/* ============================================================
   DOGER public landing — 5-screen scroll-snap surface
   Design tokens ported from docs/presentations/doger_demo_20260526.html
   ============================================================ */

:root {
    /* Surfaces — cool neutral off-white (web research 2026-05-30: WorkOS/Mistral cohort) */
    --bg:           hsl(210, 14%, 97%);
    --bg-card:      hsl(210, 14%, 99%);
    --bg-elevated:  hsl(210, 14%, 94%);
    --bg-inset:     hsl(220, 18%, 11%);

    /* Text */
    --fg:        hsl(220, 35%, 8%);
    --fg-muted:  hsl(218, 14%, 32%);
    --fg-dim:    hsl(218, 12%, 58%);

    /* Accents */
    --cyan:       hsl(195, 85%, 32%);
    --cyan-2:     hsl(195, 85%, 22%);
    --cyan-glow:  hsla(195, 85%, 32%, 0.10);
    --gold:       hsl(35, 92%, 44%);
    --magenta:    hsl(335, 70%, 44%);
    --magenta-glow: hsla(335, 70%, 44%, 0.10);
    --purple:     hsl(260, 50%, 40%);
    --red:        hsl(0, 72%, 42%);
    --green:      hsl(150, 55%, 32%);

    /* Borders */
    --border:        hsl(210, 14%, 88%);
    --border-strong: hsl(210, 14%, 72%);

    /* Type scale (clamped) */
    --title-size: clamp(2.4rem, 6.5vw, 5.4rem);
    --h2-size:    clamp(1.8rem, 4.2vw, 3rem);
    --h3-size:    clamp(1.15rem, 1.9vw, 1.55rem);
    --body-size:  clamp(0.98rem, 1.3vw, 1.18rem);
    --small-size: clamp(0.85rem, 1.05vw, 1rem);
    --tiny-size:  clamp(0.72rem, 0.9vw, 0.85rem);

    /* Fonts (matches deck) */
    --font-display: "Geist", "Inter", system-ui, sans-serif;
    --font-body:    "Inter Tight", "Inter", system-ui, sans-serif;
    --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Eases */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

/* No CSS scroll-snap anywhere. The page snaps to screens only when the user
   presses arrow keys / Page-keys / Space / Home / End (JS handler in app.js)
   or clicks a nav-dot. Mouse-wheel and trackpad scroll freely. */
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--fg);
    font-size: var(--body-size);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

a { color: var(--cyan-2); }
a:hover { color: var(--magenta); }

/* ---------- Constellation backdrop ---------- */
#constellation {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}
#constellation canvas { display: block; width: 100%; height: 100%; }
.grid-bg {
    /* Dot-grid texture — primary "blueprint" pattern (web research, May 2026).
       Subtle radial-gradient dots on 24px spacing reads as instrument paper
       rather than as decoration. Two corner glows in cyan/magenta give the page
       a subtle accent depth without competing with content. */
    background-image:
        radial-gradient(circle, hsla(220, 13%, 11%, 0.07) 1px, transparent 1px),
        radial-gradient(circle at 18% 8%, hsla(195, 85%, 32%, 0.12), transparent 32rem),
        radial-gradient(circle at 92% 92%, hsla(335, 70%, 44%, 0.07), transparent 36rem);
    background-size: 24px 24px, auto, auto;
    background-position: 0 0, 0 0, 0 0;
}

/* ---------- Screens (scroll-snap children) ---------- */
.screen {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3.5rem, 7vw, 6rem) clamp(1.2rem, 4vw, 3rem);
}
/* Coordinate label removed per user request (was: [N / 05] in top-right). */

/* Small "jump to CTA" pill — top-right of screens 2/3/4, clear of nav-dots */
.cta-jump {
    position: absolute;
    top: clamp(14px, 2.5vh, 24px);
    right: clamp(54px, 6vw, 90px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 1px 2px hsla(220, 35%, 8%, 0.04), 0 6px 18px hsla(220, 35%, 8%, 0.06);
    transition: transform 90ms ease-out, background 220ms var(--ease-out-expo), border-color 220ms var(--ease-out-expo), color 220ms var(--ease-out-expo), box-shadow 220ms var(--ease-out-expo);
    z-index: 8;
    opacity: 0;
    transform: translateY(-4px);
}
.screen.active .cta-jump { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.cta-jump:hover {
    color: var(--bg);
    background: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 4px 12px hsla(195, 85%, 22%, 0.18), 0 12px 28px hsla(195, 85%, 22%, 0.20);
}
.cta-jump:active { transform: translateY(1px) scale(0.985); }
.cta-jump:focus-visible { outline: none; box-shadow: 0 0 0 3px hsla(195, 85%, 32%, 0.35); }
@media (max-width: 700px) {
    .cta-jump { top: 12px; right: 30px; padding: 6px 12px; font-size: 0.66rem; }
}
.screen-content {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(0.9rem, 1.8vw, 1.6rem);
}

/* ---------- Reveal animation — fire when screen becomes active ---------- */
.reveal {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    will-change: opacity, transform;
    transition: opacity 0.62s var(--ease-out-expo),
                transform 0.62s var(--ease-out-expo);
}
.screen.active .reveal { opacity: 1; transform: translate3d(0, 0, 0); }
/* per-:nth-child stagger */
.screen.active .screen-content > .reveal:nth-child(1) { transition-delay: 0.04s; }
.screen.active .screen-content > .reveal:nth-child(2) { transition-delay: 0.13s; }
.screen.active .screen-content > .reveal:nth-child(3) { transition-delay: 0.22s; }
.screen.active .screen-content > .reveal:nth-child(4) { transition-delay: 0.31s; }
.screen.active .screen-content > .reveal:nth-child(5) { transition-delay: 0.40s; }
.screen.active .screen-content > .reveal:nth-child(6) { transition-delay: 0.49s; }

.screen.active .two-col > *:nth-child(1) { transition-delay: 0.42s; }
.screen.active .two-col > *:nth-child(2) { transition-delay: 0.54s; }

/* eyebrow clip-path wipe on screen activation (subtle tech flourish) */
.screen .eyebrow,
.screen .presenter-tag {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.65s var(--ease-out-expo) 0.18s,
                box-shadow 0.3s var(--ease-out-expo);
}
.screen.active .eyebrow,
.screen.active .presenter-tag {
    clip-path: inset(0 0 0 0);
}

/* underline draw on inline links */
a:not(.btn) {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size 0.4s var(--ease-out-expo), color 0.2s ease;
    text-decoration: none;
}
a:not(.btn):hover { background-size: 100% 1px; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-snap-type: none; }
    /* Kill all keyframe animations under reduced-motion */
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Type primitives ---------- */
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg-muted);
    padding: 5px 12px 5px 14px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--cyan);
    border-radius: 6px;
    background: linear-gradient(90deg, hsla(195, 85%, 32%, 0.10), var(--bg-card) 54%);
    width: max-content;
    box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, 0.8), 0 1px 2px hsla(220, 35%, 8%, 0.04);
}
.eyebrow .dot-mono {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--magenta);
    box-shadow: 0 0 0 2px hsla(335, 70%, 44%, 0.18);
}
h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--fg);
    letter-spacing: -0.025em;
    line-height: 1.08;
    margin: 0;
}
h1 { font-size: var(--title-size); font-weight: 800; }
h2 { font-size: var(--h2-size); font-weight: 700; }
h3 { font-size: var(--h3-size); font-weight: 600; line-height: 1.2; }
.lead {
    font-family: var(--font-body);
    color: var(--fg-muted);
    font-size: clamp(1.05rem, 1.45vw, 1.35rem);
    line-height: 1.5;
    margin: 0;
    max-width: 62ch;
    font-weight: 400;
}
.accent {
    color: var(--magenta);
}
/* Site brand logo — the DOGER dog mark, pinned top-left, out of flow so it
   doesn't push the hero past one screen. Persists across screens. */
.brand-logo {
    position: fixed;
    top: clamp(1rem, 2.4vw, 1.8rem);
    left: clamp(1.2rem, 4vw, 3rem);
    width: 52px; height: 52px;
    z-index: 50;
    display: block;
}
.brand-logo img { display: block; width: 100%; height: 100%; }
/* Hero wordmark — DOGER in solid magenta with a soft cyan halo. Single hue
   so it doesn't compete with the cyan→magenta gradient on "European data". */
.brand-mark {
    color: var(--magenta);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-shadow: 0 0 24px hsla(335, 70%, 44%, 0.18);
}

/* ---------- Buttons ---------- */
.btn {
    position: relative;
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-mono); font-weight: 600;
    font-size: var(--tiny-size); letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 12px 18px; border-radius: 8px;
    text-decoration: none;
    overflow: hidden;
    /* Snappier press (web research: WorkOS/Vercel sit at 80–90ms); slower
       shadow + bg fade so hover feels lush but click feels instant. */
    transition: transform 90ms ease-out,
                box-shadow 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
                background 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid transparent;
    cursor: pointer;
    /* CSS vars for the magnetic-hover offset (set by JS, default 0) */
    --mx: 0px;
    --my: 0px;
}
.btn.primary {
    background: linear-gradient(135deg, var(--fg), hsl(218, 35%, 14%));
    color: var(--bg);
    /* WorkOS 5-stop layered shadow (decreasing alpha, magenta hue) */
    box-shadow:
        inset 0 1px 0 hsla(0, 0%, 100%, 0.12),
        0 1px 1px hsla(220, 35%, 8%, 0.10),
        0 2px 4px hsla(220, 35%, 8%, 0.12),
        0 6px 12px hsla(220, 35%, 8%, 0.14),
        0 14px 30px hsla(220, 35%, 8%, 0.18);
    transform: translate(var(--mx), var(--my));
}
/* sheen sweep on hover */
.btn.primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, hsla(195, 85%, 60%, 0.28) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.7s var(--ease-out-expo);
    pointer-events: none;
}
.btn.primary:hover::before { transform: translateX(120%); }
.btn.primary:hover {
    background: linear-gradient(135deg, var(--fg), var(--cyan-2));
    transform: translate(var(--mx), calc(var(--my) - 1px));
    box-shadow:
        inset 0 1px 0 hsla(0, 0%, 100%, 0.15),
        0 2px 4px hsla(335, 70%, 44%, 0.18),
        0 6px 12px hsla(335, 70%, 44%, 0.22),
        0 12px 24px hsla(335, 70%, 44%, 0.28),
        0 22px 48px hsla(335, 70%, 44%, 0.32),
        0 0 0 4px hsla(335, 70%, 44%, 0.10);
}
.btn.primary:active {
    transform: translate(var(--mx), calc(var(--my) + 1px)) scale(0.985);
    box-shadow:
        inset 0 1px 0 hsla(0, 0%, 100%, 0.10),
        0 2px 6px hsla(220, 35%, 8%, 0.20);
    transition: transform 80ms ease-out;
}
.btn.primary:focus-visible {
    outline: none;
    box-shadow:
        inset 0 1px 0 hsla(0, 0%, 100%, 0.15),
        0 0 0 3px hsla(195, 85%, 32%, 0.35);
}
.btn.primary .arrow { transition: transform 0.2s var(--ease-out-expo); }
.btn.primary:hover .arrow { transform: translateX(3px); }
.btn.large {
    padding: 16px 26px; font-size: var(--small-size);
}
.btn.xlarge {
    padding: 20px 34px;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    letter-spacing: 0.18em;
    border-radius: 10px;
}
/* Secondary CTA — outlined, pairs with .primary (used by the video CTA) */
.btn.secondary {
    background: var(--bg-card);
    color: var(--fg);
    border: 1px solid var(--border-strong);
    box-shadow: 0 1px 2px hsla(220, 35%, 8%, 0.05);
    transform: translate(var(--mx), var(--my));
}
.btn.secondary:hover {
    color: var(--cyan-2);
    border-color: var(--cyan);
    transform: translate(var(--mx), calc(var(--my) - 1px));
    box-shadow: 0 6px 16px hsla(195, 85%, 32%, 0.16);
}
.btn.secondary:active { transform: translate(var(--mx), calc(var(--my) + 1px)) scale(0.985); }
.btn.secondary:focus-visible { outline: none; box-shadow: 0 0 0 3px hsla(195, 85%, 32%, 0.35); }
.btn .play-tri { color: var(--cyan); font-size: 0.78em; line-height: 1; }

/* ---------- Video overlay (product tour) ---------- */
.video-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: clamp(12px, 4vw, 56px);
    opacity: 0;
    transition: opacity 0.25s var(--ease-out-expo);
}
.video-modal.is-open { opacity: 1; }
.video-modal[hidden] { display: none; }
.video-modal-backdrop {
    position: absolute; inset: 0;
    background: hsla(220, 35%, 8%, 0.80);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.video-modal-inner {
    position: relative;
    /* Always fit: smallest of max width, available width, and height-derived
       width (keeps the 16:9 film fully on-screen in any orientation). */
    width: min(1100px, 92vw, calc(86vh * 16 / 9));
    aspect-ratio: 16 / 9;
    transform: scale(0.97);
    transition: transform 0.25s var(--ease-out-expo);
}
.video-modal.is-open .video-modal-inner { transform: scale(1); }
.video-modal-video {
    width: 100%; height: 100%; display: block;
    object-fit: contain;
    border-radius: 12px; background: #000;
    box-shadow: 0 30px 80px -20px hsla(220, 35%, 8%, 0.6);
}
/* Close button fixed to the viewport corner — always reachable on mobile + desktop */
.video-modal-close {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    z-index: 2;
    width: 48px; height: 48px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--bg-card); color: var(--fg);
    border: 1px solid var(--border-strong);
    box-shadow: 0 6px 20px hsla(220, 35%, 8%, 0.35);
    cursor: pointer;
    transition: transform 90ms ease-out, background 0.2s;
}
.video-modal-close:hover { color: var(--cyan-2); border-color: var(--cyan); }
.video-modal-close:active { transform: scale(0.92); }
.video-modal-close:focus-visible { outline: none; box-shadow: 0 0 0 3px hsla(195, 85%, 32%, 0.45); }

/* ---------- Nav dots (right edge, ported from deck) ---------- */
.nav-dots {
    position: fixed;
    right: clamp(12px, 2vw, 26px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}
.nav-dot {
    width: 8px; height: 8px;
    border-radius: 999px;
    background: hsla(220, 14%, 50%, 0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: width 0.45s var(--ease-out-expo),
                height 0.45s var(--ease-out-expo),
                background 0.3s var(--ease-out-expo),
                box-shadow 0.3s var(--ease-out-expo);
}
.nav-dot:hover { background: var(--fg-muted); transform: none; width: 8px; height: 14px; }
.nav-dot.active {
    background: var(--cyan);
    width: 8px;
    height: 28px;
    box-shadow:
        0 0 0 6px hsla(195, 85%, 32%, 0.10),
        0 0 14px hsla(195, 85%, 32%, 0.55);
}
.nav-dot:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px hsla(195, 85%, 32%, 0.35);
}

/* ---------- Screen head (eyebrow + h2 + lead) ---------- */
.screen-head {
    display: flex;
    flex-direction: column;
    gap: clamp(0.6rem, 1.1vw, 1rem);
    max-width: 68ch;
}

/* ============================================================
   SCREEN 1 — HERO
   ============================================================ */
.hero-content {
    align-items: flex-start;
    text-align: left;
    max-width: 980px;
}
.hero-content h1 {
    max-width: 18ch;
}
.hero-content .live-dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 0 hsla(0, 72%, 46%, 0.55);
    animation: live-pulse 1.8s ease-out infinite;
}
.hero-ctas {
    display: flex; flex-wrap: wrap; gap: 14px;
    margin-top: clamp(0.4rem, 1vw, 0.8rem);
}
.hero-pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 16px;
    font-family: var(--font-mono); font-size: var(--tiny-size);
    color: var(--fg-muted); letter-spacing: 0.04em;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
    width: max-content;
    max-width: 100%;
}
.hero-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.4rem, 0.7vw, 0.6rem);
    margin-top: clamp(0.6rem, 1vw, 0.9rem);
    max-width: 56ch;
}
/* "Why not an AI chat" chips on Screen 3 — bolder than data-source chips */
.why-chips {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.4rem, 0.8vw, 0.7rem);
    margin-top: clamp(0.5rem, 1vw, 0.8rem);
    max-width: 72ch;
}
.why-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    color: var(--fg);
    letter-spacing: 0.04em;
    box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, 0.9), 0 1px 2px hsla(220, 35%, 8%, 0.04);
}
.why-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.why-dot.cyan    { background: var(--cyan); }
.why-dot.magenta { background: var(--magenta); }
.why-dot.gold    { background: var(--gold); }
.why-dot.purple  { background: var(--purple); }
.hero-pill .sep { color: var(--border-strong); }
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 hsla(0, 72%, 46%, 0.55); transform: scale(1); }
    70%  { box-shadow: 0 0 0 0.7em hsla(0, 72%, 46%, 0); transform: scale(1.06); }
    100% { box-shadow: 0 0 0 0 hsla(0, 72%, 46%, 0); transform: scale(1); }
}

/* Scroll cue (hero) */
.scroll-cue {
    position: absolute;
    bottom: clamp(18px, 3vh, 32px);
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
    background: transparent;
    border: none;
    color: var(--fg-muted);
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.6s var(--ease-out-expo) 0.9s,
                color 0.3s var(--ease-out-expo);
}
.screen.active .scroll-cue { opacity: 0.85; }
.scroll-cue:hover { color: var(--cyan-2); }
.cue-arrow {
    font-size: 1.1rem;
    animation: cue-bob 1.8s ease-in-out infinite;
}
@keyframes cue-bob {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50%      { transform: translateY(6px); opacity: 1; }
}

/* ============================================================
   PRESENTATION-PARITY PRIMITIVES (ported from deck)
   ============================================================ */
.presenter-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: var(--tiny-size);
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--fg-muted);
    width: max-content;
}
.subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 1.6vw, 1.4rem);
    font-weight: 400;
    color: var(--fg-muted);
    line-height: 1.3;
    margin-top: clamp(0.3rem, 0.7vw, 0.6rem);
    max-width: 64ch;
    letter-spacing: -0.015em;
}
.bullet-list {
    list-style: none;
    padding: 0;
    margin-top: clamp(0.3rem, 0.7vw, 0.6rem);
    display: flex;
    flex-direction: column;
    gap: clamp(0.3rem, 0.6vw, 0.55rem);
}
.bullet-list li {
    font-size: var(--small-size);
    padding-left: 1.5em;
    position: relative;
    color: var(--fg);
    line-height: 1.4;
}
.bullet-list li::before {
    content: '';
    position: absolute;
    left: 0.1em; top: 0.5em;
    width: 0.55em; height: 0.55em;
    background: var(--cyan);
    border-radius: 2px;
    transform: rotate(45deg);
}
.gradient-text {
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

/* Quote + blinking cursor (slide 7 reference) */
.quote {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.03em;
    color: var(--fg);
    border-left: 4px solid var(--cyan);
    padding-left: clamp(0.9rem, 1.8vw, 1.6rem);
    margin: 0;
    max-width: 38ch;
}
.quote cite {
    display: block;
    font-style: normal;
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    color: var(--fg-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: clamp(0.7rem, 1.4vw, 1.2rem);
}
.cursor::after {
    content: "▌";
    display: inline-block;
    margin-left: 0.15em;
    color: var(--cyan);
    animation: cursor-blink 1.1s steps(1) infinite;
}
@keyframes cursor-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* Mono agent badge — replaces emoji icons in agent cards for a tech tone */
.agent-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 2px 7px;
    margin-right: 6px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--bg-card);
    background: var(--fg);
    border-radius: 4px;
    text-transform: uppercase;
    line-height: 1.4;
    vertical-align: 1px;
}
.agent-badge.cyan    { background: var(--cyan); }
.agent-badge.magenta { background: var(--magenta); }
.agent-badge.gold    { background: var(--gold); color: hsl(35, 95%, 12%); }  /* contrast on amber */
.agent-badge.purple  { background: var(--purple); }
.agent-badge.orch    { background: var(--fg); }

/* Owner-card colour variants (extend existing card primitive) */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: clamp(0.85rem, 1.5vw, 1.3rem);
    box-shadow:
        inset 0 1px 0 hsla(0, 0%, 100%, 0.9),
        0 1px 2px hsla(220, 35%, 8%, 0.04),
        0 16px 44px hsla(220, 35%, 8%, 0.095);
    transition: transform 0.35s var(--ease-out-expo), border-color 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-out-expo);
}
.card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--border) 60%, var(--cyan));
    box-shadow:
        inset 0 1px 0 hsla(0, 0%, 100%, 0.95),
        0 2px 4px hsla(220, 35%, 8%, 0.06),
        0 22px 56px hsla(220, 35%, 8%, 0.12);
}
.owner-card { border-top: 3px solid var(--cyan); position: relative; }
.owner-card.cyan    { border-top-color: var(--cyan); }
.owner-card.magenta { border-top-color: var(--magenta); }
.owner-card.gold    { border-top-color: var(--gold); }
.owner-card.purple  { border-top-color: var(--purple); }
.owner-card .who {
    font-family: var(--font-mono); font-size: var(--tiny-size); font-weight: 600;
    margin-bottom: clamp(0.3rem, 0.5vw, 0.5rem);
    letter-spacing: 0.08em; text-transform: uppercase;
    display: block;
}
.owner-card.cyan    .who { color: var(--cyan); }
.owner-card.magenta .who { color: var(--magenta); }
.owner-card.gold    .who { color: var(--gold); }
.owner-card.purple  .who { color: var(--purple); }
.owner-card h3 { font-size: clamp(1.05rem, 1.6vw, 1.3rem); margin-bottom: clamp(0.3rem, 0.5vw, 0.5rem); }
.owner-card p { font-size: var(--small-size); line-height: 1.45; margin: 0; color: var(--fg-muted); }

/* Siting map (Infrastructure case — live Leaflet, ported from deck slide 19) */
.siting-map {
    width: 100%;
    height: clamp(140px, 22vh, 220px);
    margin-top: clamp(0.5rem, 0.9vw, 0.8rem);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    position: relative;
}
.siting-map:not(.is-loaded)::before {
    content: 'LOADING MAP…';
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--fg-dim);
    background-image: linear-gradient(110deg, transparent 30%, hsla(195, 85%, 32%, 0.06) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2.2s ease-in-out infinite;
    pointer-events: none;
}
.siting-pin {
    background: hsl(35, 92%, 44%);
    color: white;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Geist', sans-serif;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
    border: 2px solid white;
}
.siting-pin.rank-1 { background: hsl(35, 92%, 44%); }
.siting-pin.rank-2 { background: hsl(28, 90%, 40%); }
.siting-pin.rank-3 { background: hsl(218, 80%, 38%); }
.siting-tip {
    background: var(--bg-card) !important;
    color: var(--fg) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1) !important;
}
.siting-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 0.45rem;
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    color: var(--fg-muted);
    letter-spacing: 0.04em;
}
.siting-legend span { display: inline-flex; align-items: center; gap: 6px; }
.siting-legend .dot {
    width: 18px; height: 18px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: white;
    font-family: 'Geist', sans-serif;
    font-size: 10px;
    font-weight: 700;
}
.siting-legend .dot.rank-1 { background: hsl(35, 92%, 44%); }
.siting-legend .dot.rank-2 { background: hsl(28, 90%, 40%); }
.siting-legend .dot.rank-3 { background: hsl(218, 80%, 38%); }
#sitingMap .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.7) !important;
    font-size: 8px !important;
    color: hsl(218, 12%, 40%) !important;
}

/* Audience chip — sits above each case slide's question h2 */
.audience-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px;
    margin-bottom: 8px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--cyan);
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--fg);
    width: max-content;
    max-width: 100%;
}
.audience-chip.cyan    { border-left-color: var(--cyan); }
.audience-chip.magenta { border-left-color: var(--magenta); }
.audience-chip.gold    { border-left-color: var(--gold); }
.audience-chip.purple  { border-left-color: var(--purple); }

/* Joins-fig + mini-fig */
.joins-fig {
    margin-top: clamp(0.5rem, 0.9vw, 0.8rem);
    padding: clamp(0.5rem, 0.9vw, 0.8rem);
    background: var(--bg-elevated);
    border-radius: 10px;
}
.joins-fig svg { display: block; width: 100%; height: auto; max-height: 200px; }
.mini-fig {
    margin-top: clamp(0.5rem, 0.9vw, 0.8rem);
    padding: clamp(0.5rem, 0.9vw, 0.8rem);
    background: hsla(40, 30%, 95%, 0.85);
    border-radius: 8px;
}
.mini-fig svg { display: block; width: 100%; height: auto; max-height: 130px; }

/* ============================================================
   SCREEN 2 — AGENTIC
   ============================================================ */
.agentic-content {
    gap: clamp(0.8rem, 1.6vw, 1.3rem);
}
.arch-host {
    position: relative;
    width: 100%;
    height: clamp(240px, 40vh, 460px);
    overflow: visible;
    /* CSS-only skeleton until arch_sphere.js mounts the Three.js canvas */
    background:
        radial-gradient(circle at 25% 60%, hsla(195, 85%, 32%, 0.10), transparent 38%),
        radial-gradient(circle at 50% 50%, hsla(0, 72%, 42%, 0.08), transparent 35%),
        radial-gradient(circle at 75% 60%, hsla(218, 80%, 38%, 0.10), transparent 38%);
}
.arch-host.is-loaded,
.arch-host:has(canvas) { background: none; }   /* drop skeleton once canvas mounts */
.arch-host::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(110deg,
        transparent 30%,
        hsla(195, 85%, 32%, 0.06) 50%,
        transparent 70%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2.2s ease-in-out infinite;
    pointer-events: none;
}
.arch-host.is-loaded::before,
.arch-host:has(canvas)::before { display: none; }
@keyframes skeleton-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.arch-sources {
    display: flex;
    flex-direction: column;
    gap: clamp(0.4rem, 0.7vw, 0.6rem);
}
.arch-pipe-title {
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    text-transform: uppercase;
}
.arch-source-chips {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.4rem, 0.7vw, 0.6rem);
}
.arch-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    color: var(--fg);
    box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.arch-pipe-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}
.agentic-callouts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(0.8rem, 1.6vw, 1.4rem);
}
.callout {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: clamp(0.9rem, 1.5vw, 1.3rem);
    box-shadow:
        inset 0 1px 0 hsla(0, 0%, 100%, 0.9),
        0 1px 2px hsla(220, 35%, 8%, 0.04),
        0 12px 32px hsla(220, 35%, 8%, 0.06);
    display: flex;
    align-items: flex-start;
    gap: clamp(0.7rem, 1.2vw, 1rem);
    position: relative;
}
.callout::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 4px;
    border-radius: 14px 0 0 14px;
    background: var(--cyan);
    opacity: 0.95;
}
.callout-magenta::before { background: var(--magenta); }
.callout-icon {
    width: 36px; height: 36px;
    flex-shrink: 0;
    margin-top: 2px;
    padding: 6px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}
.callout-cyan .callout-icon    { background: hsla(195, 85%, 32%, 0.08); border-color: hsla(195, 85%, 32%, 0.32); }
.callout-magenta .callout-icon { background: hsla(335, 70%, 44%, 0.08); border-color: hsla(335, 70%, 44%, 0.32); }
.callout > div { flex: 1; }
.callout p {
    margin: 0.4rem 0 0;
    font-size: var(--small-size);
    color: var(--fg-muted);
    line-height: 1.5;
}
.callout-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    letter-spacing: -0.01em;
}
.callout-tag.cyan    { color: var(--cyan-2); }
.callout-tag.magenta { color: var(--magenta); }

/* ============================================================
   SCREEN 3 — AGENTS IN CONCERT (deck slide 9 port)
   ============================================================ */
.product-content {
    gap: clamp(0.7rem, 1.4vw, 1.2rem);
    align-items: stretch;
}
.slide4-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1rem, 2vw, 1.8rem);
    align-items: stretch;
    margin-top: clamp(0.4rem, 1vw, 0.8rem);
}
/* Screenshot column lands left, agents column right */
.slide4-shot, .mini-carousel.slide4-shot { order: 1; }
.slide4-cards { order: 2; }

/* Desktop rebalance — agents left (narrower), carousel right (dominant).
   Both columns vertically centered so the heavier carousel doesn't dwarf
   the agents stack. Caps the carousel max-width so the page reads. */
@media (min-width: 921px) {
    .product-content { max-width: 1180px; gap: 0.75rem; }
    .slide4-split {
        grid-template-columns: minmax(340px, 0.82fr) minmax(540px, 1.18fr);
        gap: clamp(1rem, 1.6vw, 1.4rem);
        align-items: center;
        margin-top: 0.25rem;
    }
    .slide4-cards { order: 1; align-content: center; }
    .slide4-shot, .mini-carousel.slide4-shot {
        order: 2;
        align-self: center;
        max-width: 700px;
        width: 100%;
        justify-self: center;
    }
    .slide4-agents > .card { min-height: 108px; }
    .shot-wrap, .pof-video-wrap { max-height: min(46vh, 430px); }
}
.slide4-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "orch orch"
      "arrow arrow"
      "agent1 agent2"
      "agent3 agent4";
    gap: clamp(0.5rem, 0.9vw, 0.8rem);
    align-content: start;
}
.slide4-orch { grid-area: orch; background: var(--bg-elevated); border-color: var(--border-strong); }
.slide4-orch .who { color: var(--cyan-2); font-family: var(--font-mono); font-size: var(--tiny-size); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-bottom: 0.3rem; }
.slide4-orch p { font-size: var(--small-size); color: var(--fg-muted); margin: 0; line-height: 1.45; }
.slide4-arrow { grid-area: arrow; display: flex; justify-content: center; align-items: center; height: 28px; }
.slide4-arrow svg { width: 22px; height: 28px; }
.slide4-agents { grid-area: agent1 / agent1 / agent4 / agent2; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(0.5rem, 0.9vw, 0.8rem); }
.slide4-agents > .card { padding: clamp(0.7rem, 1.2vw, 1rem); }
.slide4-agents > .card p { font-size: clamp(0.78rem, 0.95vw, 0.92rem); margin: 0.25rem 0 0; }
.slide4-shot {
    margin: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05), 0 18px 44px rgba(15,23,42,0.10);
    display: flex;
    flex-direction: column;
}
.slide4-query {
    position: relative;
    margin: clamp(0.6rem, 1.1vw, 0.9rem) clamp(0.6rem, 1.1vw, 0.9rem) clamp(0.2rem, 0.4vw, 0.3rem);
    padding: clamp(0.85rem, 1.4vw, 1.2rem) clamp(1rem, 1.8vw, 1.5rem) clamp(0.85rem, 1.4vw, 1.2rem) clamp(2.2rem, 3vw, 2.6rem);
    background:
        linear-gradient(90deg, hsla(195, 85%, 32%, 0.14), transparent 55%),
        var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--cyan);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.2vw, 1.08rem);
    line-height: 1.42;
    color: var(--fg);
    font-weight: 500;
    box-shadow:
        inset 0 1px 0 hsla(0, 0%, 100%, 0.9),
        0 1px 2px hsla(220, 35%, 8%, 0.05),
        0 8px 22px hsla(195, 85%, 22%, 0.10),
        0 18px 38px hsla(220, 35%, 8%, 0.08);
    z-index: 1;
}
/* Terminal-style "> " prefix that picks up the cyan rule */
.slide4-query::before {
    content: '>';
    position: absolute;
    left: clamp(0.9rem, 1.4vw, 1.1rem);
    top: clamp(0.85rem, 1.4vw, 1.2rem);
    color: var(--cyan);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.05em;
    opacity: 0.9;
}
.slide4-shot img {
    display: block;
    width: 100%;
    max-height: clamp(240px, 40vh, 420px);
    object-fit: cover;
    object-position: top center;
}
.slide4-shot figcaption {
    padding: clamp(0.5rem, 1vw, 0.8rem) clamp(1rem, 1.8vw, 1.5rem);
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    color: var(--fg-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

/* Mini-carousel inside slide4-shot (Cascais + PoF query rotation) */
.mini-carousel {
    position: relative;
    overflow: hidden;
    outline: none;
}
/* Engineering-drawing L-corner brackets on the featured surface */
.mini-carousel::before,
.mini-carousel::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--cyan);
    pointer-events: none;
    z-index: 4;
    opacity: 0.78;
}
.mini-carousel::before {
    top: -1px; left: -1px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 4px;
}
.mini-carousel::after {
    bottom: -1px; right: -1px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 4px;
}
.mini-carousel:focus-visible { box-shadow: 0 0 0 3px hsla(195, 85%, 32%, 0.32); }
.mini-carousel-track {
    display: flex;
    transition: transform 0.62s var(--ease-out-expo);
    will-change: transform;
}
.mini-carousel-card {
    flex: 0 0 100%;
    min-width: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
}
.mini-carousel-card img {
    display: block;
    width: 100%;
    max-height: clamp(240px, 40vh, 420px);
    object-fit: cover;
    object-position: top center;
}
/* Cascais screenshot wrap — image in natural flow (no position:absolute) so
   the wrap height always equals the rendered image height. The earlier
   absolute-positioned scheme produced phantom empty space below the image
   on some mobile Safari builds. */
.shot-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--bg-elevated);
    min-height: 200px;          /* hold space while image is decoding */
    line-height: 0;             /* no inline phantom-baseline gap under img */
}
.shot-wrap.is-loaded { min-height: 0; }
.shot-wrap::before {
    content: 'LOADING SCREENSHOT…';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--fg-dim);
    background-image: linear-gradient(110deg,
        transparent 30%,
        hsla(195, 85%, 32%, 0.06) 50%,
        transparent 70%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2.2s ease-in-out infinite;
    pointer-events: none;
}
.shot-wrap.is-loaded::before { display: none; }
.shot-wrap picture { display: block; }
.shot-wrap img {
    display: block;
    width: 100%;
    height: auto;
    max-height: clamp(220px, 36vh, 380px);
    object-fit: cover;
    object-position: top center;
}
/* PoF cycling video — replaces the heavy live iframe.
   Pre-recorded loop of the live PoF map cycling through 19 weeks
   (assets/pof_fire_loop.mp4, ~261KB). Aspect matches the Cascais
   screenshot card so the carousel slides align. */
.pof-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1280 / 900;
    max-height: clamp(240px, 40vh, 420px);
    background: var(--bg-elevated);
    overflow: hidden;
}
.pof-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}
/* Smoother + slower transitions on both carousels */
.mini-carousel-track { transition: transform 0.9s var(--ease-out-expo) !important; }
.mini-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: hsla(0, 0%, 100%, 0.95);
    color: var(--fg);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 3px 0;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.12);
}
.mini-carousel-arrow.left  { left: 8px; }
.mini-carousel-arrow.right { right: 8px; }
.mini-carousel-arrow:hover { background: var(--cyan); color: var(--bg); transform: translateY(-50%) scale(1.05); }
.mini-carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 6;
    background: hsla(0, 0%, 100%, 0.85);
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
}
.mini-carousel-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: hsla(220, 14%, 50%, 0.45);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, transform 0.3s;
}
.mini-carousel-dot.active {
    background: var(--cyan);
    transform: scale(1.4);
}

/* Leaflet PoF map inside Climate "What it answers" card */
.pof-map {
    position: relative;
    width: 100%;
    height: clamp(110px, 14vh, 170px);
    margin-top: clamp(0.4rem, 0.8vw, 0.6rem);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-elevated);
}
.pof-map:not(.is-loaded)::before {
    content: 'LOADING PARCEL MAP…';
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    color: var(--fg-dim);
    background-image: linear-gradient(110deg, transparent 30%, hsla(195, 85%, 32%, 0.06) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 2.2s ease-in-out infinite;
    pointer-events: none;
}
.pof-map-legend {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    color: var(--fg-muted);
    letter-spacing: 0.04em;
}
.pof-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pof-map-legend .swatch {
    width: 12px; height: 12px;
    border-radius: 3px;
    display: inline-block;
}

/* legacy slide5-split kept for fallback */
.slide5-split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(1rem, 2vw, 2rem); align-items: center; margin-top: clamp(0.6rem, 1.2vw, 1rem); }
.slide5-text { display: flex; flex-direction: column; justify-content: center; }
.slide5-shot { margin: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(15,23,42,0.05), 0 12px 32px rgba(15,23,42,0.08); background: var(--bg-card); }
.slide5-shot img { display: block; width: 100%; height: auto; object-fit: contain; }

/* ============================================================
   SCREEN 4 — CAROUSEL (mirrors deck slides 16-19, each w/ bg video)
   ============================================================ */
.cases-screen {
    padding: 0;
}
.cases-screen > .carousel {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
}
.carousel {
    position: relative;
    background: var(--bg);
    overflow: hidden;
    outline: none;
}
.carousel:focus-visible { box-shadow: 0 0 0 3px hsla(195, 85%, 32%, 0.32); }
.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.95s var(--ease-out-expo);
    will-change: transform;
}
.carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}
/* per-slide bg video + scrim (deck has-bg-video pattern) */
.carousel-slide.has-bg-video > .slide-bg-video {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    opacity: 0.78;
    filter: saturate(0.95) contrast(1.05);
}
.carousel-slide.has-bg-video::before {
    content: "";
    position: absolute;
    inset: 0;
    /* lighter, radial-bias scrim so the video reads but cards stay legible */
    background:
        radial-gradient(ellipse at 50% 60%, hsla(40, 30%, 97%, 0.20) 0%, hsla(40, 30%, 97%, 0.45) 55%, hsla(40, 30%, 97%, 0.70) 100%),
        linear-gradient(180deg, hsla(40, 30%, 97%, 0.10) 0%, hsla(40, 30%, 97%, 0.35) 100%);
    z-index: 1;
    pointer-events: none;
}
.carousel-slide.has-bg-video .card {
    background: hsla(0, 0%, 100%, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.case-content {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 1240px;
    margin: 0 auto;
    /* 10% tighter padding all around per latest tightening */
    padding: clamp(3rem, 6vw, 5rem) clamp(1.8rem, 4.5vw, 3.6rem) clamp(2.5rem, 4.5vw, 4rem);
    display: flex;
    flex-direction: column;
    gap: clamp(0.45rem, 0.9vw, 0.8rem);
    overflow-y: auto;
}
.case-content > h2 {
    font-size: clamp(1.5rem, 3.4vw, 2.9rem);
    line-height: 1.1;
    max-width: 28ch;
}
.case-content > .subtitle {
    font-size: clamp(0.92rem, 1.4vw, 1.22rem);
}
.case-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(0.55rem, 1.25vw, 1.1rem);
    margin-top: clamp(0.35rem, 0.9vw, 0.7rem);
}
/* Desktop — tighter padding + unequal columns + capped figure heights
   so the cards don't have ~30% of the viewport as dead space below. */
@media (min-width: 921px) {
    .case-content {
        max-width: 1120px;
        padding: clamp(2.3rem, 4.2vw, 3.6rem) clamp(3rem, 7vw, 5.5rem);
        justify-content: center;
        overflow: hidden;
        gap: 0.6rem;
    }
    .case-two-col {
        grid-template-columns: minmax(360px, 0.9fr) minmax(460px, 1.1fr);
        gap: 1rem;
        max-height: min(58vh, 520px);
    }
    .case-two-col .card { padding: 1rem; min-height: 0; }
    .case-two-col .card .joins-fig,
    .case-two-col .card .mini-fig,
    .case-two-col .card .siting-fig {
        flex: 0 1 auto;
        min-height: 120px;
    }
    .case-two-col .card .joins-fig svg,
    .case-two-col .card .mini-fig svg,
    .case-two-col .card .siting-fig svg {
        max-height: 200px;
    }
    .card-footnote { margin-top: 0.7rem; }
}
.case-two-col .card {
    padding: clamp(0.8rem, 1.25vw, 1.08rem);
    display: flex;
    flex-direction: column;
}
.case-two-col .card > p {
    font-size: clamp(0.8rem, 0.95vw, 0.92rem);
    line-height: 1.4;
}
.case-two-col .bullet-list li {
    font-size: clamp(0.78rem, 0.92vw, 0.9rem);
}
/* Viz fills remaining card height — centred so the SVG doesn't stretch awkwardly */
.case-two-col .card .joins-fig,
.case-two-col .card .mini-fig,
.case-two-col .card .siting-fig {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.case-two-col .card .joins-fig svg,
.case-two-col .card .mini-fig svg,
.case-two-col .card .siting-fig svg {
    width: 100%;
    max-height: 260px;
    height: auto;
}
/* Bottom-pinned footnote — uses remaining flex space + dashed top rule */
.card-footnote {
    margin-top: auto;
    padding-top: clamp(0.4rem, 0.8vw, 0.7rem);
    border-top: 1px dashed var(--border);
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    color: var(--fg-muted);
    letter-spacing: 0.06em;
}
.card-footnote strong {
    color: var(--cyan-2);
    font-weight: 600;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: hsla(0, 0%, 100%, 0.95);
    color: var(--fg);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 4px 0;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}
.carousel-arrow.left  { left: 64px; }
.carousel-arrow.right { right: 64px; }   /* clears the right-edge nav-dots column */
.carousel-arrow:hover { background: var(--cyan); color: var(--bg); transform: translateY(-50%) scale(1.08); box-shadow: 0 8px 24px hsla(195, 85%, 22%, 0.32); }
.carousel-arrow:active { transform: translateY(-50%) scale(0.94); }
.carousel-arrow:focus-visible { outline: none; box-shadow: 0 0 0 3px hsla(195, 85%, 32%, 0.35); }
.mini-carousel-arrow:hover { background: var(--cyan); color: var(--bg); transform: translateY(-50%) scale(1.08); }
.mini-carousel-arrow:active { transform: translateY(-50%) scale(0.94); }
.mini-carousel-arrow:focus-visible { outline: none; box-shadow: 0 0 0 3px hsla(195, 85%, 32%, 0.35); }
.carousel-dots {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 6;
    background: hsla(0, 0%, 100%, 0.92);
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    backdrop-filter: blur(6px);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.10);
}
.carousel-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: hsla(220, 14%, 50%, 0.45);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, transform 0.3s;
}
.carousel-dot.active {
    background: var(--cyan);
    transform: scale(1.35);
}

/* Carousel progress — "01 / 04" + fill bar (replaces dot row) */
.carousel-progress {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px;
    background: hsla(0, 0%, 100%, 0.92);
    border: 1px solid var(--border);
    border-radius: 999px;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px hsla(220, 35%, 8%, 0.10);
    z-index: 6;
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    color: var(--fg);
    letter-spacing: 0.12em;
}
.cp-current { font-weight: 700; color: var(--cyan-2); font-feature-settings: 'tnum'; min-width: 1.6em; text-align: right; }
.cp-sep { color: var(--fg-dim); }
.cp-total { color: var(--fg-muted); font-feature-settings: 'tnum'; }
.cp-bar {
    width: 70px;
    height: 4px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
    margin-left: 4px;
}
.cp-bar-fill {
    display: block;
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    border-radius: 999px;
    transition: width 0.62s var(--ease-out-expo);
}

/* ============================================================
   SCREEN 5 — CTA
   ============================================================ */
.cta-screen {
    /* No opaque wash — the canvas constellation lives at z-index:-1 and needs
       to show through. Just accent glows on top of the body bg. */
    background:
        radial-gradient(circle at 50% 60%, hsla(195, 85%, 32%, 0.12), transparent 28rem),
        radial-gradient(circle at 50% 92%, hsla(335, 70%, 44%, 0.18), transparent 24rem);
}
.cta-content {
    align-items: center;
    text-align: center;
    gap: clamp(0.8rem, 1.6vw, 1.4rem);
    max-width: 920px;
}
.cta-headline {
    font-size: clamp(2.2rem, 5.8vw, 4.2rem);
    line-height: 1.06;
    display: flex;
    flex-direction: column;
    gap: 0.05em;
}
.cta-headline-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.3em;
    opacity: 0.88;
}
.cta-headline-row .cta-arrow {
    color: var(--cyan);
    font-weight: 700;
    transition: transform 0.4s var(--ease-out-expo);
}
.cta-headline-row .cta-right {
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
@media (max-width: 700px) {
    .cta-headline-row { flex-direction: column; gap: 0.1em; }
    .cta-headline-row .cta-arrow { transform: rotate(90deg); }
}
.cta-headline span:nth-child(2):not(.cta-arrow) {
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.cta-sub { margin-left: auto; margin-right: auto; }
.cta-pedigree {
    margin: clamp(0.9rem, 1.8vw, 1.4rem) auto 0;
    max-width: 56ch;
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    color: var(--fg-muted);
    letter-spacing: 0.06em;
}
.cta-footer {
    margin-top: clamp(1.5rem, 3vw, 2.4rem);
    font-family: var(--font-mono);
    font-size: var(--tiny-size);
    color: var(--fg-muted);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
    .agentic-callouts { grid-template-columns: 1fr; }
    .product-content  { gap: 0.9rem; }
    .slide4-split { grid-template-columns: 1fr; gap: 1rem; }
    .slide4-agents { grid-template-columns: 1fr 1fr; }
    .case-two-col { grid-template-columns: 1fr; }
    /* Mobile order — screenshots / queries / fire-map FIRST (visual proof),
       orchestrator + 4 agents SECOND. Reverted per user request. */
    .slide4-shot, .mini-carousel.slide4-shot { order: 1; }
    .slide4-cards { order: 2; }
}
@media (max-width: 700px) {
    /* Nav-dots hidden on mobile — desktop-only chrome (kept clipping at edge on phones) */
    .nav-dots { display: none; }
    /* CSS scroll-snap removed page-wide — nothing to override on mobile. */
    /* Mobile: allow dense screens to grow + scroll natively instead of clipping */
    .screen {
        padding: clamp(4rem, 8vw, 5rem) 1.2rem 3.5rem;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
    }
    /* Mobile: let the use-cases screen + active carousel slide grow with its
       content so users can scroll vertically within a case. Page-level snap
       (proximity) kicks in only when they reach the bottom and keep scrolling. */
    .cases-screen { padding: 0; height: auto; min-height: 100dvh; overflow: visible; }
    .cases-screen > .carousel { height: auto; }
    .cases-screen .carousel-track {
        height: auto;
        align-items: stretch;   /* all slides equal height — no gap below shorter slides */
        /* shorter transition on mobile — long transforms accentuate flicker */
        transition: transform 0.5s cubic-bezier(.16,1,.3,1) !important;
    }
    .cases-screen .carousel-slide { height: auto; min-height: 100dvh; }
    .cases-screen .case-content { height: auto; overflow: visible; padding-bottom: 4rem; }

    /* Mobile: kill backdrop-filter on the case cards. iOS Safari recomputes
       blur every paint and flickers during the track transform. Solid white
       cards look identical to the eye but transform smoothly. */
    .carousel-slide.has-bg-video .card {
        background: hsla(0, 0%, 100%, 0.96) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Mobile: hide bg videos entirely. Atmospheric video looks great on
       desktop but flickers during swipe on iOS Safari (video first-frame
       paint races the scrim composition). Cards on solid cream read cleaner
       and the swipe stays glass-smooth. */
    .carousel-slide.has-bg-video > .slide-bg-video { display: none; }
    .carousel-slide.has-bg-video::before {
        background: var(--bg);
    }
    .hero-content { max-width: 100%; }
    .hero-pill { font-size: 0.7rem; padding: 8px 12px; gap: 6px; }
    .hero-pill .sep { display: none; }
    /* Screen 2 — squeeze so the whole thing fits one viewport on phones */
    .agentic-screen h2 { font-size: clamp(1.45rem, 6vw, 1.85rem); line-height: 1.05; }
    .agentic-screen .lead { font-size: clamp(0.92rem, 3.6vw, 1rem); line-height: 1.35; }
    .agentic-content { gap: clamp(0.5rem, 1.2vw, 0.8rem); }
    .arch-pipe-title { font-size: 0.62rem; }
    .arch-host { height: clamp(160px, 26vh, 240px); }
    .arch-source-chips { gap: 5px; }
    .arch-chip { padding: 3px 9px; font-size: 0.62rem; }
    .callout { padding: 0.8rem; gap: 0.6rem; }
    .callout-icon { width: 30px; height: 30px; padding: 5px; }
    .callout p { font-size: 0.82rem; line-height: 1.4; margin-top: 0.25rem; }
    .callout-tag { font-size: 0.95rem; }
    .agentic-callouts { gap: 0.6rem; }
    .quote { font-size: clamp(1.2rem, 5.4vw, 1.8rem); padding-left: 0.9rem; }
    .slide4-shot img { max-height: 30vh; }
    .case-content { padding: 3.5rem 1.2rem 4rem; }
    .case-content > h2 { font-size: clamp(1.3rem, 6vw, 1.9rem); }
    .case-two-col .card { padding: 0.9rem; }
    .carousel-arrow { width: 34px; height: 34px; font-size: 1.2rem; }
    .carousel-arrow.left  { left: 12px; }
    .carousel-arrow.right { right: 12px; }
    .joins-fig svg { max-height: 140px; }
    .mini-fig svg { max-height: 100px; }
    .cta-headline { font-size: clamp(1.8rem, 8vw, 2.8rem); }
}
