/* ==== GLOBAL RESET ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ==== THEME VARIABLES ==== */
/* Default: dark theme values */
:root {
  --color-bg: #0b1020;
  --color-bg-elevated: #151a2f;
  --color-bg-soft: rgba(255, 255, 255, 0.04);
  --color-section-alt: radial-gradient(circle at top, #151b35 0, #090f23 55%);
  --color-border-subtle: rgba(255, 255, 255, 0.06);
  --color-text-main: #ffffff;
  --color-text-soft: rgba(255, 255, 255, 0.8);
  --color-text-muted: rgba(255, 255, 255, 0.7);
  --color-accent: #4f7dff;
  --color-accent-2: #8b5dff;
  --shadow-accent: 0 8px 24px rgba(79, 125, 255, 0.4);
  --nav-bg: rgba(11, 16, 32, 0.95);
  --card-bg: radial-gradient(
    circle at top,
    #19223f 0,
    #090f23 55%,
    #050714 100%
  );
  --feature-card-bg: rgba(15, 22, 45, 0.9);
  --price-card-bg: rgba(15, 22, 45, 0.9);
  --footer-bg: #050716;
}

/* Light theme overrides */
body[data-theme="light"] {
  --color-bg: #f4f5fb;
  --color-bg-elevated: #ffffff;
  --color-bg-soft: rgba(15, 23, 42, 0.04);
  --color-section-alt: #ffffff;
  --color-border-subtle: rgba(15, 23, 42, 0.08);
  --color-text-main: #0f172a;
  --color-text-soft: rgba(15, 23, 42, 0.84);
  --color-text-muted: rgba(15, 23, 42, 0.7);
  --color-accent: #4f46e5;
  --color-accent-2: #7c3aed;
  --shadow-accent: 0 8px 24px rgba(79, 70, 229, 0.25);
  --nav-bg: rgba(255, 255, 255, 0.95);
  --card-bg: #ffffff;
  --feature-card-bg: #ffffff;
  --price-card-bg: #ffffff;
  --footer-bg: #0f172a;
}

/* ==== GLOBAL STYLES ==== */
body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

/* ==== LAYOUT HELPERS ==== */
.nav,
.hero,
.section,
.footer-inner,
.cta-inner,
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==== NAVBAR ==== */
.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
}

.logo {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
}

.logo span {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}

.nav-links a {
  opacity: 0.85;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-right {
  display: flex;
  gap: 10px;
}

/* ==== BUTTONS ==== */
.btn {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--color-accent),
    var(--color-accent-2)
  );
  color: #ffffff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(79, 125, 255, 0.6);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-main);
}

.btn-secondary:hover {
  background: var(--color-bg-soft);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-main);
  padding-inline: 12px;
}

.btn-ghost:hover {
  background: var(--color-bg-soft);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-main);
}

.btn-outline:hover {
  background: var(--color-bg-soft);
}

.price-btn {
  width: 100%;
  justify-content: center;
}

/* ==== THEME TOGGLE ==== */
.theme-toggle {
  font-size: 0.8rem;
}

/* ==== HERO SECTION ==== */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr;
  gap: 48px;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 64px;
}

.hero-left h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin-top: 16px;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 0.98rem;
  max-width: 520px;
  color: var(--color-text-soft);
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.hero-small {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 10px;
}

.hero-tagline {
  font-size: 0.85rem;
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-soft);
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(79, 125, 255, 0.12);
  border: 1px solid rgba(79, 125, 255, 0.5);
  color: #c0d3ff;
}

body[data-theme="light"] .hero-badge {
  background: rgba(79, 70, 229, 0.06);
  color: #4338ca;
}

/* ==== HERO RIGHT PREVIEW CARD ==== */
.hero-right {
  display: flex;
  justify-content: center;
}

.hero-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] .hero-card {
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  border-color: rgba(15, 23, 42, 0.06);
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hero-card-title {
  font-size: 0.85rem;
  opacity: 0.85;
}

.pill {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
}

.pill-green {
  background: rgba(46, 213, 115, 0.18);
  color: #a6fbd1;
}

.hero-card-body {
  display: grid;
  grid-template-columns: 0.9fr 1.5fr;
  gap: 12px;
}

.hero-steps {
  list-style: none;
  font-size: 0.8rem;
}

.hero-steps li {
  padding: 6px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
  opacity: 0.8;
}

.hero-steps li.active-step {
  background: rgba(79, 125, 255, 0.25);
  opacity: 1;
}

body[data-theme="light"] .hero-steps li.active-step {
  background: rgba(79, 70, 229, 0.12);
}

.hero-preview-box {
  background: rgba(7, 11, 29, 0.9);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px;
  font-size: 0.8rem;
}

body[data-theme="light"] .hero-preview-box {
  background: #f9fafb;
  border-color: rgba(15, 23, 42, 0.06);
}

.hero-preview-box h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

/* ==== SECTIONS ==== */
.section {
  padding: 40px 16px 60px;
}

.section-alt {
  background: var(--color-section-alt);
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 8px;
  text-align: center;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 28px;
}

/* ==== "HOW IT WORKS" CARDS ==== */
.cards-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.card {
  background: var(--feature-card-bg);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid var(--color-border-subtle);
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--color-text-main);
}

/* ==== FEATURES GRID ==== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.feature-card {
  background: var(--feature-card-bg);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid var(--color-border-subtle);
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--color-text-main);
}

/* ==== BOARDS SECTION ==== */
.boards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.board-card {
  background: var(--feature-card-bg);
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid var(--color-border-subtle);
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.board-card-active {
  border: 1px solid var(--color-accent);
  box-shadow: var(--shadow-accent);
}

.board-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--color-text-main);
}

.board-label {
  display: inline-block;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
  background: rgba(46, 213, 115, 0.14);
  color: #a6fbd1;
}

.board-label-soon {
  background: rgba(249, 115, 22, 0.12);
  color: #fed7aa;
}

.board-list {
  list-style: disc;
  margin-left: 18px;
  margin-top: 8px;
  font-size: 0.86rem;
}

body[data-theme="light"] .board-card-active {
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

/* ==== PRICING ==== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.price-card {
  background: var(--price-card-bg);
  border-radius: 20px;
  padding: 20px 22px;
  border: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-card-highlight {
  border: 1px solid var(--color-accent);
  box-shadow: var(--shadow-accent);
}

.price-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--color-bg-soft);
  color: var(--color-text-soft);
}

.price-tag-pro {
  background: rgba(79, 125, 255, 0.16);
  color: #c7d2fe;
}

.price-card h3 {
  font-size: 1.1rem;
}

.price-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.price-list {
  list-style: none;
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-top: 6px;
}

.price-list li {
  margin-bottom: 4px;
}

.price-footnote {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ==== CTA SECTION ==== */
.cta-section {
  padding: 32px 16px 48px;
}

.cta-inner {
  background: linear-gradient(
    135deg,
    var(--color-accent),
    var(--color-accent-2)
  );
  border-radius: 20px;
  padding: 22px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #ffffff;
}

.cta-inner h2 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.cta-inner p {
  font-size: 0.9rem;
  opacity: 0.95;
}

/* ==== FOOTER ==== */
.footer {
  background: var(--footer-bg);
  color: #e5e7eb;
  padding: 28px 16px 32px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1.4fr 1fr;
  gap: 20px;
  align-items: flex-start;
}

.footer-left p {
  font-size: 0.85rem;
  margin-top: 6px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  gap: 40px;
}

.footer-links h4 {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.footer-links a {
  display: block;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 4px;
}

.footer-links a:hover {
  color: #e5e7eb;
}

.footer-note {
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: right;
}

/* ==== GENERIC PAGE HEADER (Class/Subject/Chapters/Chapter) ==== */
.page {
  padding: 32px 16px 60px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.8rem;
  margin: 10px 0 6px;
}

.page-header p {
  font-size: 0.95rem;
  color: var(--color-text-soft);
}

.pill-class {
  background: var(--color-bg-soft);
  color: var(--color-text-soft);
}

/* ==== CLASS PAGE ==== */
.class-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.class-card {
  background: var(--feature-card-bg);
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid var(--color-border-subtle);
  font-size: 0.9rem;
  color: var(--color-text-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.class-card h2 {
  font-size: 1.2rem;
  color: var(--color-text-main);
}

.class-card ul {
  list-style: disc;
  margin-left: 18px;
  font-size: 0.86rem;
}

.class-card-highlight {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-accent);
}

.class-btn {
  align-self: flex-start;
  margin-top: 4px;
}

/* ==== SUBJECTS PAGE ==== */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.subject-card {
  background: var(--feature-card-bg);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid var(--color-border-subtle);
  font-size: 0.9rem;
  color: var(--color-text-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subject-card h3 {
  font-size: 1rem;
  color: var(--color-text-main);
}

.subject-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ==== CHAPTERS PAGE ==== */
.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chapter-row {
  background: var(--feature-card-bg);
  border-radius: 14px;
  padding: 12px 16px;
  border: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
}

.chapter-row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chapter-row-title {
  font-weight: 600;
}

.chapter-row-meta {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* ==== CHAPTER DETAIL PAGE ==== */
.chapter-page {
  padding-bottom: 70px;
}

.chapter-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;
  gap: 22px;
  align-items: flex-start;
}

.chapter-steps {
  background: var(--feature-card-bg);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid var(--color-border-subtle);
  font-size: 0.9rem;
}

.chapter-steps h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.chapter-steps ol {
  list-style: none;
  padding-left: 0;
}

.chapter-step {
  padding: 5px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
  color: var(--color-text-soft);
}

.chapter-step.active {
  background: rgba(79, 125, 255, 0.25);
  color: var(--color-text-main);
}

body[data-theme="light"] .chapter-step.active {
  background: rgba(79, 70, 229, 0.12);
}

.chapter-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chapter-block {
  background: var(--feature-card-bg);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid var(--color-border-subtle);
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.chapter-block h2 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--color-text-main);
}

.chapter-block ul {
  margin-left: 18px;
  font-size: 0.9rem;
}

/* ==== RESPONSIVE STYLES ==== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 24px;
  }

  .hero-right {
    order: -1;
    margin-bottom: 16px;
  }

  .nav-links {
    display: none;
  }

  .features-grid,
  .boards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .footer-right {
    grid-column: 1 / -1;
  }

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

  .subjects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chapter-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-left h1 {
    font-size: 1.9rem;
  }

  .cards-row,
  .features-grid,
  .boards-grid,
  .subjects-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    padding-inline: 12px;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .footer-note {
    text-align: left;
  }

  .nav-right {
    gap: 6px;
  }

  .theme-toggle {
    display: none;
  }
}
