/* The "zazi" theme of the linktree (violet accent), copied from
   apps/linktree/web/src/themes/tokens.ts and themes.css. The colors are read by
   contrast_test.go: keep them as #rrggbb or rgb(r g b / a). url() references to
   other assets are rewritten to their fingerprinted names at startup. */

@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("geist.19f9c92546.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg-0: #f7f6f3;
  --bg-1: #e9e1f0;
  --text: #18181b;
  --muted: #52525b;
  --card: rgb(255 255 255 / 0.78);
  --card-hover: rgb(243 243 244 / 0.78);
  --border: rgb(24 24 27 / 0.08);
  --accent: #6d28d9;
  --accent-text: #6d28d9;
  --banner-from: #c4b5fd;
  --banner-to: #a5f3fc;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px -12px rgb(0 0 0 / 0.12);
  --shadow-hover: 0 1px 2px rgb(0 0 0 / 0.05), 0 14px 32px -14px rgb(0 0 0 / 0.22);
  --grain: 0.14;
  --radius: 1.1rem;
  --font: "Geist Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg-0: #0c0c10;
    --bg-1: #1f1b2c;
    --text: #fafafa;
    --muted: #bcbcc4;
    --card: rgb(255 255 255 / 0.06);
    --card-hover: rgb(255 255 255 / 0.12);
    --border: rgb(255 255 255 / 0.09);
    --accent: #a78bfa;
    /* Lighter than the accent: AA on a hovered card. */
    --accent-text: #c4b5fd;
    --banner-from: #4c1d95;
    --banner-to: #155e75;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.2), 0 8px 24px -12px rgb(0 0 0 / 0.5);
    --shadow-hover: 0 1px 2px rgb(0 0 0 / 0.25), 0 14px 32px -14px rgb(0 0 0 / 0.7);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg-0);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Static background: the theme gradient, then the grain. The animated background
   (web/, F22–F24) is a canvas added inside .backdrop, between the two. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-1) 0%, var(--bg-0) 70%);
  pointer-events: none;
}

/* Added by the bootstrap script. Its opacity (per background and mode, in
   web/src/backgrounds.json) is set in JavaScript once it runs: the fade-in is this
   transition. */
.backdrop canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease-out;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("grain.eef0befe20.svg");
  opacity: var(--grain);
  mix-blend-mode: overlay;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}

.banner {
  margin: 0 0 2rem;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* No banner: the gradient stands in, at a reduced height. */
.banner-none {
  aspect-ratio: auto;
  height: 4.5rem;
  background: linear-gradient(120deg, var(--banner-from), var(--accent) 55%, var(--banner-to));
  opacity: 0.85;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.intro {
  margin-top: 0.75rem;
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}

.intro p {
  margin: 0 0 0.75rem;
}

.services-title {
  margin: 2.5rem 0 1rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.25rem 0.875rem;
  align-items: start;
  height: 100%;
  padding: 1rem 1.125rem;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition:
    background-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.card:hover,
.card:focus-visible {
  background: var(--card-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-icon {
  grid-row: span 3;
  width: 2.75rem;
  height: 2.75rem;
}

.card-name {
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.card-description {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.card-domain {
  margin-top: 0.25rem;
  color: var(--accent-text);
  font-size: 0.8125rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.back {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent-text);
  font-weight: 600;
}

.back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

@media (max-width: 639.98px) {
  .page {
    padding: 1.5rem 1rem 2.5rem;
  }
  .banner {
    aspect-ratio: 2 / 1;
  }
  .banner-none {
    aspect-ratio: auto;
    height: 3.5rem;
  }
  .services {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
  .card:hover,
  .card:focus-visible {
    transform: none;
  }
}
