/* ========================================
   THOTTUNGAL KUDUMBAM — Design System v2
   Dark Heritage Theme · Gold Accents
   All Unique Components
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Inter:wght@300;400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Background */
  --bg-deep: #0a0a12;
  --bg-primary: #0f1019;
  --bg-secondary: #161625;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;

  /* Gold Palette */
  --gold: #c9a84c;
  --gold-light: #e0c872;
  --gold-dark: #a07c2a;
  --gold-glow: rgba(201, 168, 76, 0.3);
  --gold-subtle: rgba(201, 168, 76, 0.08);

  /* Text */
  --text-primary: #f0ece2;
  --text-secondary: #b8b0a0;
  --text-muted: #7a7468;
  --text-gold: #d4b85c;

  /* Glass */
  --glass-bg: rgba(26, 26, 46, 0.6);
  --glass-border: rgba(201, 168, 76, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Fonts */
  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-accent: 'Cormorant Garamond', 'Georgia', serif;

  /* Spacing */
  --sp-xs: .5rem;
  --sp-sm: 1rem;
  --sp-md: 1.5rem;
  --sp-lg: 2.5rem;
  --sp-xl: 4rem;
  --sp-2xl: 6rem;
  --sp-3xl: 8rem;

  /* Radius */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 30px;

  /* Transitions */
  --t-fast: .2s cubic-bezier(.4, 0, .2, 1);
  --t-smooth: .4s cubic-bezier(.4, 0, .2, 1);
  --t-slow: .7s cubic-bezier(.4, 0, .2, 1);

  --max-w: 1200px;
}

/* ---------- Light Theme ---------- */
[data-theme="light"] {
  --bg-deep: #f5f2eb;
  --bg-primary: #ece8df;
  --bg-secondary: #e3ddd3;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f5ef;
  --gold: #9a7b2e;
  --gold-light: #b8952e;
  --gold-dark: #7a5e1e;
  --gold-glow: rgba(154, 123, 46, 0.25);
  --gold-subtle: rgba(154, 123, 46, 0.06);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4640;
  --text-muted: #8a8478;
  --text-gold: #8a6b24;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(154, 123, 46, 0.2);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dark) var(--bg-deep)
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .5s, color .5s
}

::-webkit-scrollbar {
  width: 8px
}

::-webkit-scrollbar-track {
  background: var(--bg-deep)
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--t-fast)
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

ul,
ol {
  list-style: none
}

button {
  font-family: inherit;
  cursor: pointer
}

/* ---------- Utilities ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-md)
}

.sec-pad {
  padding: var(--sp-3xl) 0
}

.gold-line {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: var(--sp-sm) auto var(--sp-lg)
}

.sec-sub {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  color: var(--text-gold);
  text-transform: uppercase;
  letter-spacing: 4px;
  font-weight: 500;
  margin-bottom: var(--sp-xs)
}

.sec-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2
}

.sec-header {
  text-align: center;
  margin-bottom: var(--sp-xl)
}

/* ---------- Reveal Animations ---------- */
.rv {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s cubic-bezier(.4, 0, .2, 1), transform .8s cubic-bezier(.4, 0, .2, 1)
}

.rv.on {
  opacity: 1;
  transform: translateY(0)
}

.rv-l {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity .8s cubic-bezier(.4, 0, .2, 1), transform .8s cubic-bezier(.4, 0, .2, 1)
}

.rv-l.on {
  opacity: 1;
  transform: translateX(0)
}

.rv-r {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity .8s cubic-bezier(.4, 0, .2, 1), transform .8s cubic-bezier(.4, 0, .2, 1)
}

.rv-r.on {
  opacity: 1;
  transform: translateX(0)
}

.rv-s {
  opacity: 0;
  transform: scale(.85);
  transition: opacity .8s cubic-bezier(.4, 0, .2, 1), transform .8s cubic-bezier(.4, 0, .2, 1)
}

.rv-s.on {
  opacity: 1;
  transform: scale(1)
}

.d1 {
  transition-delay: .1s
}

.d2 {
  transition-delay: .2s
}

.d3 {
  transition-delay: .3s
}

.d4 {
  transition-delay: .4s
}

.d5 {
  transition-delay: .5s
}

.d6 {
  transition-delay: .6s
}

.d7 {
  transition-delay: .7s
}

.d8 {
  transition-delay: .8s
}

.d9 {
  transition-delay: .9s
}

.d10 {
  transition-delay: 1s
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--sp-sm) 0;
  transition: all var(--t-smooth)
}

.navbar.scrolled {
  background: rgba(10, 10, 18, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: .6rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, .3)
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(245, 242, 235, .92)
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm)
}

.nav-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--bg-deep);
  flex-shrink: 0
}

.nav-brand-text {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: .5px
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-xs)
}

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: .5rem 1rem;
  border-radius: var(--r-sm);
  position: relative;
  letter-spacing: .3px
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transition: width var(--t-smooth)
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold)
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 60%
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-smooth);
  color: var(--gold);
  font-size: 1.1rem;
  flex-shrink: 0
}

.theme-toggle:hover {
  border-color: var(--gold);
  background: var(--gold-subtle)
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
  z-index: 1001
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: all var(--t-fast)
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px)
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px)
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--sp-sm)
}

/* ========================================
   HERO
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, #141428 0%, var(--bg-deep) 70%)
}

[data-theme="light"] .hero {
  background: radial-gradient(ellipse at 50% 50%, #e8e4da 0%, var(--bg-deep) 70%)
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: radial-gradient(ellipse at center, transparent 40%, var(--bg-deep) 100%)
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  z-index: 3;
  opacity: .15;
  border: 2px solid var(--gold)
}

.hero::before {
  top: 40px;
  left: 40px;
  border-right: none;
  border-bottom: none
}

.hero::after {
  bottom: 40px;
  right: 40px;
  border-left: none;
  border-top: none
}

.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 800px;
  padding: 0 var(--sp-md)
}

.hero-crest {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--sp-lg);
  position: relative
}

.hero-crest-inner {
  width: 100%;
  height: 100%;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: crestGlow 3s ease-in-out infinite
}

.hero-crest-inner svg {
  width: 50px;
  height: 50px;
  fill: var(--gold)
}

@keyframes crestGlow {

  0%,
  100% {
    box-shadow: 0 0 20px var(--gold-glow), inset 0 0 20px rgba(201, 168, 76, .05)
  }

  50% {
    box-shadow: 0 0 40px var(--gold-glow), inset 0 0 30px rgba(201, 168, 76, .1)
  }
}

.hero-label {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 8px;
  margin-bottom: var(--sp-sm);
  opacity: 0;
  animation: fadeUp 1s .5s forwards
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--sp-md);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold-light) 50%, var(--text-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite, fadeUp 1s .7s forwards;
  opacity: 0
}

@keyframes shimmer {
  0% {
    background-position: 200% center
  }

  100% {
    background-position: -200% center
  }
}

.hero-tagline {
  font-family: var(--font-accent);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--sp-xl);
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp 1s .9s forwards
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 1rem 2.5rem;
  border: 1px solid var(--gold);
  border-radius: var(--r-xl);
  color: var(--gold);
  font-family: var(--font-accent);
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: transparent;
  transition: all var(--t-smooth);
  opacity: 0;
  animation: fadeUp 1s 1.1s forwards
}

.hero-cta:hover {
  background: var(--gold);
  color: var(--bg-deep);
  box-shadow: 0 0 30px var(--gold-glow)
}

.hero-cta .arrow-down {
  display: inline-block;
  animation: bounce 2s infinite
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0)
  }

  40% {
    transform: translateY(6px)
  }

  60% {
    transform: translateY(3px)
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}



/* ========================================
   STATS BAR
   ======================================== */
.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  padding: var(--sp-xl) 0
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
  text-align: center
}

.stat-item {
  padding: var(--sp-md)
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: var(--sp-xs)
}

.stat-label {
  font-family: var(--font-accent);
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 3px
}

.stat-item::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold-glow);
  margin: var(--sp-sm) auto 0
}

/* ========================================
   HERITAGE MAP
   ======================================== */
.heritage-map {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden
}

.map-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl);
  align-items: center
}

.map-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1.2;
  max-width: 500px;
  margin: 0 auto
}

.map-svg-container {
  width: 100%;
  height: 100%;
  position: relative
}

.map-svg-container svg {
  width: 100%;
  height: 100%
}

/* Map pin styles */
.map-pin {
  cursor: pointer;
  transition: all var(--t-smooth)
}

.map-pin:hover .pin-dot {
  r: 8;
  fill: var(--gold)
}

.pin-dot {
  transition: all var(--t-smooth)
}

.pin-pulse {
  animation: pinPulse 2s infinite
}

@keyframes pinPulse {
  0% {
    r: 6;
    opacity: .6
  }

  50% {
    r: 14;
    opacity: 0
  }

  100% {
    r: 6;
    opacity: 0
  }
}

/* Migration path animation */
.migration-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 3s ease-in-out
}

.migration-path.animate {
  stroke-dashoffset: 0
}

.map-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg)
}

.map-info-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  transition: all var(--t-smooth)
}

.map-info-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px)
}

.map-info-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: var(--sp-xs)
}

.map-info-card p {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.8
}

.map-legend {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  margin-top: var(--sp-sm)
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--text-muted)
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%
}

.legend-dot.origin {
  background: #e06050
}

.legend-dot.settled {
  background: var(--gold)
}

.legend-dot.church {
  background: #6ca0dc
}

/* ========================================
   HISTORY TIMELINE (PARALLAX)
   ======================================== */
.history {
  background: var(--bg-deep);
  position: relative;
  overflow: hidden
}

.history::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 20%, rgba(201, 168, 76, .03) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(201, 168, 76, .03) 0%, transparent 50%);
  pointer-events: none
}

/* Parallax wrapper */
.parallax-history {
  position: relative
}

.parallax-bg {
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: calc(100% + 100px);
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
  will-change: transform
}

.timeline {
  position: relative;
  padding: var(--sp-lg) 0;
  z-index: 1
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--gold), var(--gold), transparent);
  opacity: .3
}

.tl-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--sp-xl);
  position: relative
}

.tl-item:nth-child(odd) {
  flex-direction: row
}

.tl-item:nth-child(even) {
  flex-direction: row-reverse
}

.tl-content {
  width: 45%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  transition: all var(--t-smooth)
}

.tl-content:hover {
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(201, 168, 76, .08);
  transform: translateY(-4px)
}

.tl-item:nth-child(odd) .tl-content {
  margin-right: auto
}

.tl-item:nth-child(even) .tl-content {
  margin-left: auto
}

.tl-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 3px solid var(--gold);
  z-index: 2;
  transition: all var(--t-smooth)
}

.tl-item:hover .tl-dot {
  background: var(--gold);
  box-shadow: 0 0 20px var(--gold-glow)
}

.tl-year {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: var(--sp-xs)
}

.tl-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--sp-xs)
}

.tl-text {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.8
}

/* Audio narration toggle */
.narration-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .6rem 1.4rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  color: var(--text-secondary);
  font-size: .85rem;
  cursor: pointer;
  transition: all var(--t-smooth);
  margin-bottom: var(--sp-lg)
}

.narration-toggle:hover,
.narration-toggle.active {
  border-color: var(--gold);
  color: var(--gold)
}

.narration-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor
}

.narration-toggle.active .audio-bars span {
  animation: audioBar .8s infinite alternate
}

.audio-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px
}

.audio-bars span {
  display: block;
  width: 3px;
  background: currentColor;
  border-radius: 1px;
  height: 4px
}

.audio-bars span:nth-child(1) {
  animation-delay: 0s
}

.audio-bars span:nth-child(2) {
  animation-delay: .15s
}

.audio-bars span:nth-child(3) {
  animation-delay: .3s
}

.audio-bars span:nth-child(4) {
  animation-delay: .1s
}

@keyframes audioBar {
  0% {
    height: 4px
  }

  100% {
    height: 14px
  }
}

.history-readmore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--sp-md);
  padding: .7rem 1.8rem;
  border: 1px solid var(--gold);
  border-radius: var(--r-xl);
  color: var(--gold);
  font-family: var(--font-accent);
  font-size: 1rem;
  letter-spacing: 1px;
  transition: all var(--t-smooth);
  background: transparent
}

.history-readmore:hover {
  background: var(--gold);
  color: var(--bg-deep)
}

/* ========================================
   FAMILY TREE (Interactive)
   ======================================== */
.family-tree {
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden
}

.family-tree::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(201, 168, 76, .04) 0%, transparent 70%);
  pointer-events: none
}

.tree-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-lg)
}

/* Patriarch */
.tree-root {
  text-align: center;
  position: relative
}

.patriarch {
  background: linear-gradient(135deg, rgba(201, 168, 76, .15), rgba(201, 168, 76, .05));
  border: 2px solid var(--gold);
  border-radius: var(--r-lg);
  padding: var(--sp-lg) var(--sp-xl);
  position: relative;
  overflow: hidden;
  transition: all var(--t-smooth)
}

.patriarch::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(201, 168, 76, .1), transparent 30%);
  animation: rotateBg 8s linear infinite
}

@keyframes rotateBg {
  100% {
    transform: rotate(360deg)
  }
}

.patriarch:hover {
  box-shadow: 0 0 50px rgba(201, 168, 76, .15)
}

.patriarch-name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  position: relative;
  z-index: 1
}

.patriarch-sub {
  font-family: var(--font-accent);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 4px;
  position: relative;
  z-index: 1
}

.tree-line-v {
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, var(--gold), var(--gold-glow));
  position: relative
}

.tree-line-v::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 15px var(--gold-glow)
}

.tree-line-h {
  width: 80%;
  max-width: 900px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), var(--gold), transparent);
  opacity: .3
}

/* Branch cards */
.branches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-md);
  width: 100%;
  max-width: 1100px
}

.branch {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-sm);
  text-align: center;
  cursor: pointer;
  transition: all var(--t-smooth);
  position: relative;
  overflow: hidden
}

.branch::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity var(--t-smooth)
}

.branch:hover::before {
  opacity: 1
}

.branch:hover {
  border-color: var(--gold);
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(201, 168, 76, .12);
  background: rgba(26, 26, 46, .8)
}

[data-theme="light"] .branch:hover {
  background: rgba(255, 255, 255, .9)
}

.branch-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto var(--sp-sm);
  border-radius: 50%;
  background: var(--gold-subtle);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-smooth)
}

.branch:hover .branch-icon {
  background: var(--gold);
  border-color: var(--gold)
}

.branch-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--gold);
  transition: fill var(--t-smooth)
}

.branch:hover .branch-icon svg {
  fill: var(--bg-deep)
}

.branch-name {
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .5px
}

.branch-sub {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: var(--font-accent)
}

/* Expanded branch detail panel */
.branch-detail {
  display: none;
  width: 100%;
  max-width: 800px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--gold);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  margin-top: var(--sp-md);
  position: relative;
  animation: slideIn .4s ease-out
}

.branch-detail.active {
  display: block
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.branch-detail-close {
  position: absolute;
  top: var(--sp-md);
  right: var(--sp-md);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-subtle);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-smooth);
  color: var(--text-secondary);
  font-size: 1.2rem
}

.branch-detail-close:hover {
  border-color: var(--gold);
  color: var(--gold)
}

.branch-detail h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: var(--sp-sm)
}

.branch-detail p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: .95rem
}

/* ========================================
   QUOTE WALL
   ======================================== */
.quote-wall {
  background: var(--bg-deep);
  position: relative;
  overflow: hidden
}

.quote-wall::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 30% 50%, rgba(201, 168, 76, .03), transparent 60%);
  pointer-events: none
}

.quotes-marquee {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  overflow: hidden
}

.quotes-row {
  display: flex;
  gap: var(--sp-md);
  animation: marquee 30s linear infinite;
  width: max-content
}

.quotes-row:nth-child(2) {
  animation-direction: reverse;
  animation-duration: 35s
}

.quotes-row:hover {
  animation-play-state: paused
}

@keyframes marquee {
  0% {
    transform: translateX(0)
  }

  100% {
    transform: translateX(-50%)
  }
}

.quote-card {
  flex-shrink: 0;
  width: 320px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  transition: all var(--t-smooth);
  position: relative
}

.quote-card:hover {
  border-color: var(--gold);
  transform: scale(1.02)
}

.quote-card::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 15px;
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--gold);
  opacity: .2;
  line-height: 1
}

.quote-text {
  font-family: var(--font-accent);
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: var(--sp-sm);
  padding-top: var(--sp-sm)
}

.quote-author {
  font-size: .85rem;
  color: var(--gold);
  font-weight: 500
}

.quote-relation {
  font-size: .8rem;
  color: var(--text-muted)
}

/* ========================================
   COUNTDOWN / EVENTS
   ======================================== */
.events-section {
  background: var(--bg-primary);
  position: relative
}

/* Countdown */
.countdown-wrap {
  background: linear-gradient(135deg, rgba(201, 168, 76, .08), rgba(201, 168, 76, .02));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  text-align: center;
  margin-bottom: var(--sp-xl);
  position: relative;
  overflow: hidden
}

.countdown-wrap::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: var(--r-lg);
  background: linear-gradient(45deg, var(--gold), transparent, var(--gold), transparent);
  background-size: 400% 400%;
  animation: borderGlow 6s linear infinite;
  z-index: -1;
  opacity: .3
}

@keyframes borderGlow {
  0% {
    background-position: 0% 50%
  }

  50% {
    background-position: 100% 50%
  }

  100% {
    background-position: 0% 50%
  }
}

.countdown-event-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-xs)
}

.countdown-event-date {
  font-family: var(--font-accent);
  font-size: 1rem;
  color: var(--text-gold);
  margin-bottom: var(--sp-lg);
  letter-spacing: 2px
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: var(--sp-lg);
  flex-wrap: wrap
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px
}

.cd-num {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  transition: all var(--t-fast)
}

.cd-num.tick {
  animation: cdTick .4s ease-out
}

@keyframes cdTick {
  0% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.15)
  }

  100% {
    transform: scale(1)
  }
}

.cd-label {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: var(--sp-xs)
}

.cd-separator {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--gold);
  opacity: .3;
  align-self: flex-start;
  margin-top: .5rem;
  line-height: 1
}

/* Event cards */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--sp-lg)
}

.ev-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t-smooth)
}

.ev-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: var(--glass-shadow), 0 0 30px rgba(201, 168, 76, .08)
}

.ev-header {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  padding: var(--sp-md);
  position: relative;
  overflow: hidden
}

.ev-header::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, .1) 0%, transparent 60%)
}

.ev-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(8px);
  border-radius: var(--r-md);
  padding: .8rem 1.2rem;
  position: relative;
  z-index: 1
}

.ev-day {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--bg-deep);
  line-height: 1
}

.ev-month {
  font-size: .8rem;
  font-weight: 600;
  color: var(--bg-deep);
  text-transform: uppercase;
  letter-spacing: 2px
}

.ev-body {
  padding: var(--sp-lg)
}

.ev-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: var(--sp-xs)
}

.ev-time {
  font-family: var(--font-accent);
  font-size: .95rem;
  color: var(--gold);
  margin-bottom: var(--sp-sm);
  display: flex;
  align-items: center;
  gap: 6px
}

.ev-desc {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.8
}

.ev-loc {
  margin-top: var(--sp-sm);
  padding-top: var(--sp-sm);
  border-top: 1px solid rgba(201, 168, 76, .1);
  font-size: .85rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px
}

.ev-loc svg {
  width: 16px;
  height: 16px;
  fill: var(--gold);
  flex-shrink: 0;
  margin-top: 2px
}

/* ========================================
   ON THIS DAY
   ======================================== */
.on-this-day {
  background: var(--bg-secondary);
  overflow: hidden
}

.otd-card {
  max-width: 700px;
  margin: 0 auto;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  text-align: center;
  position: relative
}

.otd-card::before {
  content: '📅';
  font-size: 2.5rem;
  display: block;
  margin-bottom: var(--sp-sm)
}

.otd-date {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: var(--sp-sm)
}

.otd-event {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.7
}

.otd-empty {
  color: var(--text-muted);
  font-style: italic
}

/* ========================================
   COMMITTEE
   ======================================== */
.committee {
  background: var(--bg-primary)
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-lg)
}

.member {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl) var(--sp-lg);
  text-align: center;
  transition: all var(--t-smooth);
  position: relative;
  overflow: hidden
}

.member::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
  opacity: 0;
  transition: opacity var(--t-smooth)
}

.member:hover::before {
  opacity: 1
}

.member:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .3)
}

.member-av {
  width: 90px;
  height: 90px;
  margin: 0 auto var(--sp-md);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-subtle), var(--bg-card));
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-smooth)
}

.member:hover .member-av {
  border-color: var(--gold);
  box-shadow: 0 0 20px var(--gold-glow)
}

.member-av svg {
  width: 40px;
  height: 40px;
  fill: var(--text-muted)
}

.member-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px
}

.member-role {
  font-family: var(--font-accent);
  font-size: .95rem;
  color: var(--gold);
  letter-spacing: 1px
}

/* ========================================
   ALBUMS
   ======================================== */
.albums {
  background: var(--bg-deep)
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-md)
}

.gal-item {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: all var(--t-smooth)
}

.gal-item:hover {
  border-color: var(--gold);
  transform: scale(1.03);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .4)
}

.gal-placeholder {
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm)
}

.gal-placeholder svg {
  width: 48px;
  height: 48px;
  fill: var(--text-muted);
  opacity: .4
}

.gal-placeholder span {
  font-size: .85rem;
  color: var(--text-muted)
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
  padding: var(--sp-2xl) 0 var(--sp-lg)
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-xl)
}

.footer-brand-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: var(--sp-sm)
}

.footer-brand-text {
  font-size: .9rem;
  color: var(--text-secondary);
  max-width: 340px;
  line-height: 1.8
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--sp-md);
  text-transform: uppercase;
  letter-spacing: 2px
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs)
}

.footer-links a {
  font-size: .9rem;
  color: var(--text-secondary);
  transition: all var(--t-fast);
  padding: 4px 0
}

.footer-links a:hover {
  color: var(--gold);
  padding-left: 8px
}

.footer-bottom {
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-sm)
}

.footer-copy {
  font-size: .85rem;
  color: var(--text-muted)
}

.footer-copy span {
  color: var(--gold)
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media(max-width:1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr
  }

  .branches {
    grid-template-columns: repeat(3, 1fr)
  }

  .map-layout {
    grid-template-columns: 1fr
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media(max-width:768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 18, .97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--sp-md);
    z-index: 1002
  }

  [data-theme="light"] .nav-links {
    background: rgba(245, 242, 235, .97)
  }

  .nav-links.active {
    display: flex
  }

  .nav-links a {
    font-size: 1.3rem;
    font-family: var(--font-heading);
    padding: .8rem 1.5rem
  }

  .nav-toggle {
    display: flex
  }

  .timeline::before {
    left: 20px
  }

  .tl-item,
  .tl-item:nth-child(odd),
  .tl-item:nth-child(even) {
    flex-direction: column !important;
    padding-left: 50px
  }

  .tl-item:nth-child(odd) .tl-content,
  .tl-item:nth-child(even) .tl-content {
    margin-left: 0;
    margin-right: 0
  }

  .tl-content {
    width: 100%
  }

  .tl-dot {
    left: 20px;
    top: 0
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-md)
  }

  .branches {
    grid-template-columns: repeat(2, 1fr)
  }

  .tree-line-h {
    display: none
  }

  .events-grid {
    grid-template-columns: 1fr
  }

  .members-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .footer-grid {
    grid-template-columns: 1fr
  }

  .footer-bottom {
    justify-content: center;
    text-align: center
  }

  .hero::before,
  .hero::after {
    width: 100px;
    height: 100px
  }

  .hero::before {
    top: 20px;
    left: 20px
  }

  .hero::after {
    bottom: 20px;
    right: 20px
  }

  .hero-crest {
    width: 80px;
    height: 80px
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .quote-card {
    width: 280px
  }

  .countdown-grid {
    gap: var(--sp-sm)
  }

  .cd-separator {
    display: none
  }

  .map-layout {
    gap: var(--sp-lg)
  }
}

@media(max-width:480px) {
  .branches {
    grid-template-columns: 1fr
  }

  .members-grid {
    grid-template-columns: 1fr
  }

  .gallery-grid {
    grid-template-columns: 1fr
  }

  .sec-title {
    font-size: 1.8rem
  }

  .hero-cta {
    padding: .8rem 1.8rem;
    font-size: .95rem
  }

  .stats-grid {
    grid-template-columns: 1fr
  }

  .cd-unit {
    min-width: 70px
  }

  .cd-num {
    font-size: 2rem
  }

  .quote-card {
    width: 260px;
    padding: var(--sp-md)
  }
}

/* ========================================
   PHOTO GALLERY
   ======================================== */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 2rem
}

.gal-filter {
  padding: .45rem 1.2rem;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .3s ease;
  letter-spacing: .5px
}

.gal-filter:hover {
  border-color: var(--gold);
  color: var(--gold)
}

.gal-filter.active {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--bg-deep);
  border-color: var(--gold);
  font-weight: 600
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  min-height: 200px
}

.gal-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  border: 1px solid rgba(201, 168, 76, .1);
  transition: transform .4s ease, box-shadow .4s ease;
  opacity: 0;
  animation: galFadeIn .5s ease forwards
}

.gal-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .4)
}

.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease
}

.gal-item:hover img {
  transform: scale(1.08)
}

.gal-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .8));
  transform: translateY(100%);
  transition: transform .3s ease;
  pointer-events: none
}

.gal-item:hover .gal-item-overlay {
  transform: translateY(0)
}

.gal-item-caption {
  font-size: .85rem;
  color: #fff;
  font-weight: 500
}

.gal-item-cat {
  font-size: .7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: .25rem
}

@keyframes galFadeIn {
  to {
    opacity: 1
  }
}

.gallery-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted)
}

.gallery-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(201, 168, 76, .15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-bottom: .75rem
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

.gallery-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted)
}

.gallery-empty p {
  margin-top: .75rem;
  font-size: .95rem
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lbFadeIn .3s ease
}

@keyframes lbFadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.lb-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center
}

.lb-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5)
}

.lb-caption {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-top: 1rem;
  text-align: center;
  max-width: 60ch
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 10001;
  transition: all .2s ease;
  opacity: .7
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  opacity: 1;
  color: var(--gold)
}

.lb-close {
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  line-height: 1
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  padding: 1rem
}

.lb-prev {
  left: 1rem
}

.lb-next {
  right: 1rem
}

/* ========================================
   REDUCED MOTION (Accessibility)
   ======================================== */
@media(prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important
  }

  .rv,
  .rv-l,
  .rv-r,
  .rv-s {
    opacity: 1;
    transform: none
  }

  .quotes-row {
    animation: none !important
  }

  .hero-title {
    animation: none !important;
    opacity: 1
  }

  .hero-label,
  .hero-tagline,
  .hero-cta,
  .hero-scroll {
    animation: none !important;
    opacity: 1
  }

  .patriarch::before {
    animation: none !important
  }

  .hero-crest-inner {
    animation: none !important
  }

  .countdown-wrap::before {
    animation: none !important
  }

  .hero-canvas {
    display: none
  }
}

/* ========================================
   HISTORY MODAL
   ======================================== */
.history-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: flex-start;
  padding-top: 2rem;
  overflow-y: auto;
}

.history-modal.active {
  display: flex;
}

.history-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--gold-subtle);
  border-radius: 12px;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 3rem 2rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.history-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.5rem;
  color: var(--gold);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.history-modal-close:hover {
  background: var(--gold-subtle);
  transform: scale(1.1);
}

.history-modal-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 2rem;
  text-align: center;
  letter-spacing: 2px;
}

.history-modal-body {
  overflow-y: auto;
}

.history-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gold-subtle);
}

.history-section:last-child {
  border-bottom: none;
}

.history-section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
  font-weight: 600;
}

.history-section-content {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.history-section-content p {
  margin-bottom: 1rem;
}

.history-section-content p:last-child {
  margin-bottom: 0;
}

.history-family-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.history-family-list li {
  padding: 0.75rem 0 0.75rem 1.5rem;
  color: var(--text-secondary);
  position: relative;
  font-size: 0.95rem;
}

.history-family-list li:before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.8rem;
}

/* Scrollbar styling for modal */
.history-modal-content::-webkit-scrollbar {
  width: 8px;
}

.history-modal-content::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 10px;
}

.history-modal-content::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 10px;
}

.history-modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--gold-light);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .history-modal {
    padding-top: 1rem;
    align-items: center;
  }

  .history-modal-content {
    padding: 2rem 1.5rem;
    max-height: 95vh;
    width: 98%;
  }

  .history-modal-title {
    font-size: 1.8rem;
  }

  .history-section-title {
    font-size: 1.2rem;
  }

  .history-section-content {
    font-size: 0.9rem;
  }

  .history-modal-close {
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
  }
}