/* ============================================================
   Trailcam.no — refined nature/earthy marketing site
   ============================================================ */

/* Self-hosted Inter (variable, latin + Latin-1 incl. æøå). Same-origin,
   no render-blocking Google Fonts request. url() is relative to this file. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-var.woff2') format('woff2');
}

:root {
    color-scheme: light;

    /* Surfaces */
    --bg: #f5f2ea;
    --bg-warm: #efe9dc;
    --surface: #fbf9f3;
    --surface-2: #f2eee3;
    --ink-surface: #1d2620;

    /* Forest palette */
    --forest-900: #18241c;
    --forest-800: #1f3026;
    --forest-700: #2b4435;
    --forest-600: #3a5a45;
    --forest-500: #4f6f52;
    --forest-400: #6b8a6c;
    --moss: #8aa67e;
    --sand: #c7b89a;
    --gold: #c9a24b;
    --gold-soft: rgba(201, 162, 75, 0.16);
    --ocr: #ff8a3d;          /* high-visibility OCR accent (not the green detection colour) */
    --wx: #9fccff;           /* weather accent */

    /* Text */
    --text: #232b25;
    --text-soft: #44513f;
    --text-muted: #5c6559;
    --text-on-dark: #eef2e6;
    --text-on-dark-soft: rgba(238, 242, 230, 0.72);

    /* Lines */
    --border: #ddd4c2;
    --border-soft: #e7e0d1;
    --border-dark: rgba(238, 242, 230, 0.14);

    /* Effects */
    --accent: var(--forest-500);
    --accent-deep: var(--forest-700);
    --shadow-sm: 0 1px 2px rgba(31, 48, 38, 0.06), 0 2px 8px rgba(31, 48, 38, 0.05);
    --shadow-md: 0 8px 24px rgba(31, 48, 38, 0.10), 0 2px 6px rgba(31, 48, 38, 0.06);
    --shadow-lg: 0 24px 60px rgba(24, 36, 28, 0.22);

    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --radius-pill: 999px;

    --shell: min(1180px, calc(100vw - 40px));
    --shell-narrow: min(960px, calc(100vw - 40px));
    --section-gap: clamp(72px, 10vw, 132px);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

::selection { background: var(--gold-soft); color: var(--forest-800); }

/* ---------- Layout primitives ---------- */
.shell { width: var(--shell); margin: 0 auto; }
.shell--narrow { width: var(--shell-narrow); margin: 0 auto; }
.section { padding: var(--section-gap) 0; }
.section--tight { padding: clamp(48px, 7vw, 88px) 0; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--forest-500);
}
.eyebrow::before {
    content: "";
    width: 18px;
    height: 1.5px;
    background: var(--gold);
    border-radius: 2px;
}
.eyebrow--center { justify-content: center; }
.eyebrow--light { color: var(--moss); }

.section-head {
    display: grid;
    gap: 18px;
    max-width: 680px;
    margin-bottom: 56px;
}
.section-head--center {
    text-align: center;
    justify-items: center;
    margin-left: auto;
    margin-right: auto;
}
.section-head p { color: var(--text-muted); font-size: 1.08rem; margin: 0; }

h1, h2, h3, h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    margin: 0;
    line-height: 1.12;
    letter-spacing: -0.035em;
    color: var(--text);
}
h1 { font-size: clamp(2.7rem, 6vw, 4.6rem); letter-spacing: -0.045em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.45rem); }
p { margin: 0 0 1rem; color: var(--text-soft); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    padding: 13px 26px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-size: 0.97rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
                background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
    background: var(--forest-600);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--forest-700); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--forest-500); color: var(--forest-700); transform: translateY(-2px); }
.btn-light {
    background: rgba(238, 242, 230, 0.95);
    color: var(--forest-800);
}
.btn-light:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline-light {
    background: transparent;
    color: var(--text-on-dark);
    border-color: var(--border-dark);
}
.btn-outline-light:hover { border-color: var(--moss); transform: translateY(-2px); }
.btn--sm { min-height: 42px; padding: 9px 18px; font-size: 0.9rem; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    padding: 14px 0;
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.site-header.is-stuck {
    background: rgba(245, 242, 234, 0.82);
    backdrop-filter: saturate(140%) blur(14px);
    box-shadow: 0 1px 0 var(--border-soft);
    padding: 10px 0;
}
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__logo {
    width: auto; height: 34px;
    object-fit: contain;
}
.brand__name {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--forest-800);
}
.brand__name span { color: var(--forest-500); }

.site-nav { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-soft);
    position: relative;
    transition: color 0.18s ease;
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -5px;
    width: 0; height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: width 0.25s var(--ease);
}
.nav-links a:hover { color: var(--forest-800); }
.nav-links a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

/* Language toggle */
.lang-toggle {
    display: inline-flex;
    padding: 3px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-pill);
}
.lang-toggle button {
    border: none;
    background: transparent;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.lang-toggle button.is-active {
    background: var(--forest-600);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; color: var(--forest-800); }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding-top: clamp(36px, 6vw, 72px); padding-bottom: var(--section-gap); }
.hero__grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px 7px 9px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-soft);
    box-shadow: var(--shadow-sm);
    margin-bottom: 26px;
}
.hero__badge .tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: var(--gold-soft);
    color: #8a6d1f;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.hero h1 { margin-bottom: 22px; }
.hero h1 .accent {
    background: linear-gradient(120deg, var(--forest-600), var(--moss));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero__lead {
    font-size: 1.18rem;
    color: var(--text-soft);
    max-width: 30ch;
    margin-bottom: 30px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 22px 30px;
    padding-top: 28px;
    border-top: 1px solid var(--border-soft);
}
.hero__trust .item { display: grid; gap: 2px; }
.hero__trust .num {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--forest-700);
}
.hero__trust .lbl { font-size: 0.82rem; color: var(--text-muted); }

/* Hero visual */
.hero__visual { position: relative; }
.hero__frame {
    --detect: #5ee85f;
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--forest-800);
    line-height: 0;
}
/* Match the app's detection-editor: the image is shown at its NATURAL ratio
   (never cropped), and the SVG overlay shares the photo's 800x600 coordinate
   space — so box coords map 1:1 to image pixels exactly like detectionEditor.js. */
.hero__frame img { width: 100%; height: auto; display: block; }
.hero__frame::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(24,36,28,0.08), transparent 22% 78%, rgba(24, 36, 28, 0.28));
    pointer-events: none;
    z-index: 2;
}

/* ======================= AI detection FX ======================= */

/* Scan line that sweeps the photo up and down a few times on reveal */
.det-scan {
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 2px;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(90deg, transparent, var(--detect) 18%, #e3ffe4 50%, var(--detect) 82%, transparent);
    box-shadow: 0 0 16px 4px rgba(94, 232, 95, 0.6);
}
.is-scanning .det-scan { animation: detScan 1500ms linear infinite; }
@keyframes detScan {
    0%   { top: 0;    opacity: 1; }
    50%  { top: 100%; opacity: 1; }
    100% { top: 0;    opacity: 1; }
}

/* Horizontal "reading" scanners over a region (OCR strip, sky) */
.hscan { position: absolute; z-index: 4; pointer-events: none; overflow: hidden; opacity: 0; }
.hscan.scan { opacity: 1; }
.hscan__bar {
    position: absolute; top: 0; bottom: 0;
    width: 3px;
    left: -4px;
    background: currentColor;
    box-shadow: 0 0 10px 2px currentColor;
}
.hscan--ocr { color: var(--ocr); top: 95.6%; left: 0.5%; width: 99%; height: 4%; }
.hscan--ocr.scan .hscan__bar { animation: hSweep 2000ms linear; }
@keyframes hSweep { from { left: -4px; } to { left: 100%; } }

/* SVG overlay in the photo's coordinate space */
.det-svg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 4;
    pointer-events: none;
}
.detbox {
    fill: none;
    stroke: var(--detect);
    stroke-width: 2;
    stroke-dasharray: 4 3;            /* tighter dashes */
    vector-effect: non-scaling-stroke;
    opacity: 0;
}
.detlead { stroke: var(--detect); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; }

/* "Lock on": dashes assemble into place once, with a one-shot glow, then hold
   static (no continuous marching). */
.detg.locked .detbox { animation: detAssemble 720ms var(--ease) both; }
.detg.locked .detlead { animation: detLeadIn 300ms ease 240ms both; }
.detg.locked { animation: detGlow 760ms ease both; }
@keyframes detAssemble {
    0%   { opacity: 0; stroke-dashoffset: 60; stroke-width: 3.4; }
    35%  { opacity: 1; }
    100% { opacity: 1; stroke-dashoffset: 0; stroke-width: 2; }
}
@keyframes detLeadIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes detGlow {
    0%   { filter: drop-shadow(0 0 0 rgba(94, 232, 95, 0)); }
    35%  { filter: drop-shadow(0 0 7px rgba(94, 232, 95, 0.85)); }
    100% { filter: drop-shadow(0 0 0 rgba(94, 232, 95, 0)); }
}

/* In-image highlight regions the readouts point at — SOLID lines in their own
   colours so they're never mistaken for the (green, dashed) detection boxes. */
.region {
    fill: none;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    opacity: 0;
}
.region--ocr { stroke: var(--ocr); fill: rgba(255, 138, 61, 0.08); }
.is-reading .region { animation: regionPulse 2.4s ease-in-out infinite; }
@keyframes regionPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.95; } }

/* HTML label pills, positioned by JS at each leader's outer end */
.det-tags {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
}
.det-tag {
    position: absolute;
    left: 0; top: 0;
    transform: translate(-100%, -100%) scale(0.92); /* bottom-right corner sits on the anchor */
    transform-origin: bottom right;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #0d150e;
    border: 1.5px solid var(--detect);
    border-radius: 8px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(8, 16, 10, 0.45);
    opacity: 0;
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.det-tag.shown { opacity: 1; transform: translate(-100%, -100%) scale(1); }
.det-tag__name { color: #fff; }
.det-tag__pct { font-variant-numeric: tabular-nums; color: var(--detect); }
.det-tag--right { transform: translate(0, -100%) scale(0.92); transform-origin: bottom left; }
.det-tag--right.shown { transform: translate(0, -100%) scale(1); }

/* Connector lines from the readouts up to the image regions */
.hero__links {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 3;
    pointer-events: none;
    overflow: visible;
}
.hero__links polyline {
    fill: none;
    stroke-width: 1.4;
    stroke-dasharray: 4 4;
    vector-effect: non-scaling-stroke;
    opacity: 0;
    transition: opacity 0.45s ease;
}
.hero__links .link--ocr { stroke: var(--ocr); }
.hero__links circle { opacity: 0; transition: opacity 0.45s ease; }
.hero__links circle.link--ocr { fill: var(--ocr); }
.links-on .hero__links polyline { opacity: 0.7; }
.links-on .hero__links circle { opacity: 0.95; }

/* ======================= Readout cards (below the photo) ======================= */
.hero__readouts {
    position: relative;
    z-index: 5;
    display: flex;
    gap: 16px;
    margin-top: 18px;
}
.readout {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 13px 15px;
    background: rgba(10, 16, 11, 0.93);
    border: 1px solid rgba(94, 232, 95, 0.22);
    border-radius: var(--radius-md);
    color: var(--text-on-dark);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity 0.5s var(--ease);
}
.readout.ocrc { border-color: rgba(255, 138, 61, 0.26); }
.readout.wxc { border-color: rgba(159, 204, 255, 0.24); }
.readouts-on .readout { opacity: 1; }
.readouts-on .readout:nth-child(2) { transition-delay: 0.12s; }
.readout__head { display: flex; align-items: center; gap: 8px; }
.readout__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--detect);
    animation: ocrPulse 1.4s ease-out infinite;
}
.readout__dot--wx { background: #8fc0ff; animation-name: wxPulse; }
@keyframes ocrPulse {
    0%   { box-shadow: 0 0 0 0 rgba(94, 232, 95, 0.55); }
    70%  { box-shadow: 0 0 0 7px rgba(94, 232, 95, 0); }
    100% { box-shadow: 0 0 0 0 rgba(94, 232, 95, 0); }
}
@keyframes wxPulse {
    0%   { box-shadow: 0 0 0 0 rgba(143, 192, 255, 0.55); }
    70%  { box-shadow: 0 0 0 7px rgba(143, 192, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(143, 192, 255, 0); }
}
.readout__title {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--moss);
}
.readout__status {
    margin-left: auto;
    font-family: ui-monospace, 'SF Mono', 'Menlo', monospace;
    font-size: 0.64rem; letter-spacing: 0.04em;
    color: var(--text-on-dark-soft);
}
.ocrc .readout__dot { background: var(--ocr); animation-name: ocrPulseO; }
@keyframes ocrPulseO {
    0%   { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0.55); }
    70%  { box-shadow: 0 0 0 7px rgba(255, 138, 61, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 138, 61, 0); }
}
.ocrc .readout__title { color: #ffb98a; }
.ocrc.complete .readout__status { color: var(--ocr); }

/* OCR rows */
.ocrc__rows { display: grid; gap: 5px; }
.ocrc__row {
    display: flex; align-items: baseline; gap: 6px;
    font-family: ui-monospace, 'SF Mono', 'Menlo', monospace;
    font-size: 0.72rem;
    opacity: 0.35;
    transition: opacity 0.25s ease;
}
.ocrc__row.active, .ocrc__row.done { opacity: 1; }
.ocrc__key { color: var(--text-on-dark-soft); white-space: nowrap; }
.ocrc__dots { flex: 1; border-bottom: 1px dotted rgba(238, 242, 230, 0.22); transform: translateY(-3px); }
.ocrc__val { color: #ffc59c; white-space: nowrap; min-height: 1em; }
.ocrc__row.active .ocrc__val { color: #ffe0c7; }
.ocrc__row.done .ocrc__val { color: var(--ocr); font-weight: 700; }
.ocrc__row.done .ocrc__val::after { content: " ✓"; color: var(--ocr); }

/* Weather card — sourced online (no image scan) */
.readout__source {
    font-family: ui-monospace, 'SF Mono', 'Menlo', monospace;
    font-size: 0.6rem; letter-spacing: 0.03em;
    color: var(--text-on-dark-soft); opacity: 0.7;
}
.wxc .readout__title { color: #bcd8ff; }
.wxc__net { width: 17px; height: 17px; color: var(--wx); flex-shrink: 0; }
.wxc:not(.complete) .wxc__net { animation: wxFetch 1.3s ease-in-out infinite; }
@keyframes wxFetch { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.wxc.complete .wxc__status { color: var(--wx); }
.wxc__rows { display: grid; gap: 7px; }
.wxc__row {
    display: flex; align-items: center; gap: 8px;
    font-family: ui-monospace, 'SF Mono', 'Menlo', monospace;
    font-size: 0.74rem; color: var(--text-on-dark-soft);
    opacity: 0.35; transition: opacity 0.25s ease;
}
.wxc__row.active, .wxc__row.done { opacity: 1; }
.wxc__row--cond { font-family: var(--font-sans); font-size: 0.98rem; font-weight: 600; color: var(--text-on-dark); }
.wxc__val { color: #cfe4ff; white-space: nowrap; min-height: 1em; }
.wxc__row--cond .wxc__val { color: var(--text-on-dark); }
.wxc__row.active .wxc__val { color: #eaf4ff; }
.wxc__row.done .wxc__val { font-weight: 600; }
.wxc__icon { width: 22px; height: 22px; color: #9fccff; flex-shrink: 0; }
.wxc__arrow { width: 15px; height: 15px; color: #9fccff; transform: rotate(135deg); flex-shrink: 0; } /* NW → blows toward SE */
.wxc__rainicon { width: 15px; height: 15px; color: #8aa0bd; flex-shrink: 0; }
.wxc__presicon { width: 16px; height: 16px; color: #9fccff; flex-shrink: 0; }

.hero__chip {
    position: absolute;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 15px;
    background: rgba(251, 249, 243, 0.94);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 0.84rem;
}
.hero__chip .ic {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--forest-600);
    color: #fff;
    flex-shrink: 0;
}
.hero__chip .ic svg { width: 18px; height: 18px; }
.hero__chip .t { font-weight: 700; color: var(--text); line-height: 1.2; }
.hero__chip .s { color: var(--text-muted); font-size: 0.76rem; }
.hero__chip--ocr { bottom: 26px; left: -22px; }
.hero__chip--weather { top: 30px; right: -20px; }

/* ============================================================
   Logos / trust strip
   ============================================================ */
.trust-strip {
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface);
}
.trust-strip__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 40px;
    padding: 26px 0;
    text-align: center;
}
.trust-strip__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 600;
}
.trust-strip__item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-soft);
}
.trust-strip__item svg { width: 18px; height: 18px; color: var(--forest-500); }

/* ============================================================
   AI spotlight (dark)
   ============================================================ */
.spotlight {
    position: relative;
    background:
        radial-gradient(1100px 460px at 80% -10%, rgba(138, 166, 126, 0.18), transparent 60%),
        radial-gradient(900px 500px at 0% 120%, rgba(201, 162, 75, 0.12), transparent 55%),
        linear-gradient(180deg, var(--forest-900), var(--forest-800));
    color: var(--text-on-dark);
    border-radius: clamp(28px, 4vw, 44px);
    overflow: hidden;
}
.spotlight .section-head h2,
.spotlight__copy h2,
.spotlight h3 { color: var(--text-on-dark); }
.spotlight .section-head p { color: var(--text-on-dark-soft); }

.spotlight__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
    margin-top: 8px;
}
.spotlight__copy p { color: var(--text-on-dark-soft); font-size: 1.06rem; }
.spotlight__list { display: grid; gap: 16px; margin: 26px 0 0; padding: 0; list-style: none; }
.spotlight__list li { display: flex; gap: 13px; align-items: flex-start; }
.spotlight__list .tick {
    flex-shrink: 0;
    display: grid; place-items: center;
    width: 26px; height: 26px;
    margin-top: 1px;
    border-radius: 8px;
    background: rgba(138, 166, 126, 0.2);
    color: var(--moss);
}
.spotlight__list .tick svg { width: 15px; height: 15px; }
.spotlight__list b { color: var(--text-on-dark); font-weight: 600; }
.spotlight__list span { color: var(--text-on-dark-soft); }

/* Search demo card */
.searchdemo {
    background: rgba(19, 29, 22, 0.6);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-lg);
}
.searchdemo__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(10, 16, 12, 0.55);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
}
.searchdemo__bar svg { width: 20px; height: 20px; color: var(--moss); flex-shrink: 0; }
.searchdemo__q {
    flex: 1;
    font-size: 1rem;
    color: var(--text-on-dark);
    min-height: 1.5em;
}
.searchdemo__cursor {
    display: inline-block;
    width: 2px; height: 1.05em;
    background: var(--gold);
    vertical-align: text-bottom;
    margin-left: 1px;
    animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.searchdemo__hint {
    font-size: 0.74rem;
    color: var(--text-on-dark-soft);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}
.searchdemo__answer { margin-top: 16px; }
.searchdemo__answer.is-hidden { display: none; }
.answer-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(138, 166, 126, 0.12);
    border: 1px solid rgba(138, 166, 126, 0.2);
    border-radius: var(--radius-md);
}
.answer-card__badge {
    display: inline-flex; align-items: center; gap: 5px;
    align-self: start;
    padding: 3px 9px 3px 7px;
    background: rgba(138, 166, 126, 0.22);
    border-radius: var(--radius-pill);
    font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em;
    color: var(--moss);
}
.answer-card__badge svg { width: 13px; height: 13px; }
.answer-card__text {
    margin: 0;
    color: var(--text-on-dark);
    font-size: 0.95rem;
    line-height: 1.55;
}
.searchdemo__answer.is-in .answer-card { animation: answerIn 0.4s var(--ease) both; }
@keyframes answerIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.searchdemo__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.searchdemo__chip {
    padding: 7px 13px;
    background: rgba(238, 242, 230, 0.06);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    color: var(--text-on-dark-soft);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.searchdemo__chip:hover, .searchdemo__chip.is-active {
    background: rgba(138, 166, 126, 0.18);
    border-color: rgba(138, 166, 126, 0.4);
    color: var(--text-on-dark);
}

/* ============================================================
   Feature grid
   ============================================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-card {
    position: relative;
    padding: 30px 26px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease;
    overflow: hidden;
}
.feature-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--forest-500), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card__icon {
    display: grid; place-items: center;
    width: 50px; height: 50px;
    border-radius: 14px;
    background: var(--forest-600);
    color: #fff;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.feature-card__icon svg { width: 24px; height: 24px; }
.feature-card.is-feature .feature-card__icon { background: linear-gradient(135deg, var(--gold), #b88a2e); color: #2a2206; }

/* Movement-playback mini-map animation */
.playback-anim {
    width: 100%; height: 92px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 30% 20%, rgba(79, 111, 82, 0.10), transparent 60%),
        linear-gradient(180deg, rgba(79, 111, 82, 0.08), rgba(247, 243, 234, 0.4));
    border: 1px solid var(--border-soft);
    overflow: hidden;
}
.playback-anim svg { width: 100%; height: 100%; }
.pb-path { fill: none; stroke: var(--forest-500); stroke-width: 2; stroke-dasharray: 4 5; opacity: 0.55; }
.pb-cam circle { fill: var(--forest-600); }
.pb-cam .pb-lens { fill: #fff; }
.pb-blip { fill: var(--gold); filter: drop-shadow(0 0 5px rgba(201, 162, 75, 0.85)); }
@media (prefers-reduced-motion: reduce) { .pb-blip { display: none; } }
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { margin: 0; color: var(--text-muted); font-size: 0.96rem; }
.feature-card__pill {
    position: absolute;
    top: 22px; right: 22px;
    padding: 3px 10px;
    background: var(--gold-soft);
    color: #8a6d1f;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ============================================================
   How it works
   ============================================================ */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    counter-reset: step;
}
.step {
    position: relative;
    padding: 28px 24px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
}
.step__num {
    display: inline-grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 13px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    color: var(--forest-700);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 18px;
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { margin: 0; font-size: 0.93rem; color: var(--text-muted); }
.step__icon { position: absolute; top: 28px; right: 24px; color: var(--moss); }
.step__icon svg { width: 22px; height: 22px; }

/* ============================================================
   Audiences
   ============================================================ */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.audience-card {
    display: flex;
    flex-direction: column;
    padding: 30px 28px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.audience-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.audience-card .eyebrow { margin-bottom: 14px; }
.audience-card h3 { margin-bottom: 18px; }
.audience-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.audience-card li { display: flex; gap: 11px; align-items: flex-start; color: var(--text-soft); font-size: 0.95rem; }
.audience-card li svg { width: 18px; height: 18px; color: var(--forest-500); flex-shrink: 0; margin-top: 3px; }

/* ============================================================
   CTA
   ============================================================ */
.cta {
    position: relative;
    background:
        radial-gradient(800px 380px at 85% 110%, rgba(201, 162, 75, 0.16), transparent 60%),
        linear-gradient(150deg, var(--forest-700), var(--forest-900));
    color: var(--text-on-dark);
    border-radius: clamp(28px, 4vw, 44px);
    padding: clamp(48px, 7vw, 88px) clamp(28px, 5vw, 72px);
    text-align: center;
    overflow: hidden;
}
.cta h2 { color: var(--text-on-dark); margin-bottom: 16px; }
.cta p { color: var(--text-on-dark-soft); max-width: 56ch; margin: 0 auto 30px; font-size: 1.1rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta .cta__note { margin-top: 36px; font-size: 0.85rem; color: var(--text-on-dark-soft); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    padding: clamp(56px, 7vw, 88px) 0 36px;
    border-top: 1px solid var(--border-soft);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { color: var(--text-muted); font-size: 0.95rem; max-width: 34ch; }
.footer-col h4 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-col a { color: var(--text-soft); font-size: 0.94rem; transition: color 0.18s ease; }
.footer-col a:hover { color: var(--forest-700); }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 28px;
    border-top: 1px solid var(--border-soft);
    font-size: 0.86rem;
    color: var(--text-muted);
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .searchdemo__cursor { animation: none; }
    /* Detection FX settle instantly, no scan/assemble/pulse */
    .det-scan { display: none; }
    .detbox, .detlead { opacity: 1; animation: none; }
    .detg.locked .detbox, .detg.locked .detlead, .detg.locked { animation: none; }
    .det-tag { opacity: 1; transition: none; }
    .det-tag, .det-tag.shown { transform: translate(-100%, -100%); }
    .det-tag--right, .det-tag--right.shown { transform: translate(0, -100%); }
    .region { opacity: 0.7; animation: none; }
    .hscan { display: none; }
    .readout { opacity: 1; transition: none; }
    .ocrc__row, .wxc__row { opacity: 1; }
    .readout__dot { animation: none; }
    html { scroll-behavior: auto; }
}

/* ============================================================
   Mobile nav drawer
   ============================================================ */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(24, 36, 28, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu__panel {
    position: absolute;
    top: 0; right: 0;
    width: min(340px, 86vw);
    height: 100%;
    background: var(--bg);
    box-shadow: var(--shadow-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
}
.mobile-menu.is-open .mobile-menu__panel { transform: none; }
.mobile-menu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.mobile-menu__close {
    width: 42px; height: 42px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    cursor: pointer;
    display: grid; place-items: center;
}
.mobile-menu__close svg { width: 20px; height: 20px; }
.mobile-menu a.m-link {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}
.mobile-menu a.m-link:hover { background: var(--surface-2); }
.mobile-menu__actions { margin-top: auto; display: grid; gap: 12px; }
.mobile-menu .lang-toggle { align-self: flex-start; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__visual { max-width: 460px; margin: 8px auto 0; }
    .hero__lead { max-width: none; }
    .spotlight__grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .audience-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .nav-links, .header-actions .desktop-only { display: none; }
    .nav-toggle { display: inline-flex; }
    .feature-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .hero__readouts { flex-direction: column; margin-left: 0; margin-right: 0; gap: 12px; }
    .readout { flex: 1 1 auto; max-width: none; }
    .readout.wxc { margin-top: 0; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Beta application modal
   ============================================================ */
.beta-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.beta-modal.is-open { opacity: 1; pointer-events: auto; }
.beta-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(24, 36, 28, 0.55);
    backdrop-filter: blur(5px);
}
.beta-modal__panel {
    position: relative;
    width: min(540px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: clamp(26px, 4vw, 40px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(14px) scale(0.98);
    transition: transform 0.3s var(--ease);
}
.beta-modal.is-open .beta-modal__panel { transform: none; }
.beta-modal__close {
    position: absolute;
    top: 16px; right: 16px;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border: 1px solid var(--border);
    background: var(--page-bg);
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-soft);
    transition: border-color 0.2s ease, color 0.2s ease;
}
.beta-modal__close:hover { border-color: var(--forest-500); color: var(--forest-700); }
.beta-modal__close svg { width: 18px; height: 18px; }
.beta-modal__panel h3 { margin: 12px 0 10px; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.beta-modal__lead { color: var(--text-muted); margin: 0 0 22px; }

.beta-form { display: grid; gap: 14px; }
.beta-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.beta-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.beta-field { display: grid; gap: 6px; }
.beta-field span {
    font-size: 0.82rem; font-weight: 600; color: var(--text-soft);
}
.beta-field input,
.beta-field textarea {
    width: 100%;
    padding: 11px 13px;
    background: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.beta-field textarea { resize: vertical; min-height: 92px; }
.beta-field input:focus,
.beta-field textarea:focus {
    outline: none;
    border-color: var(--forest-500);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.beta-field.is-invalid input,
.beta-field.is-invalid textarea { border-color: var(--danger); }
.beta-form__submit { width: 100%; margin-top: 4px; }
.beta-form__submit[disabled] { opacity: 0.6; cursor: progress; }
.beta-form__msg { margin: 4px 0 0; font-size: 0.9rem; min-height: 1.2em; }
.beta-form__msg.is-error { color: var(--danger); }
.beta-form__msg.is-success { color: var(--forest-600); font-weight: 600; }

@media (max-width: 460px) {
    .beta-form__row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .beta-modal, .beta-modal__panel { transition: none; }
}

/* ============================================================
   Success dialog (mirrors the app's confirm-dialog--success)
   ============================================================ */
.app-dialog {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}
.app-dialog.is-open { opacity: 1; pointer-events: auto; }
.app-dialog__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 15, 0.85);
}
.app-dialog__card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 32px;
    text-align: center;
    border-radius: 16px;
    background: #f7f3ea;                      /* solid beige, like the app's dialog */
    border: 1px solid rgba(79, 111, 82, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    transform: translateY(12px) scale(0.96);
    transition: transform 0.28s var(--ease);
}
.app-dialog.is-open .app-dialog__card { transform: none; }
.app-dialog__icon {
    display: grid;
    place-items: center;
    width: 56px; height: 56px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--forest-600);
    color: #fff;
    box-shadow: 0 8px 20px rgba(79, 111, 82, 0.4);
}
.app-dialog__icon svg { width: 28px; height: 28px; }
.app-dialog__message {
    margin: 0 0 24px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: #2f3a33;
}
.app-dialog__buttons { display: flex; gap: 12px; justify-content: center; }
.app-dialog__btn {
    padding: 11px 26px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--forest-600);
    color: #fff;
    transition: background 0.2s ease, transform 0.1s ease;
}
.app-dialog__btn:hover { background: var(--forest-700); }
.app-dialog__btn:active { transform: scale(0.98); }
@media (prefers-reduced-motion: reduce) {
    .app-dialog, .app-dialog__card { transition: none; }
}
