/* ══════════════════════════════════════════════════════════
   BASE — reset, typography defaults, utilities, animations
   ══════════════════════════════════════════════════════════ */

/* ── FONTS — self-hosted (SIL OFL). Latin subsets; montserrat-rupee is a 1-glyph subset for ₹. */
@font-face{font-family:Montserrat;font-weight:200 900;font-display:swap;src:url(../fonts/montserrat-latin.woff2)format("woff2")}
@font-face{font-family:Montserrat;font-weight:200 900;font-display:swap;src:url(../fonts/montserrat-rupee.woff2)format("woff2");unicode-range:U+20B9}
@font-face{font-family:"DM Sans";font-weight:300 400;font-display:swap;src:url(../fonts/dmsans-latin.woff2)format("woff2")}
@font-face{font-family:"Cormorant Garamond";font-weight:500;font-display:swap;src:url(../fonts/cormorant-500-latin.woff2)format("woff2")}
@font-face{font-family:"Cormorant Garamond";font-style:italic;font-weight:400 500;font-display:swap;src:url(../fonts/cormorant-italic-latin.woff2)format("woff2")}

/* ── COLOR SCHEME ─────────────────────────────────────────── */
:root { color-scheme: light; }

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Keep anchor targets and keyboard focus clear of the fixed nav, sticky rail and bottom tray (WCAG 2.4.11) */
html {
  scroll-padding-top: 6rem;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html:has(.rail) { scroll-padding-top: 13.5rem; }
html:has(.tray.up) { scroll-padding-bottom: 10rem; }

/* ── BODY ─────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fb);
  font-size: var(--t-body);
  font-weight: 300;
  line-height: var(--lh-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
  body { line-height: var(--lh-body-d); }
}

/* ── FOCUS ────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

/* ── TYPOGRAPHY DEFAULTS ──────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--f);
  line-height: var(--lh-head);
  letter-spacing: var(--ls-h);
}

p { max-width: var(--body-ch); }

a { color: inherit; }

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

/* ── 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;
}

.skip-link {
  position: absolute;
  left: -9999px; top: 1rem;
  background: var(--plum); color: var(--bg);
  padding: 0.5rem 1.2rem;
  font-family: var(--f);
  font-size: var(--t-micro);
  letter-spacing: var(--ls-ui);
  text-decoration: none;
  z-index: 9999;
}
.skip-link:focus { left: 1rem; }

/* ── SCROLL REVEAL ────────────────────────────────────────── */
.fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade.in { opacity: 1; transform: none; }
.fade-d1 { transition-delay: 0.12s; }
.fade-d2 { transition-delay: 0.24s; }
.fade-d3 { transition-delay: 0.36s; }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.7); }
}

@keyframes tick {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes drawerIn {
  from { transform: translateX(100%); }
  to   { transform: none; }
}

/* ── REDUCED MOTION ───────────────────────────────────────── */
@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;
  }
  .fade { opacity: 1; transform: none; transition: none; }
}
