/* ============================================================
   THE HINDU WAY OF LIFE — Sacred Design System
   Dark cosmic palette · Gold glow typography · Divine geometry
   ============================================================ */

/* === CSS CUSTOM PROPERTIES === */
:root {
  --void:        #04020a;
  --deep:        #080412;
  --surface:     #0e061c;
  --rim:         #2a1045;
  --rim-soft:    rgba(42, 16, 69, 0.5);
  --gold:        #c9a227;
  --gold-bright: #ffd700;
  --gold-pale:   #f0dda0;
  --gold-dim:    #7a6218;
  --saffron:     #e07a1a;
  --crimson:     #b81428;
  --text:        #ede0c8;
  --text-mid:    #c0a880;
  --text-dim:    #7a6050;
  --glow-g:      rgba(201, 162, 39, 0.5);
  --glow-gs:     rgba(201, 162, 39, 0.18);
  --glow-s:      rgba(224, 122, 26, 0.4);
}

/* === BASE === */
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--void);
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.9;
}

/* Cosmic ambient glow — fixed so it doesn't scroll */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 15% 15%,  rgba(55, 10, 95, 0.3)  0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 85% 85%,  rgba(90, 10, 25, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 50% 50%,  rgba(20, 5,  50, 0.4)  0%, transparent 80%);
  pointer-events: none;
}

/* === NAVIGATION === */
.site-nav {
  z-index: 20;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.6s ease, border-color 0.6s ease, backdrop-filter 0.6s ease;
}

.site-nav.in-body {
  background: rgba(6, 3, 15, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--rim);
  box-shadow: 0 2px 40px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(201, 162, 39, 0.12);
  animation: none;
  opacity: 1;
}

.navbar-brand {
  font-family: 'Cinzel Decorative', 'Palatino Linotype', serif !important;
  font-size: 13px !important;  /* px — never scales with font-size buttons */
  letter-spacing: 0.22em;
  word-spacing: 0.18em;
  font-kerning: none;
  color: var(--gold) !important;
  text-shadow: 0 0 18px var(--glow-g), 0 0 40px rgba(201, 162, 39, 0.25);
  transition: text-shadow 0.35s ease;
}

.navbar-brand:hover {
  color: var(--gold-bright) !important;
  text-shadow: 0 0 28px rgba(255, 215, 0, 0.9), 0 0 60px rgba(201, 162, 39, 0.5);
}

.site-nav .nav-link {
  font-family: 'Cinzel', 'Palatino Linotype', serif;
  font-size: 10px !important;  /* px — never scales */
  letter-spacing: 0.28em;
  color: var(--text-dim) !important;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  position: relative;
  padding-bottom: 5px !important;
}

.site-nav .nav-link:hover {
  color: var(--gold-bright) !important;
  text-shadow: 0 0 14px var(--glow-g);
}

/* Animated gold underline replaces old ::before */
.site-nav .nav-link::before { display: none; }
.site-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  transition: transform 0.35s cubic-bezier(0.03, 0.78, 0.4, 1.2);
}
.site-nav .nav-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* Gold hamburger on mobile */
.navbar-toggler {
  border-color: var(--gold-dim) !important;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28201%2C162%2C39%2C0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* === HERO SECTION (deity pages) === */
.site-header {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(175deg,
    #0c0421 0%,
    #17052e 22%,
    #0b0220 50%,
    #04020a 100%
  );
}

/* Background artwork layer — dimmed + blurred so hero text stays readable */
.site-header::before {
  content: '';
  position: absolute;
  inset: -8px;          /* bleed edge to hide blur fringe */
  z-index: 1;
  background-image: url(../images/hero.svg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: bottom center;
  opacity: 0;
  transform: translateY(300px) scale(1.15);
  animation: clear 0.9s 0.15s forwards;
  filter: saturate(0.6) hue-rotate(15deg) brightness(0.42) blur(2px);
  mix-blend-mode: luminosity;
}

/* Dark scrim + radial glow overlay */
.site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg,
      rgba(4, 2, 10, 0.72) 0%,
      rgba(4, 2, 10, 0.35) 45%,
      rgba(4, 2, 10, 0.65) 100%
    ),
    radial-gradient(ellipse 55% 45% at 50% 65%, rgba(160, 85, 15, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 35% 30% at 25% 25%, rgba(70, 15, 130, 0.22) 0%, transparent 65%),
    radial-gradient(ellipse 30% 22% at 75% 70%, rgba(130, 10, 25, 0.12) 0%, transparent 65%);
  pointer-events: none;
}

.site-header .header-content {
  position: relative;
  z-index: 5;
}

.site-header .header-title {
  font-family: 'Cinzel Decorative', 'Palatino Linotype', serif;
  font-size: clamp(30px, 5.5vw, 72px);  /* px — constant, not scaled by font buttons */
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.18em;
  word-spacing: 0.2em;
  font-kerning: none;
  background: linear-gradient(135deg,
    #fffad0 0%,
    #ffd700 20%,
    #c9a227 48%,
    #f0d98c 72%,
    #ffd700 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: clear 0.9s 0.4s forwards;
  transform: translateY(8rem);
  opacity: 0;
  filter: drop-shadow(0 0 45px rgba(255, 215, 0, 0.55));
}

.site-header .header-subtitle {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(17px, 2.4vw, 24px);  /* px — constant */
  font-weight: 400;
  font-style: italic;
  color: rgba(237, 224, 200, 0.9);
  line-height: 2;
  letter-spacing: 0.06em;
  word-spacing: 0.1em;
  animation: clear 1s 0.75s forwards;
  transform: translateY(8rem);
  opacity: 0;
}

.site-header .header-cue {
  position: absolute;
  bottom: 0;
  z-index: 10;
  overflow: hidden;
  background: transparent !important;
  animation: clear 0.6s 1.6s forwards;
  transform: translateY(2rem);
  opacity: 0;
  width: 100%;
  text-align: center;
  padding: 0.75rem 1rem 1.25rem;
  cursor: pointer;
  text-decoration: none !important;
  transition: opacity 0.3s ease;
}

.site-header .header-cue:hover {
  opacity: 0.8;
}

.site-header .header-cue-icon {
  display: inline-block;
  color: var(--gold) !important;
  font-size: 1.6rem;
  animation: slide-down 0.5s 1.9s forwards, pulse 2.5s 4.2s ease-in-out infinite;
  transform: translateY(-2rem);
  opacity: 0;
  text-shadow: 0 0 20px var(--glow-g), 0 0 40px rgba(201, 162, 39, 0.3);
  transition: text-shadow 0.3s ease, transform 0.2s ease;
}

.site-header .header-cue:hover .header-cue-icon {
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.9), 0 0 60px rgba(201, 162, 39, 0.5);
  transform: translateY(3px);
  animation-play-state: paused;
}

/* === CONTENT-START SPACER (WoL section pages) === */
/* px — must not grow when font-size buttons increase text */
#content-start {
  height: 70px;
}

/* === PAGE SECTIONS === */
.page-section {
  position: relative;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.page-section:nth-child(even) {
  background: linear-gradient(180deg, rgba(14, 6, 28, 0.55) 0%, transparent 100%);
}

/* Thin gold rule + Om ornament between sections */
.page-section + .page-section {
  border-top: 1px solid var(--rim-soft);
}

.page-section + .page-section::before {
  content: '✦  ॐ  ✦';
  display: block;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.6em;
  color: var(--gold);
  opacity: 0.38;
  text-shadow: 0 0 14px var(--glow-g);
  margin-bottom: 2rem;
  font-family: serif;
}

/* === HEADINGS === */
.page-section-title {
  font-family: 'Cinzel', 'Palatino Linotype', serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  margin-top: 2.5rem;
}

h2.page-section-title {
  font-family: 'Cinzel Decorative', 'Palatino Linotype', serif;
  font-size: clamp(24px, 3.5vw, 38px);  /* px — stays large and constant */
  letter-spacing: 0.15em;
  word-spacing: 0.15em;
  font-kerning: none;
  background: linear-gradient(135deg,
    #fffad0 0%,
    #ffd700 25%,
    #c9a227 55%,
    #f0d98c 80%,
    #ffd700 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 14px rgba(201, 162, 39, 0.6));
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rim);
  margin-top: 0;
  margin-bottom: 2.5rem;
}

h3.page-section-title {
  font-size: clamp(18px, 2.5vw, 26px);  /* px — constant */
  color: var(--saffron);
  text-shadow: 0 0 22px var(--glow-s);
}

/* === BODY TEXT === */
.page-section-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.95;
  color: var(--text);
  margin-bottom: 1.6rem;
}

.page-section-text em {
  color: var(--gold-pale);
  font-style: italic;
}

.page-section-text strong {
  color: var(--saffron);
  font-weight: 600;
}

/* === LINKS === */
a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

a:hover {
  color: var(--gold-bright);
  text-shadow: 0 0 16px var(--glow-g);
}

.page-section-text ol li a {
  font-style: italic;
  word-break: break-all;
  font-size: 0.95rem;
}

/* === BLOCKQUOTES === */
blockquote {
  position: relative;
  text-align: left;
  padding: 2.2em 2.5em 2.2em 3.5em;
  border: none;
  margin: 2.5rem auto;
  max-width: 840px;
  width: 100%;
  display: block;
  background:
    linear-gradient(135deg,
      rgba(28, 10, 55, 0.82) 0%,
      rgba(12, 5, 24, 0.65) 100%
    );
  border-left: 2px solid var(--gold);
  border-top: 1px solid rgba(201, 162, 39, 0.2);
  border-bottom: 1px solid rgba(201, 162, 39, 0.1);
  border-radius: 0 16px 16px 0;
  box-shadow:
    -8px 0 30px rgba(201, 162, 39, 0.4),
    0 8px 50px rgba(0, 0, 0, 0.6),
    inset 0 0 80px rgba(201, 162, 39, 0.02);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.28rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text);
  line-height: 2;
}

blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.1em;
  left: 0.2em;
  font-family: 'Cinzel Decorative', serif;
  font-size: 6rem;
  color: var(--gold);
  opacity: 0.15;
  line-height: 1;
  pointer-events: none;
  font-style: normal;
}

blockquote::after { content: none; }

blockquote > cite,
blockquote > p > cite {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  font-style: normal;
  margin-top: 1.2em;
  color: var(--gold-pale);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* === LISTS === */
ol, ul {
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  line-height: 2;
  padding-left: 1.8rem;
}

li { margin-bottom: 0.5rem; }

ol li::marker {
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.88em;
}

ul li::marker { color: var(--gold); }

/* Reference block */
.page-section-text ol {
  border-left: 1px solid var(--rim);
  padding-left: 2rem;
  margin-top: 0.5rem;
}

/* Path-towards-fulfillment nav list */
#page-youcannothavepoweroverother ul {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.6rem 2.5rem;
  margin-top: 1rem;
}

#page-youcannothavepoweroverother ul li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

#page-youcannothavepoweroverother ul li::before {
  content: '✦';
  color: var(--gold);
  font-size: 0.6rem;
  flex-shrink: 0;
  margin-top: 0.1em;
}

#page-youcannothavepoweroverother ul li a {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-mid);
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
  padding-bottom: 1px;
  transition: color 0.25s, text-shadow 0.25s, border-color 0.25s;
}

#page-youcannothavepoweroverother ul li a:hover {
  color: var(--gold-bright);
  text-shadow: 0 0 14px var(--glow-g);
  border-color: var(--gold);
}

/* === AUTHORS === */
div .page-section-author {
  font-weight: 600;
  color: var(--crimson);
  text-shadow: 0 0 12px rgba(184, 20, 40, 0.45);
}

/* === SCROLL-TO-TOP BUTTON === */
#topBtn {
  display: none;
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99;
  border: 1px solid rgba(201, 162, 39, 0.55);
  outline: none;
  background: rgba(6, 3, 14, 0.88);
  color: var(--gold);
  cursor: pointer;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.45rem;
  line-height: 54px;
  text-align: center;
  box-shadow: 0 0 20px rgba(201, 162, 39, 0.28), 0 6px 24px rgba(0, 0, 0, 0.7);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#topBtn:hover {
  background: rgba(201, 162, 39, 0.14);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow:
    0 0 38px rgba(255, 215, 0, 0.6),
    0 0 80px rgba(201, 162, 39, 0.2),
    0 6px 24px rgba(0, 0, 0, 0.7);
  transform: translateY(-5px);
}

/* === NAV BRAND OM SYMBOL === */
.nav-brand-om {
  font-family: serif;
  font-size: 1.2em;
  line-height: 1;
  margin-right: 0.5rem;
  letter-spacing: 0;
  vertical-align: middle;
  opacity: 0.9;
  display: inline-block;
}

/* Separator between language buttons and font-size controls */
.nav-sep {
  display: inline-block;
  color: var(--rim);
  margin: 0 4px;
  vertical-align: middle;
  font-size: 0.75rem;
  line-height: 1;
  opacity: 0.7;
  pointer-events: none;
}

/* === FONT SIZE CONTROLS === */
.btn-font-size {
  background: transparent;
  border: 1px solid var(--rim);
  color: var(--text-dim);
  font-family: 'Cinzel', serif;
  font-size: 9px;  /* px — constant */
  letter-spacing: 0.06em;
  padding: 3px 8px;  /* px — constant */
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
  vertical-align: middle;
}

.btn-font-size:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 162, 39, 0.1);
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.2);
}

.btn-font-size:disabled {
  opacity: 0.25;
  cursor: default;
}

/* === LANGUAGE BUTTONS === */
.btn-primary {
  background: transparent !important;
  border: 1px solid var(--gold) !important;
  color: var(--gold) !important;
  font-family: 'Cinzel', serif;
  font-size: 10px !important;  /* px — constant */
  letter-spacing: 0.1em;
  padding: 4px 10px !important;
  transition: all 0.3s ease !important;
  border-radius: 3px !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background: rgba(201, 162, 39, 0.15) !important;
  box-shadow: 0 0 16px rgba(201, 162, 39, 0.38) !important;
  color: var(--gold-bright) !important;
}

.btn-dark {
  background: transparent !important;
  border: 1px solid var(--rim) !important;
  color: var(--text-dim) !important;
  font-family: 'Cinzel', serif;
  font-size: 10px !important;  /* px — constant */
  padding: 4px 10px !important;  /* px — constant */
  transition: all 0.3s ease !important;
  border-radius: 3px !important;
}

.btn-dark:hover,
.btn-dark:focus {
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  background: rgba(201, 162, 39, 0.08) !important;
}

/* === FOOTER === */
#footer {
  background: linear-gradient(180deg, var(--deep) 0%, #020109 100%);
  border-top: 1px solid var(--rim);
  padding: 2.8rem 1.5rem 2rem;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 11px;  /* px — constant */
  letter-spacing: 0.22em;
  color: var(--text-dim);
}

#footer::before {
  content: '✦  ॐ  ✦';
  display: block;
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.55em;
  margin-bottom: 1.2rem;
  opacity: 0.42;
  text-shadow: 0 0 18px var(--glow-g);
  font-family: serif;
}

#footer a {
  color: var(--gold);
  transition: all 0.3s ease;
}

#footer a:hover {
  color: var(--gold-bright);
  text-shadow: 0 0 14px var(--glow-g);
}

/* === SECTION ILLUSTRATION === */
.section-illustration {
  margin: 2rem 0 2.5rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--rim);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 162, 39, 0.06);
}
.section-illustration img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
  opacity: 0.92;
  transition: opacity 0.4s ease, transform 0.5s ease;
}
.section-illustration:hover img {
  opacity: 1;
  transform: scale(1.012);
}

/* === APPEAR ANIMATION === */
.appear {
  animation: clear 1s 0.3s forwards;
  opacity: 0;
  transform: translateY(1.2rem);
}

#friend { z-index: 15; overflow: hidden; }

/* === KEYFRAMES === */
@keyframes clear {
  to { opacity: 1; transform: none; }
}

@keyframes slide-down {
  from { transform: translateY(-2rem); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.68); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .page-section-text { font-size: 1.05rem; }
  blockquote {
    padding: 1.6em 1.4em 1.6em 2em;
    font-size: 1.08rem;
  }
  #page-youcannothavepoweroverother ul {
    grid-template-columns: 1fr;
  }
}
