/* JJ8 v3 premium layer. Load AFTER jj8-v2-tokens.css. Additive only: no live token is changed.
   Source: research/TEARDOWN.md (principles only; no operator values copied as brand). */
:root {
  /* 1. Surface & elevation stack: 4 stepped JJ8 surfaces + mint-tinted light overlays */
  --elev-0: var(--jj8-ink-900);            /* page            #191921 */
  --elev-1: var(--jj8-ink-800);            /* section / panel #1F222B */
  --elev-2: var(--jj8-ink-700);            /* card            #262A33 */
  --elev-3: var(--jj8-ink-600);            /* control / chip  #35383F */
  --lit-1: rgb(36 238 137 / 0.04);         /* resting tint on a card */
  --lit-2: rgb(36 238 137 / 0.08);         /* hover / selected */
  --lit-3: rgb(36 238 137 / 0.14);         /* active / focus area */
  --veil: rgb(25 25 33 / 0.72);            /* chips on art, sticky header glass */
  --edge-hi: inset 0 1px 0 rgb(255 255 255 / 0.06);         /* top light catch on every card */
  --edge-hair: inset 0 0 0 1px rgb(255 255 255 / 0.06);
  --edge-lit: inset 0 0 0 1px rgb(36 238 137 / 0.28);       /* selected / featured frame */
  --drop-1: 0 1px 0 rgb(0 0 0 / 0.32), 0 6px 16px -8px rgb(0 0 0 / 0.6);
  --drop-2: 0 16px 40px -16px rgb(0 0 0 / 0.75);
  --blur-glass: 12px;

  /* 2. Gradient & glow recipes (JJ8 greens only) */
  --grad-cta: linear-gradient(180deg, var(--jj8-green-400) 0%, var(--jj8-green-500) 100%);
  --grad-cta-hover: linear-gradient(180deg, #3AF297 0%, var(--jj8-green-400) 100%);
  --bevel-cta: inset 0 1px 0 rgb(255 255 255 / 0.35), inset 0 -2px 0 rgb(0 0 0 / 0.14);
  --glow-cta: 0 6px 20px -6px rgb(44 217 125 / 0.55);
  --glow-cta-hover: 0 10px 28px -8px rgb(44 217 125 / 0.7);
  --glow-lit: 0 0 24px -6px rgb(36 238 137 / 0.45);
  --grad-card: linear-gradient(180deg, rgb(255 255 255 / 0.035) 0%, rgb(255 255 255 / 0) 48%);
  --grad-stage:
    radial-gradient(90% 70% at 85% 0%, rgb(36 238 137 / 0.26) 0%, rgb(36 238 137 / 0) 62%),
    radial-gradient(70% 50% at 0% 100%, rgb(44 217 125 / 0.08) 0%, rgb(44 217 125 / 0) 70%),
    var(--elev-0);
  --grad-feature:
    radial-gradient(120% 120% at 100% 0%, rgb(36 238 137 / 0.16) 0%, rgb(36 238 137 / 0) 55%),
    var(--elev-1);
  --grad-sheen: linear-gradient(105deg, rgb(255 255 255 / 0) 35%, rgb(255 255 255 / 0.22) 50%, rgb(255 255 255 / 0) 65%);
  --grad-skeleton: linear-gradient(90deg, var(--elev-1) 0%, var(--elev-2) 50%, var(--elev-1) 100%);
  --mask-rail: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);

  /* 3. Grain: static SVG noise, 4% on stages only (never animated, never on text) */
  --grain: 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='.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 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --grain-opacity: 0.05;

  /* 4. Icons: UI glyphs are 24px line, 1.75 stroke, round caps; 3D art only for category/reward entry points */
  --icon-stroke: 1.75;

  /* 5. Motion system */
  --dur-instant: 80ms;    /* press */
  --dur-quick: 150ms;     /* hover, state */
  --dur-enter: 260ms;     /* section / list entry */
  --dur-panel: 320ms;     /* tabs, sheets, accordions */
  --dur-count: 1200ms;    /* count-up numbers */
  --dur-sheen: 1100ms;    /* one sheen pass */
  --dur-ping: 1600ms;     /* live dot */
  --dur-float: 6s;        /* hero object idle float */
  --dur-ticker: 40s;      /* one full ticker loop */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);     /* default for everything that enters or responds */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);  /* loops, floats */
  --ease-press: cubic-bezier(0.34, 1.56, 0.64, 1);/* release overshoot, buttons only */
  --stagger: 60ms;
  --lift-tile: -4px;
  --press-scale: 0.97;
  --reveal-y: 16px;
}
@media (prefers-reduced-motion: reduce) {
  :root { --dur-instant: 0ms; --dur-quick: 0ms; --dur-enter: 0ms; --dur-panel: 0ms; --dur-count: 0ms; --dur-sheen: 0ms;
          --lift-tile: 0px; --press-scale: 1; --reveal-y: 0px; --stagger: 0ms; }
}
