/* ==========================================================================
   Chaos Branding — "Chaos → Clarity" scrollytelling homepage
   Self-contained stylesheet for index-reimagined.html
   Governing idea: ONE scalar --cx-order (0 = chaos / top, 1 = clarity / bottom)
   drives color temperature, type, grid, noise and motion. The RESTING (no-JS /
   reduced-motion) state IS the clarity end-state, so the page is always legible.
   ========================================================================== */

/* ---- tokens -------------------------------------------------------------- */
:root {
    /* order scalar — clarity-first default; an inline head script sets it to 0
       for motion users so there's no clean→chaos flash. */
    --cx-order: 1;

    --cx-ink: #00020f;
    --cx-flame: #d74b10;
    --cx-ember: #ff7a3c;
    --cx-amber: #ffb27a;
    --cx-red: #ff3b2f;
    --cx-cyan: #37e0ff;
    --cx-clarity: #ffffff;
    --cx-gray: #b2b3b7;
    --cx-cool: #cfe9ff;

    --cx-bg-chaos: #0a0206;
    --cx-bg-clarity: #00020f;
    --cx-accent-chaos: #ff3b2f;
    --cx-accent-clarity: #d74b10;

    --cx-grad: linear-gradient(115deg, #ffb27a 0%, #ff7a3c 35%, #d74b10 70%, #ff3b2f 100%);
    --cx-grad-soft: linear-gradient(120deg, #ff8a4d, #d74b10);
    --cx-grad-clarity: linear-gradient(120deg, #ffffff, #ffe9dc 60%, #ffd2b8);

    /* derived dynamic values (pure functions of --cx-order) */
    --cx-chaos: calc(1 - var(--cx-order));               /* 1 at top → 0 at bottom */
    --cx-accent: color-mix(in oklab, var(--cx-accent-clarity), var(--cx-accent-chaos) calc(var(--cx-chaos) * 100%));
    --cx-bg: color-mix(in oklab, var(--cx-bg-clarity), var(--cx-bg-chaos) calc(var(--cx-chaos) * 100%));
    --cx-noise-op: calc(0.02 + var(--cx-chaos) * 0.13);

    --cx-line: rgba(255, 255, 255, 0.09);
    --cx-line-soft: rgba(255, 255, 255, 0.06);
    --cx-glass: rgba(255, 255, 255, 0.045);
    --cx-glass-2: rgba(255, 255, 255, 0.07);

    --cx-font-head: 'SportingGrotesque', 'Arial Narrow', sans-serif;
    --cx-font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

    /* type scale */
    --fs-d1: clamp(48px, 9vw, 132px);
    --fs-d2: clamp(34px, 5.5vw, 72px);
    --fs-d3: clamp(26px, 3.4vw, 46px);
    --fs-d4: clamp(22px, 2.4vw, 34px);
    --fs-lead: clamp(18px, 1.6vw, 22px);
    --fs-body: 17px;
    --fs-small: 14px;
    --fs-eyebrow: 13px;
    --fs-micro: 12.5px;

    /* layout */
    --cx-content: 1320px;
    --cx-margin: clamp(20px, 5vw, 80px);
    --cx-focus: #ff7a3c;
    --cx-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- fallback for browsers without color-mix(in oklab) (older Safari/webviews) ----
   The two-declaration trick can't recover here because --cx-bg holds an
   unsupported color-mix token (invalid only at computed-value time, which would
   reset backgrounds to transparent). Pin the dynamic tokens to the clarity hex
   and replace the direct color-mix paints so the page stays dark + legible. */
@supports not (background: color-mix(in oklab, #000, #fff)) {
    :root {
        --cx-bg: var(--cx-bg-clarity);
        --cx-accent: var(--cx-accent-clarity);
    }
    .cx-header.is-stuck { background: rgba(0, 2, 15, 0.92); }
    .cx-hero-aurora { background: radial-gradient(circle at 40% 40%, var(--cx-flame), transparent 64%); }
}

/* ---- reset / base -------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.cx-reimagined {
    margin: 0;
    font-family: var(--cx-font-body);
    font-size: var(--fs-body);
    line-height: 1.62;
    letter-spacing: -0.01em;
    color: var(--cx-clarity);
    background: var(--cx-bg-clarity);
    background: var(--cx-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
@media (max-width: 767px) { body.cx-reimagined { font-size: 16px; } }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--cx-font-head); font-weight: 700; }

.cx-reimagined ::selection { background: var(--cx-flame); color: #fff; }

/* focus visibility (on ink AND white grounds) */
.cx-reimagined a:focus-visible,
.cx-reimagined button:focus-visible,
.cx-reimagined input:focus-visible,
.cx-reimagined textarea:focus-visible,
.cx-reimagined select:focus-visible {
    outline: 2px solid var(--cx-focus);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(255, 122, 60, 0.25);
    border-radius: 6px;
}

/* skip link */
.cx-skip {
    position: fixed;
    top: 10px;
    left: 10px;
    transform: translateY(-160%);
    z-index: 10000;
    background: var(--cx-flame);
    color: var(--cx-ink);
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 100px;
    transition: transform 0.25s var(--cx-ease);
}
.cx-skip:focus { transform: translateY(0); }

/* layout helpers */
.cx-wrap { width: 100%; max-width: var(--cx-content); margin: 0 auto; padding: 0 var(--cx-margin); }
.cx-section { position: relative; padding: clamp(80px, 12vh, 160px) 0; }
.cx-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--cx-font-body);
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cx-ember);
}
.cx-eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--cx-ember);
}
.cx-h2 { font-size: var(--fs-d2); line-height: 1.0; letter-spacing: -0.045em; max-width: 18ch; }
.cx-sub { font-size: var(--fs-lead); line-height: 1.6; color: var(--cx-gray); max-width: 60ch; margin-top: 18px; }
.cx-gradient-text {
    background: var(--cx-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* primary / secondary buttons */
.cx-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--cx-font-head);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
    padding: 16px 30px;
    border-radius: 100px;
    border: 0;
    color: var(--cx-ink);
    background: var(--cx-grad-soft);
    box-shadow: 0 16px 44px -18px rgba(215, 75, 16, 0.95);
    transition: transform 0.4s var(--cx-ease), box-shadow 0.4s ease;
    will-change: transform;
}
.cx-btn svg { width: 20px; height: 20px; }
.cx-btn:hover { transform: translateY(-3px); box-shadow: 0 24px 54px -18px rgba(215, 75, 16, 1); }
.cx-btn--ghost {
    background: transparent;
    color: var(--cx-clarity);
    border: 1px solid var(--cx-line);
    box-shadow: none;
}
.cx-btn--ghost:hover { border-color: var(--cx-ember); background: rgba(255, 122, 60, 0.06); transform: translateY(-2px); }
.cx-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cx-ember);
    font-weight: 600;
    transition: gap 0.3s var(--cx-ease);
}
.cx-link:hover { gap: 14px; }

/* ==========================================================================
   Global FX: progress bar + fixed noise overlay
   ========================================================================== */
.cx-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 3px;
    z-index: 9999;
    pointer-events: none;
}
.cx-progress span {
    display: block; height: 100%; width: 0%;
    background: var(--cx-grad);
    box-shadow: 0 0 14px rgba(255, 90, 40, 0.7);
}
.cx-noise {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: var(--cx-noise-op);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: screen;
}
/* a faint red wash that burns off as order rises */
.cx-noise::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 50% -10%, rgba(255, 59, 47, calc(var(--cx-chaos) * 0.16)), transparent 60%);
}

/* keep content above noise */
.cx-shell { position: relative; z-index: 2; }

/* ==========================================================================
   Header / nav
   ========================================================================== */
.cx-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9000;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}
.cx-header.is-stuck {
    background: color-mix(in oklab, var(--cx-bg), transparent 18%);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom-color: var(--cx-line-soft);
}
.cx-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 92px;
}
.cx-nav-logo { display: inline-flex; align-items: center; }
.cx-nav-logo img { height: 64px; width: auto; max-width: 320px; object-fit: contain; }
@media (max-width: 991px) { .cx-nav-logo img { height: 52px; max-width: 220px; } }
.cx-nav-links { display: flex; align-items: center; gap: 30px; }
.cx-nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    transition: color 0.25s ease;
    position: relative;
}
.cx-nav-links a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -6px;
    width: 100%; height: 2px;
    background: var(--cx-ember);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 0.3s var(--cx-ease);
}
.cx-nav-links a:hover { color: #fff; }
.cx-nav-links a:hover::after { transform: scaleX(1); }
.cx-nav-cta { display: flex; align-items: center; gap: 14px; }
.cx-nav-cta .cx-btn { padding: 12px 22px; font-size: 15px; }
/* hamburger toggle (hidden on desktop, shown <=991px) */
.cx-nav-toggle {
    display: none;
    order: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--cx-line);
    border-radius: 12px;
    cursor: pointer;
}
.cx-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s var(--cx-ease), opacity 0.2s ease;
}
.cx-header.menu-open .cx-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.cx-header.menu-open .cx-nav-toggle span:nth-child(2) { opacity: 0; }
.cx-header.menu-open .cx-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991px) {
    .cx-nav-toggle { display: inline-flex; }
    .cx-nav-cta .cx-btn span.long { display: none; }
    /* nav links become a slide-down drawer anchored under the fixed header */
    .cx-nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0 16px;
        background: rgba(0, 2, 15, 0.98);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--cx-line);
        box-shadow: 0 26px 50px -22px rgba(0, 0, 0, 0.85);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.28s var(--cx-ease), transform 0.28s var(--cx-ease), visibility 0.28s;
        max-height: calc(100dvh - 92px);
        overflow-y: auto;
    }
    .cx-header.menu-open .cx-nav-links {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
    .cx-nav-links a {
        padding: 15px var(--cx-margin);
        font-size: 18px;
        color: #fff;
        border-bottom: 1px solid var(--cx-line-soft);
    }
    .cx-nav-links a:last-child { border-bottom: 0; }
    .cx-nav-links a::after { display: none; }
}

/* ==========================================================================
   1. HERO — The Storm
   ========================================================================== */
.cx-hero { position: relative; }
.cx-hero-stage {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 120px 0 60px;
}
.cx-hero-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cx-hero-aurora {
    position: absolute;
    width: 60vw; height: 60vw;
    top: -10%; left: 45%;
    border-radius: 50%;
    filter: blur(80px);
    opacity: calc(0.35 + var(--cx-chaos) * 0.45);
    background: radial-gradient(circle at 40% 40%,
        color-mix(in oklab, var(--cx-flame), var(--cx-red) calc(var(--cx-chaos) * 100%)), transparent 64%);
    will-change: transform;
}
.cx-hero-grid {
    position: absolute;
    inset: -10%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 60% 35%, #000 10%, transparent 75%);
    mask-image: radial-gradient(ellipse 75% 65% at 60% 35%, #000 10%, transparent 75%);
    opacity: calc(0.35 + var(--cx-order) * 0.4);
    /* skew melts away as order rises */
    transform: skewY(calc(var(--cx-chaos) * 1.4deg));
    will-change: transform;
}
.cx-orb {
    position: absolute;
    border-radius: 50%;
    background: var(--cx-grad-soft);
    box-shadow: 0 0 60px rgba(255, 90, 40, 0.5);
    opacity: calc(0.25 + var(--cx-chaos) * 0.35);
    will-change: transform;
}
.cx-orb--1 { width: 14px; height: 14px; top: 24%; left: 14%; }
.cx-orb--2 { width: 9px; height: 9px; top: 66%; left: 26%; }
.cx-orb--3 { width: 22px; height: 22px; top: 38%; right: 16%; }
.cx-orb--4 { width: 7px; height: 7px; top: 16%; right: 32%; }

.cx-hero-inner { position: relative; z-index: 3; max-width: 980px; }
.cx-storm-line {
    font-size: var(--fs-small);
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cx-red);
    opacity: var(--cx-chaos);
    margin: 14px 0 0;
    transition: opacity 0.3s linear;
}
.cx-hero-title {
    font-size: var(--fs-d1);
    line-height: 0.92;
    /* tracking tightens toward the clarity destination */
    letter-spacing: calc(-0.05em + var(--cx-chaos) * 0.04em);
    margin: 18px 0 0;
    color: #fff;
}
.cx-hero-title .cx-glitch {
    position: relative;
    display: inline-block;
    /* the chaos word trembles + leans while disordered */
    transform: translateY(calc(var(--cx-chaos) * -2px)) skewX(calc(var(--cx-chaos) * -4deg));
}
.cx-hero-title .cx-glitch::before,
.cx-hero-title .cx-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    mix-blend-mode: screen;
    pointer-events: none;
    opacity: calc(var(--cx-chaos) * 0.6);
}
.cx-hero-title .cx-glitch::before { color: var(--cx-red); transform: translateX(calc(var(--cx-chaos) * -5px)); }
.cx-hero-title .cx-glitch::after { color: var(--cx-cyan); transform: translateX(calc(var(--cx-chaos) * 5px)); }
.cx-hero-title .cx-glitch.is-buzzing::before { animation: cx-glitch-x 2.4s steps(2) infinite; }
.cx-hero-title .cx-glitch.is-buzzing::after { animation: cx-glitch-x 2.9s steps(2) infinite reverse; }
@keyframes cx-glitch-x {
    0%, 100% { transform: translateX(calc(var(--cx-chaos) * -5px)); }
    50% { transform: translateX(calc(var(--cx-chaos) * -8px)) translateY(1px); }
}
.cx-word--clarity { position: relative; display: inline-block; }
.cx-word--clarity .txt {
    background: var(--cx-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.cx-word--clarity::after {
    content: "";
    position: absolute;
    left: 0; right: 6%;
    bottom: 0.04em;
    height: 0.07em;
    background: var(--cx-grad);
    border-radius: 4px;
    transform: scaleX(var(--cx-order));
    transform-origin: 0 50%;
}
.cx-hero-sub { font-size: var(--fs-lead); line-height: 1.6; color: var(--cx-gray); max-width: 56ch; margin: 26px 0 0; }
.cx-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 36px 0 0; }
.cx-scrollcue {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--cx-gray);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.cx-scrollcue .dot {
    width: 22px; height: 34px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    position: relative;
}
.cx-scrollcue .dot::after {
    content: "";
    position: absolute;
    top: 6px; left: 50%;
    width: 3px; height: 6px;
    margin-left: -1.5px;
    border-radius: 3px;
    background: var(--cx-ember);
    animation: cx-wheel 1.6s var(--cx-ease) infinite;
}
@keyframes cx-wheel { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 1; transform: translateY(11px); } 100% { opacity: 0; } }

/* scattered "pain" shards floating in the hero */
.cx-shards { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cx-shard {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(16, 8, 10, 0.72);
    border: 1px solid rgba(255, 90, 60, 0.28);
    box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
    font-size: 13px;
    color: #ffd9cf;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    white-space: nowrap;
    will-change: transform;
}
.cx-shard .ic { width: 16px; height: 16px; color: var(--cx-red); flex: 0 0 auto; }
.cx-shard--1 { top: 16%; right: 6%; }
.cx-shard--2 { top: 34%; right: 22%; }
.cx-shard--3 { top: 58%; right: 4%; }
.cx-shard--4 { top: 72%; right: 24%; }
.cx-shard--5 { top: 46%; right: 38%; }
@media (max-width: 1100px) { .cx-shard--2, .cx-shard--5 { display: none; } }
@media (max-width: 767px) { .cx-shards { display: none; } }

/* hero stat band */
.cx-stats {
    position: relative;
    z-index: 3;
    margin-top: 64px;
    padding-top: 36px;
    border-top: 1px solid var(--cx-line);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.cx-stat { padding-left: 20px; border-left: 2px solid; border-image: var(--cx-grad) 1; }
.cx-stat-num { font-family: var(--cx-font-head); font-size: var(--fs-d4); line-height: 1; color: #fff; display: flex; align-items: baseline; }
.cx-stat-num .suf { color: var(--cx-ember); margin-left: 2px; }
.cx-stat-label { margin: 10px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--cx-gray); }
@media (max-width: 767px) { .cx-stats { grid-template-columns: 1fr 1fr; gap: 26px 18px; } }

/* ==========================================================================
   2. COST OF CHAOS
   ========================================================================== */
.cx-cost-head { max-width: 760px; }
.cx-cost-grid {
    margin-top: 54px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.cx-pain {
    position: relative;
    padding: 32px 30px;
    border-radius: 18px;
    background: var(--cx-glass);
    border: 1px solid var(--cx-line);
    overflow: hidden;
    will-change: transform;
}
.cx-pain::before {
    content: "";
    position: absolute;
    top: -40%; right: -30%;
    width: 70%; height: 80%;
    border-radius: 50%;
    filter: blur(60px);
    opacity: calc(0.18 + var(--cx-chaos) * 0.3);
    background: radial-gradient(circle, var(--cx-accent), transparent 64%);
}
.cx-pain-ic {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    border: 1px solid var(--cx-line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--cx-ember);
    margin-bottom: 22px;
}
.cx-pain-ic svg { width: 24px; height: 24px; }
.cx-pain h3 { font-size: var(--fs-d4); line-height: 1.05; letter-spacing: -0.03em; }
.cx-pain p { margin: 12px 0 0; color: var(--cx-gray); font-size: 15.5px; line-height: 1.6; }
.cx-cost-foot { margin-top: 40px; font-size: var(--fs-lead); color: #fff; }
.cx-cost-foot b { color: var(--cx-ember); }
@media (max-width: 900px) { .cx-cost-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   3. ENGINE — Resolve to grid (pinned)
   ========================================================================== */
.cx-engine { position: relative; }
.cx-resolve-pin {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 90px 0;
}
.cx-engine-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.cx-engine-head .cx-h2 { margin: 18px auto 0; }
.cx-engine-head .cx-eyebrow::before { display: none; }
.cx-engine-head .cx-eyebrow { justify-content: center; }
.cx-resolve-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 1fr;
    gap: 18px;
}
/* grid guide-lines that draw in as order rises */
.cx-resolve-grid::before {
    content: "";
    position: absolute;
    inset: -10px;
    background-image:
        linear-gradient(rgba(255, 122, 60, 0.16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 122, 60, 0.16) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: calc(var(--cx-order) * 0.6);
    pointer-events: none;
    border-radius: 16px;
}
.cx-tile {
    position: relative;
    z-index: 1;
    grid-column: span 2;
    min-height: 240px;
    padding: 26px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)), rgba(8, 10, 24, 0.7);
    border: 1px solid var(--cx-line);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    will-change: transform;
}
/* layout: row1 = problem (full-ish) + capture + respond; row2 = qualify + result(wide) */
.cx-tile--problem { grid-column: span 2; }
.cx-tile--capture { grid-column: span 2; }
.cx-tile--respond { grid-column: span 2; }
.cx-tile--qualify { grid-column: span 2; }
.cx-tile--result { grid-column: span 4; }
.cx-tile-step { font-family: var(--cx-font-head); font-size: 14px; letter-spacing: 0.12em; color: var(--cx-ember); }
.cx-tile-ic { width: 46px; height: 46px; margin: 14px 0 16px; color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--cx-line); background: rgba(255, 255, 255, 0.04); }
.cx-tile-ic svg { width: 24px; height: 24px; }
.cx-tile h3 { font-size: 22px; letter-spacing: -0.03em; line-height: 1.05; margin-top: auto; }
.cx-tile p { margin: 10px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--cx-gray); }
.cx-tile--result { background: linear-gradient(180deg, rgba(255, 122, 60, 0.12), rgba(255, 255, 255, 0.02)), rgba(8, 10, 24, 0.7); border-color: rgba(255, 122, 60, 0.3); }
.cx-tile--result .cx-tile-cta { margin-top: 16px; }
.cx-tile--problem { background: linear-gradient(180deg, rgba(255, 59, 47, 0.12), rgba(255, 255, 255, 0.02)), rgba(20, 8, 10, 0.7); border-color: rgba(255, 59, 47, 0.28); }
.cx-tile--problem .cx-tile-step { color: #ff6a5e; }

@media (max-width: 991px) {
    .cx-resolve-pin { min-height: 0; padding: 0; }
    .cx-resolve-grid { grid-template-columns: 1fr 1fr; }
    .cx-tile, .cx-tile--result, .cx-tile--problem,
    .cx-tile--capture, .cx-tile--respond, .cx-tile--qualify { grid-column: span 1; min-height: 200px; }
    .cx-resolve-grid::before { background-size: 40px 40px; }
    /* unpinned at this width (JS pins are desktop-only): collapse reserved viewport height */
    .cx-payoff-pin { min-height: 0; padding: clamp(60px, 10vh, 90px) 0; }
    /* drop blur on scrubbed glass layers — pins/scrub are desktop-only, save mobile GPU */
    .cx-tile, .cx-shard { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (max-width: 600px) {
    .cx-resolve-grid { grid-template-columns: 1fr; }
    .cx-tile, .cx-tile--result { grid-column: span 1; }
}

/* ==========================================================================
   4. SIX SYSTEMS
   ========================================================================== */
.cx-systems-head { max-width: 820px; margin-bottom: 50px; }
.cx-systems-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cx-card--service {
    position: relative;
    padding: 34px 30px 30px;
    border-radius: 20px;
    background: var(--cx-glass);
    border: 1px solid var(--cx-line);
    overflow: hidden;
    transition: transform 0.5s var(--cx-ease), border-color 0.4s ease;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    will-change: transform;
}
.cx-card--service::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(320px circle at var(--cx-mx, 50%) var(--cx-my, 0%), rgba(255, 122, 60, 0.16), transparent 60%);
}
.cx-card--service:hover { transform: translateY(-6px); border-color: rgba(255, 122, 60, 0.45); }
.cx-card--service:hover::before { opacity: 1; }
.cx-card-illu {
    position: absolute;
    top: 20px; right: 18px;
    width: 96px; height: 96px;
    object-fit: contain;
    opacity: 0.9;
    z-index: 1;
}
.cx-card-illu-glow {
    position: absolute;
    top: 0; right: 0;
    width: 150px; height: 150px;
    border-radius: 50%;
    filter: blur(46px);
    background: radial-gradient(circle, rgba(215, 75, 16, 0.4), transparent 65%);
    pointer-events: none;
}
.cx-card-body { position: relative; z-index: 2; margin-top: auto; }
.cx-card-num { font-family: var(--cx-font-head); font-size: 15px; color: var(--cx-ember); letter-spacing: 0.1em; }
.cx-card--service h3 { font-size: var(--fs-d3); line-height: 1.0; letter-spacing: -0.04em; margin: 14px 0 0; max-width: 12ch; }
.cx-card--service p { margin: 12px 0 0; color: var(--cx-gray); font-size: 15px; line-height: 1.55; }
.cx-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 20px; padding: 0; list-style: none; }
.cx-tags li { font-size: 12.5px; padding: 6px 12px; border-radius: 100px; border: 1px solid var(--cx-line); color: #fff; background: rgba(255, 255, 255, 0.03); }
.cx-systems-foot { margin-top: 40px; text-align: center; }
@media (max-width: 991px) { .cx-systems-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cx-systems-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   5. INDUSTRIES
   ========================================================================== */
.cx-industries { text-align: center; }
.cx-industries .cx-eyebrow { justify-content: center; }
.cx-industries .cx-eyebrow::before { display: none; }
.cx-industries .cx-h2 { margin: 18px auto 0; }
.cx-industries .cx-sub { margin: 18px auto 0; }
.cx-ind-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 44px; }
.cx-ind-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 100px;
    border: 1px solid var(--cx-line);
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--cx-font-head);
    font-size: 18px;
    letter-spacing: -0.02em;
    color: #fff;
    transition: border-color 0.3s ease, transform 0.3s var(--cx-ease);
}
.cx-ind-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cx-flame); }
.cx-ind-chip:hover { border-color: var(--cx-ember); transform: translateY(-3px); }

/* ==========================================================================
   6. WHY CHAOS
   ========================================================================== */
.cx-why-head { max-width: 820px; margin-bottom: 50px; }
.cx-why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cx-reason {
    padding: 34px 30px;
    border-radius: 18px;
    background: var(--cx-glass);
    border: 1px solid var(--cx-line);
    will-change: transform;
}
.cx-reason-n { font-family: var(--cx-font-head); font-size: 40px; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255, 122, 60, 0.55); }
.cx-reason h3 { font-size: 23px; letter-spacing: -0.03em; margin: 18px 0 0; }
.cx-reason p { margin: 12px 0 0; color: var(--cx-gray); font-size: 15.5px; line-height: 1.6; }
@media (max-width: 900px) { .cx-why-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   7. CLARITY PAYOFF (pinned climax) + conversion bar
   ========================================================================== */
.cx-payoff { position: relative; }
.cx-payoff-pin {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 90px 0;
}
.cx-payoff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    width: 100%;
}
.cx-payoff-copy .cx-h2 { margin-top: 18px; }
.cx-payoff-copy .cx-h2 em { font-style: normal; color: var(--cx-flame); }
/* inverted clarity calendar panel */
.cx-calendar {
    position: relative;
    border-radius: 22px;
    padding: 30px;
    background: var(--cx-grad-clarity);
    color: var(--cx-ink);
    box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}
.cx-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.cx-cal-title { font-family: var(--cx-font-head); font-size: 20px; letter-spacing: -0.02em; color: var(--cx-ink); }
.cx-cal-badge { font-size: 12px; font-weight: 700; color: #0a7d3f; display: inline-flex; align-items: center; gap: 6px; }
.cx-cal-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.cx-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cx-cal-cell {
    aspect-ratio: 1;
    border-radius: 8px;
    background: rgba(0, 2, 15, 0.06);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: rgba(0, 2, 15, 0.55);
    will-change: transform;
}
.cx-cal-cell.booked { background: #c0430e; color: #fff; }
.cx-cal-cell.booked.pulse { box-shadow: 0 0 0 0 rgba(215, 75, 16, 0.6); animation: cx-pulse 2.4s ease-out infinite; }
.cx-cal-cell.cool { background: var(--cx-cool); color: #06324a; }
@keyframes cx-pulse { 0% { box-shadow: 0 0 0 0 rgba(215, 75, 16, 0.6); } 70% { box-shadow: 0 0 0 14px rgba(215, 75, 16, 0); } 100% { box-shadow: 0 0 0 0 rgba(215, 75, 16, 0); } }
.cx-cal-foot { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: rgba(0,2,15,0.6); }
.cx-cal-foot .num { font-family: var(--cx-font-head); font-size: 30px; color: var(--cx-ink); letter-spacing: -0.03em; }
.cx-payoff-list { list-style: none; padding: 0; margin: 24px 0 0; }
.cx-payoff-list li { position: relative; padding-left: 30px; margin: 12px 0; color: var(--cx-gray); font-size: 16px; }
.cx-payoff-list li svg { position: absolute; left: 0; top: 3px; width: 18px; height: 18px; color: var(--cx-ember); }
@media (max-width: 900px) { .cx-payoff-grid { grid-template-columns: 1fr; gap: 34px; } .cx-payoff-pin { min-height: 0; } }

/* conversion bar */
.cx-convbar {
    margin-top: 90px;
    border-radius: 24px;
    padding: clamp(34px, 5vw, 60px);
    text-align: center;
    background:
        radial-gradient(120% 140% at 50% 0%, rgba(215, 75, 16, 0.2), transparent 60%),
        rgba(255, 255, 255, 0.03);
    border: 1px solid var(--cx-line);
}
.cx-convbar h2 { font-size: var(--fs-d2); letter-spacing: -0.045em; line-height: 1.02; max-width: 20ch; margin: 0 auto; }
.cx-convbar p { margin: 18px auto 0; color: var(--cx-gray); max-width: 56ch; font-size: var(--fs-lead); }
.cx-convbar-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: center; align-items: center; }
.cx-convbar-meta { font-size: 14px; color: var(--cx-gray); }

/* ==========================================================================
   8. BOOKING + FOOTER
   ========================================================================== */
.cx-booking-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; }
.cx-booking-copy .cx-h2 { margin-top: 18px; }
.cx-next { list-style: none; padding: 0; margin: 30px 0 0; counter-reset: step; }
.cx-next li { position: relative; padding: 0 0 0 52px; margin: 22px 0; min-height: 36px; display: flex; align-items: center; color: #fff; font-size: 16px; }
.cx-next li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute; left: 0; top: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--cx-font-head);
    color: var(--cx-ink);
    background: var(--cx-grad-soft);
    font-size: 15px;
}
.cx-booking-contact { margin-top: 34px; display: grid; gap: 14px; }
.cx-booking-contact a, .cx-booking-contact span { display: flex; align-items: center; gap: 12px; color: var(--cx-gray); font-size: 15px; }
.cx-booking-contact svg { width: 18px; height: 18px; color: var(--cx-ember); flex: 0 0 auto; }

/* form (mirrors contact.html contract: .xb-contact-input-form, ids) */
.cx-form {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--cx-line);
    border-radius: 22px;
    padding: clamp(26px, 4vw, 44px);
}
.cx-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cx-field { position: relative; margin-top: 16px; }
.cx-field--full { grid-column: 1 / -1; }
.cx-field label { display: block; font-size: 13px; font-weight: 600; color: var(--cx-gray); margin-bottom: 8px; }
.cx-field input, .cx-field textarea, .cx-field select {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--cx-line);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    padding: 14px 16px;
    transition: border-color 0.25s ease;
}
.cx-field textarea { min-height: 120px; resize: vertical; }
.cx-field input::placeholder, .cx-field textarea::placeholder { color: rgba(255, 255, 255, 0.5); }
.cx-field input:hover, .cx-field textarea:hover, .cx-field select:hover { border-color: rgba(255, 255, 255, 0.2); }
.cx-field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23b2b3b7' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

/* consent (verbatim text in HTML; styled here) */
.cx-consent { margin-top: 20px; display: grid; gap: 14px; }
.cx-consent label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.cx-consent input[type="checkbox"] { flex: 0 0 auto; margin-top: 3px; width: 17px; height: 17px; accent-color: var(--cx-flame); }
.cx-consent .txt { font-size: var(--fs-micro); line-height: 1.5; color: rgba(255, 255, 255, 0.62); }
.cx-legal { margin-top: 16px; font-size: var(--fs-micro); line-height: 1.5; color: rgba(255, 255, 255, 0.5); }
.cx-legal a { color: rgba(255, 255, 255, 0.78); text-decoration: underline; }
.cx-form-submit { margin-top: 24px; }
.cx-form-submit .cx-btn { width: 100%; justify-content: center; }
@media (max-width: 991px) { .cx-booking-grid { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 520px) {
    .cx-form-row { grid-template-columns: 1fr; }
    .cx-calendar { padding: 22px; }
    .cx-cal-grid { gap: 6px; }
    .cx-cal-cell { font-size: 11px; }
}

/* footer */
.cx-footer { position: relative; z-index: 2; border-top: 1px solid var(--cx-line); padding: 70px 0 40px; margin-top: clamp(60px, 10vh, 130px); }
.cx-footer-top { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.cx-footer-brand img { height: 40px; margin-bottom: 18px; }
.cx-footer-brand p { color: var(--cx-gray); max-width: 34ch; font-size: 15px; }
.cx-footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.cx-footer-col h4 { font-family: var(--cx-font-body); font-size: 13px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--cx-ember); margin-bottom: 16px; }
.cx-footer-col a { display: block; color: var(--cx-gray); font-size: 15px; margin: 9px 0; transition: color 0.25s ease; }
.cx-footer-col a:hover { color: #fff; }
.cx-footer-social { display: flex; gap: 12px; margin-top: 10px; }
.cx-footer-social a { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--cx-line); display: flex; align-items: center; justify-content: center; color: #fff; transition: background-color 0.25s ease, border-color 0.25s ease; }
.cx-footer-social a:hover { background: var(--cx-flame); border-color: var(--cx-flame); }
.cx-footer-social svg { width: 18px; height: 18px; }
.cx-footer-bottom { margin-top: 50px; padding-top: 26px; border-top: 1px solid var(--cx-line-soft); display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; align-items: center; color: var(--cx-gray); font-size: 13.5px; }
.cx-footer-bottom a { color: var(--cx-gray); text-decoration: underline; }
.cx-footer-bottom a:hover { color: #fff; }

/* ==========================================================================
   INNER-PAGE COMPONENT KIT (clarity-toned; used by about/service/contact/legal
   and the 6 service-detail pages via chaos-pages.js — no chaos scrollytelling)
   ========================================================================== */
/* compact page hero (clears the fixed 84px header) */
.cx-page-hero {
    position: relative;
    padding: 170px 0 72px;
    overflow: hidden;
}
.cx-page-hero::before {
    content: "";
    position: absolute;
    top: -30%; left: 50%;
    width: 70vw; height: 60vw;
    transform: translateX(-50%);
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.4;
    background: radial-gradient(circle at 50% 40%, rgba(215, 75, 16, 0.5), transparent 62%);
    pointer-events: none;
}
.cx-page-hero .cx-wrap { position: relative; z-index: 1; }
.cx-h1 {
    font-family: var(--cx-font-head);
    font-weight: 700;
    font-size: clamp(40px, 7vw, 92px);
    line-height: 0.96;
    letter-spacing: -0.05em;
    color: #fff;
    max-width: 16ch;
}
.cx-page-hero .cx-sub { max-width: 60ch; }
.cx-breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--cx-gray); margin-bottom: 22px; }
.cx-breadcrumb a { color: var(--cx-ember); }
.cx-breadcrumb span { opacity: 0.5; }
.cx-page-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; }

/* long-form prose (legal pages, rich text) */
.cx-prose { max-width: 840px; color: var(--cx-gray); font-size: 16.5px; line-height: 1.75; }
.cx-prose > * + * { margin-top: 18px; }
.cx-prose h2 { font-family: var(--cx-font-head); color: #fff; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.03em; margin-top: 48px; line-height: 1.1; }
.cx-prose h3 { font-family: var(--cx-font-head); color: #fff; font-size: 21px; letter-spacing: -0.02em; margin-top: 32px; }
.cx-prose a { color: var(--cx-ember); text-decoration: underline; }
.cx-prose strong { color: #fff; }
.cx-prose ul, .cx-prose ol { padding-left: 22px; }
.cx-prose li { margin: 8px 0; }
.cx-prose li::marker { color: var(--cx-ember); }

/* feature grid (service detail benefits/capabilities) */
.cx-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cx-feature {
    padding: 30px 28px;
    border-radius: 18px;
    background: var(--cx-glass);
    border: 1px solid var(--cx-line);
}
.cx-feature-ic {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 14px;
    border: 1px solid var(--cx-line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--cx-ember);
    margin-bottom: 18px;
}
.cx-feature-ic svg { width: 24px; height: 24px; }
.cx-feature h3 { font-size: 21px; letter-spacing: -0.02em; color: #fff; }
.cx-feature p { margin: 10px 0 0; color: var(--cx-gray); font-size: 15px; line-height: 1.6; }
@media (max-width: 991px) { .cx-feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cx-feature-grid { grid-template-columns: 1fr; } }

/* team photos — source headshots are only 138x158, so render as a compact
   circular avatar to stay crisp instead of upscaling a tiny image to full width
   (NOT .cx-card-illu — that is an absolutely-positioned corner glyph). */
.cx-team-photo {
    width: 132px;
    height: 132px;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    border: 2px solid rgba(255, 122, 60, 0.4);
    display: block;
    margin: 0 auto 20px;
}
.cx-team-section .cx-feature-grid { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.cx-team-section .cx-feature { width: 340px; max-width: 100%; text-align: center; }
.cx-team-section .cx-feature .cx-link { justify-content: center; }

/* split: text + media */
.cx-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.cx-split--rev .cx-split-media { order: -1; }
.cx-split-media img { width: 100%; border-radius: 20px; border: 1px solid var(--cx-line); }
.cx-split-list { list-style: none; padding: 0; margin: 24px 0 0; }
.cx-split-list li { position: relative; padding-left: 32px; margin: 14px 0; color: var(--cx-gray); }
.cx-split-list li svg { position: absolute; left: 0; top: 3px; width: 18px; height: 18px; color: var(--cx-ember); }
@media (max-width: 900px) { .cx-split { grid-template-columns: 1fr; gap: 32px; } .cx-split--rev .cx-split-media { order: 0; } }

/* FAQ (native details/summary) */
.cx-faq { max-width: 860px; margin: 0 auto; }
.cx-faq details {
    border: 1px solid var(--cx-line);
    border-radius: 14px;
    padding: 4px 22px;
    margin: 12px 0;
    background: var(--cx-glass);
}
.cx-faq summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 0;
    font-family: var(--cx-font-head);
    font-size: 18px;
    letter-spacing: -0.02em;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.cx-faq summary::-webkit-details-marker { display: none; }
.cx-faq summary::after { content: "+"; color: var(--cx-ember); font-size: 24px; line-height: 1; transition: transform 0.3s var(--cx-ease); }
.cx-faq details[open] summary::after { transform: rotate(45deg); }
.cx-faq details p { color: var(--cx-gray); font-size: 15.5px; line-height: 1.65; padding: 0 0 20px; margin: 0; }

/* ==========================================================================
   Reveal utility (JS adds .cx-in when in view; clarity-first default visible)
   ========================================================================== */
.cx-anim [data-cx-in] { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--cx-ease), transform 0.9s var(--cx-ease); }
.cx-anim [data-cx-in].cx-in { opacity: 1; transform: none; }

/* ==========================================================================
   Reduced motion — force clarity end-state, kill all motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    :root { --cx-order: 1 !important; }
    .cx-noise { display: none; }
    .cx-progress { display: none; }
    .cx-hero-title .cx-glitch::before,
    .cx-hero-title .cx-glitch::after { display: none !important; }
    .cx-scrollcue .dot::after,
    .cx-cal-cell.pulse { animation: none !important; }
    .cx-anim [data-cx-in] { opacity: 1 !important; transform: none !important; transition: none; }
    .cx-shards { display: none; }
}
