/* ==========================================================================
   Mahaveer.org — Stylesheet
   Self-contained: no external fonts or libraries. Works offline.
   Theme: temple lamplight at dusk — deep maroon, ivory, sacred gold.
   ========================================================================== */

:root {
  --bg: #140d0e;
  --bg-2: #1c1214;
  --bg-3: #261a1a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --line: rgba(232, 196, 124, 0.16);
  --text: #efe9dc;
  --text-muted: #b3a79e;
  --gold: #e8b54a;
  --gold-bright: #f6cd6f;
  --saffron: #ff8f3f;
  --ember: #d96b2f;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --radius: 14px;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", "Iowan Old Style", Georgia, "Noto Serif Devanagari", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Devanagari", sans-serif;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle cosmic backdrop on every page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 600px at 85% -5%, rgba(178, 58, 58, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(216, 150, 50, 0.08), transparent 55%),
    radial-gradient(700px 700px at 50% 110%, rgba(58, 132, 86, 0.09), transparent 60%),
    var(--bg);
}

::selection { background: rgba(232, 181, 74, 0.35); }

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

a { color: var(--gold-bright); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--saffron); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.25; color: var(--text); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: #1a1408; padding: 10px 18px;
  border-radius: 0 0 8px 0; z-index: 200; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease;
}
.site-header.scrolled {
  /* Solid color: iOS Safari often fails to render backdrop blur on fixed
     elements, which left the translucent bar see-through over the content. */
  background: #190f11;
  padding: 10px 0;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-om {
  font-size: 1.7rem; line-height: 1; color: var(--gold);
  text-shadow: 0 0 18px rgba(232, 181, 74, 0.55);
  font-family: var(--serif);
}
.brand-name {
  font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0.12em;
  color: var(--text); text-transform: uppercase;
}
.brand-name span { color: var(--gold); }

.main-nav ul { list-style: none; display: flex; gap: 6px; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: var(--text-muted); font-size: 0.92rem; letter-spacing: 0.04em;
}
.main-nav a:hover { color: var(--gold-bright); background: var(--surface); }
.main-nav a.active { color: var(--gold-bright); }
.main-nav a.active::after {
  content: ""; display: block; height: 2px; margin-top: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; cursor: pointer; color: var(--gold);
  font-size: 1.2rem; line-height: 1;
}

.nav-close { display: none; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(78vw, 320px);
    /* Solid color: backdrop blur is unreliable on iOS, and a translucent
       drawer read as see-through over the page. */
    background: #1a1112;
    transform: translateX(100%); transition: transform 0.3s ease;
    padding: 90px 28px 28px; border-left: 1px solid var(--line);
  }
  .nav-close {
    display: block; position: absolute; top: 16px; right: 20px;
    background: none; border: 1px solid var(--line);
    border-radius: 8px; padding: 8px 12px; cursor: pointer; color: var(--gold);
    font-size: 1.2rem; line-height: 1;
  }
  .nav-close:hover { border-color: var(--gold); }
  .main-nav.open { transform: translateX(0); box-shadow: -20px 0 60px rgba(0,0,0,0.6); }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { font-size: 1.05rem; padding: 12px 14px; }
}

/* ==========================================================================
   Hero (homepage)
   ========================================================================== */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  isolation: isolate; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-image: url("../images/hero-ahinsa-sthal.jpg");
  background-size: cover; background-position: center 18%;
  animation: heroDrift 28s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: scale(1.02); }
  to   { transform: scale(1.12); }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,13,14,0.55) 0%, rgba(20,13,14,0.25) 35%, rgba(20,13,14,0.55) 75%, var(--bg) 100%);
}
.hero-inner { padding: 120px 24px 80px; max-width: 880px; }
.hero-pranava {
  font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 4rem);
  color: var(--gold-bright);
  text-shadow: 0 0 36px rgba(246, 205, 111, 0.65), 0 2px 12px rgba(0,0,0,0.8);
  margin-bottom: 8px;
}
.hero h1 {
  font-size: clamp(3rem, 9vw, 6.2rem);
  letter-spacing: 0.05em;
  color: #fdf9ef;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.75);
}
.hero-mantra {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  color: var(--gold-bright);
  letter-spacing: 0.18em;
  text-shadow: 0 2px 14px rgba(0,0,0,0.85);
}
.hero-sub {
  margin-top: 16px; color: #d8d2c4; font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 620px; margin-left: auto; margin-right: auto;
  text-shadow: 0 1px 10px rgba(0,0,0,0.8);
}
.hero-actions { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid transparent; transition: all 0.25s ease; cursor: pointer;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--ember));
  color: #1c1206; font-weight: 700;
  box-shadow: 0 8px 30px rgba(217, 107, 47, 0.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(232, 181, 74, 0.45); color: #1c1206; }
.btn-ghost { border-color: rgba(236, 231, 218, 0.45); color: #f3eee1; backdrop-filter: blur(4px); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(232,181,74,0.08); }

.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: rgba(236,231,218,0.7); font-size: 1.6rem; animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 9px); } }

/* ==========================================================================
   Page hero (interior pages)
   ========================================================================== */
.page-hero {
  position: relative; padding: 170px 0 90px; text-align: center; isolation: isolate;
  background-size: cover; background-position: center;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20,13,14,0.72), rgba(20,13,14,0.55) 60%, var(--bg));
}
.page-hero .eyebrow { text-shadow: 0 1px 8px rgba(0,0,0,0.8); }
.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  text-shadow: 0 3px 24px rgba(0,0,0,0.8);
}
.page-hero p {
  max-width: 640px; margin: 14px auto 0; color: #d8d2c4;
  text-shadow: 0 1px 10px rgba(0,0,0,0.85);
}

/* ==========================================================================
   Sections & common blocks
   ========================================================================== */
section { padding: 84px 0; }
section.tight { padding: 56px 0; }

.eyebrow {
  display: block; font-size: 0.82rem; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--saffron); margin-bottom: 14px;
}
.section-title { font-size: clamp(1.9rem, 4.5vw, 2.7rem); margin-bottom: 14px; }
.section-lead { color: var(--text-muted); max-width: 720px; }
.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

.divider {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  color: var(--gold); padding: 10px 0 0; font-family: var(--serif); font-size: 1.4rem;
}
.divider::before, .divider::after {
  content: ""; height: 1px; width: min(160px, 26vw);
  background: linear-gradient(90deg, transparent, var(--line));
}
.divider::after { background: linear-gradient(90deg, var(--line), transparent); }

/* Card grid */
.grid { display: grid; gap: 26px; margin-top: 48px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(232, 181, 74, 0.4); background: var(--surface-strong); }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--gold-bright); }
.card p { color: var(--text-muted); font-size: 0.97rem; }
.card .card-sanskrit { font-family: var(--serif); color: var(--text); font-size: 1.15rem; margin-bottom: 6px; }
.card-icon { font-size: 2rem; margin-bottom: 16px; color: var(--gold); line-height: 1; }

/* Photo cards (link cards with image) */
.photo-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); display: block; aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.photo-card:hover img { transform: scale(1.06); }
.photo-card .pc-label {
  position: absolute; inset: auto 0 0 0; padding: 40px 22px 18px;
  background: linear-gradient(180deg, transparent, rgba(15, 9, 10, 0.92));
  color: #f3eee1;
}
.photo-card .pc-label strong { display: block; font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0.04em; }
.photo-card .pc-label span { font-size: 0.85rem; color: var(--text-muted); }

/* Quote / shloka block */
.shloka-block {
  margin: 48px auto 0; max-width: 760px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 46px 36px; position: relative; overflow: hidden;
}
.shloka-block::before {
  content: "ॐ"; position: absolute; right: -20px; top: -38px;
  font-size: 11rem; color: rgba(232, 181, 74, 0.05); font-family: var(--serif);
  pointer-events: none;
}
.shloka-sanskrit { font-family: var(--serif); font-size: clamp(1.2rem, 3vw, 1.6rem); color: var(--gold-bright); line-height: 1.9; }
.shloka-meaning { margin-top: 18px; color: var(--text-muted); font-style: italic; }
.shloka-source { margin-top: 12px; font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--saffron); }

/* ==========================================================================
   Mantra cards (mantras.html)
   ========================================================================== */
.mantra-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 38px 34px; margin-top: 30px; position: relative; overflow: hidden;
}
.mantra-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--ember));
}
.mantra-card h3 { color: var(--gold-bright); font-size: 1.45rem; margin-bottom: 4px; }
.mantra-tag { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--saffron); }
.mantra-devanagari {
  font-family: var(--serif); font-size: clamp(1.25rem, 3vw, 1.65rem);
  color: var(--text); line-height: 2; margin: 20px 0 8px;
}
.mantra-iast { color: var(--gold); font-style: italic; font-size: 1.02rem; line-height: 1.9; }
.mantra-meaning { margin-top: 18px; color: var(--text-muted); }
.mantra-meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 0.8rem; padding: 5px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-muted); background: rgba(0,0,0,0.2);
}
.copy-btn {
  margin-left: auto; font-size: 0.8rem; padding: 5px 14px; border-radius: 999px;
  border: 1px solid rgba(232,181,74,0.45); color: var(--gold-bright);
  background: none; cursor: pointer; transition: all 0.2s ease; font-family: inherit;
}
.copy-btn:hover { background: rgba(232,181,74,0.12); }

/* Japa counter */
.japa {
  margin-top: 56px; text-align: center;
  background: radial-gradient(600px 300px at 50% 0%, rgba(217,107,47,0.12), transparent 70%), var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 50px 30px;
}
.japa-bead {
  width: 168px; height: 168px; border-radius: 50%;
  margin: 30px auto 10px;
  background: radial-gradient(circle at 34% 30%, #a87b46, #5c3a1e 64%, #36220f);
  border: 2px solid rgba(232, 181, 74, 0.5);
  box-shadow: 0 0 0 10px rgba(232, 181, 74, 0.06), 0 0 44px rgba(217, 107, 47, 0.35), inset 0 -10px 26px rgba(0,0,0,0.5);
  color: var(--gold-bright); font-family: var(--serif); font-size: 2.8rem;
  cursor: pointer; user-select: none; -webkit-user-select: none;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.japa-bead:active { transform: scale(0.94); box-shadow: 0 0 0 14px rgba(232,181,74,0.10), 0 0 60px rgba(217,107,47,0.55), inset 0 -10px 26px rgba(0,0,0,0.5); }
.japa-count { font-size: 1.05rem; color: var(--text-muted); }
.japa-count strong { color: var(--gold-bright); font-size: 1.5rem; font-family: var(--serif); }
.japa-malas { margin-top: 4px; font-size: 0.9rem; color: var(--saffron); letter-spacing: 0.1em; min-height: 1.4em; }
.japa-reset {
  margin-top: 18px; background: none; border: 1px solid var(--line); color: var(--text-muted);
  padding: 8px 22px; border-radius: 999px; cursor: pointer; font-family: inherit; font-size: 0.85rem;
  transition: all 0.2s ease;
}
.japa-reset:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ==========================================================================
   Tirthankara list
   ========================================================================== */
.tirth-card { display: flex; gap: 22px; align-items: flex-start; }
.tirth-num {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 1.3rem; color: var(--gold-bright);
  border: 1px solid rgba(232,181,74,0.5);
  background: radial-gradient(circle at 35% 30%, rgba(232,181,74,0.22), rgba(0,0,0,0.3));
}
.tirth-card h3 { margin-bottom: 2px; }
.tirth-loc { font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--saffron); margin-bottom: 10px; }

/* Timeline (festivals) */
.timeline { margin-top: 50px; position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(180deg, var(--gold), rgba(232,181,74,0.08));
}
.timeline-item { position: relative; padding: 0 0 44px 26px; }
.timeline-item::before {
  content: ""; position: absolute; left: -34px; top: 8px; width: 17px; height: 17px;
  border-radius: 50%; background: var(--bg);
  border: 2px solid var(--gold); box-shadow: 0 0 14px rgba(232,181,74,0.55);
}
.timeline-item h3 { color: var(--gold-bright); font-size: 1.4rem; }
.timeline-when { font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--saffron); margin: 4px 0 12px; }
.timeline-item p { color: var(--text-muted); max-width: 720px; }
.timeline-item p + p { margin-top: 10px; }

/* ==========================================================================
   Gallery + lightbox
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  cursor: zoom-in; position: relative; background: var(--bg-2); padding: 0; display: block; width: 100%;
}
.gallery-item img { width: 100%; height: 280px; object-fit: cover; transition: transform 0.5s ease, opacity 0.3s ease; }
.gallery-item:hover img { transform: scale(1.05); opacity: 0.92; }
.gallery-item figcaption {
  padding: 12px 16px; font-size: 0.88rem; color: var(--text-muted);
  border-top: 1px solid var(--line); text-align: left; font-family: var(--sans);
}

.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(13, 8, 9, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center; flex-direction: column; padding: 4vh 4vw;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw; max-height: 78vh; object-fit: contain;
  border-radius: 10px; box-shadow: 0 30px 90px rgba(0,0,0,0.8);
}
.lightbox-caption { margin-top: 16px; color: var(--text-muted); text-align: center; max-width: 640px; }
.lightbox-close {
  position: absolute; top: 20px; right: 26px; background: none; border: none;
  color: var(--text); font-size: 2.2rem; cursor: pointer; line-height: 1;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: var(--text);
  font-size: 1.6rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox-nav:hover { background: rgba(232,181,74,0.2); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ==========================================================================
   Prose / article content
   ========================================================================== */
.prose { max-width: 780px; }
.prose p { color: var(--text-muted); margin-bottom: 18px; }
.prose p strong, .prose li strong { color: var(--text); }
.prose h2 { font-size: 1.8rem; margin: 44px 0 16px; color: var(--gold-bright); }
.prose h3 { font-size: 1.3rem; margin: 32px 0 12px; }
.prose ul { color: var(--text-muted); margin: 0 0 18px 22px; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  border-left: 3px solid var(--gold); padding: 6px 0 6px 22px; margin: 26px 0;
  font-family: var(--serif); font-size: 1.15rem; color: var(--text); font-style: italic;
}

/* Figure with caption */
.figure { margin: 36px 0; }
.figure img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.figure figcaption { margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); text-align: center; }

/* Two-column feature row */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 56px; }
.feature-row.reverse > .feature-media { order: 2; }
@media (max-width: 880px) {
  .feature-row { grid-template-columns: 1fr; gap: 28px; }
  .feature-row.reverse > .feature-media { order: 0; }
}
.feature-media img {
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow); width: 100%; height: 420px; object-fit: cover;
}
.feature-text h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 16px; }
.feature-text p { color: var(--text-muted); margin-bottom: 14px; }

/* Symbol list */
.symbol-row { display: flex; gap: 20px; align-items: flex-start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.symbol-row:last-child { border-bottom: none; }
.symbol-glyph {
  flex: 0 0 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; background: rgba(232,181,74,0.08); border: 1px solid var(--line);
}
.symbol-row h3 { font-size: 1.15rem; color: var(--gold-bright); margin-bottom: 4px; }
.symbol-row p { color: var(--text-muted); font-size: 0.95rem; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  text-align: center; padding: 80px 24px; margin: 0;
  background:
    radial-gradient(700px 320px at 50% 120%, rgba(217, 107, 47, 0.18), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cta-band .hero-pranava { font-size: 2.4rem; }
.cta-band h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 12px; }
.cta-band p { color: var(--text-muted); max-width: 560px; margin: 0 auto 30px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { padding: 64px 0 36px; border-top: 1px solid var(--line); background: rgba(0,0,0,0.25); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.site-footer h4 { font-size: 0.85rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--saffron); margin-bottom: 16px; }
.site-footer p { color: var(--text-muted); font-size: 0.92rem; max-width: 380px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--text-muted); font-size: 0.92rem; }
.site-footer a:hover { color: var(--gold-bright); }
.footer-om { font-family: var(--serif); font-size: 1.8rem; color: var(--gold); margin-bottom: 12px; }
.footer-bottom {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 0.82rem; color: rgba(164, 157, 181, 0.75);
}

/* ==========================================================================
   Reveal-on-scroll animation
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   404
   ========================================================================== */
.error-page { min-height: 100svh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.error-page .hero-pranava { font-size: 5rem; }
.error-page h1 { font-size: 2.2rem; margin: 10px 0 14px; }
.error-page p { color: var(--text-muted); margin-bottom: 30px; }

/* Credits table */
.credits-table { width: 100%; border-collapse: collapse; margin-top: 40px; font-size: 0.92rem; }
.credits-table th, .credits-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.credits-table th { color: var(--saffron); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.78rem; }
.credits-table td { color: var(--text-muted); }
@media (max-width: 700px) {
  .credits-table thead { display: none; }
  .credits-table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .credits-table td { display: block; border: none; padding: 4px 0; }
}

/* ==========================================================================
   Quiz
   ========================================================================== */
.quiz-wrap { max-width: 760px; margin: 0 auto; }
.quiz-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px 38px 38px;
}
.quiz-top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 14px;
}
.quiz-score-label { color: var(--gold); }
.quiz-bar {
  height: 4px; border-radius: 2px; background: var(--bg-3);
  overflow: hidden; margin-bottom: 28px;
}
.quiz-bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--saffron), var(--gold));
  transition: width 0.4s ease;
}
.quiz-question { font-size: 1.35rem; line-height: 1.45; margin-bottom: 24px; }
.quiz-options { display: grid; gap: 12px; }
.quiz-option {
  text-align: left; font: inherit; color: var(--text);
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 18px; cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.quiz-option:hover:not(:disabled) { border-color: var(--gold); transform: translateX(4px); }
.quiz-option:disabled { cursor: default; opacity: 0.75; }
.quiz-option.correct {
  border-color: #6fbf85; background: rgba(80, 160, 105, 0.16);
  color: var(--text); opacity: 1;
}
.quiz-option.wrong {
  border-color: #d97a6a; background: rgba(196, 90, 72, 0.16);
  opacity: 1;
}
.quiz-feedback { margin-top: 22px; padding: 16px 18px; border-radius: 10px; }
.quiz-feedback.good { background: rgba(80, 160, 105, 0.10); border: 1px solid rgba(111, 191, 133, 0.4); }
.quiz-feedback.bad { background: rgba(196, 90, 72, 0.10); border: 1px solid rgba(217, 122, 106, 0.4); }
.quiz-verdict { font-weight: 600; margin-bottom: 6px; }
.quiz-feedback.good .quiz-verdict { color: #8fd2a3; }
.quiz-feedback.bad .quiz-verdict { color: #e89a8c; }
.quiz-why { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.quiz-next { margin-top: 24px; }
.quiz-result { text-align: center; }
.quiz-result-icon { font-size: 3rem; margin-bottom: 10px; }
.quiz-result-score {
  font-family: var(--serif); font-size: 3rem; color: var(--gold);
  line-height: 1; margin-bottom: 12px;
}
.quiz-result-title { font-size: 1.4rem; margin-bottom: 10px; }
.quiz-result-sub { color: var(--text-muted); margin-bottom: 8px; }
.quiz-result-best {
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin: 14px 0 24px;
}
@media (max-width: 640px) {
  .quiz-card { padding: 26px 20px 30px; }
  .quiz-question { font-size: 1.15rem; }
}

/* <button> elements styled as .btn (quiz controls): strip the native button
   appearance so the gold gradient renders from first paint, not just on hover. */
button.btn {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  line-height: inherit;
}
button.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--ember));
  color: #1c1206;
}
