/* ==========================================================================
   FIF website — base.css
   Fonts, design tokens, reset, typography.
   Palette values come from the BRAC Brandbook (Functional Guideline, p.72)
   and the FIF logo files. See ../DESIGN-NOTES.md.
   ========================================================================== */

/* ---------- Fonts (local files only) ---------- */

/* English — Helvetica Neue LT: 55 Roman (body), 65 Medium (labels/UI), 75 Bold (headings) */
@font-face {
  font-family: "Helvetica LT";
  src: url("../assets/fonts/HelveticaLT-55-Roman.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica LT";
  src: url("../assets/fonts/HelveticaLT-65-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica LT";
  src: url("../assets/fonts/HelveticaLT-75-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Bangla — Kohinoor Bangla: Regular (body), Semibold (subheadings), Bold (headings).
   unicode-range keeps Latin text on Helvetica when both are in one font stack. */
@font-face {
  font-family: "Kohinoor Bangla";
  src: url("../assets/fonts/KohinoorBangla-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0980-09FF, U+0964-0965, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Kohinoor Bangla";
  src: url("../assets/fonts/KohinoorBangla-Semibold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0980-09FF, U+0964-0965, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Kohinoor Bangla";
  src: url("../assets/fonts/KohinoorBangla-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0980-09FF, U+0964-0965, U+200C-200D, U+25CC;
}

/* ---------- Design tokens ---------- */
:root {
  /* Brand colour — BRAC Brandbook p.72 */
  --brac-magenta: #d10074;      /* Primary. Pantone Magenta */
  --fif-green: #007161;         /* Pantone 3298 C — FIF ground colour (as in FIF deck) */
  --fif-lime: #c9d600;          /* Pantone 381 C — matches FIF logo leaf */
  --fif-orange: #ffa100;        /* Pantone 137 C — matches "innovation" in FIF logo */
  --brac-sky: #3db7e4;          /* Pantone 298 C — reserved */
  --ink: #27281c;               /* Pantone Neutral Black C — text */
  --gray: #4d4f53;              /* Pantone Cool Gray 11 C — secondary text */

  /* Derived neutrals / shades (not new hues) */
  --green-deep: #005247;        /* 3298 C darkened — footer, hover */
  --green-tint: #e5f1ee;        /* 3298 C at ~10% — card fills on light sections */
  --lime-soft: #f3f7c9;         /* 381 C at ~25% — highlight fills */
  --paper: #f5f3ec;             /* warm neutral section background */
  --line: #dcd9cc;              /* hairlines on light backgrounds */
  --white: #ffffff;

  /* Semantic roles */
  --color-bg: var(--white);
  --color-text: var(--ink);
  --color-text-muted: var(--gray);
  --color-accent: var(--brac-magenta);
  --color-on-green: var(--white);
  --color-on-green-muted: #d7ebe6;

  /* Type */
  --font-en: "Helvetica LT", "Kohinoor Bangla", Arial, "Helvetica Neue", Helvetica, sans-serif;
  --font-bn: "Kohinoor Bangla", "Helvetica LT", Arial, sans-serif;

  --text-xs: 0.8125rem;   /* 13 */
  --text-sm: 0.9375rem;   /* 15 */
  --text-md: 1.0625rem;   /* 17 — body */
  --text-lg: 1.25rem;     /* 20 */
  --text-xl: 1.5rem;      /* 24 */

  /* Heading scale — one size per role, used everywhere */
  --fs-display: clamp(2.5rem, 1.3rem + 3vw, 3.75rem);   /* hero headline */
  --fs-h1: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);          /* inner-page title */
  --fs-h2: clamp(1.75rem, 1.4rem + 1.1vw, 2.25rem);       /* section title (28 → 36) */
  --fs-h3: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);       /* card / item title (20 → 24) */
  --fs-h4: 1.125rem;                                     /* compact titles: events, speakers, stories */
  --fs-lead: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);   /* intro paragraphs (18 → 20) */
  --text-2xl: clamp(1.75rem, 1.35rem + 1.6vw, 2.25rem);
  --text-3xl: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --text-4xl: clamp(2.5rem, 1.5rem + 4.4vw, 4.75rem);

  /* Spacing — 8px scale */
  --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: 4rem;
  --space-9: 6rem;
  --section-y: clamp(4rem, 3rem + 5vw, 7rem);

  /* Layout */
  --container: 82.5rem;    /* 1320 — same content width as the live FIF 2025 site */
  --container-narrow: 48rem;
  --gutter: 1.25rem;
  --radius-sm: 0;              /* square corners — matches the header/button/card system */
  --radius: 0;
  --radius-lg: 0;
  --radius-btn: 6px;           /* buttons, inputs and header controls only */
  --accent: var(--brac-magenta);
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --shadow: 0 1px 2px rgba(39, 40, 28, 0.06), 0 8px 24px rgba(39, 40, 28, 0.08);
}

@media (min-width: 640px) {
  :root { --gutter: 2rem; }
}
@media (min-width: 1200px) {
  :root { --gutter: 2.5rem; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-en);
  font-weight: 400;
  font-size: var(--text-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--brac-magenta);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.15; }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
h4 {
  font-size: var(--text-md);
  font-weight: 500;            /* Helvetica LT 65 Medium */
  line-height: 1.35;
  letter-spacing: 0;
}
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--space-4); }
strong, b { font-weight: 500; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
}
.eyebrow {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fif-green);
}
.on-green .eyebrow { color: var(--fif-lime); }
.muted { color: var(--color-text-muted); }

/* Bangla typography: Bold headings, Semibold subheadings, Regular body */
:lang(bn) { font-family: var(--font-bn); line-height: 1.7; letter-spacing: 0; }
h1:lang(bn), h2:lang(bn) { font-weight: 700; line-height: 1.3; }
h3:lang(bn), h4:lang(bn) { font-weight: 600; line-height: 1.4; }
p:lang(bn), li:lang(bn) { font-weight: 400; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Inline glyph icons (Helvetica LT has no arrow glyphs, so arrows are SVG) */
.ico { display: inline-block; width: 1em; height: 1em; vertical-align: -0.14em; flex: none; }
