/* Base: typography, links, focus, media. Loaded after the legacy layer, so it wins. */

:root {
  /* Bootstrap 5 reads these: its components follow the brand automatically */
  --bs-body-font-family: var(--font-sans);
  --bs-body-font-size: var(--text-base);
  --bs-body-line-height: var(--leading-body);
  --bs-body-color: var(--color-text);
  --bs-body-bg: var(--color-bg);
  --bs-link-color: var(--color-link);
  --bs-link-color-rgb: 180, 83, 9;
  --bs-link-hover-color: var(--color-link-hover);
  --bs-link-hover-color-rgb: 146, 64, 14;
  --bs-border-color: var(--color-border);
  --bs-border-radius: var(--radius-sm);
  --bs-primary: var(--saffron-700);
  --bs-primary-rgb: 180, 83, 9;
  --bs-emphasis-color: var(--ink);
  --bs-heading-color: var(--ink);
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Headings: light by default; the thin display style is opt-in (.display-thin) */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: var(--leading-tight);
  letter-spacing: -.01em;
  margin-top: 0;
}
h1, .h1 { font-size: var(--text-3xl); font-weight: var(--weight-light); }
h2, .h2 { font-size: var(--text-2xl); font-weight: var(--weight-light); }
h3, .h3 { font-size: var(--text-xl); font-weight: var(--weight-regular); line-height: var(--leading-snug); }
h4, .h4 { font-size: var(--text-lg); font-weight: var(--weight-medium); line-height: var(--leading-snug); }
h5, .h5, h6, .h6 { font-size: var(--text-base); font-weight: var(--weight-semibold); line-height: var(--leading-snug); }

/* Thin display voice: only for large sizes (never body text, never small Indic text) */
.display-thin {
  font-size: var(--text-display);
  font-weight: var(--weight-thin);
  line-height: 1.05;
  letter-spacing: -.025em;
}
.title-thin { font-weight: var(--weight-thin); letter-spacing: -.02em; }
/* Devanagari and other Indic scripts need a little more weight and line height */
:lang(hi) .display-thin, :lang(hi) .title-thin,
:lang(mr) .display-thin, :lang(ne) .display-thin, :lang(sa) .display-thin {
  font-weight: var(--weight-light);
  line-height: 1.25;
  letter-spacing: 0;
}

p { margin: 0 0 var(--space-4); }
small, .text-small { font-size: var(--text-sm); }
.text-muted-2 { color: var(--color-muted) !important; }
.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--saffron-700);
  margin-bottom: var(--space-3);
}

a { color: var(--color-link); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color var(--duration) var(--ease); }
a:hover { color: var(--color-link-hover); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }

img, video, iframe { max-width: 100%; }
img { height: auto; }
hr { border: 0; border-top: var(--hairline); opacity: 1; }
::selection { background: var(--saffron-100); color: var(--ink); }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 2000;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-4); color: var(--white); }

.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important; width: 1px !important; height: 1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important;
}
