/* AI-julekalenderen: design tokens. Every module (games, demos, tools) uses these, never raw colours.
   Design v2 (Apple-clean, festive): a deep winter night for the calendar and games stages, and white with Apple grey
   for the open door. One system sans for UI and headlines; Fraunces is kept only as a festive accent (door numbers). */

@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("../fonts/fraunces-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("../fonts/fraunces-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces"; font-style: italic; font-weight: 300 900; font-display: swap;
  src: url("../fonts/fraunces-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces"; font-style: italic; font-weight: 300 900; font-display: swap;
  src: url("../fonts/fraunces-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  interpolate-size: allow-keywords;

  /* Winter night (home, calendar board, games stage) */
  --night-0: #05070d;
  --night-1: #0b1430;
  --night-2: #111d3f;
  --night-3: #1a2852;
  --night-4: #253666;
  --ink: #f5f5f7;
  --ink-2: rgba(245, 245, 247, .82);
  --ink-3: rgba(245, 245, 247, .64);
  --ink-4: rgba(245, 245, 247, .42);
  --line: rgba(245, 245, 247, .10);
  --line-2: rgba(245, 245, 247, .18);
  --glass: rgba(20, 30, 62, .58);
  --glass-2: rgba(30, 44, 84, .70);

  /* Festive palette, used sparingly */
  --red: #e11d2e;          /* primary call to action */
  --red-hi: #f0394a;
  --red-deep: #a8101f;
  --spruce: #0f7b4b;       /* green */
  --spruce-hi: #16955c;
  --spruce-deep: #095233;
  --gold: #f5b83d;
  --gold-hi: #ffd27a;
  --gold-deep: #b9811c;
  --cream: #f7f0e3;
  --berry: #8e1f4a;
  --midnight: #0b1430;
  --ice: #bfe3f2;
  --snow: #ffffff;

  /* The AI sparkle: the "AI" in the wordmark and AI moments in games and demos */
  --ai-1: #4f8bff;
  --ai-2: #8b5cf6;
  --ai-3: #e85d9b;
  --ai-4: #ffb547;
  --ai-grad: linear-gradient(110deg, var(--ai-1) 0%, var(--ai-2) 38%, var(--ai-3) 70%, var(--ai-4) 100%);
  --gold-grad: linear-gradient(135deg, #ffe7a8 0%, var(--gold-hi) 30%, var(--gold) 65%, var(--gold-deep) 100%);
  --warm-grad: linear-gradient(115deg, #e11d2e 0%, #e5461a 52%, #c27c0e 100%); /* big numbers on white, every stop >= 3:1 */

  /* The open door: white with Apple grey surfaces (names kept from the paper era) */
  --paper: #ffffff;
  --paper-2: #f5f5f7;
  --paper-3: #e8e8ed;
  --paper-ink: #1d1d1f;
  --paper-ink-2: #424245;
  --paper-ink-3: #6e6e73;
  --paper-line: rgba(0, 0, 0, .08);
  --paper-line-2: rgba(0, 0, 0, .16);
  --paper-red: #d0142a;    /* red text and links on white, 5.4:1 */
  --paper-spruce: #0f7b4b; /* green text on white, 5.3:1 */
  --paper-gold: #93600a;   /* gold text on white, 5.4:1 */
  --surface: #f5f5f7;      /* the one card surface */

  /* Status (feature availability), readable as text on white */
  --st-ga: #0f7b4b;        /* generally available */
  --st-preview: #93600a;   /* public preview */
  --st-frontier: #6a3fc4;  /* Frontier program */
  --st-roadmap: #56657d;   /* announced / coming */

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --font-festive: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-display: var(--font-sans);
  --font-body: var(--font-text);
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --fs-xs: .78rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.4rem, 1.15rem + 1.1vw, 1.875rem);
  --fs-2xl: clamp(2rem, 1.4rem + 2.8vw, 3.25rem);
  --fs-3xl: clamp(3rem, 1.7rem + 5.6vw, 5.5rem);
  --fs-body: clamp(1.0625rem, 1rem + .28vw, 1.1875rem);   /* 17 to 19 px */
  --fs-small: .9375rem;                                    /* 15 px */
  --fs-fine: .8125rem;                                     /* 13 px */
  --fs-lead: clamp(1.375rem, 1.15rem + 1.05vw, 1.875rem);  /* 22 to 30 px */
  --fs-h2: clamp(1.5rem, 1.22rem + 1.25vw, 2rem);          /* 24 to 32 px */
  --fs-title: clamp(2.125rem, 1.45rem + 3vw, 3.5rem);      /* 34 to 56 px */
  --fs-hero: clamp(3rem, 1.6rem + 6vw, 5.5rem);            /* 48 to 88 px */
  --track-tight: -.028em;

  /* Space, shape, depth */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;
  --sec: clamp(56px, 9vw, 96px);
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .22), 0 2px 8px rgba(0, 0, 0, .14);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .24), 0 2px 6px rgba(0, 0, 0, .14);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, .40), 0 8px 18px rgba(0, 0, 0, .20);
  --shadow-paper: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .07);
  --shadow-art: drop-shadow(0 18px 22px rgba(0, 0, 0, .22));
  --glow-gold: 0 0 0 2px rgba(255, 210, 122, .85), 0 0 28px rgba(245, 184, 61, .55), 0 0 70px rgba(245, 184, 61, .30);

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 140ms;
  --t-med: 260ms;
  --t-slow: 520ms;
  --t-reveal: 440ms;

  /* Layout */
  --max: 1120px;
  --max-read: 680px;
  --max-wide: 960px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 1ms; --t-med: 1ms; --t-slow: 1ms; --t-reveal: 1ms; }
}
