/* ============================================================
   تحديات نواس — design tokens (web).
   Source of truth: mobile/lib/core/theme.dart (AppColors, radii,
   HexPalette) and mobile/lib/widgets/nw.dart (the Nw kit). Warm
   cream surfaces, ink text, tangerine identity. Light theme only.

   The second half of this file keeps the token NAMES of the old
   dark «حروف» theme as aliases mapped onto the new palette, so any
   stylesheet, template or script that still reads them renders in
   the new look instead of going unstyled.
   ============================================================ */

/* ---- Brand font: NawasDubai (Dubai) ---- */
@font-face {
  font-family: 'NawasDubai';
  src: url("../fonts/NawasDubai-Regular.26b1f6f5a9bb.woff2") format('woff2'),
       url("../fonts/NawasDubai-Regular.721b44ebfb0c.ttf") format('truetype');
  font-weight: 300 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NawasDubai';
  src: url("../fonts/NawasDubai-Bold.d0857863d873.woff2") format('woff2'),
       url("../fonts/NawasDubai-Bold.889eeb6e8a80.ttf") format('truetype');
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* ---- Surfaces ---- */
  --bg: #FFF9EF;            /* cream — app background */
  --bg-sunk: #F3EEE6;       /* sunken wells, page bands */
  --surface: #FFFFFF;       /* cards, navigation */
  --segment: #F0EAE3;       /* segmented-control track */
  --board: #F0E7D8;         /* game board tray */
  --track: #F1EBE6;         /* progress track */
  --handle: #E3D9CF;        /* sheet grab handle, card drop */

  /* ---- Text ---- */
  --ink: #383449;           /* text; never a page background */
  --muted: #766D79;         /* secondary text */
  --faint: #A69DA6;         /* placeholders, tertiary */
  --line: #EDE5DE;          /* warm hairlines */

  /* ---- Brand palette ---- */
  --tangerine: #F56B43;     /* identity, team one */
  --action: #C54427;        /* filled primary buttons, links */
  --action-pressed: #8E2F1B;
  --action-text: #A13F25;   /* orange text on peach */
  --deep: #7B351F;          /* hero headings */
  --peach: #FFE8DC;         /* hero, selected, team one bg */
  --peach-soft: #FFF4EC;    /* selected card fill */
  --lilac: #E9E2FF;         /* letters surfaces */
  --purple: #7962C8;        /* supporting accents */
  --purple-text: #69529F;
  --hex-purple: #9A80D8;
  --mint: #DDF3E8;          /* guess surfaces, positive */
  --mint-line: #BFE6D4;
  --teal: #167D73;          /* success, team two */
  --teal-deep: #0F5F57;
  --sunshine: #FFE39A;      /* rewards */
  --sun-soft: #FFF0C9;      /* daily / notice cards */
  --sun-icon: #FFE0A1;
  --sun-text: #826B3F;
  --sun-deep: #926414;
  --honey: #FFD16F;         /* letter hex (guess) */
  --honey-text: #805B25;
  --sky: #DDEBF8;           /* NUNO cover */
  --online: #2EB872;
  --busy: #F2B544;

  /* ---- Teams (display colours; the protocol still says red/green) ---- */
  --team-a: #F56B43;        /* «البرتقالي» = protocol red */
  --team-a-soft: #FFE8DC;
  --team-a-text: #93472E;
  --team-b: #1E9384;        /* «النعناع» = protocol green */
  --team-b-soft: #DDF3E8;
  --team-b-text: #167D73;

  /* ---- Status ---- */
  --success: #167D73;
  --danger: #C54427;
  --warning: #926414;
  --info: #7962C8;

  /* ---- Hex tile palettes (HexPalette, flat fills) ---- */
  --hex-default: #FFFFFF;
  --hex-default-text: #655B68;
  --hex-pending: #F8D176;
  --hex-pending-text: #704C20;
  --hex-neutral: #EFE8DF;
  --hex-neutral-text: #B3A9AE;
  --hex-red: #F56B43;
  --hex-green: #167D73;
  --hex-honey: #FFD16F;

  /* ---- Radii ---- */
  --radius-xl: 28px;        /* hero, sheets, dialogs */
  --radius-lg: 22px;        /* game tiles, cards */
  --radius-md: 15px;        /* buttons, inputs, inner art */
  --radius-sm: 12px;        /* small controls, chips' inner */
  --radius-pill: 999px;

  /* ---- Shadows ---- */
  --shadow-card: 0 4px 0 #E3D9CF, 0 10px 22px #3834491A;
  --shadow-soft: 0 6px 18px #38344912;
  --shadow-pop: 0 18px 44px #38344926;
  --shadow-btn: 0 3px 0 #8E2F1B;     /* primary button lip */
  --ring-line: inset 0 0 0 1px var(--line);
  --focus-ring: 0 0 0 3px #7962C855;

  /* ---- Fonts ---- */
  --font-body: 'NawasDubai', 'Dubai', 'Tajawal', Tahoma, sans-serif;
  --font-display: 'NawasDubai', 'Dubai', 'Tajawal', Tahoma, sans-serif;

  /* ---- Type scale (theme.dart textTheme) ---- */
  --fs-display: 40px;
  --fs-score: 36px;
  --fs-h1: 30px;
  --fs-h2: 25px;
  --fs-h3: 20px;
  --fs-body: 15px;
  --fs-small: 13px;
  --fs-tiny: 12px;
  --fs-micro: 11px;

  --transition-fast: all 0.15s ease;

  /* ============================================================
     Legacy aliases (dark «حروف» theme names → new palette).
     Kept so older rules/templates/scripts render in the new look.
     ============================================================ */
  --bg-page: var(--bg);
  --bg-solid: var(--bg);
  --panel-bg: var(--surface);
  --panel-bg-soft: var(--bg-sunk);
  --panel-border: var(--line);
  --panel-border-soft: var(--line);
  --plate-bg: var(--board);
  --plate-shadow: var(--shadow-soft);

  --text: var(--ink);
  --text-muted: var(--muted);
  --text-faint: var(--faint);
  --text-soft: var(--ink);

  --link: var(--action);
  --link-hover: var(--action-pressed);

  --tile-default-a: #FFFFFF;
  --tile-default-b: #FFFFFF;
  --tile-default-fill: #FFFFFF;
  --tile-default-rim: #FFFFFF;
  --tile-default-text: #655B68;
  --tile-default-glow: #F8D176;
  --tile-default-glow-soft: rgba(248, 209, 118, 0.45);

  --tile-green-a: #167D73;
  --tile-green-b: #167D73;
  --tile-green-fill: #167D73;
  --tile-green-rim: #167D73;
  --tile-green-text: #FFFFFF;
  --tile-green-glow: #1E9384;
  --tile-green-glow-soft: rgba(30, 147, 132, 0.35);

  --tile-red-a: #F56B43;
  --tile-red-b: #F56B43;
  --tile-red-fill: #F56B43;
  --tile-red-rim: #F56B43;
  --tile-red-text: #FFFFFF;
  --tile-red-glow: #F56B43;
  --tile-red-glow-soft: rgba(245, 107, 67, 0.35);

  --tile-neutral-a: #EFE8DF;
  --tile-neutral-b: #EFE8DF;
  --tile-neutral-fill: #EFE8DF;
  --tile-neutral-rim: #EFE8DF;
  --tile-neutral-text: #B3A9AE;
  --tile-neutral-glow: rgba(179, 169, 174, 0.3);

  --team-green: var(--team-b);
  --team-green-soft: var(--team-b-text);
  --team-green-value: var(--teal);
  --team-green-rgb: 30, 147, 132;
  --team-green-grad: var(--team-b-soft);
  --team-green-border: var(--mint-line);
  --team-red: var(--team-a);
  --team-red-soft: var(--team-a-text);
  --team-red-value: var(--action);
  --team-red-rgb: 245, 107, 67;
  --team-red-grad: var(--team-a-soft);
  --team-red-border: #FFD3BF;

  --gold: var(--action);
  --gold-glow: rgba(245, 107, 67, 0.25);
  --gold-ring: var(--purple);
  --gold-border: var(--line);

  --radius-plate: var(--radius-xl);
  --radius-card: 21px;
  --radius-panel: 18px;
  --radius-input: 13px;

  --glow-green: none;
  --glow-red: none;
  --glow-gold: none;
}
