@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500;600&display=swap');

/* ===================================================================
   1. DESIGN SYSTEM & TOKENS (LaunchIt Matching)
   =================================================================== */
:root {
  /* Brand Palette */
  --bg-main:         #dcd7c4;
  --bg-surface:      #FFFFFF;
  --bg-hero:         #1C1014;
  --bg-hero-alt:     #32151F;
  
  --primary-indigo:  #9F1239;
  --primary-hover:   #881337;
  --coral-accent:    #BE185D;
  --coral-hover:     #9D174D;
  --teal-free:       #0D9488;
  --amber-tag:       #B45309;

  --text-main:       #0F172A;
  --text-muted:      #64748B;
  --text-light:      #FCF8F9;
  --line-color:      #E2E8F0;

  /* Typography */
  --font-heading:    'Plus Jakarta Sans', sans-serif;
  --font-body:       'Inter', sans-serif;
  --font-mono:       'JetBrains Mono', monospace;

  /* Radii & Shadows */
  --radius-sm:       6px;
  --radius-md:       12px;
  --radius-lg:       18px;

  --shadow-sm:       0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md:       0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg:       0 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-glow:     0 0 20px rgba(190, 24, 93, 0.25);

  --transition:      all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================================================================
   2. GLOBAL RESETS
   =================================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* ===================================================================
   3. NAVIGATION BAR (.topbar)
   =================================================================== */
.topbar {
  background: var(--bg-hero);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.topbar .logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  color: var(--text-light);
}

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

.topbar .nav-group {
  display: flex;
  align-items: center;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topbar nav a {
  color: #94A3B8;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}

.topbar nav a:hover {
  color: var(--text-light);
}

.account-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 24px;
  transition: var(--transition);
}

.account-btn:hover {
  background: var(--coral-accent);
  border-color: var(--coral-accent);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* ===================================================================
   4. LAYOUT & BUILDER CONTAINER
   =================================================================== */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.pricing-header {
  text-align: center;
  margin-top: 50px;
  margin-bottom: 36px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 15px;
}

.builder-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.builder-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.builder-box {
  background: var(--bg-surface);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.builder-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-color);
}

.builder-box-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--coral-accent);
  cursor: pointer;
}

/* ===================================================================
   5. TEST PLANS SELECTION MODULE
   =================================================================== */
.test-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  transition: opacity 0.2s ease;
}

.test-option-card {
  border: 2px solid var(--line-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: #FAFAFA;
  transition: var(--transition);
  position: relative;
}

.test-option-card input[type="radio"] {
  display: none;
}

.test-option-card:hover {
  border-color: #CBD5E1;
  background: #FFFFFF;
}

.test-option-card.active {
  border-color: var(--coral-accent);
  background: #FFF5F7;
  box-shadow: var(--shadow-glow);
}

.test-plan-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.test-plan-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
}

.test-plan-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.test-plan-price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-indigo);
}

/* ===================================================================
   6. CHAPTER NOTES SELECTION MODULE
   =================================================================== */
.class-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line-color);
  padding-bottom: 10px;
}

.class-tab-btn {
  background: transparent;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.class-tab-btn:hover {
  color: var(--coral-accent);
}

.class-tab-btn.active {
  background: var(--coral-accent);
  color: #FFFFFF;
}

.class-content-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.class-content-panel.active {
  display: flex;
}

.subject-block {
  background: #FDFBFB;
  border: 1px solid var(--line-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.subject-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-color);
}

.subject-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subject-heading {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-main);
}

.circle-select-all {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line-color);
  background: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.circle-select-all svg {
  width: 12px;
  height: 12px;
  stroke: transparent;
}

.circle-select-all:hover {
  border-color: var(--coral-accent);
}

.circle-select-all.active {
  background: var(--coral-accent);
  border-color: var(--coral-accent);
}

.circle-select-all.active svg {
  stroke: #FFFFFF;
}

.subject-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: #FFFFFF;
  border: 1px solid var(--line-color);
  padding: 2px 8px;
  border-radius: 12px;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.chapter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-main);
  background: #FFFFFF;
  border: 1px solid var(--line-color);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.chapter-item:hover {
  border-color: var(--coral-accent);
}

.chapter-item input[type="checkbox"] {
  accent-color: var(--coral-accent);
  cursor: pointer;
}

.item-purchased {
  opacity: 0.55;
  background: #F1F5F9 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* ===================================================================
   7. STICKY ORDER SUMMARY
   =================================================================== */
.order-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--line-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 90px;
}

.summary-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-color);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.summary-row.total {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid var(--line-color);
}

.summary-savings {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-free);
  margin-bottom: 16px;
  min-height: 18px;
}

.btn-checkout {
  width: 100%;
  background: var(--coral-accent);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-glow);
}

.btn-checkout:hover {
  background: var(--coral-hover);
  transform: translateY(-2px);
}

.btn-checkout:disabled {
  background: #CBD5E1;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.payment-notice {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 30px;
}

.payment-notice a {
  text-decoration: underline;
}

/* ===================================================================
   8. SITE FOOTER
   =================================================================== */
.site-footer {
  background: var(--bg-hero);
  color: #94A3B8;
  padding-top: 50px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand .logo {
  font-size: 20px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.footer-brand p {
  font-size: 13.5px;
  max-width: 340px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hero);
  color: var(--text-light);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  /* border: 1px solid rgba(255, 255, 255, 0.2); */
}

.btn:hover {
  background: var(--coral-accent);
  border-color: var(--coral-accent);
  color: #FFFFFF;
}

.footer-bottom {
  background: #120A0D;
  padding: 20px 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 10px;
}

.footer-legal a {
  margin-left: 20px;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: var(--text-light);
}

.footer-disclaimer {
  font-size: 11.5px;
  color: #7C6970;
  text-align: center;
  line-height: 1.5;
}

/* ===================================================================
   9. RESPONSIVE MEDIA QUERIES
   =================================================================== */
@media (max-width: 860px) {
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .order-summary-card {
    position: static;
  }

  .test-options-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner, .footer-bottom-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}