/* =========================================================
   ELARIS — UI LAYER (clay surfaces + reveal system + mobile)
   Load order in <head>:
     main.css  ->  elaris-perf.css  ->  elaris-ui.css  (this, LAST)
   Pure additive. Delete file = old look returns.
   ========================================================= */

/* ---------------------------------------------------------
   1. THEME TOKENS
   Your files use burgundy + gold. You said navy 00296b +
   gold fdc500. Both ready. Switch = uncomment NAVY block.
   --------------------------------------------------------- */
:root {
    --shadow-rgb: 58 7 19;                 /* burgundy shadow tint */

    /* extra accents for cards / timelines / infographics */
    --c1: #E5B22C;   /* gold  */
    --c2: #2FA39A;   /* teal  */
    --c3: #E8735A;   /* coral */
    --c4: #5B8DEF;   /* sky   */

    --paper:   #FDFAF4;
    --paper-2: #F7EFDF;

    /* clay light surface */
    --clay-out: 14px 18px 34px -16px rgb(var(--shadow-rgb) / .30),
                -8px -8px 18px rgb(255 255 255 / .95);
    --clay-out-hover: 18px 26px 44px -16px rgb(var(--shadow-rgb) / .38),
                      -8px -8px 18px rgb(255 255 255 / .95);
    --clay-in: inset 3px 3px 6px rgb(255 255 255 / 1),
               inset -5px -7px 12px rgb(var(--shadow-rgb) / .07);

    /* clay dark surface */
    --clay-dark: inset 1.5px 1.5px 0 rgb(255 255 255 / .16),
                 inset -8px -10px 20px rgb(0 0 0 / .26),
                 16px 22px 38px -18px rgb(0 0 0 / .6);
    --clay-dark-hover: inset 1.5px 1.5px 0 rgb(255 255 255 / .22),
                       inset -8px -10px 20px rgb(0 0 0 / .26),
                       20px 30px 46px -18px rgb(0 0 0 / .7);
}

/* NAVY THEME — uncomment to switch whole site
:root {
    --deep:   #00296b;  --deep-2: #001f52;  --deep-3: #00173d;
    --wine-950: #000f2b; --wine-lift: #1a4a9c;
    --gold:   #fdc500;  --gold-soft: #ffd633; --gold-tint: #fff6cc;
    --c1: #fdc500;
    --shadow-rgb: 0 30 80;
    --paper: #F7FAFF; --paper-2: #EAF1FC;
}
NOTE: old main.css still has some hard-coded burgundy rgba()
      inside gradients. Phase 2 (clean main.css) removes them. */

html { scroll-padding-top: calc(var(--nav-h, 80px) + 16px); }
a, button { -webkit-tap-highlight-color: transparent; }


/* ---------------------------------------------------------
   2. CLAY — LIGHT SECTIONS
   Soft raised pillow: big radius, white rim, inner highlight.
   Only transform/translate animate. Shadow swaps on hover
   for ONE element at a time (cheap).
   --------------------------------------------------------- */
.step, .story, .feature, .city, .faq-item, .faq__note,
.prefoot__card, .hiw__cta, .reach__atlas, .fee-card,
.struct-card, .ax-belief, .ax-step {
    background: linear-gradient(145deg, #fff 0%, var(--paper) 100%);
    border: 1px solid rgb(255 255 255 / .95);
    border-radius: 26px;
    box-shadow: var(--clay-out), var(--clay-in);
}
.story, .city, .prefoot__card { border-radius: 20px; }
.faq-item { border-radius: 22px; }

.step:hover, .story:hover, .feature:hover, .city:hover,
.faq-item:hover, .prefoot__card:hover, .fee-card:hover,
.struct-card:hover, .ax-belief:hover, .ax-step:hover {
    box-shadow: var(--clay-out-hover), var(--clay-in);
    border-color: rgb(255 255 255 / .95);
}
.faq-item[open] {
    background: linear-gradient(145deg, #fff 0%, var(--paper-2) 100%);
    box-shadow: var(--clay-out-hover), var(--clay-in);
}

/* clay pills / chips / icon tiles */
.prog__eyebrow, .hiw__eyebrow, .news__eyebrow, .faq__eyebrow,
.reach__eyebrow, .prefoot__eyebrow {
    box-shadow: 4px 6px 12px -6px rgb(var(--shadow-rgb) / .28),
                inset 1px 1px 2px #fff,
                inset -2px -3px 5px rgb(var(--shadow-rgb) / .07);
}
.step__icon-tile, .prefoot__icon-tile, .faq-item__num,
.faq-item__toggle, .faq__note-icon, .ax-belief__icon-tile {
    box-shadow: 5px 7px 14px -7px rgb(var(--shadow-rgb) / .38),
                inset 2px 2px 3px rgb(255 255 255 / .95),
                inset -3px -4px 7px rgb(var(--shadow-rgb) / .08);
}

/* clay buttons */
.btn-apply, .hiw__cta-btn, .faq__note-cta, .reach__cta, .fp__cta {
    box-shadow: 0 14px 26px -12px rgb(var(--shadow-rgb) / .5),
                inset 0 2px 2px rgb(255 255 255 / .28),
                inset 0 -5px 8px rgb(0 0 0 / .2);
}
.hero-btn--primary, .ctaband__btn--gold {
    box-shadow: 0 14px 28px -12px rgb(229 178 44 / .7),
                inset 0 2px 2px rgb(255 255 255 / .55),
                inset 0 -5px 8px rgb(150 100 0 / .22);
}
.btn-apply:active, .hero-btn:active, .ctaband__btn:active,
.hiw__cta-btn:active, .fp__cta:active, .reach__cta:active {
    scale: .97;
    transition-duration: 90ms;
}


/* ---------------------------------------------------------
   3. CLAY — DARK SECTIONS
   --------------------------------------------------------- */
.pillar, .course, .rail-card {
    background: linear-gradient(150deg, rgb(255 255 255 / .10) 0%, rgb(255 255 255 / .03) 100%);
    border: 1px solid rgb(255 255 255 / .07);
    border-radius: 26px;
    box-shadow: var(--clay-dark);
}
.pillar:hover, .course:hover, .rail-card:hover {
    box-shadow: var(--clay-dark-hover);
}
.rail-card { border-radius: 22px; }
.ctaband__panel { border-radius: 30px; box-shadow: var(--clay-dark); }
.test__flank, .test__arrow {
    box-shadow: inset 1.5px 1.5px 0 rgb(255 255 255 / .16),
                inset -4px -5px 9px rgb(0 0 0 / .25),
                8px 10px 18px -8px rgb(0 0 0 / .6);
}


/* ---------------------------------------------------------
   4. ACCENT VARIETY (cards, timeline, stats)
   perf.css forced one gold accent with !important.
   These beat it (higher specificity, also !important).
   --------------------------------------------------------- */
.pillar:nth-child(4n+1) { --pa: var(--c1) !important; }
.pillar:nth-child(4n+2) { --pa: var(--c2) !important; }
.pillar:nth-child(4n+3) { --pa: var(--c3) !important; }
.pillar:nth-child(4n+4) { --pa: var(--c4) !important; }

.step:nth-child(4n+1) { --sa: var(--c1) !important; }
.step:nth-child(4n+2) { --sa: var(--c2) !important; }
.step:nth-child(4n+3) { --sa: var(--c3) !important; }
.step:nth-child(4n+4) { --sa: var(--c4) !important; }

.course:nth-child(4n+1) { --ca: var(--c1) !important; }
.course:nth-child(4n+2) { --ca: var(--c2) !important; }
.course:nth-child(4n+3) { --ca: var(--c3) !important; }
.course:nth-child(4n+4) { --ca: var(--c4) !important; }
.course { --ca-soft: color-mix(in srgb, var(--ca) 16%, transparent) !important; }

/* timeline dots + stage names get their own colour */
.jnode:nth-child(4n+1) { --jc: var(--c1); }
.jnode:nth-child(4n+2) { --jc: var(--c2); }
.jnode:nth-child(4n+3) { --jc: var(--c3); }
.jnode:nth-child(4n+4) { --jc: var(--c4); }
.jnode__dot {
    border-color: var(--jc, var(--gold));
    background: color-mix(in srgb, var(--jc, var(--gold)) 26%, #1a0a10);
}
.jnode:hover .jnode__stage, .jnode.is-active .jnode__stage { color: var(--jc, var(--gold)); }

/* reach stats = infographic colours */
.stat:nth-child(4n+1) { --sc: var(--c1); }
.stat:nth-child(4n+2) { --sc: var(--c2); }
.stat:nth-child(4n+3) { --sc: var(--c3); }
.stat:nth-child(4n+4) { --sc: var(--c4); }
.stat__num, .stat:hover .stat__num { color: var(--sc, var(--ink)); }
.stat__num::after { background: var(--sc, var(--gold)); }


/* ---------------------------------------------------------
   5. REVEAL SYSTEM (driven by elaris-motion.js)
   translate/scale/opacity only = compositor. No conflict
   with card hover `transform`. JS strips these classes after
   the animation ends, so hover transitions stay clean.
   Variants give each section a different feel:
     up    default rise          left/right  split layouts
     title bigger rise           zoom        big panels
     pop   spring + scale        (cards, stats)
   --------------------------------------------------------- */
html .rv {
    opacity: 0;
    translate: var(--rx, 0px) var(--ry, 26px);
    scale: var(--rs, 1);
    transition:
        opacity   700ms cubic-bezier(.16, 1, .3, 1) var(--rd, 0ms),
        translate 900ms cubic-bezier(.16, 1, .3, 1) var(--rd, 0ms),
        scale     900ms cubic-bezier(.16, 1, .3, 1) var(--rd, 0ms);
    will-change: opacity, translate;
}
html .rv[data-rv="left"]  { --rx: -38px; --ry: 0px; }
html .rv[data-rv="right"] { --rx:  38px; --ry: 0px; }
html .rv[data-rv="title"] { --ry: 36px; }
html .rv[data-rv="zoom"]  { --ry: 20px; --rs: .96; }
html .rv[data-rv="pop"] {
    --ry: 34px; --rs: .9;
    transition:
        opacity   520ms ease var(--rd, 0ms),
        translate 820ms cubic-bezier(.34, 1.4, .64, 1) var(--rd, 0ms),
        scale     820ms cubic-bezier(.34, 1.4, .64, 1) var(--rd, 0ms);
}
/* MUST stay after variants (same specificity, last wins) */
html .rv.rv-in { opacity: 1; translate: 0 0; scale: 1; }

html.perf-lite .rv { transition-duration: 420ms, 520ms, 520ms; }

@media (max-width: 720px) {
    /* no sideways motion on phones: no overflow, calmer */
    html .rv[data-rv="left"], html .rv[data-rv="right"] { --rx: 0px; --ry: 24px; }
    html .rv { --ry: 20px; }
}


/* ---------------------------------------------------------
   6. PERF EXTRAS
   --------------------------------------------------------- */
.perf-mid .elaris-particles,
.perf-mid .elaris-particles--light,
.perf-mid .elaris-particles--deep {
    -webkit-mask-image: none;
            mask-image: none;
}
.perf-mid .reach__globe-img,
.perf-lite .reach__globe-img { animation: none; filter: none; }
.perf-mid .reach__globe::after { animation: none; }

/* no sticky hover on touch + no wasted lift work */
@media (hover: none) {
    .step:hover, .story:hover, .feature:hover, .city:hover, .pillar:hover,
    .course:hover, .rail-card:hover, .prefoot__card:hover, .fee-card:hover,
    .ax-belief:hover, .ax-step:hover, .jnode:hover {
        transform: none;
    }
}


/* ---------------------------------------------------------
   7. MOBILE POLISH
   --------------------------------------------------------- */
@media (max-width: 720px) {
    :root {
        /* one lighter shadow layer = cheaper paint */
        --clay-out: 8px 10px 20px -10px rgb(var(--shadow-rgb) / .28);
        --clay-out-hover: var(--clay-out);
        --clay-in: inset 2px 2px 4px rgb(255 255 255 / 1),
                   inset -3px -4px 8px rgb(var(--shadow-rgb) / .06);
        --clay-dark: inset 1px 1px 0 rgb(255 255 255 / .14),
                     inset -6px -8px 14px rgb(0 0 0 / .24);
        --clay-dark-hover: var(--clay-dark);
    }
    .step, .story, .feature, .faq-item, .faq__note, .hiw__cta,
    .pillar, .course, .fee-card, .struct-card { border-radius: 22px; }

    /* 44px tap targets */
    .faq-item__q { min-height: 56px; }
    .fp__filter, .nws-filter { min-height: 44px; }
    .test__arrow { width: 52px; height: 52px; }

    /* stop iOS zooming into forms */
    input, select, textarea { font-size: 16px !important; }
}