/* FPL Shrine design tokens. The only place raw colour values live. */

:root {
  /* Shrine palette: "Midnight" (docs/plan.md, Visual design direction) */
  --shrine-altar-deep: #070b16;     /* near-black navy: top of the altar, header, footer, dark nave */
  --shrine-altar: #121b33;          /* midnight navy: base of the altar, headings on light pages */
  --shrine-action: #ffc24d;         /* gold: the Flip button, focus rings on dark */
  --shrine-action-hover: #ffd27a;
  --shrine-option-a: #c8b4ff;       /* violet: option A tag, selection highlight */
  --shrine-option-b: #ffa08a;       /* coral: option B tag */
  --shrine-winner: #5ff5b8;         /* emerald: winner outline, "The coin has spoken" */
  --shrine-on-accent: #120f2a;      /* text on any of the bright colours above */
  --shrine-link: #5b3fd1;           /* links on light pages */
  --shrine-success: #0f7a4f;        /* success text on light pages */
  --shrine-error: #b3261e;          /* error text on white */
  --shrine-amber: #8a5700;          /* coin metal (darkest tone), Triple Captain chip */

  /* Chip medallions (white icons on these) */
  --shrine-chip-wildcard: #12875a;
  --shrine-chip-free-hit: #6547e0;
  --shrine-chip-bench-boost: #d4492f;

  --page-background: #f7f5f8;
  --surface: #ffffff;
  --text-primary: #211a22;
  --text-muted: #5f5661;
  --border: #847a86;

  /* Coin only */
  --coin-gold: #d9a227;
  --coin-gold-light: #f6d27a;

  /* Altar (always dark) */
  --altar-text: var(--page-background);
  --altar-muted: #e6dfec;
  --altar-glow: color-mix(in srgb, var(--coin-gold) 38%, transparent);
  /* Winner halo: a soft gold ring and glow around the winning card */
  --winner-halo-ring: color-mix(in srgb, var(--coin-gold) 26%, transparent);
  --winner-halo-glow: color-mix(in srgb, var(--coin-gold-light) 24%, transparent);

  /* Nave (reading area): dark by default */
  --nave-bg: var(--shrine-altar-deep);
  --nave-surface: #111a2e;
  --nave-text: var(--page-background);
  --nave-muted: var(--altar-muted);
  --nave-border: var(--border);
  --nave-heading: var(--page-background);
  --nave-link: var(--shrine-option-a);
  --nave-focus: var(--shrine-action);
  --nave-success: var(--shrine-winner);
  --nave-badge: var(--shrine-option-a);
  --nave-badge-text: var(--shrine-on-accent);

  /* Kit outline keeps white shirts visible on white cards */
  --kit-outline: rgb(33 26 34 / 0.35);

  /* Shadows */
  --shadow-card: 0 1px 2px rgb(18 15 42 / 0.12), 0 8px 24px rgb(18 15 42 / 0.28);
  --shadow-coin: rgb(8 6 20 / 0.6);

  /* Type */
  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-engraved: "Cinzel", "Trajan Pro", Georgia, serif;
  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0: 1.0625rem; /* 17px body */
  --step-1: 1.25rem;
  --step-2: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --step-4: clamp(2rem, 1.2rem + 3.6vw, 3.5rem);
  --leading-tight: 1.05;
  --leading-body: 1.6;

  /* Layout */
  --gutter: 16px;
  --width-tool: 1120px;
  --width-read: 720px;
  --radius-card: 12px;
  --radius-pill: 999px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  /* Coin */
  --coin-size: 160px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
    --coin-size: 200px;
  }
}

/* Visitors whose system is set to light get a light reading area; the altar stays dark. */
@media (prefers-color-scheme: light) {
  :root {
    --nave-bg: var(--page-background);
    --nave-surface: var(--surface);
    --nave-text: var(--text-primary);
    --nave-muted: var(--text-muted);
    --nave-heading: var(--shrine-altar);
    --nave-link: var(--shrine-link);
    --nave-focus: var(--shrine-altar);
    --nave-success: var(--shrine-success);
    --nave-badge: var(--shrine-altar);
    --nave-badge-text: var(--surface);
  }
}
