@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Noto+Serif+Devanagari:wght@300;400;500&family=Space+Mono:wght@400;700&display=swap');

/* ── TOKENS ── */
:root {
  --bg:          #0f0e0b;
  --bg2:         #141210;
  --surface:     #1a1710;
  --card:        #1d1a13;
  --card2:       #221f17;
  --border:      rgba(196,154,68,0.13);
  --border-hi:   rgba(196,154,68,0.28);
  --gold:        #c49a44;
  --gold-hi:     #e0c070;
  --gold-dim:    rgba(196,154,68,0.07);
  --cream:       #e6dcc4;
  --cream-m:     #9e9278;
  --cream-d:     #5a5240;
  --teal:        #4e8888;
  --teal-hi:     #80b8b8;
  --text:        #ddd4bc;
  --text-m:      #857c68;
  --text-d:      #504840;
  --nav-h:       56px;
  --max:         720px;
  --pad:         clamp(1.25rem, 5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(16px, 2.4vw, 18px);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── NAV ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(15,14,11,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  gap: 1rem;
}
.nav-brand {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}
.nav-brand span { color: var(--cream-m); }

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0;
}
.nav-links li a {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-d);
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  transition: color 0.18s;
  white-space: nowrap;
}
.nav-links li a:hover { color: var(--cream-m); }
.nav-links li a.active { color: var(--gold); }

.lang-pill {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border-hi);
  border-radius: 100px;
  padding: 2px;
  gap: 1px;
  margin-left: 0.5rem;
}
.lang-pill a {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-decoration: none;
  color: var(--cream-d);
  transition: all 0.18s;
}
.lang-pill a.cur {
  background: var(--gold);
  color: var(--bg);
}
.lang-pill a:hover:not(.cur) { color: var(--gold); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--cream-m);
  transition: all 0.24s;
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border-hi);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 1rem;
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { padding: 0.65rem var(--pad); font-size: 10px; }
  .lang-pill { margin: 0.4rem var(--pad) 0; align-self: flex-start; }
}

/* ── PAGE ── */
.page { min-height: calc(100vh - var(--nav-h)); }

/* ── HERO ── */
.page-hero {
  padding: clamp(3rem,8vw,5.5rem) var(--pad) clamp(2.5rem,6vw,4rem);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: 'धर्म';
  font-family: 'Noto Serif Devanagari', serif;
  font-size: clamp(80px,20vw,160px);
  color: rgba(196,154,68,0.03);
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-55%);
  pointer-events: none;
  line-height: 1;
  user-select: none;
}
.hero-inner { max-width: var(--max); }

.sec-label {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 120px;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px,7vw,54px);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.08;
  margin-bottom: 0.5rem;
}
h1 em { color: var(--gold-hi); font-style: italic; }

.hero-sub {
  font-size: clamp(16px,2.8vw,19px);
  font-style: italic;
  color: var(--cream-m);
  margin-bottom: 1.5rem;
}
.hero-one-liner {
  font-size: clamp(14px,2.3vw,16px);
  color: var(--text-m);
  max-width: 540px;
  line-height: 1.7;
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
  margin-bottom: 2rem;
}
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.stat-n {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px,5vw,34px);
  font-weight: 700;
  color: var(--gold-hi);
  line-height: 1;
}
.stat-l {
  font-family: 'Space Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-m);
  margin-top: 2px;
}

/* ── SECTION ── */
section {
  padding: clamp(2.5rem,6vw,4rem) var(--pad);
  border-bottom: 1px solid var(--border);
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
}
section:last-of-type { border-bottom: none; }

h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px,4.5vw,30px);
  font-weight: 600;
  color: var(--cream);
  line-height: 1.18;
  margin-bottom: 1.25rem;
}
h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(16px,2.8vw,20px);
  font-weight: 600;
  color: var(--cream);
  margin: 1.75rem 0 0.65rem;
  line-height: 1.25;
}
h4 {
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 1.25rem 0 0.4rem;
}
p { color: var(--text); margin-bottom: 0.9rem; }
p:last-child { margin-bottom: 0; }
em { font-style: italic; color: var(--gold-hi); }
strong { font-weight: 500; color: var(--cream); }
a { color: var(--teal-hi); text-decoration: none; transition: color 0.18s; }
a:hover { color: var(--gold-hi); }

/* ── TWO-COL ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 580px) { .two-col { grid-template-columns: 1fr; } }

/* ── CALLOUT ── */
.callout {
  border-left: 2px solid var(--gold);
  padding: 1rem 1.35rem;
  background: var(--gold-dim);
  margin: 1.25rem 0;
  font-style: italic;
  color: var(--cream-m);
  font-size: clamp(14px,2.3vw,16px);
  line-height: 1.7;
}

/* ── CARD / INSET ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}
.inset {
  background: var(--surface);
  border-left: 2px solid var(--gold);
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
}

/* ── PHASE LIST (journey) ── */
.phase-list { display: grid; gap: 0; margin: 1.5rem 0; }
.phase-item {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.phase-item:last-child { border-bottom: none; }
.phase-marker { display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
.phase-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-hi);
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: var(--gold);
  flex-shrink: 0;
}
.phase-line { flex: 1; width: 1px; background: var(--border); margin-top: 5px; }
.phase-range {
  font-family: 'Space Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 0.07em;
  color: var(--gold);
  display: block;
  margin-bottom: 0.4rem;
}
.phase-content h3 { margin-top: 0; font-size: clamp(14px,2.5vw,17px); }
.phase-content p { font-size: clamp(13px,2.1vw,15px); color: var(--text-m); margin-bottom: 0.35rem; }
.phase-q { font-style: italic; color: var(--teal); font-size: clamp(12px,1.9vw,14px); }

/* ── CHAPTER GRID ── */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.ch-item {
  background: var(--card);
  padding: 0.55rem 0.85rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.ch-item:hover { background: var(--card2); }
.ch-n {
  font-family: 'Space Mono', monospace;
  font-size: 8.5px;
  color: var(--text-d);
  flex-shrink: 0;
}
.ch-title-sm {
  font-family: 'EB Garamond', serif;
  font-size: 13.5px;
  font-style: italic;
  color: var(--cream-m);
  line-height: 1.3;
}

/* ── SP LIST (why different) ── */
.sp-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  overflow: hidden;
  margin: 1.25rem 0;
}
.sp-item {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  align-items: start;
  transition: background 0.15s;
}
.sp-item:last-child { border-bottom: none; }
.sp-item:hover { background: var(--card2); }
.sp-n {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--border-hi);
  line-height: 1;
  padding-top: 2px;
  text-align: right;
}
.sp-body h4 { margin: 0 0 0.25rem; }
.sp-body p { margin: 0; font-size: clamp(12.5px,2vw,14.5px); color: var(--text-m); line-height: 1.6; }

/* ── BT SECTION ── */
.bt-distinction {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin: 1.25rem 0;
}
@media (max-width: 480px) { .bt-distinction { grid-template-columns: 1fr; } }
.bt-col { background: var(--card); padding: 1.1rem 1.25rem; }
.bt-col.deep h4 { color: var(--teal-hi); }
.bt-col ul { list-style: none; display: grid; gap: 0.25rem; margin-top: 0.5rem; }
.bt-col ul li {
  font-size: clamp(12.5px,2vw,14px);
  color: var(--text-m);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.bt-col ul li::before { content: '—'; position: absolute; left: 0; color: var(--text-d); }

.constructs-list {
  display: grid;
  gap: 1px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin: 1.25rem 0;
}
.construct-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  background: var(--card);
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.construct-item:last-child { border-bottom: none; }
.c-mark {
  font-family: 'Noto Serif Devanagari', serif;
  font-size: 18px;
  color: var(--gold);
  line-height: 1;
  padding-top: 1px;
}
.c-text strong { font-size: clamp(12.5px,2vw,14.5px); display: block; margin-bottom: 2px; color: var(--cream); }
.c-text span { font-size: clamp(11.5px,1.9vw,13px); color: var(--text-m); }

/* ── READER LIST ── */
.reader-list { list-style: none; display: grid; gap: 0.4rem; margin: 1rem 0; }
.reader-list li {
  font-size: clamp(13px,2.1vw,15px);
  color: var(--text-m);
  padding: 0.5rem 0.7rem 0.5rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
  line-height: 1.5;
}
.reader-list li::before {
  content: '◆';
  position: absolute;
  left: 0.55rem;
  color: var(--gold);
  font-size: 6.5px;
  top: 50%;
  transform: translateY(-50%);
}

/* ── DEVA DIVIDER ── */
.deva-div {
  text-align: center;
  font-family: 'Noto Serif Devanagari', serif;
  font-size: 18px;
  color: var(--border-hi);
  margin: 2rem 0;
  letter-spacing: 0.4em;
}

/* ── PILL ── */
.pill {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid;
}
.pill-gold { border-color: var(--gold); color: var(--gold-hi); background: var(--gold-dim); }
.pill-teal { border-color: var(--teal); color: var(--teal-hi); background: rgba(78,136,136,0.06); }
.pill-muted { border-color: var(--text-d); color: var(--text-m); background: transparent; }

/* ── BUTTON ── */
.btn {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.65rem 1.6rem;
  border: 1px solid var(--border-hi);
  color: var(--cream-m);
  background: var(--card);
  text-decoration: none;
  transition: all 0.18s;
  cursor: pointer;
}
.btn:hover { color: var(--gold-hi); border-color: var(--gold); background: var(--gold-dim); }
.btn-gold {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-hi); color: var(--bg); border-color: var(--gold-hi); }

/* ── FOOTER ── */
.site-footer {
  padding: 2.5rem var(--pad);
  border-top: 1px solid var(--border);
  background: var(--bg2);
  max-width: calc(var(--max) + 2 * var(--pad));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.footer-brand {
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-text {
  font-size: clamp(11px, 1.8vw, 12.5px);
  color: var(--text-d);
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.05em;
}

/* ── FADE-IN ── */
.fi {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fi.visible { opacity: 1; transform: translateY(0); }
.fi-2 { transition-delay: 0.1s; }
.fi-3 { transition-delay: 0.2s; }
