/* Living Spatial Intelligence Design Tokens — GeoVya Real Estate & Development Intelligence
 * Two crafted atmospheres:
 *   Default Dark  ("Observatory Night"): deep midnight indigo stage, luminous slate-glass cards, emerald & warm amber accents
 *   Optional Light ("Survey Paper"):     warm ivory paper stage, frosted broadsheet glass, forest & vermilion ink
 */

:root {
  color-scheme: dark light;

  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
  }
  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
  }

  /* Atmospheric surfaces */
  --paper:          light-dark(#f4f1ea, #0b0f19);
  --paper-elevated: light-dark(#fcfaf5, #12192b);
  --paper-sunk:     light-dark(#ece7dc, #0e1424);
  --paper-glass:    light-dark(rgb(252 250 245 / 0.88), rgb(15 21 36 / 0.84));
  --paper-hover:    light-dark(#ede8dc, #1b243b);

  /* Ink hierarchy (AA/AAA verified in both themes) */
  --ink:       light-dark(#171614, #f1f5fb);
  --ink-2:     light-dark(#3b3730, #c4d0e4);
  --ink-muted: light-dark(#615a4f, #8b9bb6);
  --ink-faint: light-dark(#81796c, #687894);

  /* Luminous hairlines & glass rim */
  --rule:        light-dark(rgb(23 22 20 / 0.11), rgb(168 196 240 / 0.12));
  --rule-strong: light-dark(rgb(23 22 20 / 0.28), rgb(168 196 240 / 0.24));
  --rule-soft:   light-dark(rgb(23 22 20 / 0.06), rgb(168 196 240 / 0.07));
  --glass-rim:   light-dark(inset 0 1px 0 rgb(255 255 255 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.09));

  /* Authoritative living accents */
  --vermilion:      light-dark(#bf4325, #f2845c);
  --vermilion-soft: light-dark(rgb(191 67 37 / 0.11), rgb(242 132 92 / 0.16));
  --forest:         light-dark(#166b51, #4ce0b0);
  --forest-soft:    light-dark(rgb(22 107 81 / 0.11), rgb(76 224 176 / 0.14));
  --slate:          light-dark(#2a5680, #77b5f5);
  --slate-soft:     light-dark(rgb(42 86 128 / 0.10), rgb(119 181 245 / 0.14));
  --ochre:          light-dark(#a46616, #f5ba56);
  --ochre-soft:     light-dark(rgb(164 102 22 / 0.12), rgb(245 186 86 / 0.15));
  --plum:           light-dark(#6e2d8c, #b78ef0);

  /* Metro line hues */
  --line-14: #9f6fe8;
  --line-11: #d49a62;
  --line-4:  #e072b4;
  --line-12: #34b88d;
  --line-15: #f0567f;

  /* Typography */
  --font-serif-en: "Newsreader", Georgia, serif;
  --font-sans-en:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif-ar: "IBM Plex Sans Arabic", "Amiri", sans-serif;
  --font-sans-ar:  "IBM Plex Sans Arabic", "IBM Plex Sans", sans-serif;
  --font-mono:     "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --font-display: var(--font-serif-ar);
  --font-body:    var(--font-sans-ar);

  /* Scale */
  --fs-h1:    1.36rem;
  --fs-h2:    1.1rem;
  --fs-h3:    0.94rem;
  --fs-body:  0.88rem;
  --fs-small: 0.80rem;
  --fs-micro: 0.72rem;

  /* Soft organic radii (gives warmth & spatial atmosphere) */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Atmospheric depth shadows */
  --shadow-sheet: light-dark(
    0 2px 6px rgb(23 22 20 / 0.05), 0 22px 48px -12px rgb(23 22 20 / 0.16),
    0 2px 8px rgb(0 0 0 / 0.35), 0 28px 60px -12px rgb(0 0 0 / 0.72)
  );
  --shadow-pop: light-dark(
    0 4px 12px rgb(23 22 20 / 0.09), 0 24px 56px -10px rgb(23 22 20 / 0.24),
    0 6px 18px rgb(0 0 0 / 0.5), 0 32px 72px -12px rgb(0 0 0 / 0.85)
  );

  /* Motion */
  --ease-editorial: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 150ms;
  --t-med:  280ms;
  --t-slow: 480ms;

  /* Layout metrics */
  --masthead-h: 52px;
  --dock-h:     58px;
  --sheet-w:    418px;
  --edge:       16px;
}

html[lang="en"] {
  --font-display: var(--font-serif-en);
  --font-body:    var(--font-sans-en);
}

html[lang="ar"] {
  --font-display: var(--font-sans-ar);
  --font-body:    var(--font-sans-ar);
}

html[lang="ar"] body,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .eyebrow,
html[lang="ar"] .chip,
html[lang="ar"] .tab-pill {
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.num,
.mono {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}
bdi[dir="ltr"] {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}
.mono {
  font-family: var(--font-mono);
}
