/* ==========================================================================
   ICTOB Craft-style redesign — design tokens (spec §4.1)
   Single source of truth for color, type, shape, shadow, motion, layout.
   ========================================================================== */

/* Self-hosted, subset variable WOFF2 (spec §4.2) */
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Bangla fallback — unicode-range gated, so it is only fetched when Bengali
   glyphs actually render (spec §4.2, §9.3). Subset to the Bengali block used
   on the homepage + Latin-1 so a mixed-script line never breaks mid-sentence. */
@font-face {
  font-family: 'Hind Siliguri';
  src: url('../fonts/hind-siliguri-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0964-0965, U+0980-09FF;
}
@font-face {
  font-family: 'Hind Siliguri';
  src: url('../fonts/hind-siliguri-600.woff2') format('woff2');
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0964-0965, U+0980-09FF;
}
/* Metric-adjusted fallbacks to prevent CLS (spec §4.2) */
@font-face {
  font-family: 'Newsreader-fallback';
  src: local('Georgia');
  size-adjust: 92%;
  ascent-override: 102%;
  descent-override: 26%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Inter-fallback';
  src: local('Arial');
  size-adjust: 107%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

:root {
  /* Canvas and ink */
  --bg: #faf8f6;
  --surface: #ffffff;
  --ink: #0b0b0c;
  --ink-2: #3d3a44;          /* secondary text — darkened for legibility */
  --ink-3: #5a5662;          /* tertiary / captions (was #6e6a75, then #8b8791) */
  --line: rgba(12, 10, 20, .12);

  /* Panels (Craft-sampled) */
  --panel-periwinkle: #bccaf3;
  --panel-mint: #a2dea8;
  --panel-butter: #f9eca3;
  --panel-sky: #aedcf2;
  --panel-peach: #f6d2c0;

  /* Brand adaptation: tint of the existing ICTOB violet (#7028c0) */
  --panel-lilac: #d9c9f2;
  --brand: #5f1ba6;          /* tiny accents only: eyebrow, links, focus ring */
  --brand-deep: #2a1240;     /* footer / dark backgrounds */

  /* Medal metals — champion / 1st / 2nd */
  --gold: #e8b21c;
  --gold-deep: #a8790a;
  --gold-wash: #fdf3cf;
  --silver: #9aa3b0;
  --silver-deep: #5f6875;
  --silver-wash: #eef1f6;
  --bronze: #b26a35;
  --bronze-deep: #7d441c;
  --bronze-wash: #fbe9d8;

  /* Type stacks (Bangla fallbacks required, spec §4.2).
     Both stacks fall back to the same Bengali face, so Bangla inside a serif
     headline still renders with a proper Bengali font rather than a system default. */
  --serif: 'Newsreader', 'Newsreader-fallback', 'Hind Siliguri', Georgia, serif;
  --sans: 'Inter', 'Inter-fallback', 'Hind Siliguri', system-ui, -apple-system, sans-serif;

  /* Shape */
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 34px;
  --r-pill: 999px;

  /* Shadow (layered, soft) */
  --sh-1: 0 1px 2px rgba(12, 10, 20, .04), 0 6px 20px rgba(12, 10, 20, .06);
  --sh-2: 0 2px 4px rgba(12, 10, 20, .04), 0 16px 48px rgba(12, 10, 20, .10);
  --sh-nav: 0 0 0 1px rgba(12, 10, 20, .05), 0 8px 30px rgba(12, 10, 20, .08);

  /* Motion */
  --ease: cubic-bezier(.22, 1, .36, 1);       /* decelerating, premium */
  --ease-inout: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 200ms;
  --t-med: 400ms;
  --t-slow: 800ms;

  /* Layout */
  --gutter: clamp(12px, 1.2vw, 16px);         /* outer page gutter for hero/panels/footer */
  --content: min(1200px, 100% - 2 * clamp(20px, 4vw, 48px));
  --section-y: clamp(72px, 10vw, 160px);
}
