/* ==========================================================================
   BASE
   Loaded on every page, first.
   1. Fonts        self-hosted; Devanagari files load only if Hindi text appears
   2. Tokens       colours, type, spacing (light + dark)
   3. Reset
   4. Typography
   5. Utilities
   ========================================================================== */


/* 1. Fonts
   -------------------------------------------------------------------------- */
@font-face { font-family: "Poppins"; font-weight: 300; font-display: swap; src: url("../fonts/poppins-latin-300-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: "Poppins"; font-weight: 300; font-display: swap; src: url("../fonts/poppins-devanagari-300-normal.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/poppins-devanagari-500-normal.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../fonts/poppins-devanagari-600-normal.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-devanagari-400-normal.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-devanagari-500-normal.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-devanagari-600-normal.woff2") format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }


/* 2. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces and text */
  --bg: #FFFFFF;
  --bg-alt: #F4F3FA;
  --surface: #FFFFFF;
  --ink: #1E1F3B;          /* headings, primary buttons */
  --text: #464862;         /* body copy */
  --muted: #5F6180;        /* labels, captions */
  --line: #E4E3EF;
  --line-strong: #CDCDE0;

  /* Brand */
  --brand: #7D7FB8;        /* wordmark periwinkle */
  --brand-ink: #4E5096;    /* links on light backgrounds */
  --accent: #8B72C4;       /* lavender: focus rings, small accents (≤5% of a screen) */

  /* Dark bands (hero, experience) */
  --band: #1E1F3B;
  --on-dark: #FFFFFF;
  --on-dark-text: #DCDDF3;
  --on-dark-muted: #B4B6E4;
  --on-dark-line: rgba(255, 255, 255, .16);
  --sun: #FAC423;          /* gold accent used on dark bands */

  /* Platform colours, sampled from the Sensory Grid mark */
  --gold: #FAC423;
  --indigo: #5272B9;
  --lime: #A4CE5E;
  --coral: #F26E57;
  --sky: #16B6DA;
  --teal: #4AC0AA;

  --drawer: #F3F0FA;
  --photo-placeholder: #E8E7F2;
  --tile-mix: 48%;         /* how strong unselected tiles are */
  --error: #B42318;

  /* Type */
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Space and shape */
  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-space: clamp(72px, 9vw, 120px);
  --radius-l: 18px;
  --radius-m: 12px;
  --radius-s: 4px;
  --header-h: 80px;

  --shadow: 0 1px 2px rgba(30, 31, 59, .05), 0 14px 32px -18px rgba(52, 54, 110, .32);
  --shadow-lg: 0 2px 6px rgba(20, 21, 42, .12), 0 30px 60px -24px rgba(10, 11, 30, .55);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14152A; --bg-alt: #1A1B33; --surface: #202140;
    --ink: #F2F2F9; --text: #C6C7DC; --muted: #A3A5C1;
    --line: #2E3052; --line-strong: #40426B;
    --brand: #A3A5DA; --brand-ink: #BABCEB; --accent: #A892DA;
    --band: #0E0F21; --drawer: #221F3A; --photo-placeholder: #26284A;
    --tile-mix: 62%; --error: #FF8A7A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 32px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14152A; --bg-alt: #1A1B33; --surface: #202140;
  --ink: #F2F2F9; --text: #C6C7DC; --muted: #A3A5C1;
  --line: #2E3052; --line-strong: #40426B;
  --brand: #A3A5DA; --brand-ink: #BABCEB; --accent: #A892DA;
  --band: #0E0F21; --drawer: #221F3A; --photo-placeholder: #26284A;
  --tile-mix: 62%; --error: #FF8A7A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 32px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* Platform colour hook: any element with data-c gets --c */
[data-c="gold"]   { --c: var(--gold); }
[data-c="indigo"] { --c: var(--indigo); }
[data-c="lime"]   { --c: var(--lime); }
[data-c="coral"]  { --c: var(--coral); }
[data-c="sky"]    { --c: var(--sky); }
[data-c="teal"]   { --c: var(--teal); }


/* 3. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font-body);
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p, figure, blockquote { margin: 0; }
[hidden] { display: none !important; }


/* 4. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.015em;
}
a { color: var(--brand-ink); }
strong { font-weight: 600; }

/* Section heading size */
.heading-l {
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 1.12;
  font-weight: 500;
}
.heading-m {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.2;
  font-weight: 500;
}
.lede {
  font-size: clamp(17px, 1.45vw, 19px);
  max-width: 34em;
}

/* Two-weight headline echoing the wordmark: light line, bold line */
.split-heading .light { display: block; font-weight: 300; }
.split-heading .bold  { display: block; font-weight: 600; }


/* 5. Utilities
   -------------------------------------------------------------------------- */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

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

@media (min-width: 1440px) {
  :root { --wrap: 1280px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
