/* Import Modern Fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Manrope:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* --- DESIGN SYSTEM & THEME TOKENS --- */
:root {
  /* DARK THEME (DEFAULT) */
  --bg-primary: #080e1e;
  --bg-secondary: #0f172a;
  --bg-gradient: radial-gradient(circle at top right, #1e293b 0%, #0b132b 50%, #050914 100%);
  --card-bg: rgba(15, 23, 42, 0.75);
  --card-border: rgba(212, 175, 55, 0.25);
  --card-hover-border: rgba(212, 175, 55, 0.6);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --gold-primary: #d4af37;
  --gold-gradient: linear-gradient(135deg, #fef08a 0%, #d4af37 50%, #9a3412 100%);
  --gold-glow: rgba(212, 175, 55, 0.15);
  
  --header-bg: rgba(8, 14, 30, 0.85);
  --control-bg: rgba(15, 23, 42, 0.9);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 0 25px rgba(212, 175, 55, 0.2);
  
  --font-heading: 'Plus Jakarta Sans', 'Noto Sans Devanagari', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-body: 'Inter', 'Noto Sans Devanagari', sans-serif;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  /* LIGHT THEME */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-gradient: radial-gradient(circle at top right, #fef08a 0%, #f8fafc 40%, #e2e8f0 100%);
  --card-bg: #ffffff;
  --card-border: rgba(197, 155, 39, 0.3);
  --card-hover-border: rgba(197, 155, 39, 0.8);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --gold-primary: #b48512;
  --gold-gradient: linear-gradient(135deg, #ca8a04 0%, #b48512 50%, #854d0e 100%);
  --gold-glow: rgba(180, 133, 18, 0.15);
  
  --header-bg: rgba(248, 250, 252, 0.9);
  --control-bg: rgba(255, 255, 255, 0.95);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-gold: 0 0 25px rgba(180, 133, 18, 0.2);
}

/* RESET & BASE */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  line-height: 1.6;
}

/* --- APP CONTAINER LAYOUT --- */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* --- HEADER BAR --- */
.top-header {
  height: 70px;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}

.brand-identity:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: contain;
  border: 1.5px solid var(--gold-primary);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
  background: #ffffff;
  padding: 3px;
}

.brand-text-wrapper {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-primary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* BUTTONS & PILLS */
.btn-pill {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 0.45rem 0.9rem;
  border-radius: 50px;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-pill:hover {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn-pill.active {
  background: var(--gold-gradient);
  color: #0b132b;
  border-color: var(--gold-primary);
  font-weight: 700;
}

.lang-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 3px;
  border-radius: 50px;
  border: 1px solid var(--card-border);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: var(--gold-primary);
  color: #0b132b;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.audio-btn {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
}

.audio-btn.playing {
  background: var(--gold-gradient);
  color: #0b132b;
  animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

/* PROGRESS BAR */
.progress-bar-container {
  height: 4px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 99;
}

.progress-bar-fill {
  height: 100%;
  width: 8.33%;
  background: var(--gold-gradient);
  transition: width var(--transition-normal);
}

/* --- MAIN SLIDE STAGE --- */
.slide-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.slide {
  position: absolute;
  inset: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96) translateY(20px);
  transition: opacity var(--transition-normal), transform var(--transition-normal), visibility var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2.5rem 3rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  overflow-y: auto;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

/* SLIDE CONTENT TYPOGRAPHY */
.slide-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 0.75rem;
}

.slide-tag::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--gold-primary);
  display: inline-block;
}

.slide-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.slide-title .text-gold {
  color: var(--gold-primary);
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slide-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  font-weight: 400;
  max-width: 850px;
}

/* --- SLIDE COMPONENTS --- */

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--gold-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* FEATURE LIST */
.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-size: 0.95rem;
}

.feature-icon {
  color: var(--gold-primary);
  font-size: 1.2rem;
  shrink: 0;
}

/* FOUNDER SECTION */
.founder-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: center;
}

.founder-img-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--gold-primary);
  box-shadow: var(--shadow-gold);
  aspect-ratio: 4/5;
}

.founder-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quote-box {
  border-left: 3px solid var(--gold-primary);
  padding-left: 1.25rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* PROBLEM SOLUTION TABLE */
.matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
  margin-top: 0.5rem;
}

.matrix-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-primary);
}

.matrix-table td {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
}

.matrix-table tr td:first-child {
  border-left: 1px solid var(--card-border);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  color: #f87171;
  font-weight: 500;
}

.matrix-table tr td:last-child {
  border-right: 1px solid var(--card-border);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  color: #4ade80;
  font-weight: 600;
}

/* SERVICE GRID */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all var(--transition-fast);
}

.service-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-3px);
  background: rgba(212, 175, 55, 0.05);
}

.service-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 0.5rem;
}

.service-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* PROCESS STEPS GRID */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.step-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  position: relative;
}

.step-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold-primary);
  opacity: 0.6;
  margin-bottom: 0.25rem;
}

.step-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.step-desc {
  font-size: 0.825rem;
  color: var(--text-secondary);
}

/* REPEAT CLIENT CASE CARDS */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.case-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.case-img-box {
  height: 160px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.case-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.case-card:hover .case-img-box img {
  transform: scale(1.08);
}

.case-body {
  padding: 1.25rem;
  flex: 1;
}

.case-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.case-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.badge-year {
  background: var(--gold-glow);
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* TESTIMONIAL CARDS */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-quote {
  font-style: italic;
  font-size: 0.925rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.testimonial-author {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold-primary);
}

.testimonial-org {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* CONTACT CARD SLIDE */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.05rem;
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gold-glow);
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

/* --- BOTTOM CONTROLS BAR --- */
.bottom-controls {
  height: 75px;
  background: var(--control-bg);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slide-counter {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.slide-counter span {
  color: var(--gold-primary);
  font-size: 1.1rem;
}

.equalizer-box {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.eq-bar {
  width: 3px;
  background: var(--gold-primary);
  border-radius: 2px;
  height: 4px;
}

.playing .eq-bar:nth-child(1) { animation: eq-anim 0.8s infinite ease-in-out; }
.playing .eq-bar:nth-child(2) { animation: eq-anim 1.2s infinite ease-in-out 0.2s; }
.playing .eq-bar:nth-child(3) { animation: eq-anim 0.6s infinite ease-in-out 0.4s; }

@keyframes eq-anim {
  0%, 100% { height: 4px; }
  50% { height: 18px; }
}

/* MODAL & DRAWER */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2.5rem;
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* THUMBNAILS DRAWER */
.drawer-content {
  max-width: 900px;
  max-height: 80vh;
  overflow-y: auto;
}

.thumbnails-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.thumb-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.thumb-card:hover, .thumb-card.active {
  border-color: var(--gold-primary);
  background: var(--gold-glow);
}

.thumb-num {
  color: var(--gold-primary);
  font-weight: 800;
  margin-bottom: 0.25rem;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .slide-title { font-size: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid, .steps-grid, .case-grid, .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .founder-wrapper { grid-template-columns: 1fr; }
  .founder-img-card { width: 220px; margin: 0 auto; }
}

@media (max-width: 900px) {
  .top-header {
    padding: 0.4rem 1rem;
  }
  .header-actions {
    gap: 0.35rem;
  }
  .btn-pill {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
  }
  #audio-text, #auto-speech-text, #theme-text, #nav-free-visit {
    display: none;
  }
}

@media (max-width: 768px) {
  .top-header { padding: 0.4rem 0.75rem; }
  .brand-sub { display: none; }
  .brand-title { font-size: 0.95rem; }
  .slide { padding: 1.5rem; inset: 0.75rem; }
  .slide-title { font-size: 1.6rem; }
  .stats-grid, .feature-list, .services-grid, .steps-grid, .case-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .contact-container { grid-template-columns: 1fr; }
  .bottom-controls { padding: 0 1rem; }
  .thumbnails-grid { grid-template-columns: repeat(2, 1fr); }
}
