/* cs-bihar-ui · base
   @font-face declarations, reset, typography defaults, scrollbar. */

/* ───────── Self-hosted fonts ───────── */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Inter-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/Inter-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Inter-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Noto Sans Devanagari';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/NotoSansDevanagari-Regular.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}

@font-face {
  font-family: 'Tiro Devanagari Hindi';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/TiroDevanagariHindi-Regular-devanagari.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
@font-face {
  font-family: 'Tiro Devanagari Hindi';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/TiroDevanagariHindi-Regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ───────── Reset ───────── */

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-base);
  color: var(--ink-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p { margin: 0; }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--line-focus); outline-offset: 2px; border-radius: var(--radius-1); }

button {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer;
}
button:focus-visible { outline: 2px solid var(--line-focus); outline-offset: 2px; }

input, select, textarea { font: inherit; color: inherit; }

img, svg { display: block; max-width: 100%; }

/* ───────── Typography helpers ───────── */

.t-display-1 {
  font-family: var(--font-display);
  font-size: var(--text-display-1);
  line-height: var(--leading-display-1);
  letter-spacing: var(--tracking-display-1);
  font-weight: 400;
}
.t-h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
  letter-spacing: var(--tracking-h1);
  font-weight: 400;
}
.t-h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  letter-spacing: var(--tracking-h2);
  font-weight: 400;
}
.t-h3 {
  font-family: var(--font-body);
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  letter-spacing: var(--tracking-h3);
  font-weight: 600;
}
.t-lead {
  font-family: var(--font-body);
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
  font-weight: 400;
  color: var(--ink-secondary);
}
.t-mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  line-height: var(--leading-mono);
}
.t-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  letter-spacing: var(--tracking-xs);
  text-transform: lowercase;
  color: var(--ink-muted);
}
.t-muted { color: var(--ink-muted); }
.t-secondary { color: var(--ink-secondary); }

/* ───────── Selection + scrollbar ───────── */

::selection { background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-rule);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); background-clip: padding-box; border: 2px solid transparent; }

/* ───────── Motion preference ───────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ───────── Utilities ───────── */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.stack > * + * { margin-top: var(--stack, var(--space-4)); }
.row { display: flex; align-items: center; gap: var(--row, var(--space-3)); }
.col { display: flex; flex-direction: column; gap: var(--col, var(--space-3)); }
.container {
  width: 100%; max-width: var(--max-content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
