/* a-hub design tokens.
   One background (Whitewash) on every page and every section. Five core colours, no more.
   The palette comes from the logo kit (Navy, Signal Blue, Glow, Slate) and from Rabat's Kasbah of the Udayas:
   whitewashed walls, blue paint. Fonts mirror the logo: Montserrat (the wordmark face) for headlines and UI,
   Open Sans (the "powered by ICESCO" face) for reading. */

@font-face { font-family: "Montserrat"; src: url("../assets/fonts/Montserrat-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../assets/fonts/OpenSans.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }

/* Metric-matched fallbacks: while the web fonts load, local Arial is scaled to the same width and line box,
   so swapping to Montserrat and Open Sans does not reflow headlines (CLS). Width ratios measured in Chrome;
   ascent/descent from the fonts' hhea tables (Montserrat 968/251 per 1000, Open Sans 2189/600 per 2048). */
@font-face { font-family: "Montserrat Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 100 599; size-adjust: 112.4%; ascent-override: 86.1%; descent-override: 22.3%; line-gap-override: 0%; }
@font-face { font-family: "Montserrat Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600 900; size-adjust: 110.3%; ascent-override: 87.8%; descent-override: 22.8%; line-gap-override: 0%; }
@font-face { font-family: "Open Sans Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 300 599; size-adjust: 103.7%; ascent-override: 103.1%; descent-override: 28.3%; line-gap-override: 0%; }
@font-face { font-family: "Open Sans Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600 800; size-adjust: 103.4%; ascent-override: 103.4%; descent-override: 28.3%; line-gap-override: 0%; }

:root {
  /* The five core colours */
  --c-whitewash: #FAF9F6; /* 250 249 246 — the only background */
  --c-navy:      #01124A; /*   1  18  74 — text, the wordmark, primary buttons (16.8:1) */
  --c-signal:    #1F6FE0; /*  31 111 224 — the hyphen: links, emphasis, the join bar, button hover (4.5:1) */
  --c-glow:      #97D9FF; /* 151 217 255 — the hyphen on navy: small fills and highlights only. Never text (1.4:1) */
  --c-slate:     #5A6488; /*  90 100 136 — secondary text, quiet UI (5.5:1) */

  /* Supporting tint: form wells and portrait fields only, never a section background */
  --c-wash:  #E8EEF5; /* 232 238 245 — the blue lower wall of the kasbah, thinned */
  --c-error: #B0172B;

  /* Roles */
  --bg: var(--c-whitewash);
  --text: var(--c-navy);
  --text-2: var(--c-slate);
  --primary: var(--c-navy);
  --accent: var(--c-signal);
  --focus: var(--c-signal);

  /* Type */
  --font-head: "Montserrat", "Montserrat Fallback", Arial, sans-serif;
  --font-body: "Open Sans", "Open Sans Fallback", Arial, sans-serif;
  --font-ui: var(--font-head);

  --fs-display: clamp(3rem, 1.3rem + 6.8vw, 8.25rem);    /* home hero */
  --fs-h1:      clamp(2.5rem, 1.45rem + 4.4vw, 5.5rem);  /* page heroes */
  --fs-h2:      clamp(2rem, 1.35rem + 2.6vw, 3.5rem);
  --fs-h3:      clamp(1.35rem, 1.15rem + 0.8vw, 1.8rem);
  --fs-h4:      1.25rem;
  --fs-statement: clamp(1.5rem, 1.1rem + 1.6vw, 2.45rem);
  --fs-lead:    clamp(1.125rem, 1.04rem + 0.4vw, 1.35rem);
  --fs-body:    1.0625rem; /* 17px Open Sans reads like 18px of most faces */
  --fs-small:   0.975rem;
  --fs-label:   0.78rem;   /* tracked caps, like ACCELERATOR in the logo */
  --fs-numeral: clamp(2.75rem, 1.9rem + 3.4vw, 5.25rem);

  --lh-tight: 0.98;
  --lh-head: 1.06;
  --lh-body: 1.68;
  --track-label: 0.2em;
  --track-tight: -0.035em;

  /* Spacing (8px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 2.5rem;
  --s-8: 3rem;
  --s-9: 4rem;
  --s-10: 6rem;
  --s-11: 8rem;
  --section: clamp(5rem, 3rem + 7vw, 10rem);

  /* Layout */
  --container: 1280px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 3rem);
  --col-gap: clamp(1rem, 0.6rem + 1.6vw, 2rem);

  /* The join: the logo's hyphen, a bar twice as long as it is thick */
  --join-w: 0.44em;
  --join-h: 0.15em;

  /* Shape and motion. Corners are square, like the hyphen. */
  --radius: 0px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 240ms;
  --dur-slow: 800ms;
}
