/* ==========================================================================
   GYAN SANGAM — CONFLUENCE OF DIVINE KNOWLEDGE
   Authentic Vedic Gold & Cosmic Navy Theme
   ========================================================================== */

:root {
  --primary: #d4af37;        /* Sacred Gold */
  --primary-light: #f3e5ab;
  --saffron: #ff9933;        /* Divine Saffron */
  --navy: #0a192f;           /* Deep Cosmic Navy */
  --navy-deep: #050d1a;
  --navy-card: rgba(10, 25, 47, 0.75);
  --glass-bg: rgba(10, 25, 47, 0.65);
  --glass-border: rgba(212, 175, 55, 0.25);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.6);
  --font-cinzel: 'Cinzel', serif;
  --font-inter: 'Inter', sans-serif;
  --font-devanagari: 'Noto Serif Devanagari', serif;
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-inter);
  background-color: var(--navy);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

h1, h2, h3, h4, .cinzel {
  font-family: var(--font-cinzel);
}

/* --- Scroll Container --- */
.scroll-container {
  height: 100vh;
  width: 100vw;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar {
  display: none;
}

/* --- Sections --- */
.section {
  position: relative;
  height: 100vh;
  width: 100vw;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  overflow: hidden;
}

.ambient-mesh {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(212, 175, 55, 0.15), transparent 60%),
              radial-gradient(circle at 20% 80%, rgba(255, 153, 51, 0.1), transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(99, 102, 241, 0.12), transparent 50%);
  z-index: 0;
}
.mesh-ramayan {
  background: radial-gradient(circle at 50% 30%, rgba(59, 130, 246, 0.18), transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.12), transparent 50%);
}
.mesh-mahabharat {
  background: radial-gradient(circle at 50% 30%, rgba(239, 68, 68, 0.18), transparent 60%),
              radial-gradient(circle at 20% 70%, rgba(255, 153, 51, 0.15), transparent 50%);
}
.mesh-bhagavatam {
  background: radial-gradient(circle at 50% 30%, rgba(168, 85, 247, 0.18), transparent 60%),
              radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.15), transparent 50%);
}
.mesh-gita {
  background: radial-gradient(circle at 50% 30%, rgba(245, 158, 11, 0.22), transparent 60%),
              radial-gradient(circle at 30% 80%, rgba(16, 185, 129, 0.12), transparent 50%);
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 25, 47, 0.4), rgba(10, 25, 47, 0.85));
  z-index: 1;
}

/* --- Glass Panel --- */
.glass-panel {
  position: relative;
  z-index: 2;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3.5rem 3rem;
  text-align: center;
  max-width: 820px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: panelFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Top Navigation --- */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 25, 47, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  z-index: 100;
}
.top-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.om-symbol {
  font-size: 24px;
}
.brand-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}
.top-actions {
  display: flex;
  gap: 12px;
}

/* --- Navigation Tracker (Dots) --- */
.nav-tracker {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 100;
}
.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: var(--transition);
}
.nav-dot:hover {
  background: rgba(212, 175, 55, 0.7);
  transform: scale(1.3);
}
.nav-dot.active {
  background: var(--primary);
  transform: scale(1.6);
  box-shadow: 0 0 15px var(--primary);
}

/* --- Typography & Elements --- */
.hero-emblem, .section-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 20px rgba(255, 153, 51, 0.5));
}
.hero-subtitle {
  color: var(--primary);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 30%, var(--primary-light) 70%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 25px rgba(212, 175, 55, 0.3);
}
.hero-description, .section-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-weight: 300;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.section-heading {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  color: var(--primary);
  margin-bottom: 1rem;
  text-shadow: 0 2px 15px rgba(212, 175, 55, 0.2);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
}
.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  border-radius: 30px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--saffron));
  color: #050d1a;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 153, 51, 0.5);
  background: linear-gradient(135deg, #e6c24f, #ffaa4d);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--primary);
  color: var(--primary-light);
  transform: translateY(-3px);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: rgba(212, 175, 55, 0.15);
  transform: translateY(-3px);
}

.hero-btn-group, .btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

/* --- Video Card --- */
.video-card {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 1.5rem 0;
}
.video-play-icon {
  font-size: 3rem;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}
.video-play-icon:hover {
  transform: scale(1.15);
  color: var(--saffron);
}

/* --- Author Panel --- */
.author-panel {
  max-width: 750px;
}
.author-heading {
  font-size: 2.6rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
}
.author-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.author-meta {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-style: italic;
}
.author-quote-box {
  padding: 1.8rem;
  background: rgba(255, 153, 51, 0.06);
  border: 1px solid rgba(255, 153, 51, 0.2);
  border-radius: 16px;
  margin-bottom: 2rem;
}
.author-quote {
  font-size: 1.8rem;
  color: var(--saffron);
  letter-spacing: 1px;
  margin-bottom: 0.8rem;
}
.author-subquote {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.footer-bottom-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}
.link-btn:hover {
  color: var(--saffron);
  text-decoration: underline;
}

/* --- Modal Overlay & Content --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 13, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: var(--navy-card);
  border: 1px solid var(--primary);
  border-radius: 20px;
  width: 100%;
  max-width: 780px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: panelFadeIn 0.3s ease-out;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.modal-title {
  color: var(--primary);
  font-size: 1.6rem;
  margin: 0;
}
.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon:hover {
  color: var(--saffron);
}
.modal-body {
  padding: 2rem;
  overflow-y: auto;
  line-height: 1.7;
  color: var(--text-secondary);
}
.modal-callout {
  padding: 1.2rem 1.5rem;
  border-radius: 12px;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}
.callout-saffron {
  background: rgba(255, 153, 51, 0.08);
  border-left: 4px solid var(--saffron);
}
.callout-saffron h4 {
  color: var(--saffron);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.callout-neutral {
  background: rgba(255, 255, 255, 0.04);
  border-left: 4px solid rgba(212, 175, 55, 0.5);
}
.callout-neutral h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.modal-footer-btn {
  margin-top: 2rem;
  text-align: center;
}

/* --- Divine AI Chat Drawer --- */
.chat-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
}
.chat-drawer-overlay.active {
  display: block;
}
.chat-drawer {
  position: fixed;
  top: 0;
  right: -550px;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  background: var(--navy-deep);
  border-left: 1px solid var(--primary);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
}
.chat-drawer.active {
  right: 0;
}
.drawer-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 25, 47, 0.9);
}
.drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.drawer-icon {
  font-size: 1.8rem;
}
.drawer-title {
  font-size: 1.25rem;
  color: var(--primary);
}
.drawer-status {
  font-size: 0.75rem;
  color: #10b981;
  font-family: var(--font-inter);
}

.epic-selector-bar {
  display: flex;
  gap: 8px;
  padding: 10px 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}
.epic-chip {
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.epic-chip.active, .epic-chip:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--primary);
  color: var(--primary-light);
}

.drawer-messages {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-bubble {
  padding: 1rem 1.2rem;
  border-radius: 16px;
  max-width: 88%;
  line-height: 1.6;
  font-size: 0.95rem;
  animation: panelFadeIn 0.3s ease-out;
}
.ai-bubble {
  align-self: flex-start;
  background: rgba(10, 25, 47, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.user-bubble {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(255, 153, 51, 0.25));
  border: 1px solid var(--primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}
.bubble-header {
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 4px;
  font-weight: 600;
}

.quick-starters {
  padding: 8px 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.starter-chip {
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
}
.starter-chip:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--primary-light);
}

.drawer-input-area {
  padding: 1rem 1.5rem 1.5rem;
  background: rgba(10, 25, 47, 0.95);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}
.drawer-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 30px;
  padding: 6px 14px;
  gap: 10px;
}
.drawer-input-wrap textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-inter);
  font-size: 0.95rem;
  resize: none;
  max-height: 100px;
}
.drawer-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #050d1a;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.drawer-send-btn:hover {
  background: var(--saffron);
  transform: scale(1.08);
}
.drawer-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .nav-tracker { display: none; }
  .glass-panel { padding: 2.5rem 1.5rem; }
  .hero-title { font-size: 2.4rem; }
  .top-brand .brand-title { font-size: 1.1rem; }
}
