/* ============================================================================
   Cor Portal v2 - design tokens
   Inherited verbatim from the live cor.demismatch.com identity (cor.css :root),
   then extended for the portal's motion + depth. Do not invent a new look.
   Warm parchment ground, deep oxblood display serif, teal accent, gold,
   the signature offset HARD double-shadow (teal close, gold farther).
   ============================================================================ */
:root {
  /* ---- Core palette (from production) ---- */
  --oxblood: #3a1218;
  --oxblood-deep: #2a0c11;
  --oxblood-warm: #5a2a32;
  --oxblood-ink: #4a1e26;
  --parchment: #ece0c4;
  --parchment-soft: #f2e8cf;
  --parchment-dark: #ddd0b0;
  --parchment-deeper: #d4c69f;
  --parchment-tan: #c4b894;
  --ink: #1a0608;
  --teal: #2d6b6b;
  --teal-bright: #3d8585;
  --teal-deep: #1f4f4f;
  --gold: #c4962c;
  --gold-dim: #a5801f;
  --muted-warm: #8a7d5e;

  /* ---- Semantic ---- */
  --bg: var(--parchment);
  --bg-soft: var(--parchment-soft);
  --bg-card: var(--parchment-dark);
  --bg-card-soft: #e6dabd;
  --bg-hover: rgba(58, 18, 24, 0.06);
  --bg-warm: rgba(196, 150, 44, 0.10);
  --border: rgba(58, 18, 24, 0.24);
  --border-soft: rgba(58, 18, 24, 0.14);
  --border-strong: rgba(58, 18, 24, 0.55);
  --fg: var(--ink);
  --fg-dim: var(--oxblood-ink);
  --fg-faint: var(--muted-warm);

  /* ---- Dark surface (oxblood) for the gradient stage + derivation door ---- */
  --dark-bg: var(--oxblood-deep);
  --dark-bg-soft: var(--oxblood);
  --dark-fg: var(--parchment);
  --dark-fg-dim: var(--parchment-tan);
  --dark-fg-faint: var(--muted-warm);
  --dark-border: rgba(236, 224, 196, 0.20);

  /* ---- Type ---- */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* fluid type scale */
  --t-eyebrow: 0.72rem;
  --t-meta: 0.78rem;
  --t-body: 1.02rem;
  --t-lead: clamp(1.12rem, 1.6vw, 1.34rem);
  --t-h3: clamp(1.18rem, 2vw, 1.5rem);
  --t-h2: clamp(1.7rem, 3.4vw, 2.5rem);
  --t-h1: clamp(2.3rem, 5.4vw, 4.1rem);
  --t-display: clamp(3rem, 7vw, 5.6rem);

  /* ---- Layout ---- */
  --maxw: 1280px;
  --reading-maxw: 760px;
  --pad-x: clamp(1.15rem, 4vw, 4rem);
  --pad-y: clamp(2rem, 5vw, 4.5rem);
  --gutter: clamp(1rem, 2.4vw, 2.2rem);
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;

  /* ---- Signature offset double-shadow (teal close, gold farther) ---- */
  --shadow-card: 4px 4px 0 var(--teal);
  --shadow-card-hover: 6px 6px 0 var(--teal);
  --shadow-gold: 4px 4px 0 var(--gold);
  --shadow-double: 6px 6px 0 var(--teal), 12px 12px 0 var(--gold);
  --shadow-double-sm: 4px 4px 0 var(--teal), 8px 8px 0 var(--gold);
  --shadow-double-hover: 8px 8px 0 var(--teal), 16px 16px 0 var(--gold);
  --shadow-soft: 0 14px 40px rgba(26, 6, 8, 0.10);
  --shadow-lift: 0 4px 18px rgba(26, 6, 8, 0.14);

  /* ---- Resolution-state ramp (FULL -> ZERO). Warm/alive to cold/drained.
         Used ONLY for the M14 gradient where the data exists. ---- */
  --state-full: #2d6b6b;      /* teal, alive, resolves */
  --state-partial: #6f8f55;   /* olive-teal */
  --state-mixed: #c4962c;     /* gold, mixed */
  --state-minimal: #b5702a;   /* amber-rust */
  --state-zero: #8a2f2a;      /* oxblood-rust, fires-no-resolution */
  --cue: #b5702a;             /* the trigger / cue colour - stays lit */

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 620ms;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 1ms; --dur: 1ms; --dur-slow: 1ms; }
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
