/* Juntos — design tokens: the one place for colours, type, spacing, radii, shadows and motion.
 * Personality: a cosy games night — warm cream, deep coral, night blue, a touch of gold. Fewer colours, more space.
 * Every page loads this file before common.css. Components use the --c-*, --fs-*, --sp-*, --r-*, --shadow-* and --dur-*
 * tokens; the older names further down (--bg, --card, --fg, --coral…) are kept as aliases so every game follows the palette. */

/* ---------------------------------------------------------------- fonts (self-hosted: no Google Fonts request) */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/fredoka-500.woff2) format('woff2'); }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/fredoka-600.woff2) format('woff2'); }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/fredoka-700.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/nunito-400.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/nunito-600.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/nunito-700.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/nunito-800.woff2) format('woff2'); }

:root {
  /* ---- colour: light (default) */
  --c-bg: #FBF7F2;            /* warm cream */
  --c-surface: #FFFFFF;
  --c-surface-2: #F3EDE6;
  --c-text: #1E1B2E;          /* 15.7:1 on the background */
  --c-text-2: #5C5870;        /* 6.4:1 */
  --c-border: #E7E0D8;
  --c-primary: #E4572E;       /* deep coral: fills, icons, large shapes */
  --c-primary-strong: #C8441F;/* white text only from here down (4.9:1) */
  --c-primary-press: #B03B1A;
  --c-primary-ink: #B03B1A;   /* coral text on light and soft-coral surfaces (≥5:1) */
  --c-primary-soft: #FBE6DE;
  --c-on-primary: #FFFFFF;
  --c-night: #2B2A4C;         /* accent 1: headers, featured cards */
  --c-night-soft: #E9E8F2;
  --c-on-night: #FFFFFF;
  --c-gold: #D9A441;          /* accent 2: premium, prizes, coins — a fill, with dark text */
  --c-gold-ink: #8A6418;      /* gold as text (5.4:1) */
  --c-gold-soft: #F8EDD5;
  --c-on-gold: #1E1B2E;
  --c-success: #2E9D6A;
  --c-success-ink: #237A52;
  --c-error: #D64545;
  --c-error-ink: #B83434;
  --c-warning: #E0A100;
  --c-warning-ink: #8A6200;
  --c-wa: #0C7468;            /* WhatsApp button: dark green, white text 5.6:1 */
  --c-wa-press: #0A5F55;
  --c-focus: rgba(228, 87, 46, .45);
  --c-scrim: rgba(30, 27, 46, .5);

  /* one soft tint per game (card backgrounds); the icon carries the game's colour */
  --g-stop: #FDE7E1;  --g-trivia: #ECE7FA; --g-bingo: #DFF2EF; --g-pictionary: #E1F3E7; --g-memoria: #FBEFD6;
  --g-rummy: #FBE3E4; --g-parques: #E0ECFA; --g-domino: #E6E5EF; --g-ochos: #FCE6DA; --g-impostor: #E7E5F8;

  /* ---- type */
  --font-display: 'Fredoka', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-h1: 2rem;       /* 32 */
  --fs-h2: 1.5rem;     /* 24 */
  --fs-h3: 1.25rem;    /* 20 */
  --fs-body: 1rem;     /* 16 (never under 15 for reading text on a phone) */
  --fs-body-sm: .9375rem; /* 15 */
  --fs-label: .8125rem;/* 13 */
  --fs-micro: .75rem;  /* 12: the floor, labels only */
  --fw-regular: 400; --fw-semibold: 600; --fw-bold: 700; --fw-heavy: 800;
  --lh-tight: 1.15; --lh-body: 1.5;

  /* ---- space (4/8 grid) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  --gutter: 20px;              /* side margin on phones */
  --page-max: 1200px;          /* desktop */
  --tap: 48px;                 /* minimum touch target */

  /* ---- shape */
  --r-btn: 12px; --r-card: 20px; --r-chip: 999px; --r-sm: 8px;

  /* ---- depth: soft and diffuse, no hard borders */
  --shadow-1: 0 2px 8px rgba(30, 27, 46, .06);
  --shadow-2: 0 8px 24px rgba(30, 27, 46, .08);
  --shadow-3: 0 16px 40px rgba(30, 27, 46, .14);

  /* ---- motion */
  --dur-1: 150ms; --dur-2: 200ms; --dur-3: 250ms;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* ---- aliases: older token names used across the games, now on the new palette */
  --bg: var(--c-bg); --bg-2: var(--c-surface-2); --card: var(--c-surface); --card-2: var(--c-surface-2);
  --fg: var(--c-text); --fg-2: var(--c-text-2); --line: var(--c-border); --ring: var(--c-focus);
  --coral: var(--c-primary); --gold: var(--c-gold); --wa: #25D366; --wa-d: var(--c-wa);
  --shadow-sm: var(--shadow-1); --shadow: var(--shadow-2); --shadow-lg: var(--shadow-3);
  --sh-1: var(--shadow-1); --sh-2: var(--shadow-2);
  --radius: var(--r-card); --radius-sm: 14px; --r-md: 16px; --r-lg: var(--r-card);
  --ink-coral: var(--c-primary-ink); --ink-purple: var(--c-night); --ink-teal: #0B6B64;
  --fs-xs: var(--fs-micro); --fs-sm: var(--fs-label); --fs-md: var(--fs-body-sm); --fs-lg: 1.0625rem; --fs-xl: var(--fs-h3);
  color-scheme: light;
}

/* ---- colour: dark (system setting, unless the page is forced light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #14131F; --c-surface: #1F1D2E; --c-surface-2: #29273B; --c-text: #F4F1EC; --c-text-2: #B9B4C7; --c-border: #34314A;
    --c-primary: #E4572E; --c-primary-strong: #C8441F; --c-primary-press: #B03B1A; --c-primary-ink: #F08A66; --c-primary-soft: #3A2320;
    --c-night: #2B2A4C; --c-night-soft: #2A2840; --c-gold-ink: #E8B85A; --c-gold-soft: #3A3020;
    --c-success-ink: #5BC793; --c-error-ink: #F08080; --c-warning-ink: #F2C14E;
    --c-focus: rgba(240, 138, 102, .55); --c-scrim: rgba(0, 0, 0, .6);
    --g-stop: #33231F; --g-trivia: #29243A; --g-bingo: #1D2E2C; --g-pictionary: #1F2E25; --g-memoria: #332B1C;
    --g-rummy: #33212A; --g-parques: #1E2838; --g-domino: #24233A; --g-ochos: #33241D; --g-impostor: #252239;
    --shadow-1: 0 2px 8px rgba(0, 0, 0, .3); --shadow-2: 0 8px 24px rgba(0, 0, 0, .35); --shadow-3: 0 16px 40px rgba(0, 0, 0, .5);
    --ink-teal: #5EEAD4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --c-bg: #14131F; --c-surface: #1F1D2E; --c-surface-2: #29273B; --c-text: #F4F1EC; --c-text-2: #B9B4C7; --c-border: #34314A;
  --c-primary: #E4572E; --c-primary-strong: #C8441F; --c-primary-press: #B03B1A; --c-primary-ink: #F08A66; --c-primary-soft: #3A2320;
  --c-night: #2B2A4C; --c-night-soft: #2A2840; --c-gold-ink: #E8B85A; --c-gold-soft: #3A3020;
  --c-success-ink: #5BC793; --c-error-ink: #F08080; --c-warning-ink: #F2C14E;
  --c-focus: rgba(240, 138, 102, .55); --c-scrim: rgba(0, 0, 0, .6);
  --g-stop: #33231F; --g-trivia: #29243A; --g-bingo: #1D2E2C; --g-pictionary: #1F2E25; --g-memoria: #332B1C;
  --g-rummy: #33212A; --g-parques: #1E2838; --g-domino: #24233A; --g-ochos: #33241D; --g-impostor: #252239;
  --shadow-1: 0 2px 8px rgba(0, 0, 0, .3); --shadow-2: 0 8px 24px rgba(0, 0, 0, .35); --shadow-3: 0 16px 40px rgba(0, 0, 0, .5);
  --ink-teal: #5EEAD4;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; }
}
