/* ==========================================================================
   BABRI STONE — DESIGN SYSTEM: TOKENS & BASE
   Palette: warm ink, ivory, quarried stone, aged brass
   Type: Cormorant Garamond (display serif) + Inter (body) + IBM Plex Mono (data/labels)
   ========================================================================== */

/* Google Fonts loaded via <link rel="stylesheet"> in <head> — see README. Not @import, to avoid blocking the render tree. */

:root {
  /* ---- Color: warm architectural palette derived from the Babri lion mark
     and the quarried stone in the project photography ---- */
  --ink: #1C1A17;           /* near-black warm charcoal — primary text, dark sections */
  --ink-soft: #322E28;      /* secondary dark surface */
  --ivory: #F7F3EA;         /* primary background */
  --ivory-deep: #EFE9DC;    /* recessed panels, alt sections */
  --paper: #FFFFFF;         /* cards on ivory */
  --stone: #CBC0AC;         /* hairlines, borders */
  --stone-soft: #E3DCCB;    /* light borders / dividers on ivory */
  --taupe: #6F6656;         /* secondary / muted text */
  --brass: #8A6A34;         /* primary accent — aged brass */
  --brass-dark: #6B5127;    /* accent hover/active */
  --brass-light: #C7A968;   /* accent on dark backgrounds */
  --gradient-brass: linear-gradient(135deg, #C7A968 0%, #8A6A34 55%, #6B5127 100%);
  --gradient-brass-hover: linear-gradient(135deg, #D4B87A 0%, #8A6A34 55%, #5C4420 100%);
  --success: #4B6F52;
  --error: #A23B2E;

  /* ---- Type ---- */
  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;

  /* ---- Scale ---- */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  --radius-sm: 2px;
  --radius-md: 4px;

  --container: 1240px;
  --container-narrow: 800px;

  --shadow-card: 0 1px 2px rgba(28, 26, 23, 0.04), 0 8px 24px rgba(28, 26, 23, 0.06);
  --shadow-lifted: 0 4px 8px rgba(28, 26, 23, 0.06), 0 20px 48px rgba(28, 26, 23, 0.12);
  --shadow-gold: 0 8px 20px rgba(138, 106, 52, 0.28), 0 2px 6px rgba(138, 106, 52, 0.22);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.5s;

  /* ---- Locked viewport unit for hero sections ----
     1% of the viewport height, captured once by main.js on load and only
     ever recalculated on a genuine resize/orientation change (see main.js).
     This is what actually keeps the hero image from visibly "zooming" —
     see the comment above .hero in components.css for why 100svh alone
     isn't enough. The 1svh fallback here matches what JS computes on a
     fresh page load (full browser chrome showing), so there's no jump
     once JS takes over. */
  --vh: 1svh;
}

*, *::before, *::after { box-sizing: border-box; }
/* overflow-x on the ROOT (not body) propagates to the viewport and leaves the
   body itself `visible`, so the sticky header keeps working. It contains the
   off-canvas mobile nav panel, which Chrome otherwise counts in scrollWidth. */
html { scroll-behavior: smooth; overflow-x: hidden; }
/* NOTE: this used to also set `overflow-x: hidden` on body.material-page to
   contain the photo-swipe carousel's translateX. Don't reintroduce that —
   any non-visible `overflow` on body (even just overflow-x) makes body
   establish its own scrollport, which breaks position:sticky on .site-header
   for that page's entire scroll (the exact "nav isn't sticky on Materials"
   bug). The swipe overflow is now contained locally at the source instead
   — see `overflow: hidden` on .material-zoom in components.css — so body
   only needs the width/max-width safety net below. */
body.material-page { width: 100%; max-width: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
h4 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 600; }

p { margin: 0 0 var(--space-sm); color: var(--ink); }
p.lede { font-size: 1.2rem; color: var(--taupe); font-weight: 400; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--gradient-brass);
  display: inline-block;
}

ul, ol { padding-left: 1.2em; }

/* ---- Layout helpers ---- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.wrap-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section { padding: var(--space-2xl) 0; }
.section-tight { padding: var(--space-xl) 0; }
.section-alt { background: var(--ivory-deep); }
.section-dark { background: var(--ink); color: var(--ivory); }
.section-dark h2, .section-dark h3, .section-dark p { color: var(--ivory); }
.section-dark .eyebrow { color: var(--brass-light); }
.section-dark .eyebrow::before { background: var(--brass-light); }

.section-head { max-width: 640px; margin-bottom: var(--space-xl); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stone-soft) 20%, var(--stone-soft) 80%, transparent);
  margin: var(--space-xl) 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1.05rem 2.2rem;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease), transform 0.2s var(--ease);
  white-space: nowrap;
  max-width: 100%;
}
/* Long button labels must wrap instead of forcing horizontal overflow
   on narrow viewports (this was cropping/clipping button text and could
   drag the whole page sideways on mobile). Nowrap is kept as the default
   above so short labels never wrap awkwardly on desktop; this override
   only kicks in on the narrow widths where a long label would otherwise
   overflow. */
@media (max-width: 640px) {
  .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.3;
  }
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  position: relative;
  background: var(--gradient-brass);
  color: var(--ivory);
  border-color: var(--brass);
  box-shadow: 0 1px 2px rgba(28,26,23,0.05);
  overflow: hidden;
  z-index: 0;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.32) 45%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
  z-index: 1;
  pointer-events: none;
}
/* Soft glow that follows the pointer, positioned via --mx/--my set in
   main.js on mousemove. Sits above the sheen, below the label. */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 120px at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  z-index: 1;
  pointer-events: none;
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary > * { position: relative; z-index: 2; }
.btn-primary:hover {
  background: var(--gradient-brass-hover);
  border-color: var(--brass-dark);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}
.btn-primary:hover::before { transform: translateX(120%); }
@media (prefers-reduced-motion: reduce) { .btn-primary::before, .btn-primary::after { display: none; } }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--ivory); }
.btn-ghost-light {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(247, 243, 234, 0.55);
}
.btn-ghost-light:hover { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.btn-text {
  background: none;
  border: none;
  padding: 0;
  color: var(--brass);
  font-weight: 600;
  border-bottom: 1px solid var(--brass);
  border-radius: 0;
}
.btn-text:hover { color: var(--brass-dark); border-color: var(--brass-dark); }
.btn-block { width: 100%; justify-content: center; }
.btn-arrow { transition: transform 0.3s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---- Focus states (accessibility) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--ivory);
  padding: 1rem 1.5rem;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus {
  left: var(--space-md);
  top: var(--space-md);
}

/* ---- Reveal-on-scroll: intentionally disabled -------------------------
   Content is shown immediately with no scroll-triggered motion or entrance
   animation. The .reveal class is left in the markup (harmless) so nothing
   else needs to change, but it now does nothing but render normally. */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s cubic-bezier(.22,.61,.36,1), transform 0.65s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.inner-page .reveal,
.inner-page .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: none;
}
.inner-page .reveal {
  will-change: auto;
}

/* ---- Visually hidden (for accessible labels) ---- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .section { padding: var(--space-xl) 0; }
  :root { --space-2xl: 4rem; --space-3xl: 5rem; }
}
