/* ==========================================================================
   TrackE5 — Shared Design System
   Loaded by every page. Page-specific rules live in assets/page-*.css
   ========================================================================== */

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

:root {
    /* ----------------------------------------------------------------------
       Tokens mirror the TrackE5 Web Design System 1:1
       (source: "TrackE5 Web Design System.dc.html" body block, via DesignSync).
       Legacy variable NAMES are kept so existing rules keep working; only the
       VALUES were realigned. New semantic tokens are added below them.
       ---------------------------------------------------------------------- */

    /* Canvas / surface */
    --canvas:       #EAF0E0;
    --surface:      #FFFFFF;
    --surface-2:    #F1F7DD;
    --sunk:         #F5F8EC;

    /* Content */
    --ink:          #2C3804;
    --ink2:         #5E634B;
    --ink3:         #676A59;

    /* Accent */
    --accent:       #E1FC66;
    --on-accent:    #2C3804;
    --accent-soft:  rgba(126,154,40,.16);
    --accent-ink:   #4E5C19;

    /* Semantic */
    --pos:          #454E20;
    --neg:          #9A4229;
    --neg-fill:     #B4553A;
    --neg-soft:     rgba(180,85,58,.12);
    --warn:         #75590F;

    /* Lines / fills */
    --line:         #DCE3CD;
    --line-2:       #C6D0B4;
    --chip:         #DCE5C9;
    --track:        #D3DCBE;

    /* Chart series */
    --s1: #7E9A28;  --s2: #454E20;  --s3: #5E8A82;
    --s4: #B4553A;  --s5: #A8B87A;  --bar: #868E76;

    /* Channel triplets, so translucent variants come from the SAME source as
       the solid tokens above. Hardcoded rgba() literals are how the old palette
       survived the realignment: the variables were updated, the literals were
       not, so every page's hero glow, card border and icon tint kept painting
       the pre-realignment lime (#C8E64E), teal (#14B8A6) and olive (#2D3A2D).
       Anything needing an alpha now writes rgb(var(--accent-rgb) / 0.2) and
       cannot drift away from the token again. */
    --accent-rgb: 225 252 102;   /* --accent  #E1FC66 */
    --ink-rgb:     44  56  4;    /* --ink     #2C3804 */
    --teal-rgb:    94 138 130;   /* --s3      #5E8A82 */

    /* Dark surfaces (design-system dark theme) */
    --dark-canvas:  #0D0F09;
    --dark-surface: #16190F;
    --dark-2:       #1E2213;

    /* ---- legacy aliases, remapped onto the tokens above ---- */
    --cream:        var(--canvas);
    --white:        var(--surface);
    --olive:        var(--ink);
    --olive-light:  var(--accent-ink);
    --olive-muted:  var(--ink2);
    --olive-deep:   var(--dark-canvas);
    --text-dark:    var(--ink);
    --text-body:    var(--ink2);
    --text-muted:   var(--ink3);
    --lime:         var(--accent);
    --lime-light:   var(--surface-2);
    --lime-bg:      var(--sunk);
    --teal:         var(--s3);
    --teal-light:   #E4F0EE;
    --mint:         #E4F0EE;
    --border:       var(--line);
    --border-light: var(--surface-2);
    --error:        var(--neg);

    /* Type — Instrument Sans only; the design system specifies no serif face */
    --font-sans:  'Instrument Sans', system-ui, -apple-system, sans-serif;
    --font-mono:  ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Cinematic section rhythm — sections read as distinct chapters */
    --section-y:    clamp(6rem, 11vw, 12rem);
    --section-y-sm: clamp(4rem, 7vw, 7rem);

    /* Spacing */
    --gap-xs: 8px;
    --gap-sm: 14px;
    --gap-md: 24px;
    --gap-lg: clamp(20px, 3vw, 36px);
    --gap-xl: clamp(32px, 5vw, 64px);

    /* Radii — --r-tile / --r-card from the design system */
    --r-tile:      22px;
    --r-card:      16px;
    --radius-sm:   10px;
    --radius-md:   var(--r-card);
    --radius-lg:   var(--r-tile);
    --radius-xl:   28px;
    --radius-full: 999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(44,56,4,0.06);
    --shadow-md: 0 8px 30px rgba(44,56,4,0.09);
    --shadow-lg: 0 24px 70px rgba(44,56,4,0.14);

    /* Layout */
    --page-w: 1240px;
    --pad-x:  clamp(20px, 5vw, 56px);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* NO `scroll-behavior: smooth` here. ScrollTrigger.refresh() jumps the page to
   0 to measure and restores it; with smooth scrolling those programmatic
   scrolls animate, so every trigger gets measured mid-flight and lands with
   garbage start/end offsets. Anchor links jump instantly instead — a fair
   trade for motion that is actually correct. */
html { -webkit-text-size-adjust: 100%; }

/* Horizontal-scroll guard — off-screen motion must never create a scrollbar.
   `clip`, NOT `hidden`: overflow-x:hidden turns html/body into scroll
   containers, which corrupts ScrollTrigger's pin measurements (pinned
   sections resolved to negative start offsets and scrubbed elements sat at
   progress 1 while mid-screen). `clip` suppresses the scrollbar without
   establishing a scroll container. Verified: no page overflows anyway. */
html, body { overflow-x: clip; width: 100%; max-width: 100%; }

body {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 1.05vw, 1.0625rem);
    line-height: 1.65;
    color: var(--text-body);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.035em;
    color: var(--olive);
    text-wrap: balance;
}

/* The design system specifies Instrument Sans only — no serif face.
   Emphasis is carried by italic + colour rather than a second family. */
em, .serif {
    font-style: italic;
    font-weight: 500;
    letter-spacing: -0.012em;
    color: var(--accent-ink);
}

a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
button, input { font: inherit; color: inherit; }

::selection { background: var(--lime); color: var(--olive-deep); }

:focus-visible {
    outline: 2px solid var(--olive);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute; left: -9999px; top: 12px; z-index: 999;
    background: var(--olive); color: #fff;
    padding: 12px 22px; border-radius: var(--radius-full); font-weight: 500;
}
.skip-link:focus { left: 50%; transform: translateX(-50%); }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   FAQ — shared
   Lived in page-home.css. pricing.html reuses the same markup, but only
   loads site.css + page-pricing.css, so every FAQ rule silently missed:
   the section rendered with raw user-agent grey buttons (#EFEFEF) on a
   full-bleed band. Shared markup belongs in the shared stylesheet.
   ========================================================================== */

.faq-section { background: var(--cream); }
.faq-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}
.faq-intro { position: sticky; top: 130px; display: flex; flex-direction: column; gap: 18px; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    width: 100%;
    padding: 26px 0;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: clamp(1.02rem, 1.3vw, 1.18rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--olive);
    transition: color .25s var(--ease-out);
}
.faq-question:hover { color: var(--olive-muted); }

.faq-icon {
    position: relative;
    flex-shrink: 0;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    transition: background .3s var(--ease-out), border-color .3s var(--ease-out),
                transform .35s var(--ease-out);
}
.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 13px; height: 1.6px;
    background: var(--olive);
    transform: translate(-50%, -50%);
    transition: transform .35s var(--ease-out), background .3s var(--ease-out);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item.open .faq-icon { background: var(--olive); border-color: var(--olive); transform: rotate(180deg); }
.faq-item.open .faq-icon::before,
.faq-item.open .faq-icon::after { background: #fff; }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 240ms var(--ease-out);
}
.faq-answer-inner {
    padding-bottom: 26px;
    max-width: 62ch;
    font-size: 0.99rem;
    line-height: 1.7;
    color: var(--text-body);
}

@media (max-width: 900px) {
    .faq-grid { grid-template-columns: 1fr; }
    .faq-intro { position: static; }
}


/* ==========================================================================
   COMPARISON TABLE — shared
   Lived in page-features.css until pricing.html needed the same table.
   ========================================================================== */

.compare-wrap {
    overflow-x: auto;                 /* wide table scrolls itself, page never does */
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
}
.compare {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    text-align: left;
}
.compare th, .compare td {
    padding: 20px clamp(18px, 2.2vw, 30px);
    border-bottom: 1px solid var(--border-light);
    font-weight: 400;
    font-size: 0.97rem;
}
.compare thead th {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--olive-muted);
    background: var(--cream);
}
.compare thead th:nth-child(2) { color: var(--olive); }
.compare tbody th { font-weight: 500; color: var(--olive); }
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: none; }
.compare tbody tr { transition: background .25s var(--ease-out); }
.compare tbody tr:hover { background: var(--lime-bg); }

.compare .yes { color: var(--olive); font-weight: 450; }
.compare .yes::before {
    content: '';
    display: inline-block;
    width: 15px; height: 15px;
    margin-right: 9px;
    vertical-align: -2px;
    background: var(--olive);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}
.compare .no { color: var(--text-muted); }


/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--page-w);
    margin-inline: auto;
    padding-inline: var(--pad-x);
}

.section { padding-block: var(--section-y); }
.section--tight { padding-block: var(--section-y-sm); }

/* Transform-free full bleed.
   The previous `margin-left:50% + translateX(-50%)` put a transform on these
   sections. ScrollTrigger pins one of them (.hsection), and pinning a
   transformed element corrupts its pin-spacer math — every scrubbed trigger
   below it was offset by exactly the pin distance (-752px), so figures sat at
   progress 1 while centred on screen. Negative margins achieve the same bleed
   with no transform and no containing-block side effects. */
.full-bleed {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
}

/* Ambient grain + mesh — replaces flat colour blocks */
.ambient { position: relative; isolation: isolate; }
.ambient::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(60% 50% at 15% 0%,  rgb(var(--accent-rgb) / 0.16), transparent 70%),
        radial-gradient(50% 45% at 90% 20%, rgb(var(--teal-rgb) / 0.10), transparent 70%);
    pointer-events: none;
}

.grain::after {
    content: '';
    position: absolute; inset: 0; z-index: 1;
    pointer-events: none; opacity: 0.5; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
}

/* ==========================================================================
   NAVIGATION — floating glass pill
   ========================================================================== */

.nav {
    position: fixed;
    top: clamp(12px, 2vw, 22px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: min(calc(100% - 2 * clamp(14px, 4vw, 40px)), 1180px);
    border-radius: var(--radius-full);
    background: rgba(250,249,246,0.72);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgb(var(--ink-rgb) / 0.09);
    box-shadow: 0 2px 20px rgba(26,36,22,0.05);
    /* no `top` here — it triggers layout even on a fixed element */
    transition: background .35s var(--ease-out), box-shadow .35s var(--ease-out),
                border-color .35s var(--ease-out);
}

.nav.scrolled {
    background: rgba(250,249,246,0.9);
    box-shadow: 0 8px 34px rgba(26,36,22,0.11);
    border-color: rgb(var(--ink-rgb) / 0.14);
}

/* Over a dark hero the pill inverts so text stays legible */
.nav--on-dark:not(.scrolled) {
    background: rgba(26,36,22,0.34);
    border-color: rgba(255,255,255,0.16);
}
/* `:not(.nav-signup)` on the actions row is load-bearing, not tidiness.
   Without it that branch is `.nav--on-dark:not(.scrolled) .nav-actions > a`
   = (0,3,1), which outranks the lime-pill rule below at (0,3,0) — one extra
   element selector. The pill then took its BACKGROUND from the rule below and
   its COLOUR from this one, landing on white-on-lime at 1.15:1. Excluding the
   pill here is the fix; raising specificity below would only restart the race. */
.nav--on-dark:not(.scrolled) .nav-links a,
.nav--on-dark:not(.scrolled) .nav-actions > a:not(.nav-signup),
.nav--on-dark:not(.scrolled) .nav-logo,
.nav--on-dark:not(.scrolled) .nav-toggle { color: #fff; }
.nav--on-dark:not(.scrolled) .nav-signup { background: var(--lime); color: var(--olive-deep); }

.nav-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--gap-md);
    padding: 10px clamp(12px, 2vw, 20px);
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
    padding: 9px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 450;
    color: var(--olive);
    transition: background .25s var(--ease-out), color .25s var(--ease-out);
}
.nav-links a:hover { background: rgb(var(--ink-rgb) / 0.07); }
.nav-links a.active { background: var(--olive); color: #fff; }

.nav-logo {
    display: inline-flex; align-items: center; gap: 9px;
    justify-self: center;
    font-size: 1.06rem; font-weight: 600; letter-spacing: -0.03em;
    color: var(--olive); white-space: nowrap;
}
.nav-logo svg { width: 26px; height: 26px; flex-shrink: 0; }

.nav-actions {
    display: flex; align-items: center; justify-content: flex-end;
    gap: var(--gap-xs);
}
.nav-actions > a {
    font-size: 0.9rem; font-weight: 450; color: var(--olive);
    padding: 9px 14px; border-radius: var(--radius-full);
    transition: background .25s var(--ease-out);
}
.nav-actions > a:hover { background: rgb(var(--ink-rgb) / 0.07); }

/* Selector is scoped rather than !important-ed: an !important colour here
   outranked the .nav--on-dark override and left white text on the lime pill
   (1.41:1). Specificity (0,2,1) loses to (0,3,0) below, which is the point. */
.nav-actions > a.nav-signup {
    background: var(--olive);
    color: #fff;
    padding: 10px 22px;
    font-weight: 500;
    transition: transform .25s var(--ease-out), box-shadow .3s var(--ease-out),
                background .25s var(--ease-out);
}
.nav-actions > a.nav-signup:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgb(var(--ink-rgb) / 0.26);
    background: var(--olive-light);
}

.nav-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    padding: 8px; border-radius: var(--radius-full);
    color: var(--olive);
}
.nav-toggle svg { width: 22px; height: 22px; }

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px 14px 18px;
    border-top: 1px solid rgb(var(--ink-rgb) / 0.08);
}
.nav-mobile.open { display: flex; }
/* :not(.btn) matters — a bare `.nav-mobile a` rule outranks .btn-primary and
   painted the mobile Sign up button olive-on-olive (1:1, invisible). */
.nav-mobile a:not(.btn) {
    padding: 13px 12px;
    font-size: 1rem; font-weight: 450; color: var(--olive);
    border-radius: var(--radius-md);
}
.nav-mobile a:not(.btn):hover { background: rgb(var(--ink-rgb) / 0.06); }
.nav-mobile .btn { margin-top: 10px; justify-content: center; }

@media (max-width: 900px) {
    .nav { border-radius: var(--radius-lg); }
    .nav-inner { grid-template-columns: auto 1fr; }
    .nav-links { display: none; }
    .nav-logo { justify-self: start; }
    .nav-actions > a:not(.nav-signup) { display: none; }
    .nav-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
    .nav-signup { display: none; }
}

/* ==========================================================================
   BUTTONS — every variant contrast-checked, no invisible text
   ========================================================================== */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 16px 32px;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: 0.975rem; font-weight: 500; letter-spacing: -0.005em;
    text-align: center; cursor: pointer; white-space: nowrap;
    transition: transform .25s var(--ease-out), box-shadow .35s var(--ease-out),
                background .25s var(--ease-out), border-color .25s var(--ease-out),
                color .25s var(--ease-out);
}
.btn:active { transform: translateY(0) scale(0.985); }

/* olive #2d3a2d on white text = 12.1:1 */
.btn-primary { background: var(--olive); color: #fff; }
.btn-primary:hover {
    background: var(--olive-light);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgb(var(--ink-rgb) / 0.28);
}

/* lime #c8e64e on #1a2416 text = 13.4:1 */
.btn-lime { background: var(--lime); color: var(--olive-deep); font-weight: 550; }
.btn-lime:hover {
    background: var(--lime-light);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgb(var(--accent-rgb) / 0.45);
}

/* ghost on light backgrounds */
.btn-secondary {
    background: transparent;
    color: var(--olive);
    border-color: rgb(var(--ink-rgb) / 0.22);
}
.btn-secondary:hover {
    background: rgb(var(--ink-rgb) / 0.05);
    border-color: var(--olive);
    transform: translateY(-2px);
}

/* ghost on dark/photographic backgrounds — white text, white border */
.btn-ghost-light {
    background: rgba(255,255,255,0.06);
    color: #fff;
    border-color: rgba(255,255,255,0.36);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.btn-ghost-light:hover {
    background: rgba(255,255,255,0.16);
    border-color: #fff;
    transform: translateY(-2px);
}

.btn-sm { min-height: 44px; padding: 11px 22px; font-size: 0.875rem; }

.btn-arrow::after {
    content: '';
    width: 16px; height: 16px; flex-shrink: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") center/contain no-repeat;
    transition: transform .3s var(--ease-out);
}
.btn-arrow:hover::after { transform: translateX(4px); }

.btn-group { display: flex; flex-wrap: wrap; gap: var(--gap-sm); }

@media (max-width: 480px) {
    .btn { width: 100%; }
    .btn-group { flex-direction: column; width: 100%; }
}

/* ==========================================================================
   SECTION HEADINGS — wide containers, never a narrow text wall
   ========================================================================== */

.eyebrow {
    display: inline-block;
    font-size: 0.82rem; font-weight: 500; letter-spacing: 0.01em;
    color: var(--olive-muted);
    margin-bottom: 18px;
}

/* Measures are deliberately tight: a generous max-width lets big display type
   sit on ONE line, which reads as a banner, not a headline. 13ch/16ch keep
   display H1s at 2-3 lines and section H2s at 2 lines. Verified in browser. */
.h-display {
    font-size: clamp(3rem, 6.2vw, 5.75rem);
    max-width: 13ch;
    line-height: 1.02;
    letter-spacing: -0.042em;
}

.h-section {
    font-size: clamp(2.1rem, 4.4vw, 3.9rem);
    max-width: 16ch;
    line-height: 1.05;
    letter-spacing: -0.038em;
}

.lede {
    font-size: clamp(1.05rem, 1.35vw, 1.28rem);
    line-height: 1.6;
    color: var(--text-body);
    max-width: 56ch;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--gap-xl);
    flex-wrap: wrap;
    margin-bottom: clamp(48px, 6vw, 88px);
}

/* ==========================================================================
   INFINITE MARQUEE
   ========================================================================== */

.marquee {
    position: relative;
    overflow: hidden;
    padding-block: 22px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee-track {
    display: flex;
    width: max-content;
    gap: clamp(28px, 4vw, 60px);
    animation: marquee-scroll 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll {
    from { transform: translate3d(0,0,0); }
    to   { transform: translate3d(-50%,0,0); }
}
.marquee-item {
    display: inline-flex; align-items: center; gap: 11px;
    font-size: 0.95rem; font-weight: 450; white-space: nowrap;
    color: var(--olive-muted);
}
.marquee-item svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--olive); }

/* ==========================================================================
   FORMS — waitlist
   ========================================================================== */

.cta-form {
    display: flex; gap: 8px;
    width: 100%; max-width: 480px;
    margin-inline: auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 7px;
    transition: border-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.cta-form:focus-within {
    border-color: var(--olive);
    box-shadow: 0 0 0 4px rgb(var(--ink-rgb) / 0.09);
}
.cta-input {
    flex: 1; min-width: 0;
    padding: 13px 20px;
    background: transparent; border: none; outline: none;
    font-size: 1rem; color: var(--text-dark);
}
.cta-input::placeholder { color: var(--text-muted); }
.cta-submit {
    flex-shrink: 0;
    padding: 13px 30px;
    background: var(--olive); color: #fff;
    border: none; border-radius: var(--radius-full);
    font-size: 0.94rem; font-weight: 500; cursor: pointer;
    transition: background .25s var(--ease-out), transform .25s var(--ease-out);
}
.cta-submit:hover:not(:disabled) { background: var(--olive-light); transform: translateY(-1px); }
.cta-submit:disabled { cursor: not-allowed; }

.cta-success {
    display: none;
    max-width: 480px;
    margin: 0 auto;
    padding: 22px 28px;
    background: var(--lime-bg);
    border: 1px solid var(--lime);
    border-radius: var(--radius-md);
    text-align: center;
}
.cta-success.visible { display: block; }
.cta-success-title { font-weight: 600; color: var(--olive); margin-bottom: 4px; }
.cta-success-desc { font-size: 0.9rem; color: var(--olive-muted); }

.cta-error { color: var(--error); font-size: 0.875rem; margin-top: 10px; text-align: center; }

/* Gated until consent is given. Muted rather than ghosted: it must read as
   deliberately unavailable, not as a broken control, and the label has to stay
   legible so people can see what they are being asked to unlock. Verified at
   4.6:1 against the button fill. */
.cta-submit:disabled {
    background: var(--line-2);
    color: var(--olive);
    cursor: not-allowed;
    box-shadow: none;
}
.cta-submit:disabled:hover { background: var(--line-2); transform: none; }

/* Waitlist consent — CASL express opt-in.
   Full-size hit target and a real checkbox rather than a styled div: this is a
   legal record, so it must be operable by keyboard and assistive tech without
   any JavaScript in the path.

   Colours are the LIGHT-surface tokens. The waitlist sits on `.cta` which
   paints white — an earlier version of this rule assumed a dark band and set
   white text, which rendered the consent wording at 1:1 against its own
   background. Consent a person cannot read is not consent, so this is a
   compliance defect and not only a visual one. */
.cta-consent {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    max-width: 52ch;
    margin: 18px auto 0;
    text-align: left;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-body);
    cursor: pointer;
}
.cta-consent input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--olive);
    cursor: pointer;
}
.cta-consent strong { color: var(--olive); font-weight: 550; }
.cta-consent a {
    color: var(--accent-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cta-consent a:hover { color: var(--olive); }

.cta-note {
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 560px) {
    .cta-form { flex-direction: column; border-radius: var(--radius-lg); padding: 10px; }
    .cta-input { text-align: center; }
    .cta-submit { width: 100%; }
}

/* ==========================================================================
   CTA BAND — shared by features.html and about.html
   ========================================================================== */

.cta-band {
    position: relative;
    padding-block: clamp(90px, 12vw, 150px);
    background: radial-gradient(85% 120% at 50% 0%, #33422c, var(--olive-deep));
    text-align: center;
    overflow: hidden;
}
.cta-band-title {
    font-size: clamp(2.4rem, 5.2vw, 4.4rem);
    max-width: 15ch;
    margin: 0 auto;
    color: #fff;
    line-height: 1.04;
    letter-spacing: -0.042em;
}
.cta-band-title em { color: var(--lime); }

/* Safety net, not decoration. The band paints near-black (#0D0F09), but the
   global h1-h4 rule colours headings dark olive (#2C3804). Any heading in here
   that is not .cta-band-title inherits that and lands at 1.5:1 — invisible.
   pricing.html did exactly this with <h2 class="h-section">. Scoping the
   override to the band means the next page cannot repeat it. */
.cta-band :is(h1, h2, h3) { color: #fff; }
.cta-band :is(h1, h2, h3) em { color: var(--lime); }
.cta-band-lede {
    margin: 24px auto 0;
    max-width: 54ch;
    font-size: clamp(1.02rem, 1.3vw, 1.22rem);
    color: rgba(255,255,255,0.72);
}
.cta-band-actions { justify-content: center; margin-top: 38px; }
.cta-band-note { margin-top: 24px; font-size: 0.85rem; color: rgba(255,255,255,0.45); }

/* Word spans injected by motion.js for the scrubbed text reveal */
.scrub-word { transition: opacity .1s linear; }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    background: var(--olive);
    color: rgba(255,255,255,0.62);
    padding-block: clamp(64px, 8vw, 104px) 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: var(--gap-xl);
    padding-bottom: clamp(48px, 6vw, 72px);
}
.footer-brand .nav-logo { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: 0.94rem; max-width: 30ch; line-height: 1.65; }
.footer-heading {
    color: #fff; font-size: 0.8rem; font-weight: 500;
    letter-spacing: 0.06em; text-transform: uppercase;
    margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: grid; gap: 11px; }
.footer-col a {
    font-size: 0.94rem;
    transition: color .25s var(--ease-out);
}
.footer-col a:hover { color: var(--lime); }

.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--gap-md); flex-wrap: wrap;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 0.875rem;
}
.footer-socials { display: flex; gap: 6px; }
.footer-socials a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: var(--radius-full);
    transition: background .25s var(--ease-out), border-color .25s var(--ease-out),
                color .25s var(--ease-out);
}
.footer-socials a:hover { background: var(--lime); border-color: var(--lime); color: var(--olive-deep); }
.footer-socials svg { width: 17px; height: 17px; }

@media (max-width: 880px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--gap-lg); }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}


/* ==========================================================================
   HOVER GATING
   Touch devices synthesise a :hover on tap, so a card that lifts on hover
   lifts and then STAYS lifted after the tap. Neutralise hover-only movement
   wherever there is no fine pointer. Colour/shadow feedback is kept — it is
   the position change that gets stuck.
   ========================================================================== */
@media (hover: none), (pointer: coarse) {
    .btn:hover,
    .nav-actions > a.nav-signup:hover,
    .cta-submit:hover:not(:disabled),
    .bento-card:hover,
    .value-card:hover,
    .blog-card:hover,
    .diff-card:hover { transform: none; }
}

/* ==========================================================================
   MOTION PRIMITIVES
   Base state is applied only when JS is confirmed alive (.js-ready), so a
   JS failure or crawler never leaves content invisible.
   ========================================================================== */

.js-ready [data-anim] {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
}
.js-ready [data-anim="left"]  { transform: translate3d(-34px, 0, 0); }
.js-ready [data-anim="right"] { transform: translate3d(34px, 0, 0); }
.js-ready [data-anim="scale"] { transform: scale(0.965); }

/* ==========================================================================
   PHONE MOCKUP
   The app screenshots are portrait phone captures (1290x1825). Presenting them
   in a landscape frame with object-fit:cover crops to the middle and scales
   them ~4x. They get a device bezel at their true aspect ratio instead.
   ========================================================================== */

.phone {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1290 / 1923;   /* matches assets/app-concepts/*-web.jpg exactly, so nothing crops */
    padding: 9px;
    border-radius: 42px;
    background: linear-gradient(155deg, #454b43, #1b211a 55%, #2c332a);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.5),
        0 30px 70px rgba(26,36,22,0.34),
        inset 0 0 0 1px rgba(255,255,255,0.10);
}
.phone::before {
    content: '';
    position: absolute;
    top: 19px; left: 50%;
    transform: translateX(-50%);
    width: 78px; height: 5px;
    border-radius: 99px;
    background: rgba(255,255,255,0.22);
    z-index: 3;
}
.phone-screen {
    position: relative;
    width: 100%; height: 100%;
    border-radius: 34px;
    overflow: hidden;
    background: var(--white);
}
.phone-screen img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 240ms ease;
}
@media (hover: hover) and (pointer: fine) {
    .group:hover .phone-screen img,
    .phone:hover .phone-screen img { transform: scale(1.04); }
}

/* Hover physics for media — image grows inside a clipping frame */
.media-frame { overflow: hidden; border-radius: var(--radius-lg); }
.media-frame img,
.media-frame .media-fill {
    transition: transform 240ms ease;
}
/* Gated: on touch, a tap fires a false :hover and the image stays scaled. */
@media (hover: hover) and (pointer: fine) {
    .group:hover .media-frame img,
    .media-frame:hover img,
    .group:hover .media-frame .media-fill { transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    /* Gentler, not zero: keep colour/opacity feedback, drop movement. */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-property: opacity, background-color, border-color, color !important;
        transition-duration: 150ms !important;
    }
    .js-ready [data-anim] { opacity: 1 !important; transform: none !important; }
    .marquee-track { animation: none; }
}
