/* Client token starter. Apply the exact scale, shape, depth and motion from docs/03-design-spec.md before acceptance. */

:root {
  color-scheme: light;
  /* colour — from project.json.design.palette */
  --c-bg: #F7F2E6;
  --c-surface: #FFFDF8;
  --c-ink: #1A2342;
  --c-muted: #555B70;
  --c-accent: #2C3480;
  --c-accent-ink: #F7F2E6;
  --c-line: #E2D4B8;
  --c-tint: #F0D9A0;

  /* type - EN families from project.json.design.fonts */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-en-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* SI/TA families from project.json.design.fonts. Keep these separate so
     native switcher labels remain readable while another language is active. */
  --font-si-body: "Noto Sans Sinhala", system-ui, sans-serif;
  --font-si-display: "Noto Serif Sinhala", "Noto Sans Sinhala", serif;
  --font-ta-body: "Noto Sans Tamil", system-ui, sans-serif;
  --font-ta-display: "Noto Serif Tamil", "Noto Sans Tamil", serif;

  --fs-0: clamp(0.875rem, 0.85rem + 0.2vw, 0.95rem);
  --fs-1: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --fs-2: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem);
  --fs-3: clamp(1.6rem, 1.3rem + 1.6vw, 2.25rem);
  --fs-4: clamp(2.2rem, 1.6rem + 3.2vw, 3.6rem); /* spec §2: capped at 3.6rem */
  --lh-body: 1.55;
  --lh-heading: 1.08;
  --scale-heading: 1;

  /* space (4-pt) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-6: 1.5rem; --s-8: 2rem;
  --s-12: 3rem; --s-16: 4rem; --s-24: 6rem;

  /* shape + depth - round family; the only shadow is lightbox/drawer (spec §2) */
  --r-sm: 10px; --r-md: 18px; --r-lg: 999px;
  --shadow-1: 0 12px 32px rgb(26 35 66 / .12);
  --shadow-2: none;

  /* motion */
  --t-fast: 150ms; --t-base: 240ms; --ease: cubic-bezier(.2, .7, .2, 1);

  /* layout */
  --max-w: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --sticky-cta-h: 4rem;
  --header-h: 64px;
  --stripe-w: 12px;
}

/* Sinhala / Tamil overrides - docs/I18N.md §4 */
html[data-lang="si"] {
  --font-body: var(--font-si-body);
  --font-display: var(--font-si-display);
  --lh-heading: 1.25;
}
html[data-lang="ta"] {
  --font-body: var(--font-ta-body);
  --font-display: var(--font-ta-display);
  --lh-heading: 1.22; /* spec §2 token value for TA */
}
html[data-lang="si"],
html[data-lang="ta"] {
  --lh-body: 1.75;
  --scale-heading: 0.88;
  letter-spacing: 0;
}

/* Signature: the stripe thins to 8px where copy would be crowded (spec §3) */
@media (max-width: 360px) {
  :root { --stripe-w: 8px; }
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); scroll-padding-bottom: calc(var(--sticky-cta-h) + 16px); }
body {
  margin: 0; padding-inline-start: var(--stripe-w);
  background: var(--c-bg); color: var(--c-ink);
  font-family: var(--font-body); font-size: var(--fs-1); line-height: var(--lh-body);
  -webkit-text-size-adjust: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
p, figure, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: var(--lh-heading); text-wrap: balance; margin: 0; }
h1 { font-size: calc(var(--fs-4) * var(--scale-heading)); font-weight: 700; }
h2 { font-size: calc(var(--fs-3) * var(--scale-heading)); font-weight: 600; }
h3 { font-size: calc(var(--fs-2) * var(--scale-heading)); font-weight: 600; }
img, picture, video { max-width: 100%; height: auto; display: block; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--c-accent); }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: var(--r-sm); }
[hidden] { display: none !important; }
[translate="no"] { font-variant-numeric: tabular-nums; }
address { font-style: normal; overflow-wrap: anywhere; }
[data-lang-switch="en"] { font-family: var(--font-en-body); }
[data-lang-switch="si"] { font-family: var(--font-si-body); }
[data-lang-switch="ta"] { font-family: var(--font-ta-body); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; inset-inline-start: calc(var(--stripe-w) + 12px); z-index: 100; padding: 12px 20px; background: var(--c-accent); color: var(--c-accent-ink); border-radius: var(--r-sm); text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
