/* Kitefish site styles.
   Brand: "Sticker Pop" — sunshine, bubblegum, sky and a navy outline that
   gives every element a die-cut sticker edge. */

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

@layer reset, tokens, base, layout, components, sections, motion;

/* ---------- Reset ---------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: none; text-size-adjust: none; }
  img, svg { display: block; max-width: 100%; }
  ul, ol { list-style: none; }
  button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
  [hidden] { display: none !important; }
}

/* ---------- Tokens ---------- */
@layer tokens {
  :root {
    color-scheme: light;

    /* Brand */
    --sun: #ffd23f;
    --pink: #ff5c93;
    --sky: #3db8ff;
    --navy: #16213e;
    --white: #ffffff;

    /* Derived */
    --navy-deep: #070c1d;
    --paper: #f5f8fd;
    --ink: var(--navy);
    --ink-muted: #4d5a78;
    --on-navy: #f2f5ff;
    --on-navy-muted: #aab5d1;
    --line: color-mix(in oklch, var(--navy) 14%, transparent);
    --line-on-navy: color-mix(in oklch, var(--on-navy) 16%, transparent);
    --pink-deep: #c92467;

    /* The brand diamond, used as a mask */
    --diamond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5 20.5 12 12 22.5 3.5 12z'/%3E%3C/svg%3E");

    /* Type */
    --font-display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
    --font-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.86rem);
    --step-0: clamp(1rem, 0.97rem + 0.18vw, 1.1rem);
    --step-1: clamp(1.3rem, 1.18rem + 0.5vw, 1.6rem);
    --step-2: clamp(1.7rem, 1.4rem + 1.3vw, 2.5rem);
    --step-3: clamp(2.3rem, 1.6rem + 3.2vw, 4.2rem);

    /* Sticker system */
    --lift-c: var(--navy);
    --border: 3px solid var(--navy);
    --radius: 26px;
    --radius-sm: 16px;

    --max: 1200px;
    --header-h: 76px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  /* Re-resolve the drop shadows wherever a section changes --lift-c */
  :root, .site-header, .hero {
    --lift: 0 6px 0 var(--lift-c);
    --lift-hover: 0 9px 0 var(--lift-c);
    --lift-sm: 0 3px 0 var(--lift-c);
  }

  @supports (color: oklch(from red l c h)) {
    :root { --pink-deep: oklch(from var(--pink) calc(l - 0.15) c h); }
  }
}

/* ---------- Base ---------- */
@layer base {
  html {
    background: var(--navy);
    scroll-padding-top: calc(var(--header-h) + 12px);
  }
  body {
    min-height: 100svh;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
  }
  h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: 0.005em;
    text-wrap: balance;
  }
  p { text-wrap: pretty; }
  a { color: inherit; text-underline-offset: 0.2em; }
  /* Navy ring on light surfaces, sky ring on navy ones */
  :focus-visible { outline: 3px solid var(--focus, var(--navy)); outline-offset: 3px; border-radius: 10px; }
  .site-header, .hero, .site-footer, .skip { --focus: var(--sky); }
  .visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  ::selection { background: var(--sun); color: var(--navy); }
  .skip {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 100;
    padding: 10px 16px;
    border: var(--border);
    border-radius: 12px;
    background: var(--sun);
    color: var(--navy);
    font-weight: 800;
    &:focus { top: 12px; }
  }
}

/* ---------- Layout ---------- */
@layer layout {
  .wrap {
    width: 100%;
    max-width: calc(var(--max) + 80px);
    margin-inline: auto;
    padding-left: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left, 0px));
    padding-right: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right, 0px));
  }
  .section { padding-block: clamp(72px, 10vw, 136px); }
  .section-head {
    display: grid;
    justify-items: start;
    gap: 16px;
    max-width: 780px;
    margin-bottom: clamp(36px, 5vw, 60px);
    & h2 { font-size: var(--step-3); }
    & p { color: var(--ink-muted); font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); max-width: 56ch; }
  }
}

/* ---------- Components ---------- */
@layer components {
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: var(--step--1);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pink-deep);
    &::before {
      content: "";
      width: 14px; height: 14px;
      background: currentColor;
      -webkit-mask: var(--diamond) center / contain no-repeat;
      mask: var(--diamond) center / contain no-repeat;
    }
  }

  /* Sticker buttons: outline + solid drop that presses down */
  .btn {
    --bg: var(--white);
    --fg: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 26px;
    border: var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--fg);
    box-shadow: var(--lift);
    font-weight: 800;
    font-size: 1.02rem;
    text-decoration: none;
    white-space: nowrap;
    transition: translate 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background-color 0.2s;
    & svg { width: 20px; height: 20px; flex: none; transition: translate 0.3s var(--ease-spring); }
    &:hover { translate: 0 -3px; box-shadow: var(--lift-hover); & svg { translate: 3px 0; } }
    &:active { translate: 0 4px; box-shadow: 0 2px 0 var(--lift-c); }
  }
  .btn-sun { --bg: var(--sun); &:hover { --bg: color-mix(in oklch, var(--sun), var(--white) 25%); } }
  .btn-pink { --bg: var(--pink); --fg: var(--navy); }
  .btn-line {
    --bg: transparent;
    --fg: var(--on-navy);
    border-color: color-mix(in oklch, var(--on-navy) 55%, transparent);
    box-shadow: none;
    &:hover { --bg: var(--line-on-navy); box-shadow: none; border-color: var(--on-navy); }
    &:active { box-shadow: none; }
  }
  .btn-sm { min-height: 44px; padding-inline: 20px; font-size: 0.95rem; }

  .pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 13px;
    border: 2px solid var(--navy);
    border-radius: 999px;
    background: var(--white);
    font-weight: 800;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
    &.live {
      background: var(--sun);
      &::before {
        content: "";
        width: 8px; height: 8px;
        border-radius: 50%;
        background: var(--pink);
      }
    }
  }
  .pills { display: flex; flex-wrap: wrap; gap: 8px; }

  /* Brand lockup: app-icon tile + wordmark */
  .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.75rem;
    line-height: 1;
    & .brand-mark {
      display: grid;
      place-items: center;
      width: 46px; height: 46px;
      border: 2.5px solid var(--navy);
      border-radius: 14px;
      background: var(--sun);
      box-shadow: 0 3px 0 var(--navy-deep);
      transition: rotate 0.5s var(--ease-spring), scale 0.5s var(--ease-spring);
      & img { width: 38px; height: 38px; }
    }
    &:hover .brand-mark { rotate: -8deg; scale: 1.06; }
  }
}

/* ---------- Sections ---------- */
@layer sections {

  /* Header */
  .site-header {
    --lift-c: var(--navy-deep);
    position: sticky;
    top: 0;
    z-index: 50;
    padding-top: env(safe-area-inset-top, 0px);
    background: color-mix(in oklch, var(--navy) 86%, transparent);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border-bottom: 1px solid var(--line-on-navy);
    color: var(--on-navy);
    /* Only one element per page may carry a given transition name */
    & .brand { view-transition-name: brand; }
    & .bar {
      height: var(--header-h);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }
  }
  .progress { display: none; }
  .nav {
    display: flex;
    align-items: center;
    gap: 4px;
    & > a:not(.btn) {
      padding: 8px 15px;
      border-radius: 999px;
      font-weight: 700;
      text-decoration: none;
      color: var(--on-navy-muted);
      transition: color 0.2s, background-color 0.2s;
      &:hover { color: var(--on-navy); background: var(--line-on-navy); }
    }
    & .btn { margin-left: 10px; }
  }
  .menu-btn {
    display: none;
    place-items: center;
    width: 46px; height: 46px;
    border: 2px solid var(--line-on-navy);
    border-radius: 14px;
    color: var(--on-navy);
    & svg { width: 22px; height: 22px; }
  }
  @media (width < 760px) {
    .nav { display: none; }
    .menu-btn { display: grid; }
  }

  /* Mobile menu (popover) */
  .menu {
    position: fixed;
    inset: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 8px) max(16px, env(safe-area-inset-right, 0px)) auto auto;
    width: min(280px, calc(100vw - 32px));
    margin: 0;
    padding: 10px;
    border: var(--border);
    border-radius: 22px;
    background: var(--white);
    color: var(--navy);
    box-shadow: var(--lift);
    opacity: 0;
    translate: 0 -10px;
    scale: 0.97;
    transform-origin: top right;
    transition: opacity 0.2s, translate 0.3s var(--ease-out), scale 0.3s var(--ease-out),
      overlay 0.3s allow-discrete, display 0.3s allow-discrete;
    &:popover-open {
      display: grid;
      gap: 2px;
      opacity: 1;
      translate: 0 0;
      scale: 1;
      @starting-style { opacity: 0; translate: 0 -10px; scale: 0.97; }
    }
    & a {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 13px 14px;
      border-radius: 14px;
      font-weight: 800;
      text-decoration: none;
      &:hover { background: var(--paper); }
      & svg { width: 18px; height: 18px; }
    }
    &::backdrop { background: color-mix(in oklch, var(--navy) 40%, transparent); }
  }

  /* Hero */
  .hero {
    --lift-c: var(--navy-deep);
    position: relative;
    isolation: isolate;
    overflow: clip;
    background: var(--navy);
    color: var(--on-navy);
    padding-block: clamp(44px, 7vw, 100px) clamp(56px, 8vw, 110px);
  }
  .hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
      radial-gradient(42% 60% at 88% 18%, color-mix(in oklch, var(--sun) 20%, transparent), transparent 70%),
      radial-gradient(40% 55% at 0% 95%, color-mix(in oklch, var(--pink) 22%, transparent), transparent 70%),
      radial-gradient(35% 45% at 60% 115%, color-mix(in oklch, var(--sky) 22%, transparent), transparent 70%);
    &::before {
      content: "";
      position: absolute;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M28 21l6 7-6 7-6-7z' fill='%23fff'/%3E%3C/svg%3E");
      background-size: 56px 56px;
      opacity: 0.07;
      mask-image: radial-gradient(85% 75% at 50% 40%, #000 20%, transparent 80%);
    }
  }
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
  }
  @media (width < 900px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
  }
  .hero-copy {
    container-type: inline-size;
    display: grid;
    justify-items: start;
    gap: 26px;
    & h1 {
      font-size: clamp(2.7rem, 14cqi, 5.8rem);
      line-height: 0.98;
      /* Single column: the copy is full width, so cap by viewport height too */
      @media (width < 900px) { font-size: clamp(2.7rem, min(10cqi, 15svh), 4.5rem); }
    }
  }
  .hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    border: 1.5px solid var(--line-on-navy);
    border-radius: 999px;
    background: color-mix(in oklch, var(--navy-deep) 40%, transparent);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--on-navy);
    & img {
      width: 30px; height: 30px;
      padding: 2px;
      border-radius: 50%;
      background: var(--sun);
    }
  }
  .hl {
    color: var(--sun);
    text-decoration: underline wavy var(--pink);
    text-decoration-thickness: 0.07em;
    text-underline-offset: 0.18em;
    text-decoration-skip-ink: none;
  }
  .lede { font-size: clamp(1.08rem, 1rem + 0.45vw, 1.3rem); color: var(--on-navy-muted); max-width: 48ch; }
  .actions { display: flex; flex-wrap: wrap; gap: 14px; }
  .checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    font-weight: 700;
    & li { display: inline-flex; align-items: center; gap: 9px; }
    & svg {
      width: 22px; height: 22px;
      padding: 4px;
      border-radius: 50%;
      background: var(--sun);
      color: var(--navy);
    }
  }

  /* Hero art: the mark as a big die-cut sticker on a sunburst */
  .hero-art {
    container-type: inline-size;
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    justify-self: center;
  }
  @media (width < 900px) {
    .hero-art { max-width: 380px; }
  }
  .burst {
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    background: repeating-conic-gradient(
      color-mix(in oklch, var(--sun) 16%, transparent) 0 9deg, transparent 9deg 18deg);
    mask-image: radial-gradient(closest-side, #000 35%, transparent 100%);
  }
  .sticker-back,
  .sticker {
    position: absolute;
    inset: 17%;
    border: 3px solid var(--navy);
    border-radius: 13cqi;
  }
  .sticker-back {
    background: var(--sun);
    rotate: 9deg;
    box-shadow: 0 2cqi 0 var(--navy-deep);
  }
  .sticker {
    display: grid;
    place-items: center;
    background: var(--white);
    rotate: -5deg;
    box-shadow: 0 2cqi 0 var(--navy-deep);
    transition: rotate 0.6s var(--ease-spring), scale 0.6s var(--ease-spring);
    & img { width: 84%; }
  }
  .hero-art:hover .sticker { rotate: 2deg; scale: 1.03; }
  .confetti {
    position: absolute;
    width: var(--s);
    aspect-ratio: 1;
    border: 3px solid var(--navy);
    border-radius: 22%;
    background: var(--c);
    rotate: 45deg;
    box-shadow: 0 1cqi 0 var(--navy-deep);
  }
  .badge-free {
    position: absolute;
    top: 6%;
    left: 2%;
    display: grid;
    place-items: center;
    width: 24cqi;
    aspect-ratio: 1;
    border: 3px solid var(--navy);
    border-radius: 50%;
    background: var(--pink);
    color: var(--navy);
    box-shadow: 0 1.4cqi 0 var(--navy-deep);
    font-family: var(--font-display);
    font-size: 4.6cqi;
    line-height: 1;
    text-align: center;
    rotate: -12deg;
  }

  /* Ticker */
  .ticker {
    position: relative;
    overflow: clip;
    background: var(--sun);
    color: var(--navy);
    border-block: 3px solid var(--navy);
    & .track { display: flex; width: max-content; }
    & ul {
      display: flex;
      align-items: center;
      gap: 30px;
      padding: 16px 15px;
      font-family: var(--font-display);
      font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
      white-space: nowrap;
    }
    & li { display: flex; align-items: center; gap: 30px; }
    & li::after {
      content: "";
      width: 18px; height: 18px;
      background: var(--pink);
      -webkit-mask: var(--diamond) center / contain no-repeat;
      mask: var(--diamond) center / contain no-repeat;
    }
  }
  /* Pause control for all looping motion (WCAG 2.2.2) */
  .motion-toggle {
    position: absolute;
    inset-block: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-inline: 16px;
    border-left: 3px solid var(--navy);
    background: var(--sun);
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    & input { width: 18px; height: 18px; accent-color: var(--navy); }
    &:has(:focus-visible) { outline: 3px solid var(--navy); outline-offset: -6px; }
    @media (prefers-reduced-motion: reduce) { display: none; }
  }

  /* Games */
  .games {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: 28px;
  }
  .game {
    container: game / inline-size;
    border: var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--lift);
    transition: translate 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
    &:hover { translate: 0 -4px; box-shadow: var(--lift-hover); }
  }
  .game-body {
    display: grid;
    gap: 22px;
    padding: clamp(22px, 6cqi, 36px);
  }
  @container game (width > 520px) {
    .game-body { grid-template-columns: auto minmax(0, 1fr); gap: 28px; }
  }
  .app-icon {
    display: grid;
    place-items: center;
    width: 112px;
    aspect-ratio: 1;
    border: var(--border);
    border-radius: 28px;
    background: var(--tint, var(--sun));
    box-shadow: var(--lift-sm);
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--navy);
    & img { width: 82%; }
  }
  .game-info {
    display: grid;
    align-content: start;
    gap: 14px;
    & h3 { font-size: var(--step-2); }
    & p { color: var(--ink-muted); }
  }
  .specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px 20px;
    padding-top: 16px;
    border-top: 2px dashed var(--line);
    & dt { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
    & dd { font-weight: 800; }
  }

  /* Studio bento */
  .studio { background: var(--white); border-block: 3px solid var(--navy); }
  .bento-wrap { container-type: inline-size; }
  .bento {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
  .tile {
    --tint: var(--sun);
    position: relative;
    isolation: isolate;
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 14px;
    padding: 28px;
    border: var(--border);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--lift);
    overflow: clip;
    transition: translate 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), opacity 0.3s;
    & .ico {
      display: grid;
      place-items: center;
      width: 54px; height: 54px;
      border: var(--border);
      border-radius: 16px;
      background: var(--tint);
      box-shadow: var(--lift-sm);
      & svg {
        width: 26px; height: 26px;
        fill: none;
        stroke: var(--navy);
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
      }
    }
    & h3 { font-size: var(--step-1); align-self: end; }
    & p { color: var(--ink-muted); }
    &.wide {
      grid-column: span 2;
      background: var(--navy);
      color: var(--on-navy);
      & p { color: var(--on-navy-muted); max-width: min(40ch, 58%); }
      & h3 { font-size: var(--step-2); max-width: 16ch; }
      &::after {
        content: "";
        position: absolute;
        z-index: -1;
        right: -4%;
        bottom: -22%;
        width: 42%;
        aspect-ratio: 1;
        background: url("favicon.svg") center / contain no-repeat;
        rotate: -14deg;
        opacity: 0.9;
      }
    }
  }
  @media (hover: hover) {
    .bento:has(.tile:hover) .tile:not(:hover) { opacity: 0.62; }
    .tile:hover { translate: 0 -4px; box-shadow: var(--lift-hover); }
  }
  @container (width < 860px) {
    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @container (width < 560px) {
    .bento { grid-template-columns: minmax(0, 1fr); }
    .tile.wide { grid-column: auto; & p { max-width: 40ch; } &::after { opacity: 0.25; width: 60%; } }
  }

  /* Contact */
  .contact {
    position: relative;
    overflow: clip;
    background: var(--sun);
  }
  .contact-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
  }
  @media (width < 860px) {
    .contact-inner { grid-template-columns: minmax(0, 1fr); }
    .contact-art { display: none; }
  }
  .contact-copy {
    display: grid;
    justify-items: start;
    gap: 22px;
    & .eyebrow { color: var(--navy); }
    & h2 { font-size: clamp(2.8rem, 1.6rem + 5.4vw, 5.8rem); }
    & p:not(.eyebrow) { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); max-width: 46ch; }
  }
  .email-card {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    max-width: 100%;
    padding: 10px 10px 10px 26px;
    border: var(--border);
    border-radius: 32px;
    background: var(--white);
    box-shadow: var(--lift);
  }
  .email {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 0.9rem + 2.2vw, 2.3rem);
    line-height: 1.2;
    padding-block: 8px;
    text-decoration: none;
    overflow-wrap: anywhere;
    &:hover { color: var(--pink-deep); }
  }
  .contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 22px;
    font-weight: 800;
    & a { display: inline-flex; align-items: center; min-height: 44px; }
  }
  .contact-art {
    position: relative;
    justify-self: center;
    width: min(340px, 100%);
    aspect-ratio: 1;
    & .sticker { inset: 8%; border-radius: 40px; box-shadow: 0 10px 0 var(--navy); rotate: 7deg; }
    &:hover .sticker { rotate: -4deg; scale: 1.04; }
  }

  /* Footer */
  .site-footer {
    background: var(--navy);
    color: var(--on-navy-muted);
    padding-block: 56px calc(36px + env(safe-area-inset-bottom, 0px));
    & .brand { color: var(--on-navy); }
  }
  .footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
  }
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 26px;
    font-weight: 700;
    & a {
      display: inline-flex;
      align-items: center;
      min-height: 44px;
      text-decoration: none;
      &:hover { color: var(--on-navy); }
    }
  }
  .fine {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 20px;
    padding-top: 24px;
    border-top: 1px solid var(--line-on-navy);
    font-size: 0.88rem;
  }
  @media (width < 640px) {
    .footer-grid { grid-template-columns: minmax(0, 1fr); }
  }

  /* Privacy and other long-form pages */
  .doc { padding-block: clamp(48px, 8vw, 96px); }
  .prose {
    max-width: 76ch;
    display: grid;
    gap: 16px;
    padding: clamp(24px, 5vw, 56px);
    border: var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--lift);
    & h1 { font-size: var(--step-3); }
    & h2 { font-size: var(--step-1); margin-top: 18px; }
    & p:not(.eyebrow), & li { color: var(--ink-muted); }
    & ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 6px; }
    & a { color: var(--pink-deep); font-weight: 700; }
    & .updated { font-weight: 700; }
  }
}

/* ---------- Motion ---------- */
@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }

    .rise { animation: rise 0.9s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
    @keyframes rise { from { opacity: 0; translate: 0 26px; } }

    .pill.live::before { animation: pulse 1.8s infinite; }
    @keyframes pulse {
      0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--pink) 70%, transparent); }
      70%, 100% { box-shadow: 0 0 0 8px transparent; }
    }

    /* Hero art: slow sunburst, the sticker lands, confetti floats */
    .burst { animation: spin 60s linear infinite; }
    @keyframes spin { to { rotate: 360deg; } }
    .hero-art .sticker { animation: land 0.9s var(--ease-spring) 0.25s backwards; }
    @keyframes land { from { opacity: 0; scale: 0.6; rotate: -30deg; } }
    .confetti { animation: float var(--d, 6s) ease-in-out infinite alternate; }
    @keyframes float { to { translate: 0 -3cqi; rotate: 60deg; } }
    .badge-free { animation: wobble 5s ease-in-out infinite; }
    @keyframes wobble { 50% { rotate: -4deg; scale: 1.05; } }

    .ticker .track { animation: marquee 32s linear infinite; }
    .ticker:hover .track { animation-play-state: paused; }
    @keyframes marquee { to { translate: -25% 0; } }

    /* The pause checkbox stops every looping animation, no JavaScript needed */
    :root:has(#pause-motion:checked) :is(.ticker .track, .burst, .confetti, .badge-free),
    :root:has(#pause-motion:checked) .pill.live::before { animation-play-state: paused; }

    @supports (animation-timeline: scroll()) {
      /* The hero art drifts away as you scroll */
      .hero-art { animation: drift-out linear both; animation-timeline: scroll(root); animation-range: 0 80vh; }
      @keyframes drift-out { to { translate: 0 12%; rotate: 6deg; scale: 0.92; } }

      /* Reading progress under the header */
      .progress {
        display: block;
        position: absolute;
        left: 0; right: 0; bottom: -1px;
        height: 3px;
        background: linear-gradient(90deg, var(--sun), var(--pink), var(--sky));
        transform-origin: 0 50%;
        animation: progress linear both;
        animation-timeline: scroll(root);
      }
      @keyframes progress { from { scale: 0 1; } }

      /* Sections slide up as they enter the viewport */
      .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
      @keyframes reveal { from { opacity: 0; translate: 0 56px; } }
    }
  }
}
