/* ============================================================
   SIAM KINNARIE HEALTH SPA — DESIGN TOKENS
   Vibe archetype: Editorial Luxury (warm cream / deep obsidian)
   Accents: Temple Gold + Jade Patina + Lotus Blush
   ============================================================ */

:root {
  /* ---- Type families ---- */
  --font-display: "Cormorant Garamond", "Noto Serif Thai", Georgia, serif;
  --font-display-th: "Noto Serif Thai", "Cormorant Garamond", serif;
  --font-body: "Plus Jakarta Sans", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-body-th: "IBM Plex Sans Thai", "Plus Jakarta Sans", system-ui, sans-serif;

  /* ---- Fluid type scale ---- */
  --t-eyebrow: clamp(0.56rem, 0.52rem + 0.2vw, 0.7rem);
  --t-micro: clamp(0.72rem, 0.68rem + 0.2vw, 0.82rem);
  --t-body-s: clamp(0.84rem, 0.8rem + 0.25vw, 0.94rem);
  --t-body: clamp(0.95rem, 0.9rem + 0.3vw, 1.08rem);
  --t-lead: clamp(1.05rem, 0.98rem + 0.6vw, 1.42rem);
  --t-h4: clamp(1.15rem, 1rem + 0.8vw, 1.6rem);
  --t-h3: clamp(1.5rem, 1.2rem + 1.6vw, 2.5rem);
  --t-h2: clamp(2.1rem, 1.4rem + 3.4vw, 4.6rem);
  --t-h1: clamp(2.9rem, 1.3rem + 8vw, 8.6rem);
  --t-mega: clamp(4rem, 1rem + 14vw, 15rem);

  /* ---- Spatial rhythm (macro whitespace) ---- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 6.5rem;
  --sp-10: 9rem;
  --sp-11: 12rem;
  --section-y: clamp(5.5rem, 3rem + 11vw, 13rem);
  --gutter: clamp(1.15rem, 0.5rem + 3.4vw, 5.5rem);
  --maxw: 1360px;
  --maxw-narrow: 820px;

  /* ---- Radii (exaggerated squircles) ---- */
  --r-xs: 0.5rem;
  --r-sm: 0.875rem;
  --r-md: 1.25rem;
  --r-lg: 2rem;
  --r-xl: 2.75rem;
  --r-2xl: 3.5rem;
  --r-pill: 999px;
  --bezel: 0.4rem; /* outer shell padding for double-bezel */

  /* ---- Motion curves ---- */
  --ease-silk: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-swift: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-drape: cubic-bezier(0.65, 0.05, 0.36, 1);
  --d-fast: 240ms;
  --d-mid: 520ms;
  --d-slow: 820ms;
  --d-epic: 1400ms;

  /* ---- Elevation: diffused ambient only, never harsh ---- */
  --z-nav: 400;
  --z-overlay: 600;
  --z-modal: 700;
  --z-grain: 800;
  --z-toast: 900;
}

/* ============================================================
   DARK — "Obsidian Temple at Night" (default)
   ============================================================ */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --c-void: #06070a;
  --c-bg: #0a0b0f;
  --c-bg-raise: #101219;
  --c-bg-sunk: #07080b;
  --c-surface: rgba(255, 255, 255, 0.034);
  --c-surface-2: rgba(255, 255, 255, 0.058);
  --c-shell: rgba(255, 255, 255, 0.045);
  /* --c-hair is for DIVIDERS and DECORATIVE lines — the hero rings,
     eyebrow pills, row rules. It is deliberately near-invisible and
     must stay that way: warming it once turned the hero's rings into
     the loudest thing on the page. Card and control OUTLINES use
     --c-line instead. */
  --c-hair: rgba(255, 255, 255, 0.088);
  /* --c-line is the warm hairline every card and tile is outlined with.
     It was used in 13 places and never defined, so those borders fell
     back to currentColor — a near-white line in the dark theme. */
  --c-line: rgba(212, 173, 109, 0.45);
  --c-hair-strong: rgba(212, 173, 109, 0.5);

  --c-ink: #f4efe6;
  --c-ink-2: rgba(244, 239, 230, 0.72);
  --c-ink-3: rgba(244, 239, 230, 0.48);
  --c-ink-4: rgba(244, 239, 230, 0.3);

  --c-gold: #e5c389;
  --c-gold-2: #c69c58;
  --c-gold-deep: #8d6a2f;
  /* Also the halo inside --sh-lift, so this is the gold under
     EVERY raised card on the page, not just the hero's floor. */
  --c-gold-glow: rgba(229, 195, 137, 0.11);
  --c-jade: #79c0ad;
  --c-jade-deep: #2c6b5d;
  --c-blush: #e4a9a2;
  --c-plum: #6b4a78;

  --grad-gold: linear-gradient(118deg, #f6e2bb 0%, #e5c389 26%, #a67c35 62%, #f0d4a4 100%);
  --grad-jade: linear-gradient(135deg, #a8e0cf 0%, #4e9b89 48%, #1f5246 100%);
  /* .canvas-bg paints this at opacity 1 across the whole viewport,
     under everything. At 0.42/0.46/0.46 these three were a violet
     field top-left, a green field top-right and a gold field along
     the bottom - the patches, on every page, in both modes. The
     orbs layered over them run at 0.07-0.12, a tenth of this.
     Same positions and sizes, so the light still falls the same
     way; about a third of the strength. */
  --grad-hero: radial-gradient(120% 90% at 18% 8%, rgba(107, 74, 120, 0.14) 0%, transparent 58%),
    radial-gradient(90% 80% at 88% 18%, rgba(44, 107, 93, 0.15) 0%, transparent 60%),
    radial-gradient(130% 110% at 50% 108%, rgba(141, 106, 47, 0.17) 0%, transparent 62%),
    linear-gradient(180deg, #080910 0%, #0a0b0f 52%, #0d0b09 100%);
  --grad-panel: linear-gradient(152deg, rgba(255, 255, 255, 0.072) 0%, rgba(255, 255, 255, 0.016) 46%, rgba(255, 255, 255, 0.004) 100%);
  --grad-glass: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.022));
  --grad-aurora: conic-gradient(from 200deg at 50% 50%, rgba(229, 195, 137, 0.18), rgba(44, 107, 93, 0.18), rgba(107, 74, 120, 0.18), rgba(229, 195, 137, 0.18));
  --grad-ink-fade: linear-gradient(180deg, transparent, rgba(6, 7, 10, 0.92));

  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.11);
  --sh-soft: 0 2px 10px rgba(0, 0, 0, 0.3), 0 20px 60px -24px rgba(0, 0, 0, 0.7);
  --sh-float: 0 1px 2px rgba(0, 0, 0, 0.28), 0 30px 90px -36px rgba(0, 0, 0, 0.82), 0 0 0 1px rgba(255, 255, 255, 0.045);
  --sh-lift: 0 40px 120px -40px rgba(0, 0, 0, 0.9), 0 0 70px -30px var(--c-gold-glow);
  --grain-opacity: 0.045;
  --veil: rgba(6, 7, 10, 0.62);
}

/* ============================================================
   LIGHT — "Silk, Sand & Morning Incense"
   ============================================================ */
:root[data-theme="light"] {
  color-scheme: light;

  --c-void: #efe6d8;
  --c-bg: #fbf7f0;
  --c-bg-raise: #ffffff;
  --c-bg-sunk: #f3ebdf;
  --c-surface: rgba(28, 20, 12, 0.026);
  --c-surface-2: rgba(28, 20, 12, 0.05);
  --c-shell: rgba(28, 20, 12, 0.03);
  --c-hair: rgba(28, 20, 12, 0.082);
  --c-line: rgba(150, 110, 48, 0.55);
  --c-hair-strong: rgba(150, 110, 48, 0.62);

  --c-ink: #19120b;
  --c-ink-2: rgba(25, 18, 11, 0.74);
  --c-ink-3: rgba(25, 18, 11, 0.52);
  --c-ink-4: rgba(25, 18, 11, 0.34);

  --c-gold: #9a7026;
  --c-gold-2: #b98f3e;
  --c-gold-deep: #6d4d15;
  --c-gold-glow: rgba(154, 112, 38, 0.09);
  --c-jade: #2b6c5c;
  --c-jade-deep: #1b4b3f;
  --c-blush: #b5675f;
  --c-plum: #5c3f68;

  /* The original ran #8a5f1c to #c09646 to #7d5618 to #a67c35 -
     luminance 0.11 to 0.33. Black text fails on its dark stops
     (2.80) and white fails on its bright one (2.55): no single
     text colour is readable across it. Only the bright stop has
     changed, so the run is a deep gold throughout and light text
     sits on all of it. Worst stop 4.82. */
  --grad-gold: linear-gradient(118deg, #8a5f1c 0%, #8f6620 30%, #7d5618 68%, #86601c 100%);
  --grad-jade: linear-gradient(135deg, #3f8976 0%, #2b6c5c 50%, #17463a 100%);
  /* The gold one ran at 0.72 - the strongest single colour anywhere
     on the site, across the bottom of every screen. Cream wants
     less than near-black does, so these go a little lower still. */
  --grad-hero: radial-gradient(120% 90% at 14% 4%, rgba(201, 177, 214, 0.13) 0%, transparent 56%),
    radial-gradient(92% 82% at 90% 14%, rgba(150, 205, 190, 0.15) 0%, transparent 58%),
    radial-gradient(130% 110% at 52% 106%, rgba(235, 206, 155, 0.24) 0%, transparent 64%),
    linear-gradient(180deg, #fdfaf4 0%, #fbf7f0 54%, #f6eddf 100%);
  --grad-panel: linear-gradient(152deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.6) 44%, rgba(255, 255, 255, 0.34) 100%);
  --grad-glass: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.55));
  --grad-aurora: conic-gradient(from 200deg at 50% 50%, rgba(154, 112, 38, 0.13), rgba(43, 108, 92, 0.13), rgba(92, 63, 104, 0.13), rgba(154, 112, 38, 0.13));
  --grad-ink-fade: linear-gradient(180deg, transparent, rgba(243, 235, 223, 0.95));

  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --sh-soft: 0 1px 2px rgba(60, 42, 20, 0.05), 0 18px 46px -22px rgba(60, 42, 20, 0.22);
  --sh-float: 0 1px 2px rgba(60, 42, 20, 0.06), 0 28px 70px -28px rgba(60, 42, 20, 0.26), 0 0 0 1px rgba(28, 20, 12, 0.045);
  --sh-lift: 0 44px 110px -38px rgba(60, 42, 20, 0.34), 0 0 60px -26px var(--c-gold-glow);
  --grain-opacity: 0.03;
  --veil: rgba(251, 247, 240, 0.7);
}
