/*
 * ExileCraft design tokens — the three real shipped themes.
 *
 * COLOR + MOTION tokens are the EXACT values the live app sets in applyVars()
 * (verified against desktop/production-shell/ui-next/index.html). Shape tokens
 * (--rad, --pan-sh) are sensible defaults for designing with these panels — the
 * live app derives panel shadows per theme; treat radius/shadow as adjustable.
 *
 * Default theme = PARCHMENT (matches the app's fresh-install default), on :root.
 * Dark and Oxblood are alternates via [data-theme="dark"] / [data-theme="oxblood"]
 * on a root element. All three share the gold/teal engraved-ledger look.
 *
 * RARITY (PoE2-native, applied to item names + mod/affix lines):
 *   Normal=white/grey · Magic=blue · Rare=yellow · Unique=amber · mod/affix=blue.
 *   On PARCHMENT these are swapped to dark high-contrast values (light-on-light is illegible).
 * RED DISCIPLINE: --stamp is ONLY for blocked/illegal/hard-error. A down/negative
 *   indicator is --down (neutral steel), never red.
 */

/* ── Shared motion tokens (theme-independent) ───────────────────────── */
:root{
  --ec-t-quick:140ms;      /* button hover state changes */
  --ec-t-settle:220ms;     /* verdict stamp, spine drop, fresh-row rise */
  --ec-t-ease:320ms;       /* slower eases (reserved tier) */
  --ec-ease-settle:cubic-bezier(.22,.61,.36,1);  /* decel, NO overshoot — the "settle" */
  --ec-ease-soft:cubic-bezier(.4,0,.2,1);        /* standard in-out */
  --ec-lift:6px;           /* hover-lift distance */
  --ec-stagger:24ms;       /* per-item stagger step (histogram bars) */

  /* shape defaults (adjustable) */
  --rad:8px;

  /* frost (backdrop blur) tokens — panels vs chrome */
  --frost-blur:6px;
  --frost-chrome:12px;
  --frost-sat:1.08;

  /* shared surface constants */
  --on-gold:#15100a;       /* text on gold-gradient fills */
  --seal-grad:radial-gradient(circle at 35% 28%, #2a2118, #0c0906);
}

/* ── PARCHMENT — DEFAULT (light tan "aged ledger paper") ────────────── */
:root,
[data-theme="parchment"]{
  --bg:#1b1409;
  --sheet:#cbb98f;
  --sheet2:#b9a373;
  --pan-bg:rgba(213,197,158,.93);
  --ink:#352616;
  --ink-soft:#5d4a33;
  --muted:#574426;
  --line:rgba(53,38,22,.30);
  --line2:rgba(53,38,22,.15);
  --gold:#8a5a18;
  --gold2:#a4701f;
  --stamp:#9a3b28;          /* red — blocked/illegal ONLY */
  --mod-affix:#274d72;      /* contrast-fixed dark blue */
  --rar-normal:#46423a;
  --rar-magic:#2f5586;
  --rar-rare:#6a4d0c;
  --rar-unique:#8a4715;
  --down:#574d44;           /* neutral negative — never red */
  --spark:#3c8077;          /* go/live teal (darkened for tan) */
  --ck-blue:#2f5d82;        /* KEEP-verdict blue */
  --pan-sh:inset 0 1px 0 rgba(255,250,235,.35), 0 18px 40px -28px rgba(0,0,0,.45);
  --surf-1:rgba(0,0,0,.06);           /* inner-card wash */
  --surf-2:rgba(0,0,0,.11);           /* deep well */
  --edge-hi:rgba(255,250,235,.35);    /* top-edge highlight */
  --tier-hot:#935c00;                 /* T1-T2 prefix chips — hot saturated gold */
  --tier-hot-suf:#1f6e63;             /* T1-T2 suffix chips — hot within the spark family */
  --tier-cold:#574426;                /* T5+ chips = muted */
}

/* ── DARK — deep near-black grimdark ledger ─────────────────────────── */
[data-theme="dark"]{
  --bg:#070604;
  --sheet:#15110a;
  --sheet2:#0e0b06;
  --pan-bg:rgba(27,22,14,.92);
  --ink:#e8d7b0;
  --ink-soft:#b9a47e;
  --muted:#8c7c5e;
  --line:rgba(216,190,120,.18);
  --line2:rgba(216,190,120,.09);
  --gold:#caa24e;
  --gold2:#e6c074;
  --stamp:#cf6048;
  --mod-affix:#a3b2ee;
  --rar-normal:#cdc6b4;
  --rar-magic:#8f9dff;
  --rar-rare:#f2e27a;
  --rar-unique:#d08a3c;
  --down:#8a93a6;
  --spark:#33d8cf;
  --ck-blue:#6f9fc8;
  --pan-sh:inset 0 1px 0 rgba(216,190,120,.12), 0 22px 48px -30px rgba(0,0,0,.85);
  --surf-1:rgba(0,0,0,.24);
  --surf-2:rgba(0,0,0,.38);
  --edge-hi:rgba(216,190,120,.10);
  --tier-hot:#f4d688;
  --tier-hot-suf:#7fe9e1;
  --tier-cold:#8c7c5e;
}

/* ── OXBLOOD — deep wine / dried-blood leather ──────────────────────── */
[data-theme="oxblood"]{
  --bg:#120806;
  --sheet:#3a1d16;
  --sheet2:#2a130d;
  --pan-bg:rgba(66,37,28,.91);
  --ink:#f0dcc4;
  --ink-soft:#cba98f;
  --muted:#a07a64;
  --line:rgba(240,210,180,.17);
  --line2:rgba(240,210,180,.08);
  --gold:#cf9a44;
  --gold2:#ecc06a;
  --stamp:#e0644a;
  --mod-affix:#a3b2ee;
  --rar-normal:#cdc6b4;
  --rar-magic:#8f9dff;
  --rar-rare:#f2e27a;
  --rar-unique:#d08a3c;
  --down:#8a93a6;
  --spark:#33d8cf;
  --ck-blue:#6f9fc8;
  --pan-sh:inset 0 1px 0 rgba(240,210,180,.12), 0 22px 48px -30px rgba(0,0,0,.85);
  --surf-1:rgba(0,0,0,.22);
  --surf-2:rgba(0,0,0,.36);
  --edge-hi:rgba(240,210,180,.10);
  --tier-hot:#f6d288;
  --tier-hot-suf:#7fe9e1;
  --tier-cold:#a07a64;
}
