/* Coconut Sambol — tokens. Values from docs/03-design-spec.md §2. */

:root {
  color-scheme: dark;

  /* colour — charcoal clay interior, turmeric, lime-wash */
  --c-bg: #1B1713;
  --c-surface: #2C261F;
  --c-ink: #F3EBDD;
  --c-muted: #C9BBA8;
  --c-accent: #E0A014;
  --c-accent-ink: #1B1713;
  --c-line: #3F372E;
  --c-tint: #322C24;

  /* type — Libre Baskerville display, Nunito Sans body */
  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* SI/TA families stay 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.2rem, 1.08rem + 0.6vw, 1.45rem);
  --fs-3: clamp(1.55rem, 1.28rem + 1.5vw, 2.2rem);
  --fs-4: clamp(2.15rem, 1.55rem + 3.05vw, 3.6rem);
  --lh-body: 1.6;
  --lh-heading: 1.15;
  --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 — square corners, no shadows */
  --r-sm: 0; --r-md: 0; --r-lg: 0;
  --shadow-1: none;
  --shadow-2: none;

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

  /* layout */
  --max-w: 72rem;
  --gutter: clamp(1.125rem, 4vw, 2.5rem);
  --header-h: 4.25rem;
  --sticky-cta-h: 4.25rem;
  --hero-copy-w: 32rem;
  --services-w: 38rem;
}

/* 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.3;
  --scale-heading: 0.9;
  letter-spacing: 0;
}

/* Base */
* { box-sizing: border-box; }
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; font-weight: 700;
}
h1 { font-size: calc(var(--fs-4) * var(--scale-heading)); }
h2 { font-size: calc(var(--fs-3) * var(--scale-heading)); }
h3 { font-size: var(--fs-2); }
p { margin: 0; }
figure, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img, picture, video { max-width: 100%; display: block; }
img { height: auto; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
address { font-style: normal; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
[translate="no"] { font-variant-numeric: tabular-nums; }
[data-lang-switch="en"] { font-family: "Nunito Sans", system-ui, sans-serif; }
[data-lang-switch="si"] { font-family: var(--font-si-body); }
[data-lang-switch="ta"] { font-family: var(--font-ta-body); }

:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }

.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: var(--s-3); inset-inline-start: var(--s-3); z-index: 100;
  display: inline-flex; align-items: center; min-height: 44px;
  padding: var(--s-3) var(--s-4); background: var(--c-accent); color: var(--c-accent-ink);
  font-weight: 600; text-decoration: none; transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
