/* ═══════════════════════════════════════════════════════════
   Vedyam — Spiritual Glassmorphism Design System v2.0
   Ancient Wisdom. Modern Life.
   ═══════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  --overlay-top: rgba(15, 15, 20, 0.1);
  --overlay-bot: rgba(15, 15, 20, 0.95);
  /* Background */
  --bg-color: #0b090a;
  --bg-gradient: radial-gradient(circle at top right, #2b1111, #0b090a 50%, #1a1025);

  /* Glass Panels */
  --panel-bg: rgba(255, 255, 255, 0.06);
  --panel-border: rgba(255, 255, 255, 0.12);
  --glass-blur: blur(24px) saturate(180%);

  /* Brand Colors */
  --brand: #FF9933;
  --brand-ink: #E68A00;
  --brand-tint: rgba(255, 153, 51, 0.15);
  --brand-rgb: 255, 153, 51;

  --gold: #FFD700;
  --gold-rgb: 255, 215, 0;
  --emerald: #10b981;

  /* Ink (Text) */
  --ink: #ffffff;
  --ink-2: #e0e0e0;
  --ink-3: #a0a0a0;
  --line: rgba(255, 255, 255, 0.12);

  /* Semantic */
  --ok: #10b981;
  --ok-tint: rgba(16, 185, 129, 0.15);
  --warn: #FFD700;
  --warn-tint: rgba(255, 215, 0, 0.15);
  --bad: #ef4444;
  --bad-tint: rgba(239, 68, 68, 0.15);

  /* Radii */
  --r: 16px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* Shadows */
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.4);

  --title-shadow: 0 4px 24px rgba(0,0,0,0.5);
  --brand-glow: drop-shadow(0 0 20px rgba(255, 153, 51, 0.4));
  --card-shadow-hover: 0 16px 40px rgba(0,0,0,0.6), 0 0 20px rgba(255, 153, 51, 0.15);
  --card-shadow-center: 0 16px 40px rgba(0,0,0,0.6), 0 0 30px rgba(255, 153, 51, 0.25);

  /* Nav */
  --nav-bg: rgba(18, 18, 18, 0.8);
  --nav-bg-scrolled: rgba(10, 8, 10, 0.95);

  /* Pills */
  --pill-bg: rgba(255, 153, 51, 0.1);
  --pill-border: rgba(255, 153, 51, 0.2);
  --pill-text: var(--gold);

  /* Typography */
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --display: 'Outfit', 'Fraunces', system-ui, sans-serif;

  /* Spacing */
  --section-pad: clamp(48px, 8vw, 96px);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg, video { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--ink-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; font-family: var(--display); }
.serif { font-family: var(--serif); font-weight: 700; letter-spacing: 0.02em; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-3); }
.row { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.sp { justify-content: space-between; }
.hide { display: none !important; }
.center { text-align: center; }

/* ─── Focus Visible (Accessibility) ─── */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Glassmorphism Utility ─── */
.glass {
  background: var(--panel-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transform: translateZ(0);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-glass);
}

/* ═══════════════════════════════════════════════════════════
   SCROLL PROGRESS INDICATOR
   ═══════════════════════════════════════════════════════════ */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  z-index: 200;
  transition: width 0.05s linear;
  box-shadow: 0 0 8px rgba(var(--brand-rgb), 0.5);
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px;
  border-radius: var(--r-pill); font-weight: 600; font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); white-space: nowrap;
  position: relative; overflow: hidden;
  will-change: transform, box-shadow;
}
.btn::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}
.btn:hover::after { left: 100%; }

.btn.primary {
  background: linear-gradient(135deg, var(--brand), #FF5F1F);
  color: #fff;
  box-shadow: 0 4px 15px rgba(var(--brand-rgb), 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn.primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(var(--brand-rgb), 0.6);
}
.btn.primary:active { transform: translateY(0) scale(0.98); }

/* Neon Glow CTA */
.btn.primary.glow {
  animation: neonPulse 2s ease-in-out infinite;
}
@keyframes neonPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(var(--brand-rgb), 0.4), 0 0 0 0 rgba(var(--brand-rgb), 0); }
  50% { box-shadow: 0 4px 15px rgba(var(--brand-rgb), 0.4), 0 0 20px 4px rgba(var(--brand-rgb), 0.3); }
}

.btn.ghost {
  background: var(--panel-bg); color: var(--ink); border: 1px solid var(--panel-border);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}
.btn.subtle { background: rgba(255, 255, 255, 0.05); color: var(--ink); border: 1px solid transparent; }
.btn.subtle:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }
.btn.sm { padding: 8px 16px; font-size: 0.85rem; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.bad { background: rgba(239, 68, 68, 0.2); color: #ff8a8a; border: 1px solid var(--bad-tint); }

/* Loading spinner inside buttons */
.btn .btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: rot 0.6s linear infinite;
}
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading .btn-label { opacity: 0.6; }

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  transform: translateZ(0);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.nav.scrolled {
  background: var(--nav-bg-scrolled);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.nav-inner {
  width: 100%; padding: 14px 40px;
  display: flex; align-items: center; justify-content: space-between; position: relative;
}
.logo {
  display: inline-flex; align-items: center; gap: 12px; font-weight: 700;
  font-size: 1.5rem; color: var(--ink); font-family: var(--serif); letter-spacing: 0.05em;
}
.logo .mark {
  display: inline-flex; justify-content: center; align-items: center;
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--gold), var(--brand)); border-radius: 12px;
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), 0.3); color: #fff;
  transition: transform 0.3s ease;
}
.logo:hover .mark { transform: rotate(-8deg) scale(1.05); }
.logo b {
  background: linear-gradient(to right, var(--gold), var(--brand));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-links { 
  display: flex; gap: 6px; 
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-links a {
  padding: 8px 14px; border-radius: 12px; color: var(--ink-2);
  font-weight: 500; font-size: 0.95rem; transition: all 0.2s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; width: 0; height: 2px;
  background: var(--brand); transition: all 0.3s ease; transform: translateX(-50%);
  border-radius: 2px;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 60%; }
.nav-links a.active {
  color: var(--brand); background: var(--brand-tint);
  border: 1px solid rgba(var(--brand-rgb), 0.2);
}
.nav-links a.active::after { width: 60%; }

.nav-right { display: flex; align-items: center; gap: 12px; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #FF5F1F);
  color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 0.9rem; cursor: pointer;
  box-shadow: 0 2px 10px rgba(var(--brand-rgb), 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}
.avatar:hover { transform: scale(1.08); box-shadow: 0 4px 16px rgba(var(--brand-rgb), 0.5); }

.chip-role {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--panel-bg); color: var(--gold); border: 1px solid rgba(var(--gold-rgb), 0.2);
}

/* ─── Hamburger Menu ─── */
.hamburger {
  display: none;
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--panel-border);
  align-items: center; justify-content: center; cursor: pointer;
  transition: all 0.3s ease; flex-direction: column; gap: 5px; padding: 10px;
}
.hamburger:hover { background: rgba(255,255,255,0.1); }
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Drawer */
.mobile-drawer {
  position: fixed; top: 0; right: -100%; width: 300px; height: 100vh;
  background: rgba(11, 9, 10, 0.98);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  z-index: 200; padding: 80px 32px 32px; display: flex; flex-direction: column; gap: 8px;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid var(--panel-border);
  box-shadow: -10px 0 40px rgba(0,0,0,0.5);
}
.mobile-drawer.open { right: 0; }
.mobile-drawer a {
  display: block; padding: 14px 20px; border-radius: 12px; font-size: 1.1rem;
  font-weight: 500; color: var(--ink-2); transition: all 0.2s;
}
.mobile-drawer a:hover, .mobile-drawer a.active {
  background: var(--brand-tint); color: var(--brand);
}
.mobile-drawer .drawer-actions {
  margin-top: auto; display: flex; flex-direction: column; gap: 10px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.mobile-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.mobile-overlay.open { opacity: 1; pointer-events: auto; }

/* ═══════════════════════════════════════════════════════════
   MAIN + FOOTER
   ═══════════════════════════════════════════════════════════ */
main { flex: 1; }
section.block { padding: var(--section-pad) 0; }
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0; color: var(--ink-3); font-size: 0.9rem;
  background: rgba(11, 9, 10, 0.6);
  backdrop-filter: blur(10px);
}
.footer .fi { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }

/* ═══════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════ */
.hero {
  text-align: center;
  padding: clamp(60px, 10vw, 120px) 0 clamp(24px, 4vw, 48px);
  position: relative; z-index: 10; overflow: hidden;
}

/* Aurora / Mesh Gradient Animated Background */
.hero::before {
  content: '';
  position: absolute; inset: -50%; z-index: -2;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(var(--brand-rgb), 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(var(--gold-rgb), 0.1) 0%, transparent 50%);
  animation: auroraMove 15s ease-in-out infinite alternate;
  will-change: transform;
  transform: translateZ(0);
}
@keyframes auroraMove {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  33% { transform: translate(30px, -20px) rotate(2deg) scale(1.05); }
  66% { transform: translate(-20px, 15px) rotate(-1deg) scale(0.98); }
  100% { transform: translate(10px, -10px) rotate(1deg) scale(1.02); }
}

/* Floating Particles */
.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(var(--gold-rgb), 0.4), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(var(--brand-rgb), 0.3), transparent),
    radial-gradient(1px 1px at 60% 20%, rgba(var(--gold-rgb), 0.3), transparent),
    radial-gradient(2px 2px at 80% 50%, rgba(var(--brand-rgb), 0.2), transparent),
    radial-gradient(1px 1px at 10% 80%, rgba(var(--gold-rgb), 0.3), transparent),
    radial-gradient(1px 1px at 90% 90%, rgba(var(--brand-rgb), 0.2), transparent),
    radial-gradient(2px 2px at 50% 10%, rgba(var(--gold-rgb), 0.3), transparent),
    radial-gradient(1px 1px at 30% 50%, rgba(139, 92, 246, 0.2), transparent);
  animation: particleDrift 20s ease-in-out infinite alternate;
  will-change: transform;
  transform: translateZ(0);
}
@keyframes particleDrift {
  0% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-15px) translateX(10px); }
  100% { transform: translateY(5px) translateX(-10px); }
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL DECORATIONS (SVGs)
   ═══════════════════════════════════════════════════════════ */
#global-decorations {
  position: fixed; inset: 0; pointer-events: none; z-index: -3; overflow: hidden;
}
.global-decor-chakra {
  position: absolute; stroke: var(--brand); pointer-events: none; opacity: 0.08;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 900px; height: 900px;
  animation: spinChakraGlobal 60s linear infinite;
  will-change: transform;
  transform: translateZ(0);
}

@keyframes spinChakraGlobal {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

body.light-mode .global-decor-chakra { opacity: 0.08; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pill-bg); color: var(--pill-text);
  border: 1px solid var(--pill-border);
  padding: 8px 16px; border-radius: var(--r-pill);
  font-size: 0.9rem; font-weight: 600; margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  letter-spacing: -0.03em;
  font-family: var(--serif);
}
.hero h1 .accent {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  background: linear-gradient(to right, var(--gold), var(--brand));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Typewriter cursor */
.hero h1 .typewriter-cursor {
  display: inline-block; width: 3px; height: 0.85em;
  background: var(--brand); margin-left: 4px;
  animation: cursorBlink 0.8s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero p.lede {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  max-width: 600px; margin: 20px auto 0;
  color: var(--ink-2); line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════
   CHAT CARD — Glassmorphism
   ═══════════════════════════════════════════════════════════ */
.chat {
  position: relative; max-width: 760px; margin: 40px auto 0;
  background: var(--panel-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  transform: translateZ(0);
  border: 1px solid var(--panel-border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; text-align: left;
}
.chat::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 100%); pointer-events: none;
}
.chat-head {
  display: flex; align-items: center; gap: 12px; padding: 18px 24px;
  border-bottom: 1px solid var(--line); background: rgba(0,0,0,0.2);
}
.chat-head .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 10px var(--ok); animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 10px var(--ok); }
  50% { box-shadow: 0 0 20px var(--ok), 0 0 40px rgba(16, 185, 129, 0.3); }
}
.chat-head h4 { font-size: 1.05rem; letter-spacing: 0.02em; }
.teach-toggle {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  font-size: 0.9rem; font-weight: 500; color: var(--ink-2); cursor: pointer;
}
.switch {
  width: 44px; height: 24px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.1); border: 1px solid var(--line);
  position: relative; transition: 0.2s; flex-shrink: 0;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: 0.2s;
}
.switch.on { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 10px rgba(var(--brand-rgb), 0.4); }
.switch.on::after { transform: translateX(20px); }
.chat-body {
  max-height: 380px; overflow-y: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.chat-empty { text-align: center; color: var(--ink-3); padding: 24px 8px; }
.bubble {
  width: fit-content; max-width: 82%; padding: 10px 16px; border-radius: 20px;
  font-size: 0.98rem; line-height: 1.6;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  animation: bubblePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}
@keyframes bubblePop {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.bubble.user {
  align-self: flex-end; background: linear-gradient(135deg, var(--brand), #FF5F1F); color: #fff;
  border-bottom-right-radius: 6px; border: 1px solid rgba(255,255,255,0.2);
}
.bubble.user .bubble-content { white-space: pre-wrap; }
.bubble.bot {
  align-self: flex-start; background: rgba(255,255,255,0.08); color: var(--ink);
  border-bottom-left-radius: 6px; border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px); padding-bottom: 38px; /* space for copy button */
}

/* Markdown Styling */
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  color: var(--brand); margin-top: 16px; margin-bottom: 8px; font-weight: 600; line-height: 1.3;
}
.markdown-body h1 { font-size: 1.4rem; }
.markdown-body h2 { font-size: 1.2rem; }
.markdown-body h3 { font-size: 1.05rem; }
.markdown-body p { margin-bottom: 12px; }
.markdown-body p:last-child { margin-bottom: 0; }
.markdown-body ul, .markdown-body ol { margin-left: 20px; margin-bottom: 12px; }
.markdown-body li { margin-bottom: 6px; }
.markdown-body strong { color: var(--gold); font-weight: 600; }
.markdown-body a { color: var(--brand); text-decoration: underline; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 24px 20px; }
.chip {
  padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: 0.9rem; color: var(--ink-2);
  background: rgba(255,255,255,0.05); transition: all 0.2s; backdrop-filter: blur(5px);
}
.chip:hover {
  border-color: var(--brand); color: var(--gold); background: var(--brand-tint);
  box-shadow: 0 0 15px rgba(var(--brand-rgb), 0.2); transform: translateY(-2px);
}
.chat-input {
  display: flex; gap: 12px; padding: 16px 24px;
  border-top: 1px solid var(--line); background: rgba(0,0,0,0.2);
}
.chat-input input {
  flex: 1; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 12px 20px; font-size: 1rem; font-family: inherit; color: var(--ink); outline: none; transition: 0.2s;
}
.chat-input input:focus {
  border-color: var(--brand); background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.15);
}
.chat-input input::placeholder { color: var(--ink-3); }

/* Chat Popup Overlay */
.chat-popup-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(11, 9, 10, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 10;
  border-radius: var(--r-lg); animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.chat-popup-content { text-align: center; animation: slideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; padding: 24px; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ═══════════════════════════════════════════════════════════
   WIDGET MODAL
   ═══════════════════════════════════════════════════════════ */
.chat-widget-modal {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 10000; display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
}
.chat-widget-modal.active { display: flex; opacity: 1; }
body.chat-open { overflow: hidden; }

.chat-widget-backdrop {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.chat-widget-content {
  position: relative; z-index: 1; width: 90%; max-width: 850px; height: 85vh;
  max-height: 800px; display: flex; flex-direction: column;
  transform: translateY(30px) scale(0.95); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5); border-radius: var(--r-lg);
  margin: 0 !important;
}
.chat-widget-modal.active .chat-widget-content { transform: translateY(0) scale(1); }

@media (max-width: 768px) {
  .chat-widget-content { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; border: none; }
}

/* ═══════════════════════════════════════════════════════════
   STATS STRIP (with counter animation)
   ═══════════════════════════════════════════════════════════ */
.stats { display: flex; gap: 56px; justify-content: center; flex-wrap: wrap; padding: 40px 0; }
.stat { text-align: center; }
.stat .n {
  font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700;
  color: var(--gold); font-family: var(--display);
  text-shadow: 0 2px 10px rgba(var(--gold-rgb), 0.3);
}
.stat .l {
  font-size: 0.9rem; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════
   SECTION HEADS
   ═══════════════════════════════════════════════════════════ */
.head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 32px; flex-wrap: wrap;
}
.head h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.head p { color: var(--ink-3); margin-top: 8px; font-size: 1.05rem; }

/* ═══════════════════════════════════════════════════════════
   COURSE GRID + CARDS (with 3D transforms)
   ═══════════════════════════════════════════════════════════ */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px; perspective: 1200px;
}
.card {
  background: var(--panel-bg); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--panel-border); border-radius: var(--r-lg); padding: 26px;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s ease, border-color 0.6s ease;
  cursor: pointer; display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
  transform-style: preserve-3d; will-change: transform, box-shadow;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 100%); pointer-events: none;
  border-radius: var(--r-lg); z-index: 0;
}
/* Shimmer effect */
.card::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  transition: left 0.8s ease; z-index: 0;
}
.card:hover::after { left: 200%; }

.card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(var(--brand-rgb), 0.4);
}
/* Note: 3D tilt is applied via JS mousemove */

.card .tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.05em; position: relative; z-index: 1;
}
.card .tag .d { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.card h3 { font-size: 1.25rem; position: relative; z-index: 1; }
.card p { font-size: 0.95rem; color: var(--ink-2); position: relative; z-index: 1; }
.card .meta {
  display: flex; gap: 16px; font-size: 0.85rem; color: var(--ink-3);
  margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line);
  position: relative; z-index: 1;
}

.d.indigo { background: #818cf8; color: #818cf8; }
.d.sky { background: #38bdf8; color: #38bdf8; }
.d.amber { background: var(--gold); color: var(--gold); }
.d.rose { background: #fb7185; color: #fb7185; }
.d.emerald { background: var(--emerald); color: var(--emerald); }
.d.violet { background: #a78bfa; color: #a78bfa; }

/* ═══════════════════════════════════════════════════════════
   FILTERS + SEARCH
   ═══════════════════════════════════════════════════════════ */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.filters .f {
  padding: 8px 18px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: rgba(255,255,255,0.05); backdrop-filter: blur(10px);
  font-size: 0.9rem; color: var(--ink-2); font-weight: 500; transition: all 0.2s;
}
.filters .f:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); transform: translateY(-1px); }
.filters .f.active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 0 15px rgba(var(--brand-rgb), 0.4); }

.search {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
  background: var(--panel-bg); backdrop-filter: var(--glass-blur); border: 1px solid var(--panel-border);
  border-radius: var(--r-pill); padding: 12px 22px; box-shadow: var(--shadow);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.search:focus-within {
  border-color: rgba(var(--brand-rgb), 0.4);
  box-shadow: var(--shadow), 0 0 0 3px rgba(var(--brand-rgb), 0.1);
}
.search input { flex: 1; border: none; background: none; outline: none; font-family: inherit; font-size: 1rem; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }

/* ═══════════════════════════════════════════════════════════
   COURSE DETAIL
   ═══════════════════════════════════════════════════════════ */
.detail { max-width: 820px; margin: 0 auto; }
.detail .cover {
  height: 200px; border-radius: var(--r-lg);
  display: flex; align-items: flex-end; padding: 28px; color: #fff; margin-bottom: 30px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.2);
  position: relative; overflow: hidden;
}
.detail .cover::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}
.detail .cover h2 { position: relative; z-index: 1; }
.cover.indigo { background: linear-gradient(135deg, #312e81, #4f46e5); }
.cover.sky { background: linear-gradient(135deg, #0c4a6e, #0ea5e9); }
.cover.amber { background: linear-gradient(135deg, #78350f, var(--brand)); }
.cover.rose { background: linear-gradient(135deg, #881337, #e11d48); }
.cover.emerald { background: linear-gradient(135deg, #064e3b, var(--emerald)); }
.cover.violet { background: linear-gradient(135deg, #2e1065, #7c3aed); }

.lessons { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.lessons li {
  display: flex; gap: 16px; align-items: center; padding: 16px 20px;
  background: var(--panel-bg); backdrop-filter: var(--glass-blur); border: 1px solid var(--panel-border);
  border-radius: var(--r); transition: all 0.2s; cursor: pointer;
}
.lessons li:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); transform: translateX(6px); }
.lessons li .num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--brand-tint); color: var(--gold);
  display: grid; place-items: center; font-size: 0.9rem; font-weight: 700; flex-shrink: 0;
  border: 1px solid rgba(var(--brand-rgb), 0.3);
}

/* ─── Progress Bar ─── */
.bar {
  height: 10px; border-radius: var(--r-pill);
  background: rgba(255,255,255,0.1); overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--gold)); border-radius: var(--r-pill);
  box-shadow: 0 0 10px rgba(var(--gold-rgb), 0.5);
  transition: width 0.5s ease;
}

/* ═══════════════════════════════════════════════════════════
   AUTH + FORMS
   ═══════════════════════════════════════════════════════════ */
.auth {
  max-width: 440px; margin: 60px auto; padding: 40px;
  background: var(--panel-bg); backdrop-filter: var(--glass-blur); border: 1px solid var(--panel-border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.auth::before {
  content: ''; position: absolute; top: -50px; left: -50px; width: 150px; height: 150px;
  background: var(--brand); filter: blur(80px); opacity: 0.3; z-index: -1;
}
.auth::after {
  content: ''; position: absolute; bottom: -50px; right: -50px; width: 120px; height: 120px;
  background: var(--gold); filter: blur(80px); opacity: 0.15; z-index: -1;
}
.auth h2 { text-align: center; margin-bottom: 8px; font-size: 1.8rem; }
.auth .sub { text-align: center; color: var(--ink-3); margin-bottom: 30px; font-size: 0.95rem; }
.field { margin-bottom: 20px; position: relative; }
.field label { display: block; font-size: 0.9rem; font-weight: 500; color: var(--ink-2); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; background: rgba(0,0,0,0.2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; font-family: inherit; font-size: 1rem; color: var(--ink); outline: none; transition: 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); background: rgba(0,0,0,0.4);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.15);
}
.field textarea { resize: vertical; min-height: 100px; }

/* Inline Form Errors */
.field .field-error {
  display: none; font-size: 0.8rem; color: #ff8a8a; margin-top: 6px;
  padding-left: 2px;
}
.field.has-error input, .field.has-error select {
  border-color: var(--bad) !important;
  box-shadow: 0 0 0 3px var(--bad-tint) !important;
}
.field.has-error .field-error { display: block; }

.seg { display: flex; gap: 10px; }
.seg .opt {
  flex: 1; text-align: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r);
  font-size: 0.95rem; font-weight: 500; color: var(--ink-2); cursor: pointer;
  background: rgba(255,255,255,0.03); transition: all 0.2s;
}
.seg .opt:hover { background: rgba(255,255,255,0.08); }
.seg .opt.active {
  border-color: var(--brand); background: var(--brand-tint); color: var(--gold);
  box-shadow: 0 0 10px rgba(var(--brand-rgb), 0.2);
}
.switch-link { text-align: center; margin-top: 24px; font-size: 0.95rem; color: var(--ink-3); }
.switch-link a { color: var(--brand); font-weight: 600; transition: color 0.2s; }
.switch-link a:hover { color: var(--gold); }
.demo-creds { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.demo-creds .lab {
  font-size: 0.85rem; color: var(--ink-3); text-align: center; margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.demo-creds .row3 { display: flex; gap: 10px; }
.demo-creds .row3 button { flex: 1; font-size: 0.85rem; padding: 10px 8px; }

/* ═══════════════════════════════════════════════════════════
   REVIEW QUEUE
   ═══════════════════════════════════════════════════════════ */
.queue { display: flex; flex-direction: column; gap: 16px; }
.qrow {
  background: var(--panel-bg); backdrop-filter: var(--glass-blur); border: 1px solid var(--panel-border);
  border-radius: var(--r-lg); padding: 24px; transition: all 0.2s;
}
.qrow:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.qrow .qtop { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.badge {
  font-size: 0.78rem; font-weight: 700; padding: 4px 12px; border-radius: var(--r-pill);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge.proposed { background: var(--warn-tint); color: var(--warn); border: 1px solid rgba(var(--gold-rgb), 0.3); }
.badge.approved { background: var(--ok-tint); color: var(--ok); border: 1px solid rgba(16,185,129,0.3); }
.badge.rejected { background: var(--bad-tint); color: #ff8a8a; border: 1px solid rgba(239,68,68,0.3); }

/* ═══════════════════════════════════════════════════════════
   EMPTY / NOTICE STATES
   ═══════════════════════════════════════════════════════════ */
.empty { text-align: center; padding: 80px 24px; color: var(--ink-3); }
.empty .ico { font-size: 3rem; margin-bottom: 16px; opacity: 0.7; }
.notice {
  max-width: 600px; margin: 80px auto; text-align: center;
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--r-lg); padding: 40px;
  backdrop-filter: var(--glass-blur);
}
.notice h3 { color: #ff8a8a; margin-bottom: 12px; font-size: 1.4rem; }
.notice code {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 3px 8px; font-size: 0.9rem; color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   TOASTS
   ═══════════════════════════════════════════════════════════ */
.toasts {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 12px; z-index: 100000;
}
.toast {
  background: rgba(30, 30, 30, 0.9); backdrop-filter: blur(10px); color: #fff;
  padding: 14px 24px; border-radius: var(--r-pill); font-size: 0.95rem; font-weight: 500;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,0.1);
  animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.ok { border-left: 4px solid var(--ok); }
.toast.bad { border-left: 4px solid #ff8a8a; }
@keyframes pop {
  from { opacity: 0; transform: translateY(16px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── Spinner ─── */
.spin {
  width: 36px; height: 36px; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--brand);
  border-radius: 50%; animation: rot 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite; margin: 60px auto;
}
@keyframes rot { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   BACK-TO-TOP BUTTON
   ═══════════════════════════════════════════════════════════ */
#backToTop {
  position: fixed; bottom: 30px; right: 30px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #FF5F1F);
  color: #fff; border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(var(--brand-rgb), 0.4);
  cursor: pointer; opacity: 0; pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
  font-size: 1.2rem;
}
#backToTop.visible {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
#backToTop:hover {
  box-shadow: 0 6px 30px rgba(var(--brand-rgb), 0.6);
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════════════════
   SCROLL-TRIGGERED ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left {
  opacity: 0; transform: translateX(-40px);
  transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0; transform: translateX(40px);
  transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale {
  opacity: 0; transform: scale(0.9);
  transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Staggered Fade Up (for initial page load) */
.stagger-up {
  opacity: 0; transform: translateY(30px);
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUpFade { to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════════════
   CAROUSEL
   ═══════════════════════════════════════════════════════════ */
.carousel-wrapper { display: flex; justify-content: center; width: 100%; }
.carousel-container {
  width: 100%; max-width: none; overflow-x: hidden; overflow-y: hidden; scroll-behavior: auto;
  padding-bottom: 24px; padding-top: 24px; margin: 10px auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; cursor: grab;
}
.carousel-container:active { cursor: grabbing; }
.carousel-container::-webkit-scrollbar { display: none; }
.carousel-track {
  display: flex; gap: 24px; width: max-content; padding: 10px max(24px, calc((100vw - 1080px) / 2 + 24px));
  align-items: stretch; perspective: 1000px;
}
.carousel-track .card {
  width: 320px; height: 260px; flex-shrink: 0;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s ease, opacity 0.6s ease;
  transform: scale(0.85); opacity: 0.5; pointer-events: auto;
}
.carousel-track .card:hover {
  transform: scale(0.9) translateY(-8px);
  opacity: 0.8;
}
.carousel-track .card.center {
  transform: translateY(-8px) scale(1.1); opacity: 1; z-index: 2;
  box-shadow: var(--card-shadow-center);
  border-color: rgba(var(--brand-rgb), 0.4);
}

/* ═══════════════════════════════════════════════════════════
   LIGHT MODE
   ═══════════════════════════════════════════════════════════ */
body.light-mode {
  --overlay-top: rgba(255, 255, 255, 0.1);
  --overlay-bot: rgba(255, 255, 255, 1);
  --bg-color: #fdfaf6;
  --bg-gradient: radial-gradient(circle at top right, #ffedd5, #fdfaf6 50%, #f3e5d0);
  --panel-bg: rgba(255, 255, 255, 0.9);
  --panel-border: rgba(217, 119, 0, 0.25);
  --ink: #2a1f1a;
  --ink-2: #5c4d43;
  --ink-3: #8a7a6f;
  --line: rgba(217, 119, 0, 0.15);
  --shadow-glass: 0 8px 32px 0 rgba(217, 119, 0, 0.05);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.04);

  --brand: #e67300;
  --brand-rgb: 230, 115, 0;
  --gold: #d98200;
  --gold-rgb: 217, 119, 0;
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.95);
  --title-shadow: none;
  --brand-glow: none;
  --card-shadow-hover: 0 20px 40px rgba(0,0,0,0.06), 0 0 20px rgba(230, 92, 0, 0.1);
  --card-shadow-center: 0 24px 50px rgba(0,0,0,0.08), 0 0 30px rgba(230, 92, 0, 0.15);
  --pill-bg: rgba(230, 92, 0, 0.08);
  --pill-border: rgba(230, 92, 0, 0.15);
  --pill-text: #E65C00;
}
body.light-mode .card { background: #ffffff; border: 1px solid var(--panel-border); }
body.light-mode .card::before { background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, transparent 100%); }
body.light-mode .card h3 { color: var(--brand); font-weight: 700; }
body.light-mode .chat-head { background: rgba(255,255,255,0.7); }
body.light-mode .chat-input { background: rgba(255,255,255,0.4); }
body.light-mode .chat-input input { background: rgba(255,255,255,0.6); }
body.light-mode .footer { background: rgba(255,255,255,0.6); }
body.light-mode .mobile-drawer {
  background: rgba(255, 255, 255, 0.98);
}
body.light-mode .mobile-drawer a { color: var(--ink-2); }
body.light-mode .hamburger span { background: var(--ink); }
body.light-mode #backToTop {
  box-shadow: 0 4px 20px rgba(230, 92, 0, 0.3);
}
body.light-mode .toast {
  background: rgba(255,255,255,0.95); color: var(--ink);
  border: 1px solid rgba(0,0,0,0.06);
}

/* ═══════════════════════════════════════════════════════════
   SPLASH SCREEN
   ═══════════════════════════════════════════════════════════ */
#splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-color); background-image: var(--bg-gradient);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#splash-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-content { display: flex; align-items: center; gap: 16px; }
.splash-mark {
  font-size: 3rem; display: inline-flex; align-items: center; justify-content: center;
  width: 70px; height: 70px; border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), var(--gold));
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 30px rgba(var(--brand-rgb), 0.6);
  color: #fff;
  animation: letterPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}
.splash-text {
  font-size: 4rem; display: flex; color: var(--ink); letter-spacing: -0.02em;
}
.splash-text span {
  display: inline-block; opacity: 0;
  animation: letterPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes letterPop {
  0% { opacity: 0; transform: scale(0.5) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .nav-inner { padding: 14px 24px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .stats { gap: 40px; }
  .hero { padding: clamp(50px, 8vw, 90px) 0 clamp(20px, 4vw, 40px); }
  .hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-right { gap: 8px; }
  .hero h1 { font-size: clamp(2rem, 6vw, 2.5rem); }
  .stats { gap: 24px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .detail { max-width: 100%; }
  .auth { max-width: 90%; margin: 40px auto; }
}

@media (max-width: 768px) {
  .stats { flex-direction: column; align-items: center; gap: 32px; }
  .grid { grid-template-columns: 1fr; }
  .detail .cover { height: 160px; padding: 20px; }
  .chat { margin: 20px 16px 0; }
  .head h2 { font-size: 1.8rem; }
  /* Reduce animation overhead on mobile */
  .hero::before, .hero::after { animation-duration: 30s; opacity: 0.5; }
  .global-decor-chakra { animation-duration: 120s; opacity: 0.04; }
}

@media (max-width: 680px) {
  .hero { padding: 60px 0 24px; }
  section.block { padding: 48px 0; }
  .auth { margin: 30px auto; padding: 28px; }
  .demo-creds .row3 { flex-direction: column; }
  .head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .carousel-track .card { width: min(280px, 85vw); height: 240px; }
  .chat-input { padding: 12px 16px; }
  .chat-input input { font-size: 0.95rem; }
  .chips { padding: 0 16px 16px; }
  .btn { font-size: 0.9rem; padding: 10px 16px; }
  .hero h1 { font-size: 2rem; }
  .chat-head { padding: 14px 16px; }
  .chat-body { padding: 16px; }
}

/* ═══════════════════════════════════════════════════════════
   PREFERS-REDUCED-MOTION (Accessibility)
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .stagger-up, .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important; transform: none !important;
  }
  .hero::before, .hero::after { animation: none !important; }
  .btn::after { display: none; }
  .card::after { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   PREMIUM MOBILE-FIRST RESPONSIVENESS OVERRIDES
   ═══════════════════════════════════════════════════════════ */

/* --- 1024px: Laptops / iPad Pro --- */
@media (max-width: 1024px) {
  .nav-inner { padding: 14px 24px; }
  .hero { padding: 80px 0 60px; }
  .hero-title { font-size: clamp(3rem, 5vw, 4rem); }
  .hero-subtitle { font-size: 1.25rem; max-width: 80%; margin-inline: auto; }
  
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  
  .section-pad { padding: 80px 0; }
  .container { padding: 0 24px; }
}

/* --- 768px: Tablets / iPad --- */
@media (max-width: 768px) {
  /* Navigation */
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-right { gap: 12px; }
  .nav-right .btn.primary { display: none; } /* Hide primary nav CTA to save space */
  .logo { font-size: 1.25rem; gap: 8px; }
  .logo .mark { width: 32px; height: 32px; font-size: 1rem; }
  
  /* Mobile Drawer Styling Update */
  .mobile-drawer { width: 100%; right: -100%; border-left: none; }
  
  /* Hero Section */
  .hero { padding: 80px 0 40px; }
  .hero-title { font-size: 3rem; line-height: 1.15; margin-bottom: 20px; }
  .hero-subtitle { font-size: 1.15rem; max-width: 90%; }
  
  /* Layout & Grids */
  .section-pad { padding: 60px 0; }
  .grid-3, .features-grid, .course-grid, .dashboard-grid { 
    grid-template-columns: 1fr !important; 
    gap: 24px; 
  }
  
  .row.wrap { flex-direction: column; align-items: stretch; gap: 24px; }
  .row.wrap > div { width: 100%; }
  .about-content, .about-img { text-align: center; }
  
  /* Forms & Modals */
  .course-filters { flex-direction: column; gap: 12px; }
  .course-filters input, .course-filters select { width: 100%; padding: 14px; }
  .modal-content { width: 92%; max-width: none; padding: 32px 24px; border-radius: 20px; }
  
  /* Footer */
  .footer { padding: 40px 0 30px; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 20px; }
}

/* --- 480px: Large Phones --- */
@media (max-width: 480px) {
  /* Navigation */
  .nav-inner { padding: 12px 16px; }
  .chip-role { display: none; } /* Reclaim space */
  .avatar { width: 36px; height: 36px; }
  
  /* Hero */
  .hero { padding: 60px 0 30px; }
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1.05rem; padding: 0 10px; margin-bottom: 32px; max-width: 100%; }
  .hero-actions { 
    flex-direction: column; 
    width: 100%; 
    padding: 0 16px; 
    gap: 16px;
  }
  .hero-actions .btn { 
    width: 100%; 
    justify-content: center; 
    min-height: 48px; /* Apple HIG standard */
    font-size: 1.05rem;
  }
  
  /* Typography */
  h2, .section-title { font-size: 2rem; line-height: 1.2; margin-bottom: 24px; }
  h3 { font-size: 1.5rem; }
  p { font-size: 1rem; line-height: 1.6; }
  
  /* Sections */
  .section-pad { padding: 48px 0; }
  .container { padding: 0 16px; }
  
  /* Cards */
  .card { border-radius: 16px; }
  .card-img-wrap { height: 200px; border-radius: 12px; margin: 12px 12px 0; }
  .card-body { padding: 20px; }
  .card-title { font-size: 1.25rem; }
  
  /* Form Inputs (Full width, easy tap) */
  .form-group input, 
  .form-group select, 
  .form-group textarea { 
    padding: 14px 16px; 
    font-size: 16px; /* Prevents iOS auto-zoom */
    border-radius: 12px;
  }
  
  /* Specific Views */
  .course-detail-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .course-detail-header .btn { width: 100%; }
  
  /* Footer */
  .footer .fi { flex-direction: column; text-align: center; gap: 24px; }
}

/* --- 414px: iPhone Pro Max / Plus sizes --- */
@media (max-width: 414px) {
  .hero-title { font-size: 2.25rem; }
  .card-img-wrap { height: 180px; }
  .modal-content { padding: 24px 16px; }
}

/* --- 390px: Standard iPhones (12/13/14) --- */
@media (max-width: 390px) {
  .hero-title { font-size: 2.15rem; }
  .section-pad { padding: 40px 0; }
  .nav-inner { padding: 10px 14px; }
}

/* --- 375px: Older iPhones (X/11/SE) --- */
@media (max-width: 375px) {
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  h2, .section-title { font-size: 1.75rem; }
  .card-body { padding: 16px; }
}

/* --- 360px: Standard Androids --- */
@media (max-width: 360px) {
  .hero-title { font-size: 1.85rem; }
  .container { padding: 0 12px; }
  .card-img-wrap { height: 160px; }
}

/* --- 320px: Smallest Supported Devices --- */
@media (max-width: 320px) {
  .hero-title { font-size: 1.65rem; }
  h2, .section-title { font-size: 1.5rem; }
  .nav-right .btn.sm { padding: 6px 10px; font-size: 0.8rem; }
  .hero-actions .btn { font-size: 0.95rem; min-height: 44px; }
  .card-body p { font-size: 0.9rem; }
}

