/* ==========================================================================
   AI-Learn Landing Page - Ultra-Premium Apple/Linear-Grade Design System
   ========================================================================== */

:root {
  /* Apple/Linear Pristine Palette */
  --bg-main: #FAFAFC;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #F1F5F9;
  --bg-dark-surface: #0F172A;

  --primary: #4F46E5;
  /* Royal Indigo */
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  --purple: #7C3AED;
  --cyan: #0891B2;
  --green: #059669;
  --amber: #D97706;
  --red: #DC2626;

  --text-title: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;

  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --border-accent: rgba(79, 70, 229, 0.3);

  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;

  --max-width: 1240px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 35px -10px rgba(79, 70, 229, 0.12);
  --shadow-glow: 0 8px 25px rgba(79, 70, 229, 0.25);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-title);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Selection */
::selection {
  background: var(--primary);
  color: #FFFFFF;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: var(--radius-full);
}

/* Layout Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-title);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 50%, #C084FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Neutral Gray Image Placeholder Box */
.img-placeholder {
  width: 100%;
  min-height: 380px;
  background: #E2E8F0;
  border: 2px dashed #94A3B8;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  color: #475569;
  transition: all 0.3s ease;
}

.img-placeholder:hover {
  background: #CBD5E1;
  border-color: #64748B;
}

.img-placeholder .placeholder-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.img-placeholder .placeholder-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1E293B;
  margin-bottom: 4px;
}

.img-placeholder .placeholder-dimensions {
  font-size: 0.8rem;
  font-family: monospace;
  background: #FFFFFF;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1px solid #CBD5E1;
  color: #64748B;
}

/* Top Announcement Banner */
.announcement-bar {
  background: #EEF2FF;
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .announcement-bar {
    flex-direction: column;
    padding: 8px;
    font-size: 0.75rem;
    line-height: 1.4;
  }
}

.announcement-bar .badge-tag {
  background: var(--primary);
  color: #fff;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 250, 252, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-title);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.brand-logo:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #FFFFFF;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--primary-hover);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #F8FAFC;
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.btn-appstore {
  background: #0F172A;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--text-title);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 10px 22px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
  text-align: left;
  text-decoration: none;
}

.btn-appstore::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg);
  animation: appstoreShimmer 3.5s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes appstoreShimmer {
  0% {
    left: -100%;
  }

  15% {
    left: 200%;
  }

  100% {
    left: 200%;
  }
}

.btn-appstore:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.btn-appstore svg {
  width: 24px;
  height: 24px;
  fill: #FFFFFF;
}

.btn-appstore .btn-text-small {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  display: block;
}

.btn-appstore .btn-text-large {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  display: block;
}

.figma-pill-badge {
  background: #FFFFFF;
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .figma-pill-badge {
    font-size: 0.75rem;
    padding: 6px 12px;
    white-space: normal;
    text-align: left;
    line-height: 1.4;
  }
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-title);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  padding: 70px 0 90px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-title {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-body);
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Core Function: SPEAK - Interactive Voice Demo Box */
.hero-speak-widget {
  background: #FFFFFF;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.tutor-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tutor-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.topic-box {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.topic-box label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-hover);
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.live-transcript-card {
  background: #F8FAFC;
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 85px;
  font-size: 0.95rem;
  color: var(--text-title);
  margin-bottom: 16px;
}

.feedback-alert-pill {
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #B45309;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.mic-btn-center {
  display: flex;
  justify-content: center;
}

.mic-btn-main {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border: none;
  color: #FFFFFF;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mic-btn-main.active-speaking {
  background: linear-gradient(135deg, var(--red), var(--amber));
  animation: pulse-recording 1.5s infinite;
}

/* Section Common Styles */
.section-padding {
  padding: 90px 0;
}

.section-alt {
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-tag {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.15rem;
  color: var(--text-body);
}

/* Assessment Grid */
.assessment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.weakness-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.score-progress-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}

.progress-bar-item label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.bar-track {
  height: 10px;
  background: #E2E8F0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

.bar-fill.red {
  background: var(--red);
}

.bar-fill.amber {
  background: var(--amber);
}

.bar-fill.indigo {
  background: var(--primary);
}

.ai-diagnosis-quote {
  background: #FFFFFF;
  border-left: 4px solid var(--red);
  padding: 16px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-title);
  box-shadow: var(--shadow-sm);
}

/* Personality Grid */
.personality-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.coach-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.coach-card:hover,
.coach-card.active {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.coach-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Packs & Custom Topic Generator */
.packs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

.pack-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s ease;
}

.pack-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.pack-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-hover);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}

.create-topic-box {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 840px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
  background: #FFFFFF;
  color: var(--text-title);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Missions Grid */
.missions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mission-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.mission-badge {
  background: rgba(5, 150, 105, 0.12);
  color: var(--green);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  align-self: flex-start;
  margin-bottom: 12px;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.pricing-grid-2col {
  grid-template-columns: repeat(2, 1fr);
  max-width: 900px;
  margin: 40px auto 0;
}

.price-card {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.3s ease;
}

.price-card.featured {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.featured-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  padding: 4px 18px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.price-amount {
  font-size: 3rem;
  font-weight: 800;
  margin: 20px 0;
  color: var(--primary-hover);
}

.price-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.price-features-list li::before {
  content: "✓";
  color: var(--green);
  font-weight: 800;
  margin-right: 8px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.modal-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-main);
  border: none;
  color: var(--text-title);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
}

.qr-frame {
  background: #FFFFFF;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 20px 0;
}

.qr-frame svg {
  width: 180px;
  height: 180px;
}

/* FAQ & Footer */
.faq-section {
  padding: 90px 0;
}

.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--text-body);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.faq-answer-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item.open .faq-answer-wrapper {
  grid-template-rows: 1fr;
}

.faq-answer {
  overflow: hidden;
}

.faq-answer-inner {
  padding: 0 24px 24px;
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.site-footer {
  background: #F8FAFC;
  padding: 60px 0 30px;
  color: #475569;
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 12px;
  max-width: 320px;
}

.footer-col h5 {
  color: #1E293B;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: #64748B;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Animations */
@keyframes pulse-recording {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.6);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 35px rgba(220, 38, 38, 0.9);
  }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {

  .hero-grid,
  .assessment-grid {
    grid-template-columns: 1fr;
  }

  .personality-grid,
  .missions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .packs-grid,
  .pricing-grid,
  .pricing-grid-2col {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 2.75rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .personality-grid,
  .missions-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .header-actions {
    display: none;
  }

  .desktop-only {
    display: none !important;
  }
}

/* ==========================================================================
   Premium Scroll & Load Animations
   ========================================================================== */

/* 1. Hero Initial Load Animations (Cascading) */
@keyframes fadeUpIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  opacity: 0;
  animation: fadeUpIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle {
  opacity: 0;
  animation: fadeUpIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards 200ms;
}

.hero-cta-group {
  opacity: 0;
  animation: fadeUpIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards 350ms;
}

.hero-visual {
  opacity: 0;
  animation: fadeUpIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards 500ms;
}

/* 2. Scroll Reveal Utility Classes */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays for Grid Elements */
.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

.delay-300 {
  transition-delay: 300ms;
}

.delay-400 {
  transition-delay: 400ms;
}

/* 3. Button Micro-interactions Glow */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
  }
}

.btn-primary:hover {
  animation: pulseGlow 1.5s infinite;
}

/* ==========================================================================
   Horizontal Level Map / Streak UI
   ========================================================================== */
.level-map-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 300px;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  /* Hide scrollbar */
  scrollbar-width: none;
}

.level-map-container::-webkit-scrollbar {
  display: none;
}

.map-path {
  position: absolute;
  top: 0;
  left: 0;
  width: 900px;
  height: 120px;
  z-index: 1;
}

.map-nodes {
  position: absolute;
  top: 0;
  left: 0;
  width: 1200px;
  height: 300px;
  z-index: 2;
}

.map-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}

/* Mobile Vertical Map Layout */
@media (max-width: 768px) {
  .level-map-container {
    overflow-x: visible;
    overflow-y: visible;
    height: auto;
  }

  .map-content {
    width: 100% !important;
    height: 1100px !important;
  }

  .map-bg {
    display: none !important;
    /* Hide horizontal wavy BG */
  }

  /* Draw a vertical dashed line instead */
  .map-content::before {
    content: '';
    position: absolute;
    top: 50px;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px dashed rgba(255, 255, 255, 0.2);
    z-index: 0;
  }

  .map-nodes {
    width: 100% !important;
    height: 100% !important;
  }

  /* Zig-Zag positions overriding inline styles */
  .map-node:nth-child(1) {
    left: 25% !important;
    top: 50px !important;
  }

  .map-node:nth-child(2) {
    left: 75% !important;
    top: 200px !important;
  }

  .map-node:nth-child(3) {
    left: 25% !important;
    top: 350px !important;
  }

  .map-node:nth-child(4) {
    left: 75% !important;
    top: 500px !important;
  }

  .map-node:nth-child(5) {
    left: 25% !important;
    top: 650px !important;
  }

  .map-node:nth-child(6) {
    left: 75% !important;
    top: 800px !important;
  }

  .map-node:nth-child(7) {
    left: 50% !important;
    top: 950px !important;
  }
}

.map-node:hover {
  transform: translate(-50%, -55%);
}

.node-island {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.node-island img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.2));
}

.node-label {
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 99px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  position: relative;
  z-index: 5;
  transition: all 0.3s ease;
}

.map-node.completed .node-label {
  background: #312A5C;
  color: #FFF;
}

.map-node.locked .node-label {
  background: #E5E7EB;
  color: #6B7280;
}

.map-node.current {
  z-index: 10;
}

.map-node.current .node-label {
  background: #FFFFFF;
  color: #7960E4;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.map-node.current .node-island {
  transform: scale(1.2) translateY(-10px);
}

.map-node.current .node-island img {
  filter: drop-shadow(0 15px 15px rgba(249, 115, 22, 0.4));
}



.map-node.current .node-label {
  color: var(--orange);
  font-weight: 800;
  margin-top: 12px;
}



.node-tooltip {
  position: absolute;
  top: -50px;
  background: var(--text-title);
  color: #FFF;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.node-tooltip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--text-title);
}