@import url("local-fonts.css");

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

:root {
  color-scheme: dark;
  /* colour — from project.json.design.palette */
  --c-bg: #12101A;
  --c-surface: #1C1826;
  --c-ink: #F6F0FF;
  --c-muted: #B4A8C8;
  --c-accent: #FF2D95;
  --c-accent-ink: #12101A;
  --c-line: #3A3248;
  --c-tint: #162430;

  /* type - EN families from project.json.design.fonts */
  --font-display: "Unbounded", Georgia, serif;
  --font-body: "Onest", 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);
  /* Unbounded is a wide geometric display face; the authored "default" scale is
     kept except for --fs-4's upper bound, which holds the headline to three
     lines inside the authored 36 rem copy column at 1280. */
  --fs-4: clamp(1.75rem, 1.05rem + 3.8vw, 3.75rem);
  --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 - ONE radius family per project: none, square corners */
  --r-sm: 0; --r-md: 0; --r-lg: 0;
  /* Depth is the glow, not a shadow. The only shadow in this design is the
     lightbox, exactly as docs/03-design-spec.md §2 specifies. */
  --shadow-1: 0 0 40px rgb(255 45 149 / .25);
  --shadow-2: none;

  /* signature — the one memorable element. Two occurrences only:
     the wordmark rule and the sticky CTA's top edge. */
  --rule-h: 3px;
  --rule-glow: 0 0 12px #FF2D95;

  /* hero composition */
  --hero-band: rgb(18 16 26 / .75);
  --hero-band-mobile: rgb(18 16 26 / .8);
  --hero-copy-w: 36rem;

  /* motion — one hero entrance, 560 ms total */
  --t-fast: 150ms; --t-base: 240ms; --ease: cubic-bezier(.2, .7, .2, 1);
  --t-rule: 400ms;
  --t-entrance: 560ms;

  /* layout */
  --max-w: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  /* --header-min is the authored header minimum. --header-h is the measured
     value written by main.js; only the measured one feeds scroll padding, so a
     measurement can never drive the box it was taken from. */
  --header-min: 4rem;
  --header-h: var(--header-min);
  --sticky-cta-h: 3.5rem;
  --sticky-breakpoint: 1024px;
}

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

/* Base */
/* --header-h and --sticky-cta-h are measured at runtime; the fallbacks above
   keep anchor scrolling sane before main.js runs. Focus must never land under
   the header or the sticky action. */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s-4)); scroll-padding-bottom: calc(var(--sticky-cta-h) + var(--s-4)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; 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;
}
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)); }
h2 { font-size: calc(var(--fs-3) * var(--scale-heading)); }
h3 { font-size: calc(var(--fs-2) * var(--scale-heading)); }
img, picture, video { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: var(--r-sm); }
[translate="no"] { font-variant-numeric: tabular-nums; }
address { font-style: normal; overflow-wrap: anywhere; }
[data-lang-switch="si"] { font-family: var(--font-si-body); }
[data-lang-switch="ta"] { font-family: var(--font-ta-body); }
.skip-link { position: absolute; inset-inline-start: var(--s-4); top: -100%; background: var(--c-accent); color: var(--c-accent-ink); padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); z-index: 100; }
.skip-link:focus { top: var(--s-4); }
