/*
 * HerdHawk marketing site.
 * Brand tokens mirror the app (src/styles/index.css): leather browns, a rust-to-copper
 * sunset, turquoise edges, brass actions, rust warnings, hexagons instead of circles.
 * No build step: plain modern CSS (layers, nesting, container queries, :has(),
 * scroll-driven animations, view transitions) with graceful fallbacks.
 */
@layer reset, tokens, base, layout, components, sections, motion, utilities;

/* ---------- Fonts (self-hosted, SIL OFL; see assets/fonts/OFL-*.txt) ---------- */
@font-face { font-family: 'Lato'; font-weight: 400; font-display: swap; src: url('../fonts/lato-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-weight: 700; font-display: swap; src: url('../fonts/lato-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-weight: 900; font-display: swap; src: url('../fonts/lato-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('../fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('../fonts/nunito-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 900; font-display: swap; src: url('../fonts/nunito-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-display: swap; src: url('../fonts/barlow-semi-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 700; font-display: swap; src: url('../fonts/barlow-semi-condensed-latin-700-normal.woff2') format('woff2'); }

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

@layer tokens {
  :root {
    color-scheme: dark;
    interpolate-size: allow-keywords;

    --font-sans: 'Lato', ui-sans-serif, system-ui, sans-serif;
    --font-heading: 'Nunito', 'Lato', ui-sans-serif, system-ui, sans-serif;
    --font-display: 'Barlow Semi Condensed', 'Nunito', ui-sans-serif, sans-serif;

    --leather-50: #f7f1ea; --leather-100: #ebdfd1; --leather-200: #d4bfa7; --leather-300: #b69676;
    --leather-400: #8f6c4f; --leather-500: #6b4e39; --leather-600: #4f3a2c; --leather-700: #3b2c22;
    --leather-800: #2d221b; --leather-900: #1e1611; --leather-950: #140e0b;
    --turquoise-200: #a9ebe1; --turquoise-300: #6fd8c8; --turquoise-400: #3fc2ae; --turquoise-500: #2fa595; --turquoise-700: #1d6a62;
    --forest-300: #8fd6a2; --forest-400: #5fb57a; --forest-500: #3f9a5c; --forest-600: #2f8a4f; --forest-700: #236b3c; --forest-800: #1a512d;
    --sand-50: #fbf9f4; --sand-100: #f4efe6; --sand-200: #e9e1d3;
    --wheat-100: #f9ebc8; --wheat-200: #f2d592; --wheat-300: #ecbb55; --wheat-400: #e09f3c; --wheat-500: #c9852a; --wheat-700: #7c5018;
    --clay-200: #f2c0ad; --clay-300: #f2967c; --clay-400: #d4643f; --clay-500: #b8432a; --clay-600: #943521; --clay-700: #6e2819;

    --canvas: var(--leather-900);
    --canvas-deep: var(--leather-950);
    --surface: var(--leather-800);
    --surface-raised: var(--leather-700);
    --tint: rgb(255 255 255 / 0.06);
    --ink: #fff;
    --ink-muted: rgb(255 255 255 / 0.68);
    --ink-subtle: rgb(255 255 255 / 0.46);
    --line: rgb(255 255 255 / 0.1);
    --line-strong: rgb(255 255 255 / 0.2);
    --edge: var(--turquoise-500);
    --primary: var(--wheat-400);
    --primary-hover: var(--wheat-300);
    --primary-ink: var(--leather-950);
    --good: var(--forest-300);
    --warn: var(--wheat-300);
    --bad: var(--clay-300);

    --sunset: linear-gradient(165deg, #6e2a19 0%, #a3472a 32%, #c96f3a 62%, #dc9a52 100%);
    --sunset-wide: linear-gradient(100deg, #6e2a19 0%, #a3472a 30%, #c96f3a 65%, #dc9a52 100%);
    --brass: linear-gradient(180deg, var(--wheat-300), var(--wheat-500));

    --radius-item: 0.3125rem;
    --radius-control: 0.5rem;
    --radius-card: 1.25rem;
    --shadow-card: 0 10px 20px rgb(0 0 0 / 0.45);
    --shadow-raised: 0 24px 60px rgb(0 0 0 / 0.55);

    --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --maxw: 75rem;
    --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  }
}

@layer base {
  html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
  body {
    min-height: 100dvh;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
  }
  h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
  p, li { text-wrap: pretty; }
  ::selection { background: var(--wheat-300); color: var(--leather-950); }
  :focus-visible { outline: 3px solid var(--turquoise-400); outline-offset: 3px; border-radius: 4px; }
  a { text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 0.18em; }
}

@layer layout {
  .wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
  .section { padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; }
  .section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
  .section-head.center { margin-inline: auto; text-align: center; }
  .eyebrow {
    display: inline-flex; align-items: center; gap: 0.55rem;
    font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--turquoise-300);
    margin-bottom: 0.9rem;
    &::before { content: ''; width: 0.7rem; height: 0.8rem; background: currentColor; clip-path: var(--hex); }
  }
  .h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 900; }
  .lede { margin-top: 1rem; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-muted); }
}

@layer components {
  /* Skip link */
  .skip {
    position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: 0.7rem 1rem;
    background: var(--wheat-300); color: var(--leather-950); font-weight: 700; border-radius: var(--radius-control);
    &:focus { top: 1rem; }
  }

  /* Brand */
  .brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; }
  .brand img { width: 2.25rem; height: 2.25rem; }
  .brand span { font-family: var(--font-heading); font-weight: 900; font-size: 1.3rem; letter-spacing: -0.01em; }

  /* Buttons */
  .btn {
    --_h: 3rem;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
    min-height: var(--_h); padding: 0 1.35rem; border-radius: var(--radius-control);
    font-family: var(--font-heading); font-weight: 800; font-size: 1rem; text-decoration: none; white-space: nowrap;
    transition: transform 0.2s var(--ease-out-soft), background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
    &:active { transform: translateY(1px) scale(0.99); }
    & svg { width: 1.15em; height: 1.15em; flex: none; }
  }
  .btn-lg { --_h: 3.5rem; font-size: 1.08rem; padding-inline: 1.7rem; }
  .btn-primary {
    background: var(--brass); color: var(--primary-ink);
    box-shadow: 0 1px 0 rgb(255 255 255 / 0.35) inset, 0 10px 24px rgb(224 159 60 / 0.25);
    &:hover { box-shadow: 0 1px 0 rgb(255 255 255 / 0.45) inset, 0 14px 32px rgb(224 159 60 / 0.38); transform: translateY(-1px); }
  }
  .btn-ghost {
    border: 1px solid var(--line-strong); color: var(--ink); background: rgb(255 255 255 / 0.03);
    &:hover { border-color: var(--turquoise-400); background: rgb(63 194 174 / 0.08); }
  }
  .price-tag {
    font-family: var(--font-display); font-weight: 700; font-size: 1.05em;
    padding: 0.1rem 0.5rem; border-radius: 0.3rem; background: rgb(20 14 11 / 0.18);
  }

  /* Card: leather surface, thin turquoise edge (as in the app) */
  .card {
    position: relative; background: linear-gradient(180deg, rgb(255 255 255 / 0.035), transparent 40%), var(--surface);
    border: 1px solid rgb(47 165 149 / 0.45); border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
  }

  .hexdot { width: 0.75rem; height: 0.85rem; clip-path: var(--hex); background: currentColor; flex: none; display: inline-block; }

  .pill {
    display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.75rem;
    border-radius: 99px; border: 1px solid var(--line-strong); background: rgb(255 255 255 / 0.04);
    font-size: 0.85rem; font-weight: 700; color: var(--ink-muted);
  }

  .tick-list { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
  .tick-list li { display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.6rem; align-items: start; color: var(--ink-muted); }
  .tick-list li::before {
    content: ''; width: 1.1rem; height: 1.25rem; margin-top: 0.2rem; clip-path: var(--hex);
    background: var(--turquoise-400) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23140e0b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat;
  }
  .tick-list strong { color: var(--ink); }

  /* Status words used across mocks */
  .s-good { color: var(--good); }
  .s-bad { color: var(--bad); }
  .s-warn { color: var(--warn); }
}

/* ======================================================================
   Sections
   ====================================================================== */
@layer sections {

  /* ---------- Header ---------- */
  .site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgb(30 22 17 / 0.72);
    backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, background-color 0.3s;
    &.is-scrolled { border-bottom-color: var(--line); background: rgb(30 22 17 / 0.88); }
  }
  .nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
  .nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; padding: 0; }
  .nav-links a {
    display: block; padding: 0.5rem 0.8rem; border-radius: var(--radius-control);
    text-decoration: none; font-weight: 700; font-size: 0.95rem; color: var(--ink-muted);
    &:hover, &[aria-current='true'] { color: var(--ink); background: var(--tint); }
  }
  .nav-cta { display: flex; align-items: center; gap: 0.5rem; }
  .nav-cta .btn { --_h: 2.6rem; padding-inline: 1rem; font-size: 0.95rem; }
  .menu-btn {
    display: none; width: 2.75rem; height: 2.75rem; border-radius: var(--radius-control);
    border: 1px solid var(--line-strong); place-items: center;
    & svg { width: 1.3rem; height: 1.3rem; }
  }
  .mobile-menu {
    inset: 4.25rem 0 auto 0; margin: 0; width: 100%; max-width: none; border: 0;
    padding: 1rem var(--gutter) 1.5rem; background: rgb(30 22 17 / 0.97);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); color: var(--ink);
    opacity: 0; translate: 0 -0.5rem;
    transition: opacity 0.25s, translate 0.25s var(--ease-out-soft), display 0.25s allow-discrete, overlay 0.25s allow-discrete;
    &:popover-open { opacity: 1; translate: 0 0; }
    & ul { list-style: none; padding: 0; display: grid; gap: 0.25rem; }
    & a:not(.btn) { display: block; padding: 0.85rem 0.5rem; font-weight: 800; font-family: var(--font-heading); font-size: 1.15rem; text-decoration: none; border-bottom: 1px solid var(--line); }
    & .btn { width: 100%; margin-top: 1rem; }
  }
  @starting-style { .mobile-menu:popover-open { opacity: 0; translate: 0 -0.5rem; } }
  @media (max-width: 960px) {
    .nav-links, .nav-cta .btn-ghost { display: none; }
    .menu-btn { display: grid; }
  }
  @media (max-width: 420px) { .nav-cta .btn-primary .price-tag { display: none; } }

  /* ---------- Hero ---------- */
  .hero { position: relative; isolation: isolate; padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 6rem); overflow: clip; }
  .hero-bg {
    position: absolute; inset: 0; z-index: -2;
    background:
      radial-gradient(60rem 30rem at 85% 8%, rgb(220 154 82 / 0.22), transparent 60%),
      radial-gradient(40rem 26rem at 5% 30%, rgb(63 194 174 / 0.08), transparent 60%),
      linear-gradient(180deg, #2a1810 0%, var(--canvas) 70%);
  }
  .hero-range {
    position: absolute; inset: auto 0 0 0; height: min(42vw, 26rem); z-index: -1;
    background: url('../img/range-sunset.svg') center bottom / cover no-repeat;
    opacity: 0.55;
    mask-image: linear-gradient(180deg, transparent 0%, #000 45%, #000 70%, transparent 100%);
  }
  .hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
  .hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); font-weight: 900; letter-spacing: -0.035em; }
  .hero h1 em {
    font-style: normal; background: linear-gradient(95deg, var(--wheat-200), var(--wheat-400) 45%, var(--clay-300));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .hero .lede { max-width: 36rem; margin-top: 1.4rem; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
  .hero-proof { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 2rem; padding: 0; list-style: none; }
  .hero-proof li { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.95rem; color: var(--ink-muted); }
  .hero-proof .hexdot { color: var(--turquoise-400); width: 0.6rem; height: 0.7rem; }
  .hero-visual { position: relative; display: grid; place-items: center; }
  .hero-visual .float-card {
    position: absolute; z-index: 2; padding: 0.8rem 1rem; font-size: 0.85rem; line-height: 1.35;
    display: flex; gap: 0.7rem; align-items: center; max-width: 15rem;
    & b { display: block; font-family: var(--font-heading); font-size: 0.95rem; }
    & span { color: var(--ink-muted); }
    & .icon { width: 2.2rem; height: 2.5rem; clip-path: var(--hex); display: grid; place-items: center; flex: none; }
    & .icon svg { width: 1.1rem; height: 1.1rem; }
  }
  .hero-visual { justify-items: end; }
  .hero-visual .float-card { max-width: 12.5rem; }
  .float-a { left: -3.5rem; top: 10%; }
  .float-a .icon { background: var(--forest-600); }
  .float-b { left: -4rem; bottom: 14%; }
  .float-b .icon { background: var(--wheat-400); color: var(--leather-950); }
  @media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-copy { text-align: center; }
    .hero .lede { margin-inline: auto; }
    .hero-actions, .hero-proof { justify-content: center; }
    .hero-visual { justify-items: center; }
  }
  @media (max-width: 1300px) { .hero-visual .float-card { display: none; } }
  @media (max-width: 520px) { .hero-actions .btn { flex: 1 1 100%; } .hero .eyebrow::before { display: none; } }

  /* ---------- Phone frame ---------- */
  .phone {
    --pw: min(21.5rem, 100%);
    width: var(--pw); border-radius: 2.6rem; padding: 0.6rem;
    background: linear-gradient(160deg, #4a382b, #1a120d 55%, #3b2c22);
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 40px 80px rgb(0 0 0 / 0.6), 0 0 0 0.35rem rgb(0 0 0 / 0.25);
    position: relative;
    &::before { content: ''; position: absolute; top: 1.05rem; left: 50%; translate: -50% 0; width: 5.5rem; height: 1.35rem; border-radius: 99px; background: #0b0806; z-index: 3; }
  }
  .phone-screen { border-radius: 2.1rem; overflow: hidden; background: var(--canvas); position: relative; }
  .statusbar { display: flex; justify-content: space-between; padding: 0.85rem 1.6rem 0.35rem; font-size: 0.72rem; font-weight: 700; font-family: var(--font-sans); }
  .statusbar .sig { display: inline-flex; gap: 0.3rem; align-items: center; }
  .statusbar .sig i { display: inline-block; width: 3px; background: currentColor; border-radius: 1px; }
  .statusbar .sig.off i { opacity: 0.25; }

  /* ---------- Chute Mode mock (shared by hero and demo) ---------- */
  .chute {
    --c-bg: var(--leather-900); --c-panel: var(--leather-800); --c-ink: #fff; --c-muted: rgb(255 255 255 / 0.66);
    --c-line: rgb(255 255 255 / 0.12); --c-key: var(--leather-700); --c-key-ink: #fff;
    --c-preg: linear-gradient(160deg, var(--forest-500), var(--forest-700)); --c-open: linear-gradient(160deg, var(--clay-400), var(--clay-600)); --c-recheck: linear-gradient(160deg, var(--wheat-300), var(--wheat-500));
    --c-recheck-ink: var(--leather-950);
    background: var(--c-bg); color: var(--c-ink); font-family: var(--font-sans);
    display: grid; gap: 0.55rem; padding: 0 0.7rem 0.8rem;
    transition: background-color 0.3s, color 0.3s;
  }
  .chute[data-theme='sun'] {
    --c-bg: #fff; --c-panel: #fff; --c-ink: #000; --c-muted: #222; --c-line: #000; --c-key: #fff; --c-key-ink: #000;
    --c-preg: #0b6b2e; --c-open: #a8231a; --c-recheck: #ffd23f; --c-recheck-ink: #000;
  }
  .chute-banner {
    background: var(--sunset-wide); border-radius: 0.85rem; padding: 0.6rem 0.75rem;
    display: grid; justify-items: start; gap: 0.4rem; color: #fff;
    & b { font-family: var(--font-heading); font-size: 0.92rem; display: block; line-height: 1.2; }
    & small { font-size: 0.7rem; opacity: 0.9; }
  }
  .chute[data-theme='sun'] .chute-banner { background: #fff; color: #000; border: 2px solid #000; }
  .sync-pill {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.5rem; border-radius: 99px;
    background: rgb(20 14 11 / 0.45); font-size: 0.66rem; font-weight: 700; white-space: nowrap;
    & .dot { width: 0.45rem; height: 0.5rem; clip-path: var(--hex); background: var(--wheat-300); }
    &[data-state='synced'] .dot { background: var(--forest-300); }
    &[data-state='syncing'] .dot { background: var(--turquoise-300); animation: pulse 0.8s ease-in-out infinite alternate; }
  }
  .chute[data-theme='sun'] .sync-pill { background: #000; color: #fff; }
  .score { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: center; }
  .score-hex {
    width: 4.6rem; height: 5.2rem; clip-path: var(--hex); display: grid; place-content: center; text-align: center;
    background: linear-gradient(180deg, var(--turquoise-400), var(--turquoise-700));
    & small { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
    & strong { font-family: var(--font-display); font-size: 1.55rem; line-height: 1; }
  }
  .chute[data-theme='sun'] .score-hex { background: #000; color: #fff; }
  .score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.3rem; }
  .score-grid div {
    background: var(--c-panel); border: 1px solid var(--c-line); border-radius: 0.5rem; padding: 0.3rem 0.2rem; text-align: center;
    & strong { display: block; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.05; }
    & small { font-size: 0.58rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-muted); }
  }
  .colors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.25rem; }
  .color-chip {
    display: grid; justify-items: center; gap: 0.2rem; padding: 0.35rem 0.1rem 0.3rem; border-radius: 0.4rem;
    border: 1px solid var(--c-line); background: var(--c-panel); font-size: 0.62rem; font-weight: 800; white-space: nowrap; color: var(--c-ink);
    & i { width: 0.65rem; height: 0.75rem; clip-path: var(--hex); background: var(--chip); outline: 1px solid #000; }
    &[aria-pressed='true'] { border-color: var(--turquoise-400); box-shadow: 0 0 0 2px var(--turquoise-400) inset; }
  }
  .chute[data-theme='sun'] .color-chip[aria-pressed='true'] { background: #000; color: #fff; box-shadow: none; }
  .tagcard {
    background: var(--c-panel); border: 1px solid var(--c-line); border-radius: 0.75rem; padding: 0.5rem 0.7rem;
    clip-path: polygon(0 0, calc(100% - 0.9rem) 0, 100% 0.9rem, 100% 100%, 0.9rem 100%, 0 calc(100% - 0.9rem));
    min-height: 5.1rem;
  }
  .tagcard-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
  .tag-label { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-muted); display: flex; align-items: center; gap: 0.35rem; }
  .tag-label i { width: 0.6rem; height: 0.7rem; clip-path: var(--hex); background: var(--chip, transparent); outline: 1px solid var(--c-line); }
  .tag-value { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; line-height: 1; min-height: 2.2rem; letter-spacing: 0.02em; }
  .tag-value .caret { display: inline-block; width: 2px; height: 1.8rem; background: var(--turquoise-400); vertical-align: -0.2rem; margin-left: 2px; animation: blink 1s steps(1) infinite; }
  .tag-value .ph { color: var(--c-muted); opacity: 0.6; }
  .tag-id { font-size: 0.72rem; color: var(--c-muted); line-height: 1.35; min-height: 1.95em; }
  .tag-id b { color: var(--c-ink); }
  .tag-id .warn { color: var(--wheat-300); font-weight: 700; }
  .chute[data-theme='sun'] .tag-id .warn { color: #000; text-decoration: underline; }
  .keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.3rem; }
  .key {
    height: 2.55rem; display: grid; place-items: center; position: relative; color: var(--c-key-ink);
    font-family: var(--font-display); font-weight: 700; font-size: 1.3rem;
    &::before {
      content: ''; position: absolute; inset: 0; z-index: 0; background: var(--c-key); border: 1px solid var(--c-line);
      clip-path: polygon(0.8rem 0, calc(100% - 0.8rem) 0, 100% 50%, calc(100% - 0.8rem) 100%, 0.8rem 100%, 0 50%);
      transition: background-color 0.15s;
    }
    & span { position: relative; z-index: 1; }
    &:hover::before { background: color-mix(in srgb, var(--c-key) 80%, var(--turquoise-400)); }
    &.is-pressed::before, &:active::before { background: var(--turquoise-500); }
    & svg { width: 1.2rem; height: 1.2rem; position: relative; z-index: 1; }
  }
  .chute[data-theme='sun'] .key::before { background: #000; border: 0; }
  .chute[data-theme='sun'] .key::after {
    content: ''; position: absolute; inset: 2px; z-index: 0; background: #fff;
    clip-path: polygon(0.75rem 0, calc(100% - 0.75rem) 0, 100% 50%, calc(100% - 0.75rem) 100%, 0.75rem 100%, 0 50%);
  }
  .chute[data-theme='sun'] .key.is-pressed::after, .chute[data-theme='sun'] .key:active::after { background: #000; }
  .chute[data-theme='sun'] .key.is-pressed { color: #fff; }
  .results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
  .result {
    min-height: 3.3rem; border-radius: 0.6rem; color: #fff; display: grid; place-items: center; gap: 0.1rem; padding: 0.35rem;
    font-family: var(--font-heading); font-weight: 900; font-size: 0.86rem; box-shadow: 0 6px 14px rgb(0 0 0 / 0.3);
    transition: transform 0.15s, filter 0.15s, opacity 0.2s;
    & svg { width: 1.1rem; height: 1.1rem; }
    &:disabled { opacity: 0.38; cursor: not-allowed; box-shadow: none; }
    &:not(:disabled):hover { filter: brightness(1.08); }
    &.is-pressed { transform: scale(0.95); filter: brightness(1.2); }
  }
  .result.preg { background: var(--c-preg); }
  .result.open { background: var(--c-open); }
  .result.recheck { background: var(--c-recheck); color: var(--c-recheck-ink); }
  .chute[data-theme='sun'] .result { box-shadow: none; border: 2px solid #000; }
  .chute-toast {
    min-height: 2.35rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    padding: 0.4rem 0.6rem; border-radius: 0.55rem; font-size: 0.74rem; line-height: 1.3;
    background: var(--c-panel); border: 1px dashed var(--c-line); color: var(--c-muted);
    &[data-kind='saved'] { border-style: solid; border-color: var(--forest-400); color: var(--c-ink); }
    &[data-kind='blocked'] { border-style: solid; border-color: var(--wheat-400); color: var(--c-ink); }
    & button { font-weight: 900; color: var(--turquoise-300); font-size: 0.74rem; padding: 0.3rem 0.4rem; text-decoration: underline; }
  }
  .chute[data-theme='sun'] .chute-toast button { color: #000; }
  .entries { list-style: none; padding: 0; display: grid; gap: 0.25rem; font-size: 0.72rem; }
  .entries li { display: grid; grid-template-columns: 0.6rem 1fr auto; gap: 0.45rem; align-items: center; padding: 0.3rem 0.5rem; border-radius: var(--radius-item); background: var(--c-panel); border: 1px solid var(--c-line); }
  .entries li i { width: 0.6rem; height: 0.7rem; clip-path: var(--hex); background: var(--chip); outline: 1px solid #000; }
  .entries li b { font-family: var(--font-display); font-size: 0.95rem; }
  .entries .r { font-weight: 900; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; }
  .entries .r.preg { color: var(--forest-300); } .entries .r.open { color: var(--clay-300); } .entries .r.recheck { color: var(--wheat-300); }
  .chute[data-theme='sun'] .entries .r { color: #000; }
  .entries .old { text-decoration: line-through; opacity: 0.55; }

  /* ---------- Problem strip ---------- */
  .problem { padding-block: clamp(3rem, 6vw, 4.5rem); border-block: 1px solid var(--line); background: var(--canvas-deep); }
  .problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.5rem); }
  .problem-item {
    display: grid; gap: 0.5rem;
    & h3 { font-size: 1.2rem; font-weight: 800; display: flex; gap: 0.6rem; align-items: center; }
    & h3 .hexdot { color: var(--clay-300); }
    & p { color: var(--ink-muted); font-size: 1rem; }
  }
  .problem-intro { font-family: var(--font-heading); font-weight: 900; font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 2rem; max-width: 52rem; letter-spacing: -0.02em; line-height: 1.2; }
  .problem-intro span { color: var(--wheat-300); }
  @media (max-width: 760px) { .problem-grid { grid-template-columns: 1fr; } }

  /* ---------- Features bento ---------- */
  .bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
  .feature { padding: clamp(1.25rem, 2.5vw, 1.75rem); container-type: inline-size; overflow: hidden; display: flex; flex-direction: column; gap: 0.75rem; }
  .feature h3 { font-size: 1.3rem; font-weight: 900; }
  .feature p { color: var(--ink-muted); font-size: 0.98rem; }
  .feature div > h3 + p { margin-top: 0.5rem; }
  .feature .f-icon {
    width: 2.9rem; height: 3.25rem; clip-path: var(--hex); display: grid; place-items: center; background: var(--sunset); flex: none;
    & svg { width: 1.35rem; height: 1.35rem; color: #fff; }
  }
  .feature.span-3 { grid-column: span 3; } .feature.span-2 { grid-column: span 2; } .feature.span-4 { grid-column: span 4; } .feature.span-6 { grid-column: 1 / -1; }
  .feature.highlight { background: radial-gradient(30rem 18rem at 100% 0%, rgb(220 154 82 / 0.18), transparent 70%), var(--surface); }
  .feature .mini { margin-top: auto; padding-top: 0.5rem; }
  @container (min-width: 34rem) { .feature.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 1.5rem; } }
  @media (max-width: 1000px) { .feature.span-2 { grid-column: span 3; } .feature.span-4 { grid-column: span 6; } }
  @media (max-width: 680px) { .bento { grid-template-columns: 1fr; } .feature.span-2, .feature.span-3, .feature.span-4 { grid-column: auto; } }

  /* mini visuals inside feature cards */
  .mini-timeline { list-style: none; padding: 0; display: grid; gap: 0.45rem; font-size: 0.85rem; }
  .mini-timeline li { display: grid; grid-template-columns: 0.8rem 1fr auto; gap: 0.6rem; align-items: center; padding: 0.45rem 0.65rem; background: var(--tint); border-radius: var(--radius-item); }
  .mini-timeline li i { width: 0.7rem; height: 0.8rem; clip-path: var(--hex); background: var(--turquoise-400); }
  .mini-timeline .badge { font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.12rem 0.45rem; border-radius: 0.3rem; }
  .badge.est { background: rgb(236 187 85 / 0.16); color: var(--wheat-300); }
  .badge.rec { background: rgb(143 214 162 / 0.15); color: var(--forest-300); }
  .badge.conf { background: rgb(111 216 200 / 0.15); color: var(--turquoise-300); }
  .badge.sch { background: rgb(242 150 124 / 0.15); color: var(--clay-300); }
  .mini-csv { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.74rem; line-height: 1.6; background: var(--canvas-deep); border: 1px solid var(--line); border-radius: 0.6rem; padding: 0.7rem 0.8rem; color: var(--ink-muted); overflow-x: auto; white-space: pre; }
  .mini-csv b { color: var(--wheat-300); font-weight: 700; }
  .mini-roles { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .mini-roles span { font-weight: 800; font-size: 0.82rem; padding: 0.35rem 0.7rem; border-radius: 0.4rem; background: var(--tint); border: 1px solid var(--line); }
  .mini-roles span:first-child { border-color: var(--wheat-400); color: var(--wheat-200); }
  .mini-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
  .mini-chips span { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 800; padding: 0.3rem 0.6rem; border-radius: 0.4rem; background: var(--tint); }
  .mini-chips i { width: 0.7rem; height: 0.8rem; clip-path: var(--hex); background: var(--chip); }
  .mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; font-family: var(--font-display); font-size: 0.8rem; text-align: center; }
  .mini-cal span { padding: 0.3rem 0; border-radius: 0.3rem; background: var(--tint); color: var(--ink-muted); }
  .mini-cal .h { background: none; font-size: 0.68rem; letter-spacing: 0.06em; color: var(--ink-subtle); }
  .mini-cal .c { background: rgb(143 214 162 / 0.2); color: var(--forest-300); font-weight: 700; }
  .mini-cal .e { background: rgb(236 187 85 / 0.18); color: var(--wheat-300); font-weight: 700; }
  .mini-cal .s { background: rgb(242 150 124 / 0.2); color: var(--clay-300); font-weight: 700; }

  /* ---------- Screens from the real app (Dark / Daylight) ---------- */
  .screens-theme { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.75rem; padding: 0; border: 0; }
  .screens-theme label {
    position: relative; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.95rem; border-radius: var(--radius-control); cursor: pointer;
    border: 1px solid var(--line-strong); font-weight: 800; font-size: 0.9rem; background: rgb(255 255 255 / 0.03);
    & svg { width: 1.05rem; height: 1.05rem; }
    & input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
    &:has(input:checked) { border-color: var(--turquoise-400); background: rgb(63 194 174 / 0.12); color: var(--turquoise-200); }
    &:has(input:focus-visible) { outline: 3px solid var(--turquoise-300); outline-offset: 2px; }
  }
  .screens-row {
    list-style: none; padding: 0 0 0.75rem; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(11.5rem, 1fr);
    gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  }
  .screens-row li { scroll-snap-align: start; }
  .screens-row figure { margin: 0; display: grid; gap: 0.6rem; }
  .screens-row img { display: block; width: 100%; height: auto; border-radius: 1.1rem; border: 1px solid var(--line-strong); box-shadow: var(--shadow-raised); background: var(--canvas-deep); }
  .screens-row figcaption { font-family: var(--font-heading); font-weight: 800; font-size: 0.92rem; color: var(--ink-muted); text-align: center; }
  .screens-row .shot-daylight { display: none; }
  .screens:has(input[value='daylight']:checked) .shot-daylight { display: block; }
  .screens:has(input[value='daylight']:checked) .shot-dark { display: none; }

  /* ---------- Chute deep-dive + interactive demo ---------- */
  .chute-section { background: radial-gradient(50rem 30rem at 0% 50%, rgb(163 71 42 / 0.18), transparent 70%), var(--canvas); }
  .demo-grid { display: grid; grid-template-columns: 1fr minmax(18rem, 23rem); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
  .demo-copy .tick-list { margin-top: 1.75rem; }
  .demo-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.75rem; }
  .toggle {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.9rem; border-radius: var(--radius-control);
    border: 1px solid var(--line-strong); font-weight: 800; font-size: 0.9rem; background: rgb(255 255 255 / 0.03);
    &[aria-pressed='true'] { border-color: var(--turquoise-400); background: rgb(63 194 174 / 0.12); color: var(--turquoise-200); }
    & svg { width: 1.05rem; height: 1.05rem; }
  }
  .kbd-hint { margin-top: 1rem; font-size: 0.88rem; color: var(--ink-subtle); }
  .kbd-hint kbd { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; padding: 0.05rem 0.4rem; border-radius: 0.3rem; border: 1px solid var(--line-strong); background: var(--tint); color: var(--ink-muted); }
  .demo-stage { display: grid; justify-items: center; gap: 0.75rem; }
  .demo-stage .caption { font-size: 0.82rem; color: var(--ink-subtle); text-align: center; }
  @media (max-width: 900px) { .demo-grid { grid-template-columns: 1fr; } }

  /* ---------- How it works ---------- */
  .steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: step; position: relative; }
  .step { padding: 1.5rem 1.35rem 1.6rem; counter-increment: step; display: grid; gap: 0.6rem; align-content: start; }
  .step::before {
    content: counter(step); width: 2.6rem; height: 2.95rem; clip-path: var(--hex); display: grid; place-items: center;
    background: var(--brass); color: var(--leather-950); font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  }
  .step h3 { font-size: 1.15rem; font-weight: 900; }
  .step p { color: var(--ink-muted); font-size: 0.96rem; }
  @media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

  /* ---------- Offline sync diagram ---------- */
  .offline { background: linear-gradient(180deg, var(--canvas) 0%, var(--canvas-deep) 100%); }
  .offline-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
  .flow { padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 0.6rem; }
  .flow-row { display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.9rem; align-items: center; padding: 0.8rem; border-radius: 0.8rem; background: var(--tint); border: 1px solid var(--line); }
  .flow-row .ic { width: 2.6rem; height: 2.95rem; clip-path: var(--hex); display: grid; place-items: center; background: var(--leather-600); }
  .flow-row .ic svg { width: 1.2rem; height: 1.2rem; }
  .flow-row b { font-family: var(--font-heading); display: block; line-height: 1.25; }
  .flow-row span { color: var(--ink-muted); font-size: 0.92rem; line-height: 1.4; display: block; }
  .flow-row.on .ic { background: var(--turquoise-500); color: var(--leather-950); }
  .flow-row.done .ic { background: var(--forest-500); }
  .flow-row.warn .ic { background: var(--wheat-400); color: var(--leather-950); }
  .flow-arrow { justify-self: start; margin-left: 1.95rem; width: 2px; height: 0.9rem; background: linear-gradient(var(--turquoise-400), transparent); }
  @media (max-width: 860px) { .offline-grid { grid-template-columns: 1fr; } }

  /* ---------- Dashboard showcase ---------- */
  .browser { border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow-raised); border: 1px solid var(--line-strong); background: var(--canvas); }
  .browser-bar { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0.9rem; background: var(--leather-950); border-bottom: 1px solid var(--line); }
  .browser-bar .dots { display: flex; gap: 0.35rem; } .browser-bar .dots i { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--leather-600); }
  .browser-bar .url { flex: 1; max-width: 22rem; margin-inline: auto; text-align: center; font-size: 0.78rem; color: var(--ink-subtle); padding: 0.25rem 0.8rem; border-radius: 99px; background: var(--tint); }
  .app { display: grid; grid-template-columns: 4.75rem 13rem 1fr; min-height: 32rem; }
  .app-rail { background: var(--sunset); display: grid; align-content: start; justify-items: center; gap: 0.9rem; padding-top: 1rem; }
  .app-rail img { width: 2.4rem; height: 2.4rem; }
  .app-rail i { width: 2.2rem; height: 2.45rem; clip-path: var(--hex); background: rgb(30 22 17 / 0.3); }
  .app-rail i.on { background: var(--wheat-300); }
  .app-menu { background: linear-gradient(rgb(30 22 17 / 0.82), rgb(30 22 17 / 0.82)), var(--sunset); padding: 1.1rem 0.9rem; display: grid; align-content: start; gap: 0.25rem; font-size: 0.86rem; }
  .app-menu b { font-family: var(--font-heading); font-size: 1rem; margin-bottom: 0.2rem; }
  .app-menu small { color: var(--ink-subtle); font-size: 0.72rem; margin-bottom: 0.8rem; }
  .app-menu span { padding: 0.45rem 0.6rem; border-radius: var(--radius-item); color: var(--ink-muted); font-weight: 700; }
  .app-menu span.on { background: rgb(255 255 255 / 0.1); color: #fff; }
  .app-menu .chute-btn { margin-top: 1rem; text-align: center; background: var(--brass); color: var(--leather-950); font-weight: 900; border-radius: var(--radius-control); padding: 0.6rem; }
  .app-main { padding: 1.25rem; display: grid; gap: 1rem; align-content: start; min-width: 0; }
  .app-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
  .app-head h3 { font-size: 1.35rem; font-weight: 900; }
  .app-head .filters { display: flex; gap: 0.4rem; flex-wrap: wrap; }
  .app-head .filters span { font-size: 0.76rem; font-weight: 800; padding: 0.35rem 0.65rem; border-radius: 0.4rem; background: var(--tint); border: 1px solid var(--line); }
  .app-head .filters span:first-child { border-color: var(--turquoise-500); color: var(--turquoise-200); }
  .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.6rem; }
  .tile { padding: 0.8rem 0.9rem; border-radius: 0.9rem; border: 1px solid rgb(47 165 149 / 0.35); background: var(--surface); }
  .tile small { display: block; font-size: 0.72rem; font-weight: 800; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
  .tile strong { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; }
  .tile em { font-style: normal; font-size: 0.74rem; color: var(--ink-subtle); display: block; }
  .app-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0.8rem; }
  .panel { padding: 1rem; border-radius: 0.9rem; border: 1px solid rgb(47 165 149 / 0.35); background: var(--surface); min-width: 0; }
  .panel h4 { font-size: 0.95rem; font-weight: 900; margin-bottom: 0.7rem; display: flex; justify-content: space-between; gap: 0.5rem; }
  .panel h4 small { font-family: var(--font-sans); font-weight: 700; color: var(--ink-subtle); font-size: 0.74rem; }
  .stack { display: flex; height: 1.6rem; border-radius: 0.4rem; overflow: hidden; }
  .stack span { display: block; height: 100%; width: var(--w); transform-origin: left; }
  .legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.7rem; font-size: 0.8rem; color: var(--ink-muted); }
  .legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
  .legend i { width: 0.6rem; height: 0.7rem; clip-path: var(--hex); background: var(--c); }
  .bars { display: grid; gap: 0.5rem; margin-top: 0.9rem; font-size: 0.8rem; }
  .bars div { display: grid; grid-template-columns: 5.5rem 1fr 3rem; gap: 0.6rem; align-items: center; }
  .bars .track { height: 0.55rem; background: var(--tint); border-radius: 99px; overflow: hidden; }
  .bars .fill { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--turquoise-500), var(--turquoise-300)); border-radius: 99px; }
  .bars b { font-family: var(--font-display); text-align: right; }
  .list { list-style: none; padding: 0; display: grid; gap: 0.35rem; font-size: 0.82rem; }
  .list li { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.45rem 0.6rem; border-radius: var(--radius-item); background: var(--tint); }
  .list li b { font-family: var(--font-display); font-size: 0.95rem; }
  .sample-note { margin-top: 0.9rem; font-size: 0.82rem; color: var(--ink-subtle); text-align: center; }
  .showcase-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
  .showcase-points div { border-top: 2px solid var(--wheat-400); padding-top: 0.9rem; }
  .showcase-points h3 { font-size: 1.1rem; font-weight: 900; margin-bottom: 0.35rem; }
  .showcase-points p { color: var(--ink-muted); font-size: 0.96rem; }
  @media (max-width: 1100px) { .app { grid-template-columns: 4.75rem 1fr; } .app-menu { display: none; } }
  @media (max-width: 760px) {
    .app { grid-template-columns: 1fr; } .app-rail { display: none; } .app-cols { grid-template-columns: 1fr; }
    .showcase-points { grid-template-columns: 1fr; }
  }

  /* ---------- Calving calculator ---------- */
  .calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
  .calc { padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 1.1rem; }
  .field { display: grid; gap: 0.4rem; }
  .field label { font-weight: 800; font-size: 0.92rem; }
  .field small { color: var(--ink-subtle); font-size: 0.82rem; }
  .field input, .field select {
    min-height: 3rem; padding: 0 0.85rem; border-radius: var(--radius-control); border: 1px solid var(--line-strong);
    background: var(--canvas-deep); font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; width: 100%;
    &:focus { outline: none; border-color: var(--turquoise-400); box-shadow: 0 0 0 3px rgb(63 194 174 / 0.25); }
  }
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .calc-out { display: grid; gap: 0.6rem; padding-top: 0.4rem; border-top: 1px solid var(--line); }
  .calc-out div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
  .calc-out span { color: var(--ink-muted); font-weight: 700; display: inline-flex; gap: 0.5rem; align-items: center; }
  .calc-out strong { font-family: var(--font-display); font-size: 1.45rem; }
  .calc-out .big strong { font-size: 2rem; color: var(--wheat-200); }
  @media (max-width: 860px) { .calc-grid { grid-template-columns: 1fr; } }
  @media (max-width: 440px) { .field-row { grid-template-columns: 1fr; } }

  /* ---------- Audience ---------- */
  .audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .aud { padding: 1.75rem 1.5rem; display: grid; gap: 0.7rem; align-content: start; }
  .aud h3 { font-size: 1.3rem; font-weight: 900; }
  .aud p { color: var(--ink-muted); }
  .aud .tag { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.82rem; color: var(--wheat-300); }
  @media (max-width: 860px) { .audience { grid-template-columns: 1fr; } }

  /* ---------- Pricing ---------- */
  .pricing { background: radial-gradient(50rem 30rem at 50% 0%, rgb(220 154 82 / 0.14), transparent 70%), var(--canvas-deep); }
  .price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.25rem, 3vw, 2rem); align-items: stretch; }
  .price-card { padding: clamp(1.5rem, 3.5vw, 2.5rem); display: grid; gap: 1.25rem; align-content: start; border-color: var(--wheat-400); }
  .price-card::before {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(140deg, var(--wheat-300), transparent 40%, transparent 60%, var(--turquoise-400));
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  }
  .price-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
  .price-top img { width: 3.5rem; height: 3.5rem; }
  .price { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
  .price strong { font-family: var(--font-display); font-size: clamp(4rem, 9vw, 5.5rem); line-height: 0.9; letter-spacing: -0.02em; }
  .price span { color: var(--ink-muted); font-weight: 700; }
  .price-card .btn { width: 100%; }
  .price-small { font-size: 0.86rem; color: var(--ink-subtle); }
  .compare { padding: clamp(1.5rem, 3.5vw, 2.5rem); display: grid; gap: 1.25rem; align-content: start; }
  .compare h3 { font-size: 1.35rem; font-weight: 900; }
  .compare output { font-family: var(--font-display); }
  .range-field { display: grid; gap: 0.5rem; }
  .range-field label { display: flex; justify-content: space-between; font-weight: 800; font-size: 0.95rem; }
  .range-field label output { color: var(--turquoise-200); font-size: 1.1rem; }
  input[type='range'] {
    appearance: none; -webkit-appearance: none; width: 100%; height: 0.5rem; border-radius: 99px; background: var(--tint); accent-color: var(--wheat-400);
    background-image: linear-gradient(90deg, var(--wheat-400), var(--wheat-300)); background-size: var(--fill, 50%) 100%; background-repeat: no-repeat;
    &::-webkit-slider-thumb { -webkit-appearance: none; width: 1.6rem; height: 1.8rem; clip-path: var(--hex); background: var(--sand-50); cursor: grab; }
    &::-moz-range-thumb { width: 1.5rem; height: 1.5rem; border: 0; border-radius: 50%; background: var(--sand-50); cursor: grab; }
  }
  .vs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .vs div { padding: 1rem; border-radius: 0.9rem; background: var(--tint); border: 1px solid var(--line); }
  .vs small { display: block; font-weight: 800; color: var(--ink-muted); font-size: 0.82rem; }
  .vs strong { font-family: var(--font-display); font-size: 2rem; line-height: 1.15; }
  .vs .them strong { color: var(--clay-300); }
  .vs .us { border-color: var(--wheat-400); }
  .vs .us strong { color: var(--wheat-200); }
  .saving { font-family: var(--font-heading); font-weight: 900; font-size: 1.15rem; }
  .saving output { color: var(--forest-300); font-size: 1.3rem; }
  .compare .price-small a { color: var(--ink-muted); }
  @media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }

  /* ---------- Trust ---------- */
  .trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
  .trust { padding: 1.4rem; display: grid; gap: 0.5rem; align-content: start; }
  .trust svg { width: 1.6rem; height: 1.6rem; color: var(--turquoise-300); }
  .trust h3 { font-size: 1.05rem; font-weight: 900; }
  .trust p { color: var(--ink-muted); font-size: 0.94rem; }
  @media (max-width: 960px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 520px) { .trust-grid { grid-template-columns: 1fr; } }

  /* ---------- FAQ ---------- */
  .faq { max-width: 50rem; margin-inline: auto; display: grid; gap: 0.6rem; }
  .faq details { border-radius: 0.9rem; background: var(--surface); border: 1px solid var(--line); transition: border-color 0.2s; }
  .faq details[open] { border-color: rgb(47 165 149 / 0.6); }
  .faq summary {
    list-style: none; cursor: pointer; padding: 1.1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    font-family: var(--font-heading); font-weight: 800; font-size: 1.08rem;
    &::-webkit-details-marker { display: none; }
    &::after { content: ''; width: 0.75rem; height: 0.75rem; flex: none; border-right: 2.5px solid var(--wheat-300); border-bottom: 2.5px solid var(--wheat-300); rotate: 45deg; translate: 0 -0.2rem; transition: rotate 0.25s var(--ease-out-soft), translate 0.25s; }
  }
  .faq details[open] summary::after { rotate: 225deg; translate: 0 0.2rem; }
  .faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.3s var(--ease-out-soft), content-visibility 0.3s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
  .faq .a { padding: 0 1.25rem 1.2rem; color: var(--ink-muted); display: grid; gap: 0.6rem; }

  /* ---------- Final CTA ---------- */
  .final { position: relative; isolation: isolate; overflow: clip; text-align: center; padding-block: clamp(5rem, 11vw, 9rem); }
  .final::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url('../img/range-sunset.svg') center 70% / cover no-repeat; }
  .final::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--canvas-deep) 0%, rgb(20 14 11 / 0.55) 35%, rgb(20 14 11 / 0.35) 70%, var(--canvas) 100%); }
  .final .brand-hex { width: 4.5rem; height: 4.5rem; margin: 0 auto 1.5rem; filter: drop-shadow(0 10px 24px rgb(0 0 0 / 0.5)); }
  .final h2 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 900; max-width: 18ch; margin-inline: auto; }
  .final p { margin: 1rem auto 0; max-width: 36rem; font-size: 1.15rem; color: rgb(255 255 255 / 0.85); }
  .final .hero-actions { justify-content: center; }

  /* ---------- Footer ---------- */
  .site-footer { border-top: 1px solid var(--line); padding-block: 3rem 2.5rem; background: var(--canvas); font-size: 0.94rem; }
  .foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; }
  .foot-grid p { color: var(--ink-muted); margin-top: 0.8rem; max-width: 22rem; }
  .foot-grid h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; color: var(--ink-subtle); margin-bottom: 0.8rem; }
  .foot-grid ul { list-style: none; padding: 0; display: grid; gap: 0.45rem; }
  .foot-grid a { color: var(--ink-muted); text-decoration: none; &:hover { color: var(--ink); text-decoration: underline; } }
  .foot-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--ink-subtle); font-size: 0.86rem; }
  @media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

  /* ---------- Sticky mobile buy bar ---------- */
  .buybar {
    position: fixed; inset: auto 0.75rem 0.75rem 0.75rem; z-index: 40; display: none; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.6rem 0.6rem 0.6rem 1rem; border-radius: 1rem; background: rgb(45 34 27 / 0.92); border: 1px solid rgb(47 165 149 / 0.5);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--shadow-raised);
    translate: 0 150%; transition: translate 0.35s var(--ease-out-soft);
    &.is-visible { translate: 0 0; }
    & b { font-family: var(--font-heading); display: block; line-height: 1.2; }
    & small { color: var(--ink-muted); font-size: 0.78rem; }
    & .btn { --_h: 2.75rem; }
  }
  @media (max-width: 760px) { .buybar { display: flex; } .site-footer { padding-bottom: 6.5rem; } }

  /* ---------- Legal pages ---------- */
  .legal { padding-block: clamp(3rem, 7vw, 5rem); }
  .legal article { max-width: 46rem; margin-inline: auto; }
  .legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 900; }
  .legal .updated { color: var(--ink-subtle); margin-top: 0.6rem; }
  .legal h2 { font-size: 1.4rem; font-weight: 900; margin-top: 2.5rem; margin-bottom: 0.6rem; }
  .legal p, .legal li { color: var(--ink-muted); }
  .legal p + p { margin-top: 0.8rem; }
  .legal ul { margin-top: 0.6rem; padding-left: 1.2rem; display: grid; gap: 0.4rem; }
  .legal strong { color: var(--ink); }
  .legal a { color: var(--turquoise-300); }
}

/* ======================================================================
   Motion
   ====================================================================== */
@layer motion {
  @keyframes blink { 50% { opacity: 0; } }
  @keyframes pulse { to { opacity: 0.35; } }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  @keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-6rem, -14rem, 0); } }
  @keyframes floaty { 50% { transform: translateY(-8px); } }
  @keyframes grow { from { transform: scaleX(0); } }

  .hero-copy > * { animation: rise 0.7s var(--ease-out-soft) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.24s; }
  .hero-visual { animation: rise 0.9s 0.15s var(--ease-out-soft) both; }
  .float-a { animation: floaty 6s ease-in-out infinite; }
  .float-b { animation: floaty 7s 1s ease-in-out infinite; }

  /* Film grain + drifting dust, as in the app (off for reduced motion) */
  .grain { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -0.35'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px; }
  .dust { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
  .dust i { position: absolute; width: var(--s, 3px); height: var(--s, 3px); border-radius: 50%; background: rgb(249 235 200 / 0.5); filter: blur(0.5px);
    left: var(--x); top: var(--y); animation: drift var(--d, 24s) linear infinite; opacity: var(--o, 0.5); }

  /* Scroll-driven reveals where supported; content is fully visible otherwise. */
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
      .stack span, .bars .fill { animation: grow linear both; animation-timeline: view(); animation-range: entry 10% cover 35%; }
      .hero-range { animation: parallax linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
      @keyframes parallax { to { transform: translateY(12%); opacity: 0.25; } }
    }
  }
  .progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 70; background: var(--sunset-wide); transform-origin: left; transform: scaleX(0); pointer-events: none; }
  @supports (animation-timeline: scroll()) {
    .progress { animation: grow-progress linear both; animation-timeline: scroll(root); }
    @keyframes grow-progress { to { transform: scaleX(1); } }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .dust { display: none; }
  }

  /* Cross-document view transitions between pages of the site */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
}

@layer utilities {
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .mt-1 { margin-top: 1rem; }
  .mt-2 { margin-top: 2rem; }
  .center { text-align: center; }
}

@media print {
  .site-header, .buybar, .grain, .dust, .progress, .hero-visual, .demo-stage { display: none !important; }
  body { background: #fff; color: #000; }
}
