/* ==========================================================================
   Ivy Devs LLC — Cinematic scroll-driven experience
   Dark luxury · Liquid glass · Premium tech
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
    /* Palette — deep ink with warm amber + electric blue accents */
    --bg-0: #07070a;            /* near-black */
    --bg-1: #0c0c11;            /* slightly lifted */
    --bg-2: #14141b;
    --ink-0: #f5f5f7;           /* primary text */
    --ink-1: #c7c8d1;           /* secondary text */
    --ink-2: #8a8b96;           /* muted */
    --ink-3: #5a5b66;           /* very muted */
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);

    /* Accents */
    --amber: #ffb547;           /* the warm garage glow */
    --amber-soft: rgba(255, 181, 71, 0.18);
    --neon: #ff3b6f;            /* taillight pink */
    --ice: #6cf2ff;             /* cool tech accent */

    /* Glass tokens */
    --glass-bg: rgba(255, 255, 255, 0.045);
    --glass-bg-strong: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-blur: blur(22px) saturate(140%);

    /* Type */
    --font-display: "Syncopate", "Space Grotesk", system-ui, sans-serif;
    --font-sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    /* Premium display — cinematic chapters 01–04 only (Fraunces reads clearly vs Space Grotesk) */
    --font-premium: "Fraunces", "Georgia", "Times New Roman", serif;
    /* Cool cyan + silver (chapter treatment; final beat keeps amber) */
    --cinema-ch-cyan: #7eedf7;
    --cinema-ch-cyan-deep: #24b4cf;
    --cinema-ch-cyan-glow: rgba(126, 237, 247, 0.5);
    --cinema-ch-silver: #f2f6fb;
    --cinema-ch-frost: rgba(126, 237, 247, 0.14);
    --cinema-ch-line: rgba(126, 237, 247, 0.38);
    --cinema-ch-signal: rgba(36, 180, 207, 0.55);

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    background: var(--bg-0);
    color: var(--ink-0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    overscroll-behavior-y: none; /* prevent bounce/pull-to-refresh on mobile */
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-1);
    background: var(--bg-0);
    overflow-x: hidden;
}

img,
video,
canvas {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 200ms var(--ease-soft);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

.mono {
    font-family: var(--font-mono);
    font-weight: 400;
    letter-spacing: 0.04em;
}

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

::selection {
    background: var(--amber);
    color: var(--bg-0);
}

/* ---------- Subtle starfield gradient on body ---------- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% -10%, rgba(255, 181, 71, 0.08), transparent 50%),
        radial-gradient(ellipse at 100% 0%, rgba(108, 242, 255, 0.05), transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 59, 111, 0.04), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   LOADER — ivy plant grows, sprouts leaves, blooms into the brand mark
   ========================================================================== */
.loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 65%, #06140a 0%, #000 70%);
    z-index: 200;
    display: grid;
    place-items: center;
    transition: opacity 700ms var(--ease-out), visibility 0s linear 700ms;
}

.loader.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.loader__stage {
    position: relative;
    width: min(280px, 64vw);
    aspect-ratio: 7 / 8;
    isolation: isolate;
}

.loader__vine {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Stem & branches use pathLength="1" so a single dasharray works for any path */
.vine {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: vine-draw 0.95s cubic-bezier(.45, .05, .25, 1) forwards;
}

.vine--branch {
    animation-duration: 0.5s;
}
.vine--b1 { animation-delay: 0.40s; }
.vine--b2 { animation-delay: 0.55s; }
.vine--b3 { animation-delay: 0.70s; }

@keyframes vine-draw {
    to { stroke-dashoffset: 0; }
}

/* Leaves pop in at the tip of each branch with a springy overshoot */
.leaf {
    transform-box: fill-box;
    transform-origin: 50% 50%;
    transform: scale(0) rotate(-12deg);
    opacity: 0;
    animation: leaf-pop 0.55s cubic-bezier(.34, 1.56, .64, 1) forwards;
}

.leaf--1 { animation-delay: 0.85s; }
.leaf--2 { animation-delay: 1.00s; }
.leaf--3 { animation-delay: 1.15s; }

@keyframes leaf-pop {
    0%   { transform: scale(0)    rotate(-14deg); opacity: 0; }
    60%  { transform: scale(1.18) rotate(6deg);   opacity: 1; }
    100% { transform: scale(1)    rotate(0deg);   opacity: 1; }
}

/* Brand logo blooms at the top of the stem */
.loader__bloom {
    position: absolute;
    top: -4%;
    left: 50%;
    width: 64%;
    transform: translate(-50%, 0) scale(0.35) rotate(-8deg);
    opacity: 0;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 0 rgba(122, 255, 138, 0));
    animation:
        bloom-in 0.85s cubic-bezier(.2, .7, .2, 1.25) 1.30s forwards,
        bloom-glow 1.6s ease-in-out 2.15s infinite alternate;
    will-change: transform, opacity, filter;
}

@keyframes bloom-in {
    0% {
        opacity: 0;
        transform: translate(-50%, 6%) scale(0.35) rotate(-8deg);
        filter: drop-shadow(0 0 0 rgba(122, 255, 138, 0));
    }
    60% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1.10) rotate(3deg);
        filter: drop-shadow(0 0 22px rgba(122, 255, 138, 0.85));
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1) rotate(0);
        filter: drop-shadow(0 0 18px rgba(122, 255, 138, 0.7));
    }
}

@keyframes bloom-glow {
    from { filter: drop-shadow(0 0 14px rgba(122, 255, 138, 0.55)); }
    to   { filter: drop-shadow(0 0 28px rgba(160, 255, 170, 0.95)); }
}

.loader__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(14px, 2.2vw, 20px);
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: #d8ffd8;
    opacity: 0;
    text-shadow:
        0 0 6px rgba(122, 255, 138, 0.9),
        0 0 18px rgba(60, 220, 110, 0.7),
        0 0 36px rgba(40, 200, 90, 0.45);
    animation:
        title-rise 0.6s ease-out 1.45s forwards,
        loader-title 2.4s var(--ease-soft) 2.05s infinite;
}

@keyframes title-rise {
    from { opacity: 0; transform: translateY(8px); letter-spacing: 0.55em; }
    to   { opacity: 1; transform: translateY(0);   letter-spacing: 0.32em; }
}

@keyframes loader-title {
    0%, 100% {
        text-shadow:
            0 0 4px rgba(122, 255, 138, 0.7),
            0 0 14px rgba(60, 220, 110, 0.5),
            0 0 28px rgba(40, 200, 90, 0.3);
    }
    50% {
        text-shadow:
            0 0 8px rgba(160, 255, 170, 1),
            0 0 22px rgba(80, 235, 120, 0.85),
            0 0 44px rgba(40, 200, 90, 0.6);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vine, .leaf, .loader__bloom, .loader__title {
        animation: none;
    }
    .vine { stroke-dashoffset: 0; }
    .leaf { transform: none; opacity: 1; }
    .loader__bloom { transform: translate(-50%, 0); opacity: 1; }
    .loader__title { opacity: 1; letter-spacing: 0.32em; }
}

/* ==========================================================================
   NAVBAR — floating glass
   ========================================================================== */
.nav {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1280px, calc(100% - 32px));
    z-index: 100;
    transition: transform 400ms var(--ease-out), opacity 400ms var(--ease-out);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px 12px 22px;
    background: rgba(10, 10, 14, 0.55);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 30px 60px -30px rgba(0, 0, 0, 0.8);
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-0);
    text-decoration: none;
}

.footer__logo {
    display: inline-flex;
}

.site-logo {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
}

.site-logo--nav {
    height: 32px;
    max-width: 200px;
}

.site-logo--footer {
    height: 28px;
    max-width: 200px;
}

.nav__links {
    display: flex;
    gap: 8px;
}

.nav__links a {
    padding: 8px 14px;
    font-size: 13px;
    color: var(--ink-1);
    border-radius: 10px;
    transition: color 200ms, background 200ms;
}

.nav__links a:hover {
    color: var(--ink-0);
    background: rgba(255, 255, 255, 0.05);
}

.nav__cta {
    display: flex;
    gap: 6px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition:
        background 220ms var(--ease-soft),
        border-color 220ms var(--ease-soft),
        color 220ms var(--ease-soft),
        box-shadow 220ms var(--ease-soft);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink-1);
    border-color: var(--glass-border);
    padding: 9px 11px;
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink-0);
}

.btn--primary {
    background: linear-gradient(180deg, #fff 0%, #d8d8df 100%);
    color: #0a0a10;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 12px 30px -12px rgba(255, 255, 255, 0.35);
}

.btn--primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 18px 40px -12px rgba(255, 255, 255, 0.45);
}

.btn--lg {
    padding: 14px 22px;
    font-size: 14px;
    border-radius: 14px;
}

/* Hide nav links on small screens */
@media (max-width: 880px) {
    .nav__links { display: none; }
}

@media (max-width: 520px) {
    .nav__inner { padding: 10px 10px 10px 16px; }
    .btn--primary span { display: none; }
    .btn--primary { padding: 9px 11px; }
}

/* ==========================================================================
   CINEMA — sticky canvas frame sequence
   ========================================================================== */
.cinema {
    position: relative;
    /* tall scroll area drives the frame index. ~600vh = comfortable pacing */
    height: 600vh;
    background: var(--bg-0);
    overscroll-behavior: none; /* prevent pull-to-refresh eating scroll on mobile */
}

.cinema__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: #000;
}

#cinemaCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cinematic vignette for depth */
.cinema__vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 18%, transparent 70%, rgba(0, 0, 0, 0.55) 100%);
    pointer-events: none;
    mix-blend-mode: multiply;
}

/* Subtle film grain */
.cinema__grain {
    position: absolute;
    inset: -10%;
    pointer-events: none;
    opacity: 0.06;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    animation: grain 1.6s steps(6) infinite;
}

@keyframes grain {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(-3%, 2%); }
    40%  { transform: translate(2%, -3%); }
    60%  { transform: translate(-2%, -1%); }
    80%  { transform: translate(3%, 2%); }
    100% { transform: translate(0, 0); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.15); }
}

/* Scroll prompt */
.cinema__prompt {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 10px;
    color: var(--ink-2);
    pointer-events: none;
    transition: opacity 600ms;
    z-index: 5;
}

.cinema__prompt.is-hidden {
    opacity: 0;
}

.prompt__dot {
    animation: scrollDot 1.6s ease-in-out infinite;
    stroke: var(--ink-0);
    stroke-width: 2;
}

@keyframes scrollDot {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50%      { transform: translateY(4px); opacity: 0.4; }
}

/* ---------- Cinema captions / overlays ---------- */
.caption {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 32px;
    opacity: 0;
    transition: opacity 1000ms var(--ease-out);
    pointer-events: none;
    z-index: 4;
    will-change: opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.caption.is-active {
    opacity: 1;
    pointer-events: auto;
}

.caption--side {
    justify-content: flex-start;
    padding-left: 56px;
}

.caption--side.caption--right {
    justify-content: flex-end;
    padding-left: 32px;
    padding-right: 56px;
}

.caption__center {
    text-align: center;
    max-width: 920px;
}

.caption__center--small {
    max-width: 720px;
}

/* Chapter 03 — wider, prose-style headline (less vertical stacking) */
.caption__center--ch3 {
    max-width: min(960px, 94vw);
}

.caption__center--final {
    max-width: min(1000px, 96vw);
}

.caption__panel {
    max-width: 440px;
    padding: 28px 30px;
    border-radius: 22px;
}

/* Eyebrow / kicker */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 10px;
    color: var(--ink-1);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.eyebrow__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 8px var(--amber);
}

/* Hero typography */
.hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 7vw, 96px);
    line-height: 0.96;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--ink-0);
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}

.hero__title--small {
    font-size: clamp(32px, 5vw, 64px);
    line-height: 1.05;
}

/* Chapter 03 — prose width + Space Grotesk (Syncopate stacks too tall here) */
.hero__title--ch3 {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: clamp(22px, 2.65vw, 36px);
    line-height: 1.28;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.hero__title--ch3 .line + .line {
    margin-top: 0.45em;
}

/* Chapter FINAL — THE BEST TIME TO / BUILD / WAS YESTERDAY. + sentence subline */
.hero__title--final {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(22px, 2.75vw, 40px);
    line-height: 1.12;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    max-width: min(920px, 94vw);
    margin-left: auto;
    margin-right: auto;
}

.hero__title--final .line + .line {
    margin-top: 0.22em;
}

.hero__final-sub {
    margin: 1.1em auto 0;
    max-width: min(520px, 90vw);
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: clamp(14px, 1.35vw, 17px);
    line-height: 1.55;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-1);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.hero__final-sub .grad {
    font-weight: 500;
    background: linear-gradient(180deg, #fff 0%, var(--amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 12px rgba(255, 181, 71, 0.4));
}

.hero__title .line {
    display: block;
    overflow: hidden;
}

.hero__title em {
    font-style: italic;
    font-family: "Space Grotesk", serif;
    font-weight: 300;
    color: var(--ink-1);
}

.hero__title .grad {
    background: linear-gradient(180deg, #fff 0%, var(--amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 24px rgba(255, 181, 71, 0.4));
}

.hero__sub {
    margin: 24px auto 0;
    max-width: 540px;
    font-size: clamp(14px, 1.2vw, 16px);
    color: var(--ink-1);
    line-height: 1.6;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   CINEMA CHAPTERS 01–04 — premium (Fraunces + vivid cyan / metallic)
   No looping motion on type. Final chapter unchanged.
   ========================================================================== */

.caption--ch1 .eyebrow,
.caption--ch2 .eyebrow,
.caption--ch3 .eyebrow,
.caption--ch4 .eyebrow {
    color: rgba(240, 248, 252, 0.95);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), var(--cinema-ch-frost));
    border-color: var(--cinema-ch-line);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 0 0 1px var(--cinema-ch-signal) inset,
        0 14px 48px -26px var(--cinema-ch-cyan-glow);
}

.caption--ch1 .eyebrow__dot,
.caption--ch2 .eyebrow__dot,
.caption--ch3 .eyebrow__dot,
.caption--ch4 .eyebrow__dot {
    background: linear-gradient(145deg, #ffffff, var(--cinema-ch-cyan) 45%, var(--cinema-ch-cyan-deep));
    box-shadow:
        0 0 12px var(--cinema-ch-cyan-glow),
        0 0 28px rgba(36, 180, 207, 0.35);
}

/* Ch 01 — centered hero title: stronger metallic + cyan halo */
.caption--ch1 .hero__title {
    font-family: var(--font-premium);
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: clamp(44px, 7.2vw, 104px);
    line-height: 1.02;
    letter-spacing: -0.01em;
    text-transform: none;
    background: linear-gradient(
        168deg,
        #ffffff 0%,
        var(--cinema-ch-silver) 32%,
        #c5d2e2 58%,
        #7a94a8 88%,
        #5a7082 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter:
        drop-shadow(0 2px 28px rgba(0, 0, 0, 0.55))
        drop-shadow(0 0 56px rgba(36, 180, 207, 0.22))
        drop-shadow(0 0 1px rgba(126, 237, 247, 0.35));
}

.caption--ch1 .hero__sub {
    color: rgba(205, 220, 232, 0.97);
    font-weight: 400;
    letter-spacing: 0.015em;
    line-height: 1.68;
    text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.55),
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 24px rgba(36, 180, 207, 0.08);
}

/* Ch 02 + 04 — glass: brighter cyan edge + inner frost */
.caption--ch2 .caption__panel.glass,
.caption--ch4 .caption__panel.glass {
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.07),
        rgba(126, 237, 247, 0.07),
        rgba(255, 255, 255, 0.03)
    );
    border-color: rgba(126, 237, 247, 0.28);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 0 0 1px rgba(126, 237, 247, 0.12) inset,
        0 36px 100px -40px rgba(0, 0, 0, 0.78),
        0 0 48px -20px var(--cinema-ch-cyan-glow);
}

.caption--ch2 .cap__title,
.caption--ch4 .cap__title {
    font-family: var(--font-premium);
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: clamp(26px, 3.15vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: rgba(252, 253, 255, 0.99);
    text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.45),
        0 14px 44px rgba(0, 0, 0, 0.42),
        0 0 32px rgba(36, 180, 207, 0.12);
}

.caption--ch2 .cap__body,
.caption--ch4 .cap__body {
    color: rgba(198, 214, 228, 0.98);
    letter-spacing: 0.012em;
}

.caption--ch2 .cap__closer,
.caption--ch4 .cap__closer {
    font-family: var(--font-premium);
    font-optical-sizing: auto;
    font-weight: 600;
    font-size: clamp(16px, 1.55vw, 21px);
    letter-spacing: 0.01em;
    color: rgba(240, 246, 252, 0.98);
    border-top-color: rgba(126, 237, 247, 0.22);
    text-shadow:
        0 2px 22px rgba(0, 0, 0, 0.45),
        0 0 24px rgba(36, 180, 207, 0.1);
}

/* Ch 03 — frosted strip behind copy (readability, medium weight) */
.caption__center--ch3 {
    position: relative;
    z-index: 0;
}

.caption__center--ch3::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -28px clamp(-16px, -3vw, -24px);
    border-radius: 24px;
    background: linear-gradient(165deg, rgba(6, 10, 16, 0.52), rgba(8, 14, 22, 0.38));
    border: 1px solid rgba(126, 237, 247, 0.2);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 0 0 1px rgba(0, 0, 0, 0.35) inset,
        0 28px 80px -36px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(18px) saturate(132%);
    -webkit-backdrop-filter: blur(18px) saturate(132%);
    pointer-events: none;
}

/* Ch 03 — headline: solid ice metal (no full-block clip) so .ch3-kw can pop */
.caption--ch3 .hero__title--ch3 {
    font-family: var(--font-premium);
    font-optical-sizing: auto;
    font-weight: 500;
    font-size: clamp(25px, 2.9vw, 40px);
    line-height: 1.32;
    letter-spacing: -0.02em;
    text-wrap: balance;
    color: rgba(236, 244, 250, 0.96);
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.55),
        0 2px 24px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(36, 180, 207, 0.14);
    filter: none;
}

.caption--ch3 .ch3-kw {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.98);
    padding: 0.06em 0.22em 0.1em;
    margin: 0 -0.04em;
    border-radius: 0.28em;
    background: linear-gradient(180deg, rgba(126, 237, 247, 0.2), rgba(36, 180, 207, 0.1));
    box-shadow:
        0 0 0 1px rgba(126, 237, 247, 0.45),
        0 0 20px -4px var(--cinema-ch-cyan-glow);
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.75),
        0 0 18px rgba(126, 237, 247, 0.35);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Chapter gradient accents — cyan / silver instead of amber (ch 01–04 only) */
.caption--ch1 .grad,
.caption--ch2 .grad,
.caption--ch3 .grad,
.caption--ch4 .grad {
    background: linear-gradient(188deg, #ffffff 0%, var(--cinema-ch-cyan) 48%, var(--cinema-ch-cyan-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 16px var(--cinema-ch-cyan-glow));
}

.caption--ch4 .pill {
    color: rgba(220, 248, 255, 0.98);
    background: rgba(126, 237, 247, 0.14);
    border-color: rgba(126, 237, 247, 0.32);
    box-shadow: 0 0 14px -6px var(--cinema-ch-cyan-glow);
}

/* Side panel typography */
.cap__title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    color: var(--ink-0);
}

.cap__title .grad {
    background: linear-gradient(180deg, #fff 0%, var(--amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 18px rgba(255, 181, 71, 0.35));
}

.cap__body {
    font-size: 14px;
    color: var(--ink-1);
    line-height: 1.65;
    margin: 0 0 22px;
}

.cap__body:has(+ .cap__closer) {
    margin-bottom: 0;
}

.cap__closer {
    margin: 22px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: clamp(15px, 1.5vw, 18px);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.35;
    color: var(--ink-0);
}

.cap__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    list-style: none;
    margin: 0;
}

.cap__stats li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 12px;
}

.cap__stats span {
    font-size: 9px;
    color: var(--ink-3);
    letter-spacing: 0.12em;
}

.cap__stats b {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 18px;
    color: var(--ink-0);
}

.cap__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    padding: 6px 12px;
    font-size: 10px;
    color: var(--amber);
    background: var(--amber-soft);
    border: 1px solid rgba(255, 181, 71, 0.25);
    border-radius: 999px;
}

/* Cinema responsive */
@media (max-width: 768px) {
    .cinema { height: 550vh; }
    .caption { padding: 0 20px; }
    .caption--side { justify-content: center; padding-left: 20px; }
    .caption--side.caption--right { padding-right: 20px; }
    .caption__panel { max-width: 100%; }
}

/* ==========================================================================
   CHAPTER HERO — premium futuristic typography (ch 01–04)
   A cinematic, HUD-inflected type system layered over the video:
   — bracketed mono chapter marker with pulsing cyan signal
   — Fraunces display with italic, gradient emphasis on key words
   — cinematic meta rows (coordinates, fps, scene)
   — refined side panels with center-dotted dividers
   — pull-quote w/ corner brackets for ch 03
   — numbered process steps w/ draw-in rules for ch 04
   ========================================================================== */

/* Layout wrappers */
.ch-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.ch-stack--hero {
    max-width: min(900px, 94vw);
}

.ch-stack--quote {
    max-width: min(960px, 94vw);
    padding: 48px clamp(22px, 4vw, 56px) 44px;
}

.ch-panel {
    display: flex;
    flex-direction: column;
    padding: 30px 32px 28px;
    max-width: 460px;
    border-radius: 20px;
}

.ch-panel > * + * {
    margin-top: 0;
}

/* ---------- Chapter marker (HUD bracket + pulsing signal) ---------- */
.ch-marker {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 7px 14px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: rgba(240, 248, 252, 0.88);
    background:
        linear-gradient(135deg, rgba(126, 237, 247, 0.05), rgba(255, 255, 255, 0.02) 60%, rgba(126, 237, 247, 0.06));
    border: 1px solid rgba(126, 237, 247, 0.32);
    border-radius: 3px;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.04),
        0 18px 44px -28px rgba(36, 180, 207, 0.55),
        0 0 18px -8px var(--cinema-ch-cyan-glow);
    align-self: flex-start;
}

.ch-stack--hero .ch-marker,
.ch-stack--quote .ch-marker {
    align-self: center;
}

.ch-marker__bracket {
    color: var(--cinema-ch-cyan);
    font-weight: 400;
    font-size: 12px;
    opacity: 0.78;
    letter-spacing: 0;
}

.ch-marker__pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cinema-ch-cyan);
    box-shadow:
        0 0 0 2px rgba(126, 237, 247, 0.18),
        0 0 14px var(--cinema-ch-cyan-glow);
    animation: chPulse 2.4s ease-in-out infinite;
}

@keyframes chPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.8); }
}

.ch-marker__index {
    color: rgba(245, 250, 255, 0.97);
    font-weight: 500;
}

.ch-marker__line {
    width: 18px;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(126, 237, 247, 0.1),
        rgba(126, 237, 247, 0.55),
        rgba(126, 237, 247, 0.1)
    );
}

.ch-marker__label {
    color: var(--cinema-ch-cyan);
    font-weight: 500;
    letter-spacing: 0.24em;
    text-shadow: 0 0 14px rgba(126, 237, 247, 0.3);
}

/* ---------- Title system (Fraunces + italic emphasis) ---------- */
.ch-title {
    font-family: var(--font-premium);
    font-optical-sizing: auto;
    font-weight: 500;
    margin: 0;
    color: rgba(252, 253, 255, 0.99);
    text-wrap: balance;
}

.ch-title em {
    font-style: italic;
    font-weight: 400;
    background: linear-gradient(
        172deg,
        #ffffff 0%,
        var(--cinema-ch-cyan) 50%,
        var(--cinema-ch-cyan-deep) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 22px var(--cinema-ch-cyan-glow));
}

/* Ch 01 — centered hero composition */
.ch-title--hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    line-height: 0.98;
    letter-spacing: -0.015em;
}

.ch-title__prefix {
    font-family: var(--font-mono);
    font-size: clamp(10px, 1.05vw, 12px);
    font-weight: 400;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: rgba(200, 218, 232, 0.72);
    margin-bottom: 2px;
}

.ch-title__main {
    font-size: clamp(56px, 8.4vw, 128px);
    line-height: 0.96;
    letter-spacing: -0.02em;
    font-weight: 500;
    background: linear-gradient(
        168deg,
        #ffffff 0%,
        var(--cinema-ch-silver) 30%,
        #c9d6e5 56%,
        #8a9fb2 84%,
        #5f7383 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter:
        drop-shadow(0 2px 28px rgba(0, 0, 0, 0.55))
        drop-shadow(0 0 56px rgba(36, 180, 207, 0.2));
}

.ch-title__main em {
    padding-right: 0.02em;
}

.ch-title__suffix {
    font-family: var(--font-mono);
    font-size: clamp(11px, 1.15vw, 13px);
    font-weight: 400;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: rgba(210, 228, 242, 0.82);
    margin-top: 10px;
    position: relative;
    padding: 0 18px;
}

.ch-title__suffix::before,
.ch-title__suffix::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 26px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(126, 237, 247, 0.4));
    transform: translateY(-50%);
}

.ch-title__suffix::before {
    right: 100%;
    background: linear-gradient(90deg, transparent, rgba(126, 237, 247, 0.4));
}

.ch-title__suffix::after {
    left: 100%;
    background: linear-gradient(90deg, rgba(126, 237, 247, 0.4), transparent);
}

/* Ch 02 + 04 — side panel title */
.ch-title--panel {
    font-size: clamp(26px, 3.1vw, 40px);
    line-height: 1.14;
    letter-spacing: -0.018em;
    font-weight: 600;
    color: rgba(255, 255, 255, 1);
    margin-top: 20px;
}

/* ---------- Sub copy ---------- */
.ch-sub {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 500;
    line-height: 1.66;
    color: rgba(228, 238, 248, 0.98);
    letter-spacing: 0.005em;
    max-width: 560px;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5), 0 6px 24px rgba(0, 0, 0, 0.55);
}

.ch-sub--hero {
    font-size: clamp(16px, 1.45vw, 19px);
}

.ch-sub--hero + .ch-sub--hero {
    margin-top: 14px;
}

.ch-sub__accent {
    font-family: var(--font-premium);
    font-style: italic;
    font-weight: 500;
    background: linear-gradient(172deg, #ffffff 0%, var(--cinema-ch-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 14px var(--cinema-ch-cyan-glow));
    letter-spacing: -0.01em;
    padding-left: 4px;
}

/* ---------- Chapter meta row (coordinates) ---------- */
.ch-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.28em;
    color: rgba(220, 234, 246, 0.5);
    text-transform: uppercase;
}

.ch-meta__sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--cinema-ch-cyan);
    opacity: 0.55;
    box-shadow: 0 0 10px var(--cinema-ch-cyan-glow);
}

/* ---------- Side panel (ch 02 + 04) body & divider ---------- */
.ch-divider {
    position: relative;
    height: 1px;
    margin: 20px 0 20px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(126, 237, 247, 0.35) 35%,
        rgba(126, 237, 247, 0.35) 65%,
        transparent
    );
}

.ch-divider::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cinema-ch-cyan);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 14px var(--cinema-ch-cyan-glow);
}

.ch-body {
    font-family: var(--font-sans);
    font-size: clamp(14.5px, 1.15vw, 16px);
    font-weight: 450;
    line-height: 1.76;
    letter-spacing: 0.008em;
    color: rgba(222, 234, 246, 0.99);
    margin: 0 0 14px;
}

.ch-body:last-of-type {
    margin-bottom: 0;
}

.ch-body em {
    font-style: italic;
    font-weight: 500;
    font-family: var(--font-premium);
    color: rgba(245, 251, 255, 0.98);
    background: linear-gradient(172deg, #ffffff 0%, var(--cinema-ch-cyan) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.005em;
}

.ch-signoff {
    position: relative;
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(126, 237, 247, 0.2);
    font-family: var(--font-premium);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(15px, 1.45vw, 18.5px);
    line-height: 1.42;
    letter-spacing: 0.005em;
    color: rgba(240, 246, 252, 0.98);
    text-shadow:
        0 2px 22px rgba(0, 0, 0, 0.45),
        0 0 24px rgba(36, 180, 207, 0.1);
}

.ch-signoff__mark {
    display: inline-block;
    margin-right: 10px;
    color: var(--cinema-ch-cyan);
    font-style: normal;
    font-weight: 500;
    filter: drop-shadow(0 0 10px var(--cinema-ch-cyan-glow));
}

/* ---------- Numbered steps (ch 04) ---------- */
.ch-steps {
    list-style: none;
    margin: 24px 0 0;
    padding: 18px 0 2px;
    border-top: 1px solid rgba(126, 237, 247, 0.18);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ch-step {
    display: grid;
    grid-template-columns: 32px 26px 1fr;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(220, 245, 252, 0.92);
}

.ch-step__num {
    color: var(--cinema-ch-cyan);
    font-weight: 600;
    text-shadow: 0 0 12px var(--cinema-ch-cyan-glow);
}

.ch-step__rule {
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(126, 237, 247, 0.15),
        rgba(126, 237, 247, 0.6)
    );
}

.ch-step__name {
    color: rgba(230, 248, 255, 0.95);
    font-family: var(--font-mono);
    font-weight: 500;
}

/* ---------- Ch 03 — pull-quote w/ corner brackets ---------- */
.caption__center--ch3.ch-stack--quote {
    position: relative;
}

/* Override the old full-background frosted card — align to content box so
   corner brackets sit precisely on the card edges. */
.caption__center--ch3.ch-stack--quote::before {
    inset: 0;
    background: linear-gradient(
        165deg,
        rgba(6, 10, 16, 0.48),
        rgba(8, 14, 22, 0.3)
    );
    border: 1px solid rgba(126, 237, 247, 0.14);
    border-radius: 4px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        inset 0 0 0 1px rgba(0, 0, 0, 0.28),
        0 30px 80px -36px rgba(0, 0, 0, 0.58),
        0 0 48px -24px var(--cinema-ch-cyan-glow);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.ch-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.85;
}

.ch-corner::before,
.ch-corner::after {
    content: "";
    position: absolute;
    background: linear-gradient(
        90deg,
        var(--cinema-ch-cyan),
        rgba(126, 237, 247, 0.2)
    );
    box-shadow: 0 0 12px var(--cinema-ch-cyan-glow);
}

.ch-corner::before {
    width: 22px;
    height: 1.5px;
}

.ch-corner::after {
    width: 1.5px;
    height: 22px;
}

.ch-corner--tl { top: 14px; left: 14px; }
.ch-corner--tl::before { top: 0; left: 0; }
.ch-corner--tl::after  { top: 0; left: 0; }

.ch-corner--tr { top: 14px; right: 14px; transform: scaleX(-1); }
.ch-corner--tr::before { top: 0; left: 0; }
.ch-corner--tr::after  { top: 0; left: 0; }

.ch-corner--bl { bottom: 14px; left: 14px; transform: scaleY(-1); }
.ch-corner--bl::before { top: 0; left: 0; }
.ch-corner--bl::after  { top: 0; left: 0; }

.ch-corner--br { bottom: 14px; right: 14px; transform: scale(-1, -1); }
.ch-corner--br::before { top: 0; left: 0; }
.ch-corner--br::after  { top: 0; left: 0; }

.ch-quote {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    max-width: 880px;
    margin: 0 auto;
}

.ch-quote__mark {
    font-family: var(--font-premium);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(72px, 10vw, 140px);
    line-height: 0.4;
    color: var(--cinema-ch-cyan);
    opacity: 0.68;
    margin: 10px 0 -0.05em;
    filter: drop-shadow(0 0 28px var(--cinema-ch-cyan-glow));
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.95),
        var(--cinema-ch-cyan) 55%,
        var(--cinema-ch-cyan-deep)
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ch-quote__body {
    margin: 0;
    padding: 0;
    font-family: var(--font-premium);
    font-optical-sizing: auto;
    font-weight: 500;
    font-size: clamp(24px, 3.05vw, 40px);
    line-height: 1.34;
    letter-spacing: -0.018em;
    color: rgba(240, 248, 252, 0.97);
    text-wrap: balance;
    text-shadow:
        0 1px 0 rgba(0, 0, 0, 0.55),
        0 2px 24px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(36, 180, 207, 0.12);
}

.ch-quote__body em {
    font-style: italic;
    font-weight: 500;
    background: linear-gradient(
        172deg,
        #ffffff 0%,
        var(--cinema-ch-cyan) 55%,
        var(--cinema-ch-cyan-deep) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 24px var(--cinema-ch-cyan-glow));
    letter-spacing: -0.012em;
}

.ch-quote__end {
    margin: 14px 0 0;
    font-family: var(--font-premium);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.4;
    letter-spacing: 0.005em;
    color: rgba(245, 251, 255, 0.96);
    background: linear-gradient(
        172deg,
        #ffffff 0%,
        var(--cinema-ch-cyan) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 16px var(--cinema-ch-cyan-glow));
}

/* ---------- Entry motion — transition-based reveal (smooth cross-fade + graceful exit) ---------- */
.caption--ch1 .ch-title__main,
.caption--ch1 .ch-title__prefix,
.caption--ch1 .ch-title__suffix,
.caption--ch1 .ch-sub,
.caption--ch2 .ch-title,
.caption--ch2 .ch-body,
.caption--ch2 .ch-signoff,
.caption--ch3 .ch-quote__mark,
.caption--ch3 .ch-quote__body,
.caption--ch3 .ch-quote__end,
.caption--ch3 .ch-meta,
.caption--ch4 .ch-title,
.caption--ch4 .ch-body,
.caption--ch4 .ch-step,
.caption--final .eyebrow,
.caption--final .hero__title--final .line,
.caption--final .hero__final-sub {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    transition:
        opacity 600ms var(--ease-out),
        transform 600ms var(--ease-out);
    transition-delay: 0ms;
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.caption--ch1.is-active .ch-title__main,
.caption--ch1.is-active .ch-title__prefix,
.caption--ch1.is-active .ch-title__suffix,
.caption--ch1.is-active .ch-sub,
.caption--ch2.is-active .ch-title,
.caption--ch2.is-active .ch-body,
.caption--ch2.is-active .ch-signoff,
.caption--ch3.is-active .ch-quote__mark,
.caption--ch3.is-active .ch-quote__body,
.caption--ch3.is-active .ch-quote__end,
.caption--ch3.is-active .ch-meta,
.caption--ch4.is-active .ch-title,
.caption--ch4.is-active .ch-body,
.caption--ch4.is-active .ch-step,
.caption--final.is-active .eyebrow,
.caption--final.is-active .hero__title--final .line,
.caption--final.is-active .hero__final-sub {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-duration: 950ms;
}

/* Staggered entry delays */
.caption--ch1.is-active .ch-title__main                                    { transition-delay: 140ms; }
.caption--ch1.is-active .ch-title__suffix                                  { transition-delay: 240ms; }
.caption--ch1.is-active .ch-stack--hero > .ch-sub--hero:first-of-type      { transition-delay: 320ms; }
.caption--ch1.is-active .ch-stack--hero > .ch-sub--hero + .ch-sub--hero    { transition-delay: 400ms; }

.caption--ch2.is-active .ch-title             { transition-delay: 140ms; }
.caption--ch2.is-active .ch-body              { transition-delay: 280ms; }
.caption--ch2.is-active .ch-signoff           { transition-delay: 420ms; }

.caption--ch3.is-active .ch-quote__mark       { transition-delay: 80ms; }
.caption--ch3.is-active .ch-quote__body       { transition-delay: 200ms; }
.caption--ch3.is-active .ch-quote__end        { transition-delay: 380ms; }
.caption--ch3.is-active .ch-meta              { transition-delay: 480ms; }

.caption--ch4.is-active .ch-title             { transition-delay: 140ms; }
.caption--ch4.is-active .ch-body:nth-of-type(1) { transition-delay: 260ms; }
.caption--ch4.is-active .ch-body:nth-of-type(2) { transition-delay: 340ms; }
.caption--ch4.is-active .ch-body:nth-of-type(3) { transition-delay: 420ms; }
.caption--ch4.is-active .ch-step:nth-child(1) { transition-delay: 540ms; }
.caption--ch4.is-active .ch-step:nth-child(2) { transition-delay: 620ms; }
.caption--ch4.is-active .ch-step:nth-child(3) { transition-delay: 700ms; }

.caption--final.is-active .eyebrow                         { transition-delay: 80ms; }
.caption--final.is-active .hero__title--final .line:nth-child(1) { transition-delay: 180ms; }
.caption--final.is-active .hero__title--final .line:nth-child(2) { transition-delay: 300ms; }
.caption--final.is-active .hero__title--final .line:nth-child(3) { transition-delay: 420ms; }
.caption--final.is-active .hero__final-sub                 { transition-delay: 600ms; }

@media (prefers-reduced-motion: reduce) {
    .caption--ch1 .ch-title__main,
    .caption--ch1 .ch-title__prefix,
    .caption--ch1 .ch-title__suffix,
    .caption--ch1 .ch-sub,
    .caption--ch2 .ch-title,
    .caption--ch2 .ch-body,
    .caption--ch2 .ch-signoff,
    .caption--ch3 .ch-quote__mark,
    .caption--ch3 .ch-quote__body,
    .caption--ch3 .ch-quote__end,
    .caption--ch3 .ch-meta,
    .caption--ch4 .ch-title,
    .caption--ch4 .ch-body,
    .caption--ch4 .ch-step,
    .caption--final .eyebrow,
    .caption--final .hero__title--final .line,
    .caption--final .hero__final-sub {
        transition: opacity 200ms linear !important;
        transform: none !important;
    }
    .caption--ch1.is-active .ch-title__main,
    .caption--ch1.is-active .ch-title__prefix,
    .caption--ch1.is-active .ch-title__suffix,
    .caption--ch1.is-active .ch-sub,
    .caption--ch2.is-active .ch-title,
    .caption--ch2.is-active .ch-body,
    .caption--ch2.is-active .ch-signoff,
    .caption--ch3.is-active .ch-quote__mark,
    .caption--ch3.is-active .ch-quote__body,
    .caption--ch3.is-active .ch-quote__end,
    .caption--ch3.is-active .ch-meta,
    .caption--ch4.is-active .ch-title,
    .caption--ch4.is-active .ch-body,
    .caption--ch4.is-active .ch-step,
    .caption--final.is-active .eyebrow,
    .caption--final.is-active .hero__title--final .line,
    .caption--final.is-active .hero__final-sub {
        transition-delay: 0ms !important;
    }
    .ch-marker__pulse { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .ch-stack--quote { padding: 36px 20px 34px; }
    .ch-panel { padding: 24px 22px 22px; }
    .ch-title__main { font-size: clamp(44px, 12vw, 80px); }
    .ch-quote__body { font-size: clamp(20px, 4.6vw, 28px); }
    .ch-corner { width: 16px; height: 16px; }
    .ch-corner::before { width: 16px; }
    .ch-corner::after  { height: 16px; }
    .ch-corner--tl, .ch-corner--tr { top: 10px; }
    .ch-corner--bl, .ch-corner--br { bottom: 10px; }
    .ch-corner--tl, .ch-corner--bl { left: 10px; }
    .ch-corner--tr, .ch-corner--br { right: 10px; }
    .ch-meta { gap: 10px; font-size: 9px; }
    .ch-step { grid-template-columns: 26px 20px 1fr; gap: 10px; font-size: 10px; }
}

/* ==========================================================================
   GLASS — base utility
   ========================================================================== */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 30px 80px -40px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section {
    position: relative;
    padding: 96px 0 72px;
}

.section--tight { padding: 48px 0 48px; }

.container {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.section__head {
    max-width: 720px;
    margin: 0 auto 44px;
    text-align: center;
}

.section__title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 0 18px;
    color: var(--ink-0);
}

.section__lede {
    font-size: 15px;
    color: var(--ink-2);
    line-height: 1.65;
    margin: 0;
}

/* ==========================================================================
   SERVICES — Interactive 6-card gallery w/ shared-element FLIP expand
   ========================================================================== */
.services {
    position: relative;
    padding: 88px 0 88px;
    isolation: isolate;
}
.services__lede {
    max-width: 520px;
    margin: 10px auto 0;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    perspective: 1400px;
    position: relative;
    z-index: 1;
}

/* ---------- Card shell ---------- */
.service-card {
    --rx: 0deg;
    --ry: 0deg;
    --mx: 50%;
    --my: 50%;
    --reveal: 1; /* visible by default — entrance animation is opt-in via .is-pre */
    position: relative;
    display: block;
    padding: 0;
    border-radius: 22px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    outline: none;
    transform-style: preserve-3d;
    transform: translate3d(0, calc((1 - var(--reveal)) * 40px), 0) scale(calc(0.96 + var(--reveal) * 0.04));
    opacity: var(--reveal);
    transition: opacity 700ms var(--ease-out), transform 900ms cubic-bezier(0.22, 1.2, 0.36, 1);
    transition-delay: calc(var(--i, 0) * 80ms);
    will-change: transform, opacity;
}
/* JS adds .is-pre to start cards hidden; .is-in removes it when in view.
   If JS never runs (or IO never fires), cards remain visible by default. */
.service-card.is-pre {
    --reveal: 0;
}
.service-card.is-in {
    --reveal: 1;
}
.service-card:focus-visible .service-card__inner {
    border-color: rgba(255, 181, 71, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.18), 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}

.service-card__inner {
    position: relative;
    height: 100%;
    padding: 18px 18px 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    overflow: hidden;
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: border-color 300ms var(--ease-soft), box-shadow 400ms var(--ease-soft), transform 500ms var(--ease-out);
    will-change: transform;
}

.service-card:hover .service-card__inner,
.service-card:focus-visible .service-card__inner {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 181, 71, 0.08) inset;
}

.service-card__sheen {
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: radial-gradient(320px 220px at var(--mx) var(--my), rgba(255, 181, 71, 0.22), rgba(255, 181, 71, 0) 60%);
    opacity: 0;
    transition: opacity 400ms var(--ease-soft);
    mix-blend-mode: screen;
}
.service-card:hover .service-card__sheen {
    opacity: 1;
}

/* ---------- Preview stage ---------- */
.service-card__preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    background: radial-gradient(120% 100% at 50% 0%, rgba(255, 181, 71, 0.10), rgba(0, 0, 0, 0) 60%), linear-gradient(180deg, #0a0a10, #06060a);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 18px;
}

/* ---------- Meta ---------- */
.service-card__meta {
    position: relative;
    padding: 2px 6px 4px;
}

.service-card__index {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--ink-2);
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 14px;
}

.service-card__title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 22px;
    line-height: 1.2;
    color: var(--ink-0);
    margin: 0 0 8px;
    letter-spacing: -0.015em;
}

.service-card__body {
    font-size: 13.5px;
    color: var(--ink-2);
    line-height: 1.6;
    margin: 0 0 14px;
}

.service-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--amber);
    opacity: 0.85;
    transition: gap 300ms var(--ease-out), opacity 200ms var(--ease-soft);
}
.service-card:hover .service-card__cta { gap: 10px; opacity: 1; }

/* ---------- Expanded / dim states ---------- */
.services[data-expanded="true"] .service-card:not(.is-open) {
    opacity: 0.12;
    filter: blur(10px) saturate(0.5);
    transform: translate3d(0, 0, 0) scale(0.96);
    pointer-events: none;
    transition: opacity 450ms var(--ease-out), filter 450ms var(--ease-out), transform 500ms var(--ease-out);
}

.service-card.is-open {
    z-index: 90;
    cursor: default;
}
.service-card.is-flipping {
    position: fixed;
    margin: 0;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform-origin: top left;
    will-change: left, top, width, height;
    z-index: 90;
}
.services__placeholder {
    visibility: hidden;
    pointer-events: none;
    border-radius: 22px;
}
.service-card.is-flipping .service-card__inner {
    transform: none;
    height: 100%;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 80px 160px -60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 181, 71, 0.12) inset;
}
.service-card.is-open .service-card__sheen { opacity: 0; }

/* Expanded inner layout: bigger preview, heading on the side */
.service-card.is-open .service-card__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 28px;
    padding: 24px;
    align-items: stretch;
    overflow: hidden;
}
.service-card.is-open .service-card__preview,
.service-card.is-open .service-card__meta {
    min-width: 0;
    min-height: 0;
}
.service-card.is-open .service-card__preview {
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
}
.service-card.is-open .service-card__meta {
    align-self: center;
    padding: 6px 8px;
    overflow: auto;
    max-height: 100%;
}
.service-card.is-open .service-card__title {
    font-size: clamp(28px, 3vw, 40px);
    margin-bottom: 14px;
}
.service-card.is-open .service-card__body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-1);
    margin-bottom: 20px;
}
.service-card.is-open .service-card__cta {
    display: none;
}

/* ---------- Backdrop ---------- */
.services__backdrop {
    position: fixed;
    inset: 0;
    background: radial-gradient(120% 90% at 50% 30%, rgba(12, 12, 17, 0.5), rgba(7, 7, 10, 0.92));
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    opacity: 0;
    pointer-events: none;
    z-index: 70;
    transition: opacity 400ms var(--ease-out);
}
.services[data-expanded="true"] .services__backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Close button ---------- */
.services__close {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(14, 14, 20, 0.75);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--ink-0);
    font-size: 10px;
    letter-spacing: 0.22em;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.services[data-expanded="true"] .services__close {
    opacity: 1;
    transform: translateY(0);
}
.services__close-hint {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    font-size: 9px;
    color: var(--ink-2);
}

/* ==========================================================================
   MOTIFS — per-card animated previews (pure CSS)
   ========================================================================== */

/* ----- Shared motif root ----- */
.motif {
    position: absolute;
    inset: 0;
    overflow: hidden;
    color: var(--ink-1);
}

/* ----- 01 Landing pages ----- */
.motif--landing {
    background: linear-gradient(180deg, #0b0b14, #06060a);
}
.ml-browser {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 5;
}
.ml-browser span {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}
.ml-browser span:nth-child(1) { background: #ff5f57; }
.ml-browser span:nth-child(2) { background: #febc2e; }
.ml-browser span:nth-child(3) { background: #28c840; }
.ml-browser__url {
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 7px;
    letter-spacing: 0.16em;
    color: var(--ink-1);
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
}
.ml-browser__dots {
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--ink-3);
}
.ml-stage {
    position: absolute;
    inset: 20px 0 0 0;
    overflow: hidden;
}
.ml-scroll {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    animation: ml-scroll 12s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
@keyframes ml-scroll {
    0%   { transform: translateY(0); }
    35%  { transform: translateY(-55%); }
    60%  { transform: translateY(-55%); }
    100% { transform: translateY(0); }
}

/* ----- Hero ----- */
.ml-hero {
    position: relative;
    flex: 0 0 auto;
    min-height: 100%;
    padding: 10px 14px 16px;
    overflow: hidden;
    isolation: isolate;
}
.ml-nav {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: rgba(12, 12, 18, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.ml-nav__logo {
    width: auto;
    height: 10px;
    max-width: 36px;
    object-fit: contain;
    object-position: left center;
    display: block;
    flex: 0 0 auto;
}
.ml-nav__link {
    flex: 0 0 auto;
    width: 22px; height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
}
.ml-nav__link:nth-child(3) { width: 30px; }
.ml-nav__link:nth-child(4) { width: 18px; }
.ml-nav__cta {
    margin-left: auto;
    width: 26px; height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber), #ffd88a);
}
.ml-hero__bg {
    position: absolute;
    inset: -20% -10% -10% -10%;
    z-index: 0;
    background:
        radial-gradient(60% 55% at 18% 30%, rgba(255, 181, 71, 0.55), transparent 60%),
        radial-gradient(55% 55% at 82% 20%, rgba(255, 59, 111, 0.45), transparent 60%),
        radial-gradient(75% 65% at 50% 100%, rgba(108, 242, 255, 0.35), transparent 65%),
        linear-gradient(180deg, #12111a, #0b0b12);
    filter: saturate(1.15);
    animation: ml-bg 10s ease-in-out infinite;
}
@keyframes ml-bg {
    0%, 100% { transform: scale(1) translate(0, 0); }
    50%      { transform: scale(1.08) translate(-2%, 1%); }
}
.ml-hero__grain {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.18;
    mix-blend-mode: overlay;
    background-image:
        radial-gradient(rgba(255,255,255,0.6) 1px, transparent 1.5px),
        radial-gradient(rgba(0,0,0,0.5) 1px, transparent 1.5px);
    background-size: 3px 3px, 5px 5px;
    background-position: 0 0, 1px 2px;
    pointer-events: none;
}
.ml-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.ml-hero__eyebrow {
    display: inline-block;
    align-self: flex-start;
    font-size: 7px;
    letter-spacing: 0.25em;
    color: var(--ink-0);
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 59, 111, 0.18);
    border: 1px solid rgba(255, 59, 111, 0.45);
    box-shadow: 0 0 14px rgba(255, 59, 111, 0.22);
}
.ml-hero__title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}
.ml-hero__word {
    height: 12px;
    width: 78%;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(255,255,255,0.55));
}
.ml-hero__word--accent {
    width: 55%;
    height: 14px;
    background: linear-gradient(90deg, var(--amber), var(--neon) 60%, var(--ice));
    box-shadow: 0 0 20px rgba(255, 181, 71, 0.35);
}
.ml-hero__word--sm {
    width: 42%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
}
.ml-hero__sub {
    height: 5px;
    width: 68%;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.18);
    margin-top: 4px;
}
.ml-hero__sub--short { width: 48%; }
.ml-hero__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.ml-cta {
    position: relative;
    width: 58px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber), #ffd88a);
    box-shadow: 0 8px 20px -6px rgba(255, 181, 71, 0.6), 0 0 24px rgba(255, 181, 71, 0.35);
    overflow: hidden;
    animation: ml-cta 6s ease-in-out infinite;
}
@keyframes ml-cta {
    0%, 60%, 100% { transform: scale(1); box-shadow: 0 8px 20px -6px rgba(255,181,71,0.6), 0 0 24px rgba(255,181,71,0.35); }
    68%           { transform: scale(0.94); box-shadow: 0 4px 14px -6px rgba(255,181,71,0.8), 0 0 40px rgba(255,181,71,0.55); }
    74%           { transform: scale(1.04); }
}
.ml-cta__ripple {
    position: absolute;
    top: 50%; left: 50%;
    width: 6px; height: 6px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.55);
    animation: ml-ripple 6s ease-out infinite;
}
@keyframes ml-ripple {
    0%, 65%, 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    68%           { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    85%           { transform: translate(-50%, -50%) scale(7); opacity: 0; }
}
.ml-cta--ghost {
    width: 40px;
    height: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    box-shadow: none;
    animation: none;
}
.ml-cta--ghost::before { display: none; }
.ml-chips {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.ml-chip {
    font-size: 7px;
    letter-spacing: 0.2em;
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid currentColor;
    opacity: 0.9;
    animation: ml-chip 4s ease-in-out infinite;
}
.ml-chip--a { color: var(--amber); background: rgba(255, 181, 71, 0.12); animation-delay: 0s; }
.ml-chip--b { color: var(--ice); background: rgba(108, 242, 255, 0.12); animation-delay: -1.3s; }
.ml-chip--c { color: #4ade80; background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.6); animation-delay: -2.6s; }
@keyframes ml-chip {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-3px); }
}

/* ----- Features strip ----- */
.ml-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px 14px 10px;
    background: linear-gradient(180deg, #0d0d16, #0a0a12);
}
.ml-feat {
    padding: 9px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    animation: ml-feat 12s ease-in-out infinite;
}
.ml-feat--a { border-color: rgba(255, 181, 71, 0.35); animation-delay: 2.0s; }
.ml-feat--b { border-color: rgba(255, 59, 111, 0.35); animation-delay: 2.4s; }
.ml-feat--c { border-color: rgba(108, 242, 255, 0.35); animation-delay: 2.8s; }
@keyframes ml-feat {
    0%, 15% { opacity: 0; transform: translateY(6px); }
    22%, 55% { opacity: 1; transform: translateY(0); }
    62%, 100% { opacity: 1; transform: translateY(0); }
}
.ml-feat__dot {
    width: 10px; height: 10px;
    border-radius: 3px;
}
.ml-feat--a .ml-feat__dot { background: var(--amber); box-shadow: 0 0 8px rgba(255,181,71,0.5); }
.ml-feat--b .ml-feat__dot { background: var(--neon); box-shadow: 0 0 8px rgba(255,59,111,0.5); }
.ml-feat--c .ml-feat__dot { background: var(--ice); box-shadow: 0 0 8px rgba(108,242,255,0.5); }
.ml-feat__t { height: 5px; width: 80%; border-radius: 2px; background: rgba(255,255,255,0.4); }
.ml-feat__b { height: 3px; width: 65%; border-radius: 2px; background: rgba(255,255,255,0.15); }

/* ----- Testimonial / Pricing tease ----- */
.ml-tease {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 10px;
    padding: 10px 14px 20px;
    background: #0a0a12;
}
.ml-quote {
    position: relative;
    padding: 10px 10px 10px 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ml-quote__mark {
    position: absolute;
    top: -2px; left: 6px;
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1;
    color: var(--amber);
    opacity: 0.8;
}
.ml-quote__l { height: 4px; width: 90%; border-radius: 2px; background: rgba(255,255,255,0.35); }
.ml-quote__l--sm { width: 60%; background: rgba(255,255,255,0.18); }
.ml-quote__author { margin-top: 4px; height: 3px; width: 40%; border-radius: 2px; background: rgba(255,181,71,0.6); }
.ml-price {
    padding: 10px;
    border-radius: 8px;
    background: linear-gradient(160deg, rgba(255,181,71,0.12), rgba(255,181,71,0));
    border: 1px solid rgba(255, 181, 71, 0.3);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ml-price__tag {
    align-self: flex-start;
    font-size: 7px;
    letter-spacing: 0.25em;
    color: var(--amber);
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(255, 181, 71, 0.15);
    border: 1px solid rgba(255, 181, 71, 0.3);
}
.ml-price__big { height: 12px; width: 70%; border-radius: 3px; background: var(--ink-0); }
.ml-price__sub { height: 4px; width: 55%; border-radius: 2px; background: rgba(255,255,255,0.2); }
.ml-price__btn {
    margin-top: 2px;
    height: 10px; width: 60%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
}

/* ----- Cursor ----- */
.ml-cursor {
    position: absolute;
    top: 56%;
    left: 20%;
    width: 11px;
    height: 15px;
    z-index: 6;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.7));
    animation: ml-cursor 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.ml-cursor::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ink-0);
    clip-path: polygon(0 0, 100% 45%, 48% 55%, 72% 100%, 56% 100%, 32% 62%, 0 82%);
}
@keyframes ml-cursor {
    0%   { transform: translate(0, 0) scale(1); }
    10%  { transform: translate(-18px, -8px) scale(1); }
    25%  { transform: translate(-40px, 8px) scale(1); }
    32%  { transform: translate(-40px, 8px) scale(0.9); }
    34%  { transform: translate(-40px, 8px) scale(1); }
    60%  { transform: translate(-40px, 8px) scale(1); }
    100% { transform: translate(0, 0) scale(1); }
}

/* ----- 02 Automations (Lead Scraper -> Slack) ----- */
.motif--automations {
    background:
        radial-gradient(90% 60% at 15% 30%, rgba(255,181,71,0.10), transparent 60%),
        radial-gradient(90% 60% at 85% 70%, rgba(108,242,255,0.08), transparent 60%),
        #07070a;
}

/* Status bar */
.ma-status {
    position: absolute;
    top: 8px;
    right: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 5;
    pointer-events: none;
}
.ma-status__chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 7px;
    letter-spacing: 0.22em;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(12, 12, 20, 0.75);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #4ade80;
}
.ma-status__dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.8);
    animation: ma-blink 1.1s ease-in-out infinite;
}
@keyframes ma-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}
.ma-status__count {
    font-size: 7px;
    letter-spacing: 0.18em;
    color: var(--ink-2);
}
.ma-status__count b {
    color: var(--ink-0);
    font-weight: 600;
}

/* Panels */
.ma-panel {
    position: absolute;
    top: 28px;
    bottom: 10px;
    width: 40%;
    border-radius: 8px;
    background: rgba(12, 12, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.ma-panel--a { left: 4%; }
.ma-panel--b { right: 4%; }
.ma-panel__head {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}
.ma-panel__icon {
    display: inline-grid;
    place-items: center;
    width: 14px; height: 14px;
    border-radius: 4px;
    background: rgba(255, 181, 71, 0.15);
    border: 1px solid rgba(255, 181, 71, 0.4);
    color: var(--amber);
}
.ma-panel__title {
    font-size: 7px;
    letter-spacing: 0.22em;
    color: var(--ink-0);
}
.ma-panel__live {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 6px;
    letter-spacing: 0.25em;
    color: #4ade80;
}
.ma-panel__live i {
    width: 4px; height: 4px; border-radius: 50%;
    background: #4ade80;
    animation: ma-blink 1s ease-in-out infinite;
}

/* Scraper rows */
.ma-rows {
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ma-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
    opacity: 0;
    animation: ma-row 5s linear infinite;
}
.ma-row::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,181,71,0.25), transparent);
    transform: translateX(-100%);
    animation: ma-row-shine 5s linear infinite;
}
.ma-row:nth-child(1) { animation-delay: 0.0s; }
.ma-row:nth-child(1)::after { animation-delay: 0.0s; }
.ma-row:nth-child(2) { animation-delay: 0.4s; }
.ma-row:nth-child(2)::after { animation-delay: 0.4s; }
.ma-row:nth-child(3) { animation-delay: 0.8s; }
.ma-row:nth-child(3)::after { animation-delay: 0.8s; }
.ma-row:nth-child(4) { animation-delay: 1.2s; }
.ma-row:nth-child(4)::after { animation-delay: 1.2s; }
.ma-row:nth-child(5) { animation-delay: 1.6s; }
.ma-row:nth-child(5)::after { animation-delay: 1.6s; }
@keyframes ma-row {
    0%, 2%   { opacity: 0; transform: translateX(-6px); }
    5%, 75%  { opacity: 1; transform: translateX(0); }
    85%, 100%{ opacity: 0; transform: translateX(6px); }
}
@keyframes ma-row-shine {
    0%, 5%   { transform: translateX(-100%); }
    10%      { transform: translateX(100%); }
    11%, 100%{ transform: translateX(100%); }
}
.ma-row__co {
    flex: 0 0 auto;
    width: 34%; height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.5);
}
.ma-row__role {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
}
.ma-row__tick {
    display: grid;
    place-items: center;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    font-size: 8px;
    line-height: 1;
    border: 1px solid rgba(74, 222, 128, 0.4);
    transform: rotate(45deg);
}

/* Connector wire */
.ma-wire {
    position: absolute;
    top: 50%;
    left: 44%;
    width: 12%;
    height: 2px;
    transform: translateY(-50%);
    overflow: visible;
    z-index: 3;
}
.ma-wire__path {
    fill: none;
    stroke: url(#maWireGrad);
    stroke-width: 1.2;
    stroke-dasharray: 3 4;
    animation: ma-wire-flow 1.8s linear infinite;
}
@keyframes ma-wire-flow {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -14; }
}
.ma-packet {
    position: absolute;
    top: 50%;
    left: 44%;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--amber), rgba(255,181,71,0));
    box-shadow: 0 0 10px rgba(255, 181, 71, 0.9);
    transform: translate(-50%, -50%);
    z-index: 4;
    animation: ma-packet 1.6s cubic-bezier(0.55, 0, 0.45, 1) infinite;
}
.ma-packet--1 { animation-delay: 0s; }
.ma-packet--2 { animation-delay: -0.53s; }
.ma-packet--3 { animation-delay: -1.06s; }
@keyframes ma-packet {
    0%   { left: 44%; opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
    15%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    85%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { left: 56%; opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
}

/* Slack panel */
.ma-slack__head {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}
.ma-slack__logo {
    display: grid;
    grid-template-columns: 5px 5px;
    grid-template-rows: 5px 5px;
    gap: 1.5px;
    width: 12px; height: 12px;
}
.ma-slack__logo i {
    display: block;
    border-radius: 2px;
}
.ma-slack__ch {
    font-size: 7px;
    letter-spacing: 0.1em;
    color: var(--ink-0);
    font-weight: 600;
}
.ma-slack__members {
    margin-left: auto;
    font-size: 7px;
    color: var(--ink-2);
    padding: 1px 5px;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.ma-slack__feed {
    position: relative;
    padding: 6px 6px;
    height: calc(100% - 22px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
}
.ma-msg {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    padding: 3px 4px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.04);
    opacity: 0;
    transform: translateY(8px);
    animation: ma-msg 8s cubic-bezier(0.22, 1.2, 0.36, 1) infinite;
}
.ma-msg--1 { animation-delay: 0.0s; }
.ma-msg--2 { animation-delay: 2.0s; }
.ma-msg--3 { animation-delay: 4.0s; }
.ma-msg--4 { animation-delay: 6.0s; }
@keyframes ma-msg {
    0%, 5%   { opacity: 0; transform: translateY(10px) scale(0.96); }
    10%, 80% { opacity: 1; transform: translateY(0) scale(1); }
    92%, 100%{ opacity: 0; transform: translateY(-4px) scale(0.98); }
}
.ma-msg__av {
    flex: 0 0 auto;
    width: 14px; height: 14px;
    border-radius: 3px;
}
.ma-msg__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ma-msg__top {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ma-msg__top b {
    font-size: 7px;
    letter-spacing: 0.05em;
    color: var(--ink-0);
    font-weight: 600;
}
.ma-msg__app {
    font-size: 5px;
    letter-spacing: 0.15em;
    color: var(--ink-1);
    padding: 1px 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}
.ma-msg__time {
    font-size: 6px;
    color: var(--ink-3);
}
.ma-msg__text {
    font-size: 7px;
    letter-spacing: 0.05em;
    color: var(--ink-1);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ma-msg__text b {
    color: var(--amber);
    font-weight: 600;
}

/* ----- 03 Portfolios (mini racing game) ----- */
.motif--portfolio {
    --steer: 0;
    background: #05050a;
    overflow: hidden;
    isolation: isolate;
}

/* Sky + environment */
.mp-sky {
    position: absolute;
    inset: 0 0 42% 0;
    background:
        linear-gradient(180deg,
            #1a0f2e 0%,
            #3b1a3d 30%,
            #7a2a4d 55%,
            #c85a4e 75%,
            #f5a742 88%,
            #1a0d1a 100%);
    z-index: 0;
}
.mp-sun {
    position: absolute;
    top: 28%; left: 50%;
    width: 40%;
    aspect-ratio: 1;
    transform: translate(-50%, 0);
    border-radius: 50%;
    background: radial-gradient(circle, #ffd88a 0%, #ff7a50 50%, rgba(255,122,80,0) 70%);
    filter: blur(1px);
    z-index: 1;
    animation: mp-sun 10s ease-in-out infinite;
}
@keyframes mp-sun {
    0%, 100% { transform: translate(-50%, 0) scale(1); opacity: 0.95; }
    50%      { transform: translate(-50%, -2%) scale(1.04); opacity: 1; }
}
.mp-mountains {
    position: absolute;
    left: 0; right: 0;
    top: 44%;
    height: 18%;
    background:
        linear-gradient(180deg, rgba(10, 5, 20, 0.9), rgba(10, 5, 20, 0));
    clip-path: polygon(0 60%, 8% 45%, 18% 55%, 28% 35%, 38% 50%, 48% 30%, 58% 48%, 72% 38%, 82% 52%, 92% 40%, 100% 50%, 100% 100%, 0 100%);
    z-index: 1;
}

/* Road */
.mp-road {
    position: absolute;
    inset: 50% 0 0 0;
    perspective: 300px;
    perspective-origin: 50% 0%;
    z-index: 2;
    overflow: hidden;
}
.mp-road::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #16121c 0%, #0a070f 100%);
    transform: rotateX(62deg);
    transform-origin: top center;
}
.mp-road__lines {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(180deg,
            transparent 0 10px,
            rgba(255, 181, 71, 0.7) 10px 18px,
            transparent 18px 36px),
        linear-gradient(90deg, transparent 46%, rgba(255, 181, 71, 0.7) 46% 54%, transparent 54%);
    background-size: 100% 36px, 100% 100%;
    transform: rotateX(62deg);
    transform-origin: top center;
    animation: mp-road 0.45s linear infinite;
    mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 100%);
}
@keyframes mp-road {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 0 36px, 0 0; }
}
.mp-road__edge {
    position: absolute;
    top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, rgba(255, 181, 71, 0), rgba(255, 181, 71, 0.8) 30%, rgba(255, 59, 111, 0.9));
    box-shadow: 0 0 12px rgba(255, 181, 71, 0.6);
    transform: rotateX(62deg);
    transform-origin: top center;
}
.mp-road__edge--l { left: 15%; }
.mp-road__edge--r { right: 15%; }

/* Speed lines */
.mp-speed {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    background:
        radial-gradient(ellipse 6% 80% at 10% 60%, rgba(255,255,255,0.15), transparent 70%),
        radial-gradient(ellipse 6% 80% at 90% 60%, rgba(255,255,255,0.15), transparent 70%),
        radial-gradient(ellipse 4% 70% at 22% 50%, rgba(255,255,255,0.08), transparent 70%),
        radial-gradient(ellipse 4% 70% at 78% 50%, rgba(255,255,255,0.08), transparent 70%);
    mix-blend-mode: screen;
    animation: mp-speed 0.35s linear infinite;
}
@keyframes mp-speed {
    0%, 100% { opacity: 0.85; transform: scaleY(1); }
    50%      { opacity: 1; transform: scaleY(1.04); }
}

/* Billboards */
.mp-billboards {
    position: absolute;
    inset: 0;
    z-index: 4;
    perspective: 400px;
    perspective-origin: 50% 50%;
}
.mp-sign {
    position: absolute;
    top: 44%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(-400px);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 6px;
    letter-spacing: 0.25em;
    color: var(--ink-0);
    background: rgba(12, 12, 20, 0.85);
    border: 1px solid rgba(255, 181, 71, 0.5);
    box-shadow: 0 0 16px rgba(255, 181, 71, 0.35);
    white-space: nowrap;
    opacity: 0;
    animation: mp-sign 4s linear infinite;
    transform-origin: center;
}
.mp-sign::before {
    content: "";
    position: absolute;
    top: 100%; left: 50%;
    width: 1px; height: 18px;
    background: rgba(255, 181, 71, 0.4);
    transform: translateX(-50%);
}
.mp-sign--1 { animation-delay: 0.0s; --lane: -1; }
.mp-sign--2 { animation-delay: 0.5s; --lane:  1; }
.mp-sign--3 { animation-delay: 1.0s; --lane: -1; }
.mp-sign--4 { animation-delay: 1.5s; --lane:  1; }
.mp-sign--5 { animation-delay: 2.0s; --lane: -1; }
.mp-sign--6 { animation-delay: 2.5s; --lane:  1; }
.mp-sign--7 { animation-delay: 3.0s; --lane: -1; }
.mp-sign--8 { animation-delay: 3.5s; --lane:  1; }
@keyframes mp-sign {
    0%   {
        opacity: 0;
        transform: translate(calc(-50% + (var(--lane, -1) * 20px)), -50%) translateZ(-500px) scale(0.6);
        filter: blur(2px);
    }
    20%  {
        opacity: 1;
        filter: blur(0);
    }
    70%  {
        opacity: 1;
        filter: blur(0);
        transform: translate(calc(-50% + (var(--lane, -1) * 240px)), 140%) translateZ(200px) scale(2.2);
    }
    85%  {
        opacity: 0;
        transform: translate(calc(-50% + (var(--lane, -1) * 320px)), 220%) translateZ(400px) scale(3);
        filter: blur(3px);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + (var(--lane, -1) * 320px)), 220%) translateZ(400px) scale(3);
    }
}

/* Car — obvious steer: large translateX + lean rotateZ on body */
.mp-car {
    position: absolute;
    left: 50%;
    bottom: 8%;
    /* Big lateral travel — hits the road edges when steered fully */
    transform: translateX(calc(-50% + var(--steer, 0) * 110px));
    width: 34%;
    height: 22%;
    z-index: 6;
    animation: mp-car-bob 1.4s ease-in-out infinite;
    /* Snappy, spring-y catch-up */
    transition: transform 220ms cubic-bezier(0.22, 1.2, 0.36, 1);
}
@keyframes mp-car-bob {
    0%, 100% { filter: drop-shadow(0 6px 12px rgba(255, 181, 71, 0.3)); }
    50%      { filter: drop-shadow(0 8px 14px rgba(255, 181, 71, 0.45)); }
}
.mp-car__body {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #2a1f30 0%, #14101a 55%, #050308 100%);
    border-radius: 40% 40% 12% 12% / 60% 60% 20% 20%;
    box-shadow:
        inset 0 -6px 14px rgba(255, 181, 71, 0.15),
        0 -10px 20px -4px rgba(255, 59, 111, 0.35);
    /* Body leans into the turn */
    transform: rotate(calc(var(--steer, 0) * 8deg));
    transform-origin: 50% 90%;
    transition: transform 220ms cubic-bezier(0.22, 1.2, 0.36, 1);
}

/* Wheels — visible at the bottom corners */
.mp-car__wheel {
    position: absolute;
    bottom: -6%;
    width: 18%;
    height: 22%;
    border-radius: 50%;
    background: radial-gradient(circle, #1a1420 30%, #050308 70%);
    border: 1px solid rgba(255, 181, 71, 0.35);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}
.mp-car__wheel--l { left: 6%;  }
.mp-car__wheel--r { right: 6%; }
.mp-car__wheel::before {
    content: "";
    position: absolute;
    inset: 28%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--amber) 0%, rgba(255, 181, 71, 0.4) 60%, rgba(0,0,0,0) 80%);
    animation: mp-wheel-spin 0.4s linear infinite;
}
@keyframes mp-wheel-spin {
    from { transform: rotate(0); }
    to   { transform: rotate(360deg); }
}

/* Dust kicked up when steering hard — opacity follows |steer| */
.mp-car__dust {
    position: absolute;
    bottom: -8%;
    width: 30%;
    height: 38%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255, 181, 71, 0.45), rgba(255, 181, 71, 0));
    filter: blur(4px);
    pointer-events: none;
    /* steer = -1 -> right wheel kicks dust LEFT (going right) — opacity scales with |steer| */
    opacity: calc(min(1, max(0, abs(var(--steer, 0)) * 1.4 - 0.2)));
    transition: opacity 200ms ease-out;
}
.mp-car__dust--l { left: -10%; }
.mp-car__dust--r { right: -10%; }
@supports not (opacity: abs(1)) {
    /* Fallback for browsers without abs() — just hide dust */
    .mp-car__dust { opacity: 0; }
}

/* Lane warning — red glows on edges that intensify with steering */
.mp-warn {
    position: absolute;
    top: 50%;
    bottom: 0;
    width: 18%;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease-out;
}
.mp-warn--l {
    left: 0;
    background: linear-gradient(90deg, rgba(255, 59, 111, 0.55), rgba(255, 59, 111, 0));
    /* Lights up when steering hard LEFT (steer -> -1) */
    opacity: calc(min(1, max(0, var(--steer, 0) * -1.6 - 0.2)));
}
.mp-warn--r {
    right: 0;
    background: linear-gradient(270deg, rgba(255, 59, 111, 0.55), rgba(255, 59, 111, 0));
    opacity: calc(min(1, max(0, var(--steer, 0) * 1.6 - 0.2)));
}

/* "MOVE MOUSE TO STEER" hint — pulses, fades when card has --steered=1 */
.mp-hint {
    position: absolute;
    left: 50%;
    bottom: 38%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(12, 12, 18, 0.78);
    border: 1px solid rgba(255, 181, 71, 0.55);
    color: var(--amber);
    font-size: 8px;
    letter-spacing: 0.32em;
    box-shadow: 0 0 18px rgba(255, 181, 71, 0.35);
    z-index: 9;
    pointer-events: none;
    animation: mp-hint-pulse 1.6s ease-in-out infinite;
    transition: opacity 320ms ease-out, transform 320ms ease-out;
}
.motif--portfolio[data-steered="1"] .mp-hint {
    opacity: 0;
    transform: translateX(-50%) scale(0.85);
}
@keyframes mp-hint-pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 181, 71, 0.25); transform: translateX(-50%) scale(1); }
    50%      { box-shadow: 0 0 22px rgba(255, 181, 71, 0.55); transform: translateX(-50%) scale(1.04); }
}
.mp-hint__arrow {
    display: inline-block;
    font-size: 11px;
    animation: mp-hint-arrow 1.2s ease-in-out infinite;
}
.mp-hint__arrow--l { animation-delay: 0s;    }
.mp-hint__arrow--r { animation-delay: -0.6s; }
@keyframes mp-hint-arrow {
    0%, 100% { transform: translateX(0);   opacity: 0.6; }
    50%      { transform: translateX(-3px); opacity: 1;   }
}
.mp-hint__arrow--r { animation-name: mp-hint-arrow-r; }
@keyframes mp-hint-arrow-r {
    0%, 100% { transform: translateX(0);   opacity: 0.6; }
    50%      { transform: translateX(3px);  opacity: 1;   }
}

/* Mini steering wheel HUD bottom-center, rotates with --steer */
.mp-wheel {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    z-index: 9;
    pointer-events: none;
}
.mp-wheel__rim {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 181, 71, 0.6);
    background: rgba(12, 12, 18, 0.55);
    box-shadow: 0 0 10px rgba(255, 181, 71, 0.35);
    transform: rotate(calc(var(--steer, 0) * 70deg));
    transition: transform 220ms cubic-bezier(0.22, 1.2, 0.36, 1);
}
.mp-wheel__spoke {
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 2px;
    margin-top: -1px;
    background: rgba(255, 181, 71, 0.7);
}
.mp-wheel__spoke::before,
.mp-wheel__spoke::after {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
}
.mp-wheel__spoke::before { transform: rotate(60deg);  }
.mp-wheel__spoke::after  { transform: rotate(-60deg); }
.mp-wheel__hub {
    position: absolute;
    top: 50%; left: 50%;
    width: 6px; height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 6px var(--amber);
}
.mp-car__roof {
    position: absolute;
    top: 0;
    left: 25%; right: 25%;
    height: 55%;
    background: linear-gradient(180deg, #3a2a42, #1a1222);
    border-radius: 60% 60% 10% 10% / 80% 80% 20% 20%;
}
.mp-car__window {
    position: absolute;
    top: 10%;
    left: 30%; right: 30%;
    height: 38%;
    background: linear-gradient(180deg, rgba(108, 242, 255, 0.6), rgba(108, 242, 255, 0.15) 70%, rgba(255, 181, 71, 0.2));
    border-radius: 60% 60% 10% 10% / 80% 80% 20% 20%;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}
.mp-car__shadow {
    position: absolute;
    left: 10%; right: 10%;
    bottom: -20%;
    height: 18%;
    background: radial-gradient(ellipse, rgba(0,0,0,0.7), transparent 70%);
    filter: blur(2px);
}
.mp-car__light {
    position: absolute;
    bottom: 12%;
    width: 18%; height: 8%;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 16px var(--neon), 0 0 32px rgba(255, 59, 111, 0.6);
    animation: mp-tail 2s ease-in-out infinite;
}
.mp-car__light--l { left: 10%; }
.mp-car__light--r { right: 10%; }
@keyframes mp-tail {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; }
}

/* HUD */
.mp-hud {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    color: var(--ink-0);
}
.mp-hud__tl {
    position: absolute;
    top: 12px; left: 12px;
    font-size: 7px;
    letter-spacing: 0.28em;
    padding: 3px 7px;
    border-radius: 4px;
    background: rgba(12, 12, 18, 0.7);
    border: 1px solid rgba(255, 181, 71, 0.35);
    color: var(--amber);
}
.mp-hud__tr {
    position: absolute;
    top: 12px; right: 12px;
    font-size: 7px;
    letter-spacing: 0.25em;
    color: var(--ink-2);
}
.mp-hud__speed {
    position: absolute;
    bottom: 14px; right: 14px;
    display: flex;
    align-items: baseline;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(12, 12, 18, 0.75);
    border: 1px solid rgba(255, 181, 71, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.mp-hud__num {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--amber);
    text-shadow: 0 0 10px rgba(255, 181, 71, 0.6);
    animation: mp-speed-num 4s steps(60, end) infinite;
}
@keyframes mp-speed-num {
    0%   { opacity: 0.8; }
    100% { opacity: 1; }
}
.mp-hud__unit {
    font-size: 7px;
    letter-spacing: 0.22em;
    color: var(--ink-2);
}
.mp-hud__tach {
    position: absolute;
    bottom: 14px; left: 14px;
    width: 36px; height: 18px;
    border-radius: 36px 36px 0 0;
    border: 1px solid rgba(255, 181, 71, 0.25);
    border-bottom: none;
    overflow: hidden;
    background: rgba(12, 12, 18, 0.65);
}
.mp-hud__tach i {
    position: absolute;
    bottom: 0; left: 50%;
    width: 2px; height: 16px;
    background: linear-gradient(180deg, var(--neon), var(--amber));
    transform-origin: 50% 100%;
    animation: mp-tach 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes mp-tach {
    0%   { transform: rotate(-72deg); }
    45%  { transform: rotate(68deg); }
    55%  { transform: rotate(72deg); }
    100% { transform: rotate(-72deg); }
}

/* Letterbox */
.mp-letter {
    position: absolute;
    left: 0; right: 0;
    height: 6%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9;
    pointer-events: none;
}
.mp-letter--t { top: 0; }
.mp-letter--b { bottom: 0; }

/* ----- 04 SaaS & AI (hybrid: AI assistant + arbitrage) ----- */
.motif--saas {
    background:
        radial-gradient(60% 60% at 22% 35%, rgba(108,242,255,0.10), transparent 65%),
        radial-gradient(55% 55% at 80% 70%, rgba(54,232,156,0.08), transparent 65%),
        radial-gradient(40% 40% at 60% 0%,  rgba(255,181,71,0.08), transparent 60%),
        #06070b;
    overflow: hidden;
}

/* Color helpers */
.motif--saas .up { color: #36e89c; }
.motif--saas .dn { color: #ff5577; }

/* Top scrolling market ticker */
.ms-ticker {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 14%;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(12,12,18,0.85), rgba(12,12,18,0.55));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    z-index: 4;
}
.ms-ticker__track {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    padding: 0 14px;
    white-space: nowrap;
    animation: ms-ticker 18s linear infinite;
    will-change: transform;
}
@keyframes ms-ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.ms-ticker__item {
    font-size: 7px;
    letter-spacing: 0.16em;
    color: var(--ink-1);
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}
.ms-ticker__item b {
    color: var(--ink-0);
    font-weight: 700;
}
.ms-ticker__item em {
    font-style: normal;
    font-size: 6.5px;
    letter-spacing: 0.1em;
}

/* Shared panel chrome */
.ms-panel {
    position: absolute;
    background: linear-gradient(180deg, rgba(20, 20, 28, 0.85), rgba(12, 12, 18, 0.78));
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 4;
    padding: 8px 10px;
    overflow: hidden;
    box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.6);
}
.ms-panel__head {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 7px;
    letter-spacing: 0.28em;
    color: var(--ink-1);
    margin-bottom: 6px;
}
.ms-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
}
.ms-dot--live  { background: #ff3b6f; color: #ff3b6f; animation: ma-blink 1.1s ease-in-out infinite; }
.ms-dot--alert { background: var(--amber); color: var(--amber); animation: ma-blink 0.9s ease-in-out infinite; }
.ms-dot--ok    { background: #36e89c; color: #36e89c; }

/* Chat panel — left side */
.ms-panel--chat {
    top: 19%;
    left: 5%;
    width: 50%;
    height: 60%;
    display: flex;
    flex-direction: column;
}
.ms-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
}
.ms-msg {
    display: flex;
    max-width: 92%;
}
.ms-msg--user { justify-content: flex-end; align-self: flex-end; }
.ms-msg--ai   { justify-content: flex-start; align-self: flex-start; }
.ms-msg__bubble {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 7px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--ink-0);
    max-width: 100%;
}
.ms-msg--user .ms-msg__bubble {
    background: rgba(108, 242, 255, 0.18);
    border-color: rgba(108, 242, 255, 0.35);
    border-bottom-right-radius: 2px;
}
.ms-msg__bubble--ai {
    background: linear-gradient(135deg, rgba(255, 181, 71, 0.15), rgba(108, 242, 255, 0.08));
    border-color: rgba(255, 181, 71, 0.3);
    border-bottom-left-radius: 2px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ms-msg__l1, .ms-msg__l2, .ms-msg__l3, .ms-msg__l4 { display: block; opacity: 0; animation: ms-msg-line 9s linear infinite; }
.ms-msg__l1 { animation-delay: 1.4s; }
.ms-msg__l2 { animation-delay: 2.6s; }
.ms-msg__l3 { animation-delay: 3.4s; }
.ms-msg__l4 { animation-delay: 4.2s; }
@keyframes ms-msg-line {
    0%, 5%   { opacity: 0; transform: translateY(2px); }
    10%, 100% { opacity: 1; transform: translateY(0); }
}
.ms-msg__profit b { color: #36e89c; }
.ms-dots::after {
    content: "...";
    display: inline-block;
    width: 0;
    overflow: hidden;
    vertical-align: bottom;
    animation: ms-el 1.6s steps(4, end) infinite;
}
@keyframes ms-el {
    0%   { width: 0; }
    100% { width: 12px; }
}

/* Typing indicator (first user message: simulated typing) */
.ms-msg--user:first-child .ms-msg__bubble { padding: 4px 7px; }
.ms-typing { display: inline-flex; gap: 2px; align-items: center; height: 8px; }
.ms-typing i {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: ms-typing 1.2s ease-in-out infinite;
}
.ms-typing i:nth-child(1) { animation-delay: 0s; }
.ms-typing::before, .ms-typing::after {
    content: ""; width: 3px; height: 3px;
    border-radius: 50%; background: rgba(255, 255, 255, 0.6);
    animation: ms-typing 1.2s ease-in-out infinite;
}
.ms-typing::before { animation-delay: 0.15s; }
.ms-typing::after  { animation-delay: 0.30s; }
@keyframes ms-typing {
    0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1;   }
}
/* First user msg fades out before second slides in */
.ms-msg--user:first-child {
    animation: ms-typing-fade 9s ease-in-out infinite;
}
@keyframes ms-typing-fade {
    0%, 8%   { opacity: 1; transform: translateY(0); max-height: 14px; }
    12%, 100% { opacity: 0; transform: translateY(-4px); max-height: 0; padding: 0; margin: 0; border: 0; }
}
.ms-msg__user-text {
    overflow: hidden;
    white-space: nowrap;
    animation: ms-user-type 9s ease-in-out infinite;
    display: inline-block;
    max-width: 0;
}
@keyframes ms-user-type {
    0%, 13%   { max-width: 0; opacity: 0; }
    14%       { opacity: 1; }
    22%, 100% { max-width: 140px; opacity: 1; }
}

/* Right panel: opportunity + executed log */
.ms-panel--ops {
    top: 19%;
    right: 5%;
    width: 36%;
    height: 60%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.ms-opp {
    flex: 0 0 auto;
    background: linear-gradient(135deg, rgba(255, 181, 71, 0.16), rgba(255, 59, 111, 0.08));
    border: 1px solid rgba(255, 181, 71, 0.4);
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: 0 0 18px rgba(255, 181, 71, 0.18);
    animation: ms-opp-glow 2.4s ease-in-out infinite;
}
@keyframes ms-opp-glow {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 181, 71, 0.18); }
    50%      { box-shadow: 0 0 24px rgba(255, 181, 71, 0.4); }
}
.ms-opp__head {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 6.5px;
    letter-spacing: 0.28em;
    color: var(--amber);
    margin-bottom: 4px;
}
.ms-opp__pair {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-0);
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.ms-opp__bar {
    position: relative;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 6px;
}
.ms-opp__fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--amber), #36e89c);
    transform-origin: left;
    transform: scaleX(0);
    animation: ms-opp-fill 3.2s ease-in-out infinite;
}
@keyframes ms-opp-fill {
    0%   { transform: scaleX(0); }
    60%  { transform: scaleX(0.97); }
    80%  { transform: scaleX(1); }
    100% { transform: scaleX(1); opacity: 0.4; }
}
.ms-opp__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 7px;
    letter-spacing: 0.18em;
    color: var(--ink-2);
    padding: 2px 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
}
.ms-opp__row:first-of-type { border-top: none; }
.ms-opp__row b {
    color: var(--ink-0);
    font-size: 8px;
    letter-spacing: 0.04em;
}

/* Executed log */
.ms-log {
    flex: 1;
    background: rgba(12, 12, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ms-log__head {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 6.5px;
    letter-spacing: 0.28em;
    color: #36e89c;
    margin-bottom: 2px;
}
.ms-log__row {
    display: flex;
    justify-content: space-between;
    font-size: 6.5px;
    letter-spacing: 0.14em;
    color: var(--ink-2);
    padding: 2px 0;
}
.ms-log__row em {
    font-style: normal;
    font-size: 7.5px;
    font-weight: 600;
}
.ms-log__row--new {
    background: rgba(54, 232, 156, 0.1);
    border-radius: 4px;
    padding: 2px 4px;
    margin: 0 -4px;
    animation: ms-log-flash 3.2s ease-out infinite;
}
@keyframes ms-log-flash {
    0%   { background: rgba(54, 232, 156, 0.4); transform: translateX(4px); opacity: 0; }
    18%  { background: rgba(54, 232, 156, 0.4); transform: translateX(0);   opacity: 1; }
    60%  { background: rgba(54, 232, 156, 0.1); }
    100% { background: rgba(54, 232, 156, 0.1); opacity: 1; }
}

/* Bottom P&L sparkline */
.ms-pnl {
    position: absolute;
    left: 5%; right: 5%;
    bottom: 7%;
    height: 14%;
    background: rgba(12, 12, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    z-index: 4;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.ms-pnl__label {
    font-size: 6.5px;
    letter-spacing: 0.3em;
    color: var(--ink-2);
    flex: 0 0 auto;
}
.ms-pnl__spark {
    flex: 1;
    height: 100%;
    max-height: 24px;
}
.ms-pnl__line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: ms-pnl-draw 4s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(54, 232, 156, 0.6));
}
.ms-pnl__area {
    opacity: 0;
    animation: ms-pnl-fill 4s ease-in-out infinite;
}
@keyframes ms-pnl-draw {
    0%   { stroke-dashoffset: 200; }
    50%  { stroke-dashoffset: 0; }
    90%  { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 200; }
}
@keyframes ms-pnl-fill {
    0%   { opacity: 0; }
    50%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { opacity: 0; }
}
.ms-pnl__num {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    color: #36e89c;
    text-shadow: 0 0 8px rgba(54, 232, 156, 0.5);
}

/* ----- 05 Web apps (full insights/analytics dashboard) ----- */
.motif--webapps {
    background:
        radial-gradient(80% 60% at 50% 0%, rgba(255,181,71,0.08), transparent 70%),
        radial-gradient(60% 50% at 90% 100%, rgba(108,242,255,0.08), transparent 70%),
        #07070a;
    overflow: hidden;
}
.motif--webapps .up { color: #36e89c; }
.motif--webapps .dn { color: #ff5577; }

.mw-app {
    position: absolute;
    inset: 6%;
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #0d0d14, #09090d);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
}

/* Sidebar */
.mw-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.025);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.mw-side__logo {
    width: 14px;
    height: 14px;
    margin: 0 auto 6px;
    border-radius: 2px;
    object-fit: contain;
    object-position: center;
    display: block;
    flex: 0 0 auto;
}
.mw-side__item {
    display: block;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
}
.mw-side__item--mini {
    margin-top: auto;
    height: 5px;
    width: 60%;
}
.mw-side__item.is-active {
    background: var(--amber);
    box-shadow: 0 0 8px rgba(255, 181, 71, 0.5);
}

/* Top bar */
.mw-main {
    padding: 8px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    position: relative;
}
.mw-top {
    display: flex;
    gap: 6px;
    align-items: center;
    height: 12px;
}
.mw-top__title {
    width: 28%;
    height: 7px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.18);
}
.mw-top__search {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.12), rgba(255,255,255,0.05));
    background-size: 200% 100%;
    animation: mw-shimmer 2.4s linear infinite;
}
.mw-top__av {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ice), #6c8aff);
    box-shadow: 0 0 6px rgba(108, 242, 255, 0.4);
}
@keyframes mw-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* KPI cards */
.mw-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}
.mw-kpi {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 5px 7px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}
.mw-kpi__label {
    font-size: 5.5px;
    letter-spacing: 0.22em;
    color: var(--ink-2);
}
.mw-kpi__num {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ink-0);
    line-height: 1;
}
.mw-kpi__val { display: inline-block; }
.mw-kpi:nth-child(1) .mw-kpi__num { color: var(--amber); }
.mw-kpi:nth-child(2) .mw-kpi__num { color: var(--ink-0); }
.mw-kpi:nth-child(3) .mw-kpi__num { color: var(--ice); }
.mw-kpi__delta {
    font-size: 6px;
    letter-spacing: 0.12em;
    margin-top: 1px;
}

/* Area chart + donut row */
.mw-row2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 5px;
    flex: 1;
    min-height: 0;
}
.mw-area {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 5px 7px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.mw-area__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mw-area__title {
    font-size: 5.5px;
    letter-spacing: 0.22em;
    color: var(--ink-2);
}
.mw-area__legend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 5.5px;
    letter-spacing: 0.12em;
    color: var(--ink-2);
}
.mw-area__legend i {
    width: 6px; height: 2px;
    background: var(--amber);
    border-radius: 1px;
}
.mw-area__legend i.alt {
    background: rgba(255, 255, 255, 0.25);
    margin-left: 4px;
}
.mw-area__svg {
    flex: 1;
    width: 100%;
    margin-top: 2px;
    overflow: visible;
}
.mw-area__line {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: mw-line-draw 4s ease-in-out infinite;
    filter: drop-shadow(0 0 3px rgba(255, 181, 71, 0.5));
}
.mw-area__fill {
    opacity: 0;
    animation: mw-fill-fade 4s ease-in-out infinite;
}
.mw-area__dot {
    opacity: 0;
    animation: mw-dot-pulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 4px var(--amber));
}
@keyframes mw-line-draw {
    0%   { stroke-dashoffset: 300; }
    50%  { stroke-dashoffset: 0; }
    90%  { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 300; }
}
@keyframes mw-fill-fade {
    0%   { opacity: 0; }
    55%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { opacity: 0; }
}
@keyframes mw-dot-pulse {
    0%, 50%   { opacity: 0; r: 1.5; }
    55%       { opacity: 1; r: 2.4; }
    65%       { r: 4; opacity: 0.6; }
    75%, 100% { r: 2.4; opacity: 1; }
}

/* Donut */
.mw-donut {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 5px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mw-donut__svg {
    width: 100%;
    height: 100%;
    max-height: 64px;
}
.mw-donut__seg {
    transform-origin: center;
    animation: mw-donut-draw 4s ease-out infinite;
    stroke-dasharray: 0 88;
}
.mw-donut__seg--a { animation-delay: 0s;    --target: 36; }
.mw-donut__seg--b { animation-delay: 0.25s; --target: 26; }
.mw-donut__seg--c { animation-delay: 0.5s;  --target: 14; }
@keyframes mw-donut-draw {
    0%        { stroke-dasharray: 0 88; }
    50%, 90%  { stroke-dasharray: var(--target) 88; }
    100%      { stroke-dasharray: 0 88; }
}
.mw-donut__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    pointer-events: none;
}
.mw-donut__num {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-0);
    letter-spacing: 0.02em;
}
.mw-donut__sub {
    font-size: 5px;
    letter-spacing: 0.28em;
    color: var(--ink-2);
}

/* Bottom row: bars + feed */
.mw-row3 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 5px;
    height: 28%;
}
.mw-bars {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 5px 7px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}
.mw-bars__title {
    font-size: 5.5px;
    letter-spacing: 0.22em;
    color: var(--ink-2);
}
.mw-bars__grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 3px;
    align-items: end;
}
.mw-bars__grid i {
    display: block;
    height: var(--h);
    border-radius: 2px 2px 0 0;
    background: linear-gradient(180deg, var(--ice), rgba(108, 242, 255, 0.15));
    transform-origin: bottom;
    animation: mw-bar 3.2s cubic-bezier(0.22, 1.2, 0.36, 1) infinite;
}
.mw-bars__grid i:nth-child(1) { animation-delay: 0.00s; }
.mw-bars__grid i:nth-child(2) { animation-delay: 0.08s; }
.mw-bars__grid i:nth-child(3) { animation-delay: 0.16s; }
.mw-bars__grid i:nth-child(4) { animation-delay: 0.24s; background: linear-gradient(180deg, var(--amber), rgba(255, 181, 71, 0.15)); }
.mw-bars__grid i:nth-child(5) { animation-delay: 0.32s; }
.mw-bars__grid i:nth-child(6) { animation-delay: 0.40s; background: linear-gradient(180deg, var(--amber), rgba(255, 181, 71, 0.15)); }
.mw-bars__grid i:nth-child(7) { animation-delay: 0.48s; }
.mw-bars__grid i:nth-child(8) { animation-delay: 0.56s; }
.mw-bars__grid i:nth-child(9) { animation-delay: 0.64s; }
@keyframes mw-bar {
    0%   { transform: scaleY(0.3); opacity: 0.7; }
    40%  { transform: scaleY(1);   opacity: 1;   }
    70%  { transform: scaleY(0.85); }
    100% { transform: scaleY(0.3); opacity: 0.7; }
}

/* Activity feed */
.mw-feed {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 5px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}
.mw-feed__row {
    display: flex;
    align-items: center;
    gap: 5px;
    animation: mw-feed-in 4s ease-in-out infinite;
    opacity: 0;
}
.mw-feed__row:nth-child(1) { animation-delay: 0.0s; }
.mw-feed__row:nth-child(2) { animation-delay: 0.6s; }
.mw-feed__row:nth-child(3) { animation-delay: 1.2s; }
.mw-feed__row:nth-child(4) { animation-delay: 1.8s; }
@keyframes mw-feed-in {
    0%, 5%   { opacity: 0; transform: translateX(-4px); }
    10%, 90% { opacity: 1; transform: translateX(0); }
    100%     { opacity: 0; transform: translateX(-4px); }
}
.mw-feed__dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    flex: 0 0 auto;
}
.mw-feed__dot.up { background: #36e89c; box-shadow: 0 0 5px #36e89c; }
.mw-feed__dot.dn { background: #ff5577; box-shadow: 0 0 5px #ff5577; }
.mw-feed__bar {
    flex: 1;
    height: 5px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
}
.mw-feed__bar--m { width: 70%; flex: 0 0 auto; }
.mw-feed__bar--s { width: 45%; flex: 0 0 auto; }

/* Live status pill */
.mw-live {
    position: absolute;
    bottom: 6px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(12, 12, 18, 0.7);
    border: 1px solid rgba(54, 232, 156, 0.35);
    font-size: 6px;
    letter-spacing: 0.22em;
    color: var(--ink-1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 4;
}
.mw-live b { color: #36e89c; font-weight: 700; }
.mw-live__dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #36e89c;
    box-shadow: 0 0 8px #36e89c;
    animation: ma-blink 1.1s ease-in-out infinite;
}

/* ----- 06 3D experiences (mini cinema) ----- */
.motif--threed {
    background: #03030a;
    overflow: hidden;
    isolation: isolate;
}

/* Sky */
.m3-sky {
    position: absolute;
    inset: 0 0 50% 0;
    background: linear-gradient(180deg,
        #050318 0%,
        #0a0524 28%,
        #2a0f3c 55%,
        #5a1a3a 78%,
        #8a2d22 92%,
        #2a0d15 100%);
    z-index: 0;
    animation: m3-sky 8s ease-in-out infinite;
}
@keyframes m3-sky {
    0%, 100% { filter: hue-rotate(0deg) saturate(1); }
    50%      { filter: hue-rotate(-12deg) saturate(1.15); }
}
.m3-bloom {
    position: absolute;
    top: 28%;
    left: 50%;
    width: 70%;
    aspect-ratio: 2 / 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(255, 181, 71, 0.55), rgba(255, 59, 111, 0.25) 40%, transparent 70%);
    filter: blur(2px);
    z-index: 1;
    animation: m3-bloom 5s ease-in-out infinite;
}
@keyframes m3-bloom {
    0%, 100% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}
.m3-stars {
    position: absolute;
    inset: 0 0 50% 0;
    z-index: 1;
    background-image:
        radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 28% 32%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 48% 12%, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 68% 28%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 82% 8%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 92% 22%, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 38% 6%, rgba(255,255,255,0.5), transparent);
    animation: m3-twinkle 3s ease-in-out infinite;
}
@keyframes m3-twinkle {
    0%, 100% { opacity: 0.7; }
    50%      { opacity: 1; }
}

/* Perspective floor */
.m3-floor {
    position: absolute;
    inset: 50% 0 0 0;
    perspective: 260px;
    perspective-origin: 50% 0%;
    z-index: 2;
    overflow: hidden;
}
.m3-floor::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #1a0d1f 0%, #030108 100%);
    transform: rotateX(62deg);
    transform-origin: top center;
}
.m3-floor__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 181, 71, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 242, 255, 0.25) 1px, transparent 1px);
    background-size: 20px 20px, 20px 20px;
    transform: rotateX(62deg);
    transform-origin: top center;
    animation: m3-floor-flow 1.4s linear infinite;
    mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 100%);
}
@keyframes m3-floor-flow {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 0 20px, 0 0; }
}
.m3-floor__horizon {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 181, 71, 1), transparent);
    box-shadow: 0 0 20px rgba(255, 181, 71, 0.8);
    animation: m3-horizon 4s ease-in-out infinite;
}
@keyframes m3-horizon {
    0%, 100% { opacity: 0.8; }
    50%      { opacity: 1; }
}

/* Hero 3D object: orbiting wireframe rings */
.m3-scene {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    perspective: 600px;
    z-index: 3;
}
.m3-hero {
    position: relative;
    width: 84px;
    height: 84px;
    transform-style: preserve-3d;
    animation: m3-hero-spin 10s linear infinite;
}
@keyframes m3-hero-spin {
    from { transform: rotateX(-12deg) rotateY(0deg); }
    to   { transform: rotateX(-12deg) rotateY(360deg); }
}
.m3-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.4px solid rgba(255, 181, 71, 0.7);
    box-shadow: 0 0 14px rgba(255, 181, 71, 0.3) inset, 0 0 14px rgba(255, 181, 71, 0.3);
}
.m3-ring--x  { transform: rotateX(90deg); }
.m3-ring--y  { transform: rotateY(0deg); }
.m3-ring--z  { transform: rotateZ(0deg) rotateX(20deg); border-color: rgba(255, 59, 111, 0.65); box-shadow: 0 0 14px rgba(255, 59, 111, 0.3) inset, 0 0 14px rgba(255, 59, 111, 0.3); }
.m3-ring--d1 { transform: rotateX(45deg) rotateY(45deg); border-color: rgba(108, 242, 255, 0.55); box-shadow: 0 0 14px rgba(108, 242, 255, 0.25) inset, 0 0 14px rgba(108, 242, 255, 0.25); }
.m3-ring--d2 { transform: rotateX(-45deg) rotateY(45deg); border-color: rgba(255, 181, 71, 0.5); }
.m3-ring__glow {
    position: absolute;
    inset: 30%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(255, 181, 71, 0.3) 40%, transparent 70%);
    box-shadow: 0 0 30px rgba(255, 181, 71, 0.6);
    animation: m3-glow-pulse 2.4s ease-in-out infinite;
}
@keyframes m3-glow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50%      { transform: scale(1.2); opacity: 1; }
}

/* Letterbox */
.m3-letter {
    position: absolute;
    left: 0; right: 0;
    height: 7%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9;
    pointer-events: none;
}
.m3-letter--t { top: 0; }
.m3-letter--b { bottom: 0; }

/* Scroll progress HUD */
.m3-hud {
    position: absolute;
    top: 14%;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
    padding: 6px 8px;
    border-radius: 5px;
    background: rgba(8, 8, 12, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.m3-hud__chapter {
    position: relative;
    font-size: 7px;
    letter-spacing: 0.28em;
    color: transparent;
}
.m3-hud__chapter::before {
    content: "CH 01 / 04";
    position: absolute;
    inset: 0;
    color: var(--ink-1);
    animation: m3-chapter 9s steps(1, end) infinite;
}
@keyframes m3-chapter {
    0%, 32%   { content: "CH 01 / 04"; }
    33%, 65%  { content: "CH 02 / 04"; }
    66%, 100% { content: "CH 03 / 04"; }
}
.m3-hud__bar {
    position: relative;
    width: 44px; height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}
.m3-hud__bar i {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--amber), var(--neon));
    box-shadow: 0 0 6px rgba(255, 181, 71, 0.8);
    animation: m3-progress 9s linear infinite;
}
@keyframes m3-progress {
    0%   { width: 0%; }
    100% { width: 100%; }
}

/* Chapter captions */
.m3-captions {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
    min-width: 60px;
}
.m3-caption {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: var(--ink-0);
    opacity: 0;
    transform: translateX(8px);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    animation: m3-cap 9s ease-in-out infinite;
}
.m3-caption--1 { animation-delay: 0s; color: var(--amber); }
.m3-caption--2 { animation-delay: -6s; color: var(--neon); }
.m3-caption--3 { animation-delay: -3s; color: var(--ice); }
@keyframes m3-cap {
    0%, 2%     { opacity: 0; transform: translateX(8px); }
    6%, 30%    { opacity: 1; transform: translateX(0); }
    34%, 100%  { opacity: 0; transform: translateX(-8px); }
}

/* Frame counter */
.m3-frame {
    position: absolute;
    bottom: 14%;
    right: 10px;
    font-size: 7px;
    letter-spacing: 0.22em;
    color: var(--ink-2);
    z-index: 10;
    padding: 3px 7px;
    border-radius: 4px;
    background: rgba(8, 8, 12, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.m3-frame__num {
    display: inline-block;
    min-width: 20px;
    color: var(--amber);
}
.m3-frame__num::before {
    content: "042";
    animation: m3-frame-text 9s steps(1, end) infinite;
}
@keyframes m3-frame-text {
    0%   { content: "001"; }
    10%  { content: "038"; }
    20%  { content: "072"; }
    30%  { content: "105"; }
    40%  { content: "138"; }
    50%  { content: "170"; }
    60%  { content: "203"; }
    70%  { content: "234"; }
    80%  { content: "266"; }
    90%  { content: "288"; }
    100% { content: "300"; }
}

/* Camera specs */
.m3-spec {
    position: absolute;
    bottom: 14%;
    left: 10px;
    font-size: 6px;
    letter-spacing: 0.2em;
    color: var(--ink-3);
    z-index: 10;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .services__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
    .service-card.is-open .service-card__inner {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 16px;
        padding: 18px;
    }
    .service-card.is-open .service-card__preview {
        aspect-ratio: auto;
        width: 100%;
        height: 100%;
        max-height: 60vh;
    }
    .service-card.is-open .service-card__meta {
        align-self: stretch;
        max-height: none;
        overflow: visible;
    }
    .service-card.is-open .service-card__title { font-size: 22px; margin-bottom: 8px; }
    .service-card.is-open .service-card__body { font-size: 13.5px; margin-bottom: 12px; }
}
@media (max-width: 640px) {
    .services { padding: 56px 0 64px; }
    .services__grid { grid-template-columns: 1fr; gap: 14px; }
    .service-card__title { font-size: 20px; }
    .services__close { top: 14px; right: 14px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .service-card,
    .service-card__inner,
    .service-card__sheen,
    .services[data-expanded="true"] .service-card:not(.is-open) {
        transition-duration: 100ms !important;
    }
    .motif *,
    .motif::before,
    .motif::after {
        animation: none !important;
    }
    .service-card { transform: none; opacity: 1; --reveal: 1; }
}

/* ==========================================================================
   CTA — reservation block
   ========================================================================== */
.cta {
    position: relative;
    padding: 72px 0;
    overflow: hidden;
}

.cta__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(255, 181, 71, 0.18), transparent 60%),
        radial-gradient(ellipse at 30% 0%, rgba(255, 59, 111, 0.08), transparent 50%);
    pointer-events: none;
}

.cta__inner { position: relative; z-index: 1; }

.cta__content {
    max-width: 780px;
    margin: 0 auto;
    padding: 44px 36px;
    text-align: center;
    border-radius: 28px;
}

.cta__title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 0 20px;
    color: var(--ink-0);
}

.cta__lede {
    font-size: 15px;
    color: var(--ink-1);
    max-width: 520px;
    margin: 0 auto 24px;
    line-height: 1.65;
}

.cta__form {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin: 0 auto 16px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
}

.cta__form input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 0 16px;
    color: var(--ink-0);
    font-family: inherit;
    font-size: 14px;
}

.cta__form input::placeholder { color: var(--ink-3); }

.cta__meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--ink-3);
    flex-wrap: wrap;
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
}

.dot--live {
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    animation: pulse 1.6s ease-in-out infinite;
}

@media (max-width: 560px) {
    .cta__content { padding: 40px 24px; }
    .cta__form { flex-direction: column; padding: 12px; }
    .cta__form input { padding: 12px 8px; text-align: center; }
}

/* ==========================================================================
   TESTIMONIALS — Twitter-style stacked cards + marquee rails
   ========================================================================== */
.testify {
    position: relative;
    padding: 60px 0 72px;
    overflow: hidden;
    isolation: isolate;
}

.testify__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 50% 55%, rgba(255, 181, 71, 0.16), transparent 60%),
        radial-gradient(ellipse 40% 30% at 18% 95%, rgba(108, 242, 255, 0.10), transparent 60%),
        radial-gradient(ellipse 40% 30% at 85% 8%, rgba(255, 59, 111, 0.08), transparent 60%);
    z-index: -1;
}

/* ----- Marquee rails (top + bottom) ----- */
.testify__rail {
    position: relative;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.testify__rail--top { padding-top: 8px; }
.testify__rail--bot { padding-bottom: 8px; margin-top: 16px; }

.testify__rail-track {
    display: flex;
    align-items: center;
    gap: 14px;
    width: max-content;
    padding: 14px 0;
    animation: testifyRailScroll 70s linear infinite;
    will-change: transform;
}

.testify__rail-track--rev {
    animation-duration: 90s;
    animation-direction: reverse;
}

@keyframes testifyRailScroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

.tmini {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.025);
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    border-radius: 999px;
    white-space: nowrap;
    font-size: 13px;
    color: var(--ink-1);
    line-height: 1;
    transition: border-color 280ms var(--ease-out), background 280ms var(--ease-out), transform 280ms var(--ease-out);
}

.tmini:hover {
    border-color: rgba(255, 181, 71, 0.45);
    background: rgba(255, 181, 71, 0.06);
    transform: translateY(-1px);
}

.tmini__q { color: var(--ink-0); font-weight: 400; }
.tmini__h { color: var(--ink-3); font-size: 11px; letter-spacing: 0.04em; }

/* ----- Heading ----- */
.testify__inner { position: relative; z-index: 2; }

.testify__head {
    text-align: center;
    margin: 42px auto 40px;
    max-width: 760px;
}

.testify__title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: clamp(40px, 5.4vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 16px 0 18px;
    color: var(--ink-0);
}

.testify__lede {
    color: var(--ink-1);
    font-size: 15.5px;
    line-height: 1.65;
    margin: 0 auto;
    max-width: 540px;
}

/* ----- Stage / stack ----- */
.testify__stage {
    position: relative;
    display: grid;
    place-items: center;
    margin-top: 40px;
    min-height: 460px;
    perspective: 1600px;
    perspective-origin: 50% 40%;
}

.testify__stack {
    position: relative;
    display: grid;
    grid-template-areas: "stack";
    place-items: center;
    width: 380px;
    height: 240px;
    transform-style: preserve-3d;
}

@media (min-width: 720px) {
    .testify__stack { width: 420px; height: 250px; }
}

/* ----- Individual card ----- */
.ttest {
    grid-area: stack;
    --x: 0px;
    --y: 0px;
    --rot: 0deg;
    --skew: -8deg;
    --extra-x: 0px;
    --extra-y: 0px;
    --extra-rot: 0deg;
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --drag-x: 0px;
    --drag-y: 0px;
    --drag-r: 0deg;
    --float-x: 0px;
    --float-y: 0px;
    --pop: 1;
    --depth: 0px;
    width: 380px;
    transform-style: preserve-3d;
    transform-origin: 50% 60%;
    will-change: transform;
    cursor: grab;
    outline: none;
    transition:
        transform 620ms cubic-bezier(0.18, 1, 0.28, 1),
        z-index 0ms 100ms;
    transform:
        translate3d(
            calc(var(--x) + var(--extra-x) + var(--drag-x) + var(--float-x)),
            calc(var(--y) + var(--extra-y) + var(--drag-y) + var(--float-y)),
            var(--depth)
        )
        rotate(calc(var(--rot) + var(--extra-rot) + var(--drag-r)))
        skewY(var(--skew))
        rotateX(var(--tilt-x))
        rotateY(var(--tilt-y))
        scale(var(--pop));
}

.ttest.is-dragging {
    transition: none;
    cursor: grabbing;
    z-index: 9999 !important;
}

.ttest.is-flying {
    transition: transform 520ms cubic-bezier(0.5, 0, 0.75, 0);
    pointer-events: none;
}

@media (min-width: 720px) {
    .ttest { width: 420px; }
}

/* Default stacking offsets — back to front */
.ttest[data-i="0"] { --x: -88px; --y: -36px; --rot: -3.2deg; z-index: 1; }
.ttest[data-i="1"] { --x: -44px; --y: -18px; --rot: -1.6deg; z-index: 2; }
.ttest[data-i="2"] { --x:   0px; --y:   0px; --rot:    0deg; z-index: 3; }
.ttest[data-i="3"] { --x:  44px; --y:  18px; --rot:  1.6deg; z-index: 4; }
.ttest[data-i="4"] { --x:  88px; --y:  36px; --rot:  3.2deg; z-index: 5; }

/* When a stack has a focused card, pop it on top */
.ttest.is-focus {
    z-index: 100 !important;
    --pop: 1.04;
}

.ttest__card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 200px;
    padding: 16px 18px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(28, 28, 38, 0.92) 0%, rgba(12, 12, 17, 0.88) 100%);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow:
        0 30px 80px -28px rgba(0, 0, 0, 0.7),
        0 8px 24px -10px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition:
        border-color 360ms var(--ease-out),
        background 360ms var(--ease-out),
        box-shadow 360ms var(--ease-out);
}

@media (min-width: 720px) {
    .ttest__card { min-height: 220px; padding: 18px 22px 16px; }
}

.ttest.is-focus .ttest__card {
    border-color: rgba(255, 181, 71, 0.42);
    background:
        linear-gradient(180deg, rgba(36, 28, 18, 0.94) 0%, rgba(14, 14, 20, 0.92) 100%);
    box-shadow:
        0 40px 120px -28px rgba(255, 181, 71, 0.25),
        0 18px 50px -16px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Glow ring (sits behind card via blur halo) */
.ttest__glow {
    position: absolute;
    inset: -2px;
    border-radius: 24px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 420ms var(--ease-out);
    background:
        conic-gradient(
            from 220deg at 50% 50%,
            rgba(255, 181, 71, 0.55) 0deg,
            rgba(255, 59, 111, 0.32) 90deg,
            rgba(108, 242, 255, 0.45) 200deg,
            rgba(255, 181, 71, 0.55) 360deg
        );
    filter: blur(18px);
    z-index: -1;
}

.ttest.is-focus .ttest__glow {
    opacity: 0.85;
    animation: ttestGlowSpin 7s linear infinite;
}

@keyframes ttestGlowSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Sheen swipe on focus */
.ttest__sheen {
    position: absolute;
    top: -50%;
    left: -60%;
    width: 60%;
    height: 200%;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 45%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0.06) 55%,
        transparent 100%
    );
    pointer-events: none;
    transform: translateX(-100%) skewX(-12deg);
    transition: transform 1100ms var(--ease-out);
}

.ttest.is-focus .ttest__sheen {
    transform: translateX(360%) skewX(-12deg);
}

/* Header row: avatar + name + X icon */
.ttest__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.ttest__av {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--amber) 0%, var(--neon) 50%, var(--ice) 100%);
    overflow: hidden;
    display: block;
    box-shadow: 0 4px 12px -4px rgba(255, 181, 71, 0.4);
}

.ttest__av img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    background: var(--bg-1);
    object-fit: cover;
}

.ttest__who {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.ttest__name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-0);
    letter-spacing: -0.01em;
}

/* Role / company line */
.ttest__role {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--ink-2);
    letter-spacing: 0.005em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Big decorative quotation mark in the upper-right corner */
.ttest__quotemark {
    position: absolute;
    top: 2px;
    right: 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 96px;
    line-height: 0.7;
    color: var(--amber);
    opacity: 0.14;
    pointer-events: none;
    transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out), color 420ms var(--ease-out);
    transform-origin: top right;
}

.ttest.is-focus .ttest__quotemark {
    opacity: 0.38;
    transform: scale(1.08) rotate(-4deg);
}

/* Review body */
.ttest__text {
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--ink-0);
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.005em;
    position: relative;
    z-index: 1;
}

@media (min-width: 720px) {
    .ttest__text { font-size: 15px; }
}

/* Footer: stars + date */
.ttest__foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--ink-2);
}

.ttest__date {
    color: var(--ink-3);
    font-size: 11px;
    letter-spacing: 0.04em;
}

/* Star rating */
.ttest__stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.ttest__star {
    width: 14px;
    height: 14px;
    color: var(--amber);
    opacity: 0.62;
    transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out), filter 300ms var(--ease-out);
}

.ttest.is-focus .ttest__star {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(255, 181, 71, 0.55));
    animation: ttestStarWave 700ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.ttest.is-focus .ttest__star:nth-child(1) { animation-delay:   0ms; }
.ttest.is-focus .ttest__star:nth-child(2) { animation-delay:  60ms; }
.ttest.is-focus .ttest__star:nth-child(3) { animation-delay: 120ms; }
.ttest.is-focus .ttest__star:nth-child(4) { animation-delay: 180ms; }
.ttest.is-focus .ttest__star:nth-child(5) { animation-delay: 240ms; }

@keyframes ttestStarWave {
    0%   { transform: translateY(0) scale(1); }
    40%  { transform: translateY(-4px) scale(1.25); }
    100% { transform: translateY(0) scale(1); }
}

/* Hint pill below stack */
.testify__hint {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: 0.18em;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.testify__hint-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 8px var(--amber);
    animation: pulse 1.6s ease-in-out infinite;
}

/* Mobile: shrink stack offsets */
@media (max-width: 560px) {
    .testify { padding: 40px 0 56px; }
    .testify__head { margin: 28px auto 22px; }
    .testify__stage { min-height: 380px; margin-top: 22px; }
    .testify__stack { width: 280px; height: 220px; }
    .ttest { width: 280px; }
    .ttest[data-i="0"] { --x: -52px; --y: -22px; }
    .ttest[data-i="1"] { --x: -26px; --y: -11px; }
    .ttest[data-i="3"] { --x:  26px; --y:  11px; }
    .ttest[data-i="4"] { --x:  52px; --y:  22px; }
    .ttest__card { min-height: 180px; padding: 14px 15px; }
    .ttest__text { font-size: 13.5px; -webkit-line-clamp: 4; }
    .ttest__av { width: 38px; height: 38px; }
    .ttest__name { font-size: 14px; }
    .ttest__role { font-size: 11px; }
    .ttest__star { width: 12px; height: 12px; }
    .ttest__quotemark { font-size: 72px; }
    .tmini { padding: 9px 14px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .testify__rail-track { animation: none; }
    .ttest, .ttest__glow, .ttest__sheen, .ttest__star, .ttest__quotemark { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    padding: 48px 0 22px;
    border-top: 1px solid var(--line);
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 44px;
    margin-bottom: 44px;
}

.footer__tag {
    margin-top: 16px;
    color: var(--ink-2);
    font-size: 13px;
    max-width: 280px;
}

.footer__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer__cols h4 {
    font-size: 10px;
    color: var(--ink-3);
    margin: 0 0 16px;
    letter-spacing: 0.16em;
    font-weight: 400;
}

.footer__cols a {
    display: block;
    padding: 6px 0;
    color: var(--ink-1);
    font-size: 14px;
}

.footer__cols a:hover {
    color: var(--ink-0);
}

.footer__base {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 11px;
    color: var(--ink-3);
}

@media (max-width: 768px) {
    .footer__inner { grid-template-columns: 1fr; gap: 40px; }
    .footer__cols { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .footer__base { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ==========================================================================
   PROJECTS — 3D stellar card gallery
   Outer section = breathing room (heading + lede sit here).
   Inner stage   = the black interactive canvas.
     [data-expanded="false"] — compact ~75vh preview, scroll passes through
     [data-expanded="true"]  — immersive 100svh, full controls (incl. zoom)
   ========================================================================== */
.projects {
    position: relative;
    padding: clamp(52px, 7.5vw, 108px) 0;
    background: var(--bg-0);
}

/* Soft gradient wash above and below the stage for a cinematic fade */
.projects::before,
.projects::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 96px;
    pointer-events: none;
    z-index: 2;
}
.projects::before {
    top: 0;
    background: linear-gradient(180deg, var(--bg-0) 0%, rgba(7, 7, 10, 0) 100%);
}
.projects::after {
    bottom: 0;
    background: linear-gradient(0deg, var(--bg-0) 0%, rgba(7, 7, 10, 0) 100%);
}

/* -------- Header (above the stage, inside the top padding) -------- */
.projects__header {
    text-align: center;
    margin-bottom: clamp(28px, 4vw, 52px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.projects__header .eyebrow {
    margin-bottom: 0;
}

.projects__title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: clamp(34px, 4.4vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--ink-0);
    margin: 0;
    text-wrap: balance;
}

.projects__lede {
    max-width: 540px;
    margin: 0;
    font-size: clamp(14px, 1.2vw, 16px);
    color: var(--ink-2);
    line-height: 1.65;
}

/* -------- Stage (the interactive canvas) -------- */
.projects__stage {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 520px;
    max-height: 780px;
    background: #000;
    overflow: hidden;
    isolation: isolate;
    box-shadow:
        inset 0 120px 160px -80px rgba(0, 0, 0, 0.9),
        inset 0 -120px 160px -80px rgba(0, 0, 0, 0.9),
        0 40px 120px -40px rgba(0, 0, 0, 0.6);
    transition:
        height 600ms var(--ease-out),
        min-height 600ms var(--ease-out),
        max-height 600ms var(--ease-out),
        border-radius 600ms var(--ease-out),
        margin 600ms var(--ease-out);
    border-radius: 28px;
    margin: 0 clamp(16px, 3vw, 40px);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.projects__stage[data-expanded="true"] {
    height: 100svh;
    min-height: 640px;
    max-height: none;
    border-radius: 0;
    margin: 0;
    border-color: transparent;
}

#galleryCanvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
    z-index: 1;
    touch-action: none; /* let OrbitControls handle gestures */
    cursor: grab;
}
#galleryCanvas:active { cursor: grabbing; }

.projects__hint {
    position: absolute;
    left: 50%;
    bottom: clamp(18px, 3vw, 36px);
    transform: translateX(-50%);
    z-index: 3;
    font-size: clamp(11px, 1.1vw, 13px);
    font-weight: 600;
    letter-spacing: 0.14em;
    color: rgba(232, 250, 255, 0.95);
    margin: 0;
    padding: 10px 18px;
    background: linear-gradient(165deg, rgba(12, 22, 28, 0.88), rgba(8, 14, 20, 0.78));
    border: 1px solid rgba(126, 237, 247, 0.42);
    border-radius: 999px;
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    white-space: nowrap;
    pointer-events: none;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(108, 242, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 8px 32px -8px rgba(0, 0, 0, 0.65),
        0 0 28px -6px rgba(108, 242, 255, 0.2);
}

/* Swap hint text between states */
.projects__stage[data-expanded="false"] .projects__hint--expanded,
.projects__stage[data-expanded="true"]  .projects__hint--collapsed {
    display: none;
}

/* -------- Expand / Collapse toggle -------- */
.projects__toggle {
    position: absolute;
    top: 50%;
    right: clamp(16px, 2.5vw, 28px);
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(126, 237, 247, 0.55);
    background: linear-gradient(165deg, rgba(36, 180, 207, 0.35), rgba(12, 40, 48, 0.82));
    color: #f4feff;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    transform: translateY(-50%);
    text-shadow: 0 0 18px rgba(108, 242, 255, 0.35);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 10px 36px -12px rgba(0, 0, 0, 0.55),
        0 0 32px -8px rgba(108, 242, 255, 0.28);
    transition:
        background 200ms var(--ease-soft),
        border-color 200ms var(--ease-soft),
        transform 160ms var(--ease-soft),
        color 200ms var(--ease-soft),
        box-shadow 200ms var(--ease-soft);
}

.projects__toggle:hover {
    background: linear-gradient(165deg, rgba(56, 200, 220, 0.45), rgba(14, 52, 60, 0.9));
    border-color: rgba(200, 248, 255, 0.75);
    color: #ffffff;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 12px 40px -10px rgba(0, 0, 0, 0.5),
        0 0 40px -4px rgba(126, 237, 247, 0.4);
}
.projects__toggle:active {
    transform: translateY(-50%) scale(0.97);
}
.projects__toggle:focus-visible {
    outline: 2px solid var(--ice);
    outline-offset: 3px;
}

.projects__toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.projects__stage[data-expanded="false"] .projects__toggle-label--collapse,
.projects__stage[data-expanded="true"]  .projects__toggle-label--expand {
    display: none;
}

/* Expanded: collapse control moves to top-left (clear of the canvas focal area) */
.projects__stage[data-expanded="true"] .projects__toggle {
    top: clamp(18px, 3vw, 32px);
    right: auto;
    left: clamp(18px, 3vw, 32px);
    transform: none;
    min-height: 38px;
    padding: 0 16px;
    font-size: 11px;
    font-weight: 700;
}

.projects__stage[data-expanded="true"] .projects__toggle:active {
    transform: scale(0.97);
}

.projects__loading {
    position: absolute;
    bottom: clamp(16px, 3vw, 32px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    transition: opacity 600ms var(--ease-soft);
    pointer-events: none;
}
.projects__loading[data-hidden="true"] { opacity: 0; }

@media (max-width: 640px) {
    .projects__stage {
        height: 58vh;
        min-height: 360px;
        max-height: 520px;
        margin: 0 12px;
        border-radius: 18px;
    }
    .projects__toggle {
        min-height: 38px;
        padding: 0 14px;
        font-size: 10px;
        letter-spacing: 0.1em;
    }
    .projects__stage[data-expanded="true"] .projects__toggle {
        transform: none;
    }
    .projects__hint {
        font-size: 10px;
        letter-spacing: 0.12em;
        padding: 8px 14px;
        white-space: normal;
        text-align: center;
        max-width: min(340px, calc(100% - 100px));
    }
}

/* ==========================================================================
   Project modal (tilt card)
   ========================================================================== */
.pmodal {
    position: fixed;
    inset: 0;
    /* Above .nav (100), loaders, and page overlays so modal actions receive clicks */
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.pmodal[data-open="true"] {
    display: flex;
    animation: pmodal-in 240ms var(--ease-out);
}

@keyframes pmodal-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.pmodal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.pmodal__wrap {
    position: relative;
    width: 100%;
    max-width: 440px;
    z-index: 1;
    pointer-events: auto;
}

.pmodal__close {
    position: absolute;
    top: -48px;
    right: -4px;
    background: transparent;
    border: none;
    padding: 4px;
    color: #fff;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 200ms var(--ease-soft), transform 200ms var(--ease-soft);
    z-index: 2;
}
.pmodal__close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.pmodal__tilt {
    perspective: 1000px;
    width: 100%;
}

.pmodal__card {
    position: relative;
    width: 100%;
    background: #1F2121;
    border-radius: 16px;
    padding: 16px;
    transform-style: preserve-3d;
    transition: transform 500ms var(--ease-out);
    box-shadow:
        rgba(0, 0, 0, 0.01) 0 520px 146px 0,
        rgba(0, 0, 0, 0.04) 0 333px 133px 0,
        rgba(0, 0, 0, 0.26) 0 83px 83px 0,
        rgba(0, 0, 0, 0.29) 0 21px 46px 0;
}

.pmodal__imgwrap {
    position: relative;
    width: 100%;
    /* Match gallery card image viewport (16:10) — wide screenshot frame, edge-to-edge */
    aspect-ratio: 16 / 10;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: #0a0a0f;
}
.pmodal__imgwrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.pmodal__title {
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    margin: 0 0 16px 0;
    letter-spacing: -0.01em;
}

.pmodal__actions {
    display: flex;
    gap: 8px;
}

.pmodal__btn,
.pmodal__heart {
    border: none;
    height: 38px;
    background: #31b8c6;
    color: #000;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 300ms var(--ease-out), transform 120ms var(--ease-out);
    text-decoration: none;
    box-sizing: border-box;
}
.pmodal__btn { flex: 1; }
.pmodal__heart { width: 38px; }

.pmodal__btn:disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.pmodal__btn:not(:disabled) {
    pointer-events: auto;
    cursor: pointer;
}

.pmodal__btn:hover,
.pmodal__heart:hover { opacity: 0.85; }
.pmodal__btn:active,
.pmodal__heart:active { transform: scale(0.97); }
.pmodal__btn:disabled:hover { opacity: 0.45; }
.pmodal__btn:disabled:active { transform: none; }

.pmodal__heart[aria-pressed="true"] svg {
    fill: currentColor;
}

/* Lock body scroll when modal open */
body.pmodal-open {
    overflow: hidden;
}

/* ==========================================================================
   CONTACT — Book-a-call section (3D scene + interactive form)
   ========================================================================== */
.contact {
    position: relative;
    padding: 86px 0 96px;
    overflow: hidden;
    background: var(--bg-0);
    isolation: isolate;
}

/* Ambient background layers */
.contact__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.contact__grid {
    position: absolute;
    inset: -1px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 30%, transparent 80%);
    opacity: 0.7;
}

.contact__glow {
    position: absolute;
    width: 640px;
    height: 640px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.55;
}

.contact__glow--amber {
    top: -220px;
    left: -180px;
    background: radial-gradient(circle, rgba(255, 181, 71, 0.3), transparent 70%);
}

.contact__glow--ice {
    bottom: -260px;
    right: -200px;
    background: radial-gradient(circle, rgba(108, 242, 255, 0.25), transparent 70%);
}

.contact__inner {
    position: relative;
    z-index: 2;
}

/* Header block */
.contact__head {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.contact__head .eyebrow {
    margin-bottom: 20px;
}

.contact__title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: clamp(36px, 4.8vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.03em;
    margin: 0 0 22px;
    color: var(--ink-0);
}

.contact__title .grad {
    background: linear-gradient(180deg, #fff 0%, var(--amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 22px rgba(255, 181, 71, 0.35));
}

.contact__lede {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-2);
    max-width: 620px;
    margin: 0 auto;
}

/* Stage: 3D scene + form side-by-side */
.contact__stage {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 36px;
    align-items: stretch;
}

@media (max-width: 980px) {
    .contact__stage {
        grid-template-columns: 1fr;
        gap: 22px;
    }
}

/* ==========================================================================
   3D scene (left side)
   ========================================================================== */
.contact__scene {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    min-height: 560px;
    background:
        radial-gradient(ellipse at 50% 80%, rgba(255, 181, 71, 0.08), transparent 55%),
        radial-gradient(ellipse at 50% 0%, rgba(108, 242, 255, 0.05), transparent 55%),
        linear-gradient(180deg, #0a0a10 0%, #05050a 100%);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 40px 80px -30px rgba(0, 0, 0, 0.9);
}

/* Animated studio scene (3D dev at desk) */
.contact__scene--studio {
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255, 181, 71, 0.10), transparent 60%),
        radial-gradient(ellipse at 80% 90%, rgba(255, 59, 111, 0.06), transparent 55%),
        radial-gradient(ellipse at 20% 90%, rgba(108, 242, 255, 0.05), transparent 55%),
        linear-gradient(180deg, #0a0a10 0%, #04040a 100%);
}

/* Soft horizon line behind the desk */
.contact__scene--studio::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 58%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06) 40%, rgba(255, 255, 255, 0.06) 60%, transparent);
    pointer-events: none;
    z-index: 1;
}

/* Faint grid floor (CSS perspective; pure decoration behind canvas) */
.contact__scene--studio::after {
    content: "";
    position: absolute;
    left: -20%;
    right: -20%;
    bottom: -10%;
    height: 55%;
    background-image:
        linear-gradient(rgba(255, 181, 71, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 181, 71, 0.06) 1px, transparent 1px);
    background-size: 42px 42px;
    transform: perspective(700px) rotateX(62deg);
    transform-origin: center top;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
    pointer-events: none;
    z-index: 1;
    opacity: 0.55;
}

#contactCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Corner HUD readouts */
.contact__hud {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    background: rgba(7, 7, 10, 0.55);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--ink-1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-transform: uppercase;
    pointer-events: none;
}

.contact__hud--tl { top: 18px; left: 18px; }
.contact__hud--tr { top: 18px; right: 18px; }
.contact__hud--bl { bottom: 18px; left: 18px; flex-direction: column; align-items: flex-start; gap: 2px; }
.contact__hud--br { bottom: 18px; right: 18px; flex-direction: column; align-items: flex-end; gap: 2px; }

.contact__hud-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 8px var(--amber);
    animation: cpulse 1.6s ease-in-out infinite;
}

@keyframes cpulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.85); }
}

.contact__hud-loc {
    padding-left: 8px;
    margin-left: 4px;
    border-left: 1px solid var(--glass-border);
    color: var(--ink-2);
}

.contact__hud-label {
    font-size: 9px;
    color: var(--ink-3);
}

.contact__hud-value {
    font-size: 11px;
    color: var(--ink-0);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact__scene-hint {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--ink-2);
    pointer-events: none;
    opacity: 0.85;
    transition: opacity 360ms var(--ease-soft), transform 360ms var(--ease-soft);
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(7, 7, 10, 0.55);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.contact__scene-hint__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 10px var(--amber);
    animation: cpulse 1.4s ease-in-out infinite;
}

.contact__scene[data-state="playing"] .contact__scene-hint,
.contact__scene[data-state="over"] .contact__scene-hint {
    opacity: 0;
    transform: translate(-50%, 8px);
}

/* ==========================================================================
   Studio scene HUD (live indicator / faux browser chrome / shipping ticker / nudge)
   ========================================================================== */
.shud {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    line-height: 1;
    transition: border-color 220ms var(--ease-soft), background 220ms var(--ease-soft), transform 220ms var(--ease-out);
}

/* LIVE badge */
.shud--live {
    background: rgba(7, 7, 10, 0.6);
    border-color: rgba(255, 181, 71, 0.28);
}

.shud__pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--amber);
    box-shadow: 0 0 8px rgba(255, 181, 71, 0.9), 0 0 14px rgba(255, 181, 71, 0.45);
    animation: spulse 1.5s ease-in-out infinite;
}

@keyframes spulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(0.78); }
}

.shud__label {
    font-size: 9.5px;
    letter-spacing: 0.18em;
    color: var(--ink-1);
}

/* Faux browser-window chrome (top-right) */
.shud--window {
    padding: 6px 11px 6px 9px;
    background: rgba(7, 7, 10, 0.7);
}

.shud__dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.shud__dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: inline-block;
}

.shud__dots i:nth-child(1) { background: rgba(255, 95, 86, 0.7); }
.shud__dots i:nth-child(2) { background: rgba(255, 189, 46, 0.7); }
.shud__dots i:nth-child(3) { background: rgba(39, 201, 63, 0.7); }

.shud__url {
    font-size: 10px;
    color: var(--ink-1);
    letter-spacing: 0.04em;
    padding-left: 8px;
    margin-left: 4px;
    border-left: 1px solid var(--glass-border);
    text-transform: none;
}

.shud__proto { color: var(--ink-3); }

/* Shipping ticker (bottom-left) */
.shud--stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 9px 12px;
    background: rgba(7, 7, 10, 0.7);
}

.shud__stat-label {
    font-size: 9px;
    color: var(--ink-3);
    letter-spacing: 0.18em;
}

.shud__stat-row {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: var(--ink-0);
    letter-spacing: 0.02em;
    text-transform: none;
}

.shud__stat-line {
    min-width: 132px;
    display: inline-block;
    color: var(--amber);
    text-shadow: 0 0 10px rgba(255, 181, 71, 0.35);
    font-variant-numeric: tabular-nums;
}

.shud__stat-cursor {
    display: inline-block;
    width: 7px;
    height: 12px;
    background: var(--amber);
    box-shadow: 0 0 6px rgba(255, 181, 71, 0.65);
    animation: scursor 1s steps(2, end) infinite;
    transform: translateY(1px);
}

@keyframes scursor {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Mouse-nudge chip (bottom-right) */
.shud--nudge {
    flex-direction: row;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    background: rgba(7, 7, 10, 0.6);
}

.shud__nudge-icon {
    display: inline-flex;
    color: var(--amber);
    opacity: 0.85;
}

.shud__nudge-text {
    font-size: 9.5px;
    color: var(--ink-2);
    letter-spacing: 0.16em;
}

/* Once user has interacted, fade the nudge */
.contact__scene--studio[data-state="active"] .shud--nudge {
    opacity: 0.35;
}

/* Invalid-field shake (used on submit validation) */
.cfield.is-shake {
    animation: cshake 420ms var(--ease-out);
}

@keyframes cshake {
    0%, 100% { transform: translateX(0); }
    15%      { transform: translateX(-6px); }
    30%      { transform: translateX(5px); }
    45%      { transform: translateX(-3px); }
    60%      { transform: translateX(3px); }
    80%      { transform: translateX(-1px); }
}

/* ==========================================================================
   Form card (right side)
   ========================================================================== */
.contact__form {
    position: relative;
    padding: 32px 32px 28px;
    border-radius: 24px;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 40px 80px -30px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

@media (max-width: 520px) {
    .contact__form { padding: 22px 20px 20px; border-radius: 20px; }
}

.contact__form-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 4px;
}

.contact__form-kicker {
    font-size: 10px;
    color: var(--amber);
    letter-spacing: 0.18em;
}

.contact__form-title {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink-0);
    margin: 2px 0 2px;
}

.contact__form-sub {
    font-size: 13px;
    color: var(--ink-2);
    margin: 0;
}

.contact__form-error {
    display: none;
    font-size: 13px;
    color: #ff6b8a;
    margin: 8px 0 0;
    line-height: 1.4;
}
.contact__form-error:not([hidden]) {
    display: block;
}

/* Generic field */
.cfield {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cfield__label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: var(--ink-2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cfield__hint {
    font-size: 9.5px;
    color: var(--ink-3);
    letter-spacing: 0.06em;
}

.cfield-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 520px) {
    .cfield-row { grid-template-columns: 1fr; }
}

/* Inputs */
.cinput-wrap {
    position: relative;
}

.cinput {
    width: 100%;
    padding: 13px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--ink-0);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition:
        background 220ms var(--ease-soft),
        border-color 220ms var(--ease-soft);
}

.cinput::placeholder { color: var(--ink-3); }

.cinput:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--line-strong);
}

.cinput:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 181, 71, 0.45);
}

.cinput__focus {
    position: absolute;
    inset: -1px;
    border-radius: 13px;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at var(--fx, 50%) var(--fy, 50%),
                        rgba(255, 181, 71, 0.28),
                        transparent 60%);
    transition: opacity 240ms var(--ease-soft);
    mix-blend-mode: screen;
}

.cinput:focus ~ .cinput__focus,
.cinput-wrap:hover .cinput__focus {
    opacity: 1;
}

.cinput--area {
    resize: none;
    min-height: 86px;
}

.cinput-wrap--area { display: block; }

/* ==========================================================================
   Custom dropdown
   ========================================================================== */
.cdrop {
    position: relative;
}

.cdrop__trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--ink-0);
    text-align: left;
    transition:
        background 220ms var(--ease-soft),
        border-color 220ms var(--ease-soft);
}

.cdrop__trigger:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--line-strong);
}

.cdrop.is-open .cdrop__trigger {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 181, 71, 0.45);
}

.cdrop__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(180deg, rgba(255, 181, 71, 0.2), rgba(255, 181, 71, 0.05));
    border: 1px solid rgba(255, 181, 71, 0.28);
    color: var(--amber);
    flex-shrink: 0;
    transition: transform 400ms var(--ease-out), background 260ms var(--ease-soft);
}

.cdrop.is-open .cdrop__icon {
    transform: rotate(-8deg) scale(1.05);
}

.cdrop__text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    min-width: 0;
}

.cdrop__title {
    font-size: 14px;
    color: var(--ink-0);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cdrop__meta {
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: 0.06em;
}

.cdrop__chev {
    color: var(--ink-2);
    transition: transform 280ms var(--ease-out);
    flex-shrink: 0;
}

.cdrop.is-open .cdrop__chev {
    transform: rotate(180deg);
    color: var(--amber);
}

/* Menu */
.cdrop__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    padding: 6px;
    background: rgba(14, 14, 18, 0.92);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 24px 60px -20px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top center;
    pointer-events: none;
    transition:
        opacity 200ms var(--ease-soft),
        transform 240ms var(--ease-out);
}

.cdrop.is-open .cdrop__menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.cdrop__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 9px;
    color: var(--ink-1);
    background: transparent;
    text-align: left;
    transition: background 160ms var(--ease-soft), color 160ms var(--ease-soft);
    position: relative;
}

.cdrop__item:hover,
.cdrop__item.is-hover {
    background: rgba(255, 181, 71, 0.08);
    color: var(--ink-0);
}

.cdrop__item.is-active {
    background: rgba(255, 181, 71, 0.12);
    color: var(--ink-0);
}

.cdrop__item.is-active::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--amber);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px var(--amber);
}

.cdrop__item-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--ink-1);
    flex-shrink: 0;
    transition: background 160ms var(--ease-soft), border-color 160ms var(--ease-soft), color 160ms var(--ease-soft);
}

.cdrop__item:hover .cdrop__item-ico,
.cdrop__item.is-hover .cdrop__item-ico,
.cdrop__item.is-active .cdrop__item-ico {
    background: rgba(255, 181, 71, 0.18);
    border-color: rgba(255, 181, 71, 0.4);
    color: var(--amber);
}

.cdrop__item-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.cdrop__item-title {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
}

.cdrop__item-sub {
    font-size: 9.5px;
    color: var(--ink-3);
    letter-spacing: 0.06em;
}

.cdrop__item-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    font-size: 9.5px;
    color: var(--ink-2);
    flex-shrink: 0;
}

/* ==========================================================================
   Footer row: policy + magnetic submit
   ========================================================================== */
.cfield__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px dashed var(--glass-border);
}

.cpolicy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: 0.08em;
}

.cpolicy svg { opacity: 0.8; }

/* Magnetic submit button */
.cmagnet {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    min-width: 180px;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, #d8d8df 100%);
    color: #0a0a10;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    overflow: hidden;
    will-change: transform;
    transition: box-shadow 260ms var(--ease-soft);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 12px 30px -10px rgba(255, 181, 71, 0.3);
}

.cmagnet:hover {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 0 0 1px rgba(255, 181, 71, 0.3),
        0 20px 44px -12px rgba(255, 181, 71, 0.5);
}

.cmagnet:active .cmagnet__label { transform: scale(0.96); }

.cmagnet__label {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 140ms var(--ease-out);
    pointer-events: none;
}

/* Goo-y hover halo that follows cursor */
.cmagnet__pull {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(
        circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 181, 71, 0.9),
        rgba(255, 181, 71, 0) 60%
    );
    opacity: 0;
    transition: opacity 240ms var(--ease-soft);
    pointer-events: none;
}

.cmagnet:hover .cmagnet__pull { opacity: 1; }

/* Outer ring that pulses on hover */
.cmagnet__ring {
    position: absolute;
    inset: -8px;
    border-radius: 22px;
    border: 1px solid rgba(255, 181, 71, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms var(--ease-soft), transform 240ms var(--ease-soft);
}

.cmagnet:hover .cmagnet__ring {
    opacity: 1;
    animation: cmagnet-pulse 1.8s ease-in-out infinite;
}

@keyframes cmagnet-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.06); opacity: 0; }
}

.cmagnet.is-loading {
    pointer-events: none;
    color: transparent;
}

.cmagnet.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(10, 10, 16, 0.2);
    border-top-color: #0a0a10;
    animation: cspin 0.8s linear infinite;
    z-index: 3;
}

@keyframes cspin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Success overlay (cinematic)
   ========================================================================== */
.csuccess {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255, 181, 71, 0.18), transparent 60%),
        linear-gradient(180deg, rgba(14, 14, 18, 0.96), rgba(7, 7, 10, 0.98));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: inherit;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 420ms var(--ease-soft), transform 520ms var(--ease-out);
    text-align: center;
}

.csuccess.is-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.csuccess__ring {
    position: relative;
    width: 92px;
    height: 92px;
    margin-bottom: 6px;
}

.csuccess__ring svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.csuccess__ring-track {
    fill: none;
    stroke: var(--glass-border);
    stroke-width: 2.5;
}

.csuccess__ring-fill {
    fill: none;
    stroke: var(--amber);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 276.46;
    stroke-dashoffset: 276.46;
    filter: drop-shadow(0 0 10px rgba(255, 181, 71, 0.6));
    transition: stroke-dashoffset 900ms var(--ease-out) 120ms;
}

.csuccess.is-visible .csuccess__ring-fill {
    stroke-dashoffset: 0;
}

.csuccess__check {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    color: var(--amber);
    transition: transform 520ms var(--ease-out) 700ms, opacity 320ms var(--ease-soft) 700ms;
    filter: drop-shadow(0 0 8px rgba(255, 181, 71, 0.6));
}

.csuccess.is-visible .csuccess__check {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.csuccess__title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: clamp(22px, 2.6vw, 30px);
    letter-spacing: -0.02em;
    color: var(--ink-0);
    margin: 8px 0 2px;
}

.csuccess__sub {
    font-size: 11px;
    color: var(--ink-2);
    letter-spacing: 0.08em;
    margin: 0 0 20px;
}

.csuccess__receipt {
    width: min(360px, 100%);
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.csuccess__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--ink-0);
}

.csuccess__row span:first-child {
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: 0.1em;
}

.csuccess__row--eta {
    padding-top: 10px;
    margin-top: 2px;
    border-top: 1px dashed var(--glass-border);
}

.csuccess__row--eta span:last-child {
    color: var(--amber);
    font-weight: 500;
    text-shadow: 0 0 16px rgba(255, 181, 71, 0.45);
}

.csuccess__note {
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: 0.08em;
    margin: -6px 0 14px;
}

.csuccess__note span {
    color: var(--ink-0);
    border-bottom: 1px dotted var(--ink-3);
}

.csuccess__reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--ink-1);
    font-size: 11px;
    letter-spacing: 0.08em;
    transition: background 180ms var(--ease-soft), color 180ms var(--ease-soft);
}

.csuccess__reset:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--ink-0);
}

/* ==========================================================================
   Message field (emphasized) + helper tips
   ========================================================================== */
.cfield--message .cinput-wrap--area {
    position: relative;
}

.cfield--message .cinput--area {
    min-height: 148px;
    font-size: 14px;
    line-height: 1.55;
}

.cmsg__tips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 4px;
    font-size: 9.5px;
    color: var(--ink-3);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cmsg__tip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cmsg__tip-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--amber);
    opacity: 0.7;
    box-shadow: 0 0 6px rgba(255, 181, 71, 0.5);
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .cinema { height: 100vh; }
    .cinema__sticky { position: relative; }
}

/* ==========================================================================
   MOBILE OPTIMIZATIONS — phones only (≤ 768px). Desktop is unchanged.
   Background video / canvas behavior is intentionally untouched.
   Only text overlays, headings, services cards and the contact form are
   re-fitted so they feel right on small screens.
   ========================================================================== */
@media (max-width: 768px) {
    /* ---- Caption text overlays on the hero (text-only, video unchanged) ---- */
    .caption { padding: 0 16px; }
    .caption__panel { padding: 18px 16px; }
    .caption__center,
    .caption__center--small,
    .caption__center--ch3,
    .caption__center--final { gap: 14px; }
    .ch-title__main { font-size: clamp(26px, 7.5vw, 40px); line-height: 1.06; }
    .ch-title       { font-size: clamp(24px, 7vw, 36px);   line-height: 1.1;  }
    .ch-title__prefix,
    .ch-title__suffix { font-size: clamp(11px, 2.6vw, 13px); letter-spacing: 0.18em; }
    .ch-meta { display: none; } /* HUD coordinates row feels cramped on small screens */
    .hero__sub { font-size: 14px; line-height: 1.55; }

    /* ---- Generic section spacing ---- */
    .section { padding: 56px 0 60px; }
    .section__head { margin-bottom: 28px; }
    .section__title { font-size: clamp(26px, 6.8vw, 36px); }
    .section__lede  { font-size: 14px; line-height: 1.6; }

    /* ---- Services ---- */
    .services { padding: 48px 0 56px; }
    .services__lede { font-size: 14px; }
    .services__grid { gap: 12px; }
    /* Kill 3D tilt + sheen on touch — they only fire on hover and
       end up baked at random angles after touch. Cards stay flat & readable. */
    .service-card { transform: none !important; opacity: 1 !important; --reveal: 1 !important; }
    .service-card__inner {
        padding: 16px 16px 18px;
        transform: none !important;
        transition: border-color 200ms var(--ease-soft);
    }
    .service-card:hover .service-card__inner,
    .service-card:focus-visible .service-card__inner { transform: none; }
    .service-card__sheen { display: none; }
    .service-card__title { font-size: 19px; }
    .service-card__body  { font-size: 13.5px; line-height: 1.55; }

    /* ---- Contact ---- */
    .contact { padding: 56px 0 64px; }
    .contact__head { margin-bottom: 26px; }
    .contact__title { font-size: clamp(26px, 6.8vw, 38px); margin-bottom: 14px; }
    .contact__lede  { font-size: 14px; line-height: 1.6; }
    .contact__stage { gap: 18px; }
    .contact__scene { min-height: 320px; border-radius: 18px; }
    .contact__hud { display: none; } /* HUD overlays clutter the small canvas */
    .contact__form { padding: 22px 18px 20px; border-radius: 18px; gap: 16px; }
    .contact__form-title { font-size: 19px; }
    .contact__form-sub   { font-size: 12.5px; }
}

/* Even tighter for small phones (< 480px) */
@media (max-width: 480px) {
    .container { width: min(100%, calc(100% - 28px)); }
    .contact__scene { min-height: 260px; }
    .contact__form { padding: 20px 16px 18px; }
}
