/* ExamAnalytics marketing site - education theme.
   Deep indigo "ink" + warm amber "chalk" accent on a soft cream ground, rounded
   notebook/card motifs. Hand-written semantic CSS, no framework dependency. */

:root {
  --ink: #1e2a4a;
  --ink-2: #131c33;
  --ink-soft: #4d5a80;
  --gold: #f2a93b;
  --gold-dark: #d98f1f;
  --cream: #fbf7ee;
  --paper: #ffffff;
  --border: #e7e1d3;
  --text: #1f2433;
  --text-soft: #5b6178;
  --success: #2e7d5b;
  --success-bg: #eaf6f0;
  --danger: #c0392b;
  --danger-bg: #fdecea;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(30, 42, 74, 0.10);
  --shadow-lg: 0 24px 60px rgba(30, 42, 74, 0.18);
  --max: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand span, .btn {
  font-family: 'Poppins', 'Inter', sans-serif;
}

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); }
h2 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text-soft); }
a { color: var(--ink); text-decoration: none; }
img { max-width: 100%; display: block; }

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

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold-dark); background: rgba(242, 169, 59, .14);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-align: center; line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--ink-2); box-shadow: 0 8px 20px rgba(242, 169, 59, .35); }
.btn-primary:hover { background: var(--gold-dark); box-shadow: 0 10px 26px rgba(217, 143, 31, .4); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: #f2ede0; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Header / nav */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); box-shadow: 0 2px 20px rgba(0,0,0,.12); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.2rem; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-weight: 800; font-size: 1rem;
  flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: rgba(255,255,255,.82); font-weight: 500; font-size: .95rem; transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; }
.mobile-menu {
  display: none; flex-direction: column; gap: 4px; background: var(--ink-2);
  padding: 12px 24px 24px;
}
.mobile-menu a {
  color: rgba(255,255,255,.85); padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-weight: 500;
}
.mobile-menu.open { display: flex; }
.mobile-menu .btn { margin-top: 10px; }

@media (max-width: 900px) {
  .nav-links, .nav-actions .btn-outline, .nav-actions .btn-primary { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* Hero */
.hero {
  background: radial-gradient(1200px 500px at 15% -10%, rgba(242,169,59,.16), transparent),
              linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff; padding: 88px 0 100px; position: relative; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero p.lead { color: rgba(255,255,255,.78); font-size: 1.1rem; max-width: 46ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.6rem; color: var(--gold); font-family: 'Poppins', sans-serif; }
.hero-stats div span { color: rgba(255,255,255,.65); font-size: .85rem; }
.hero-art {
  background: var(--paper); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-lg);
  color: var(--text);
}
.hero-art .row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.hero-art .row:last-child { border-bottom: none; }
.hero-art .pill { padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--success-bg); color: var(--success); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 56px 0 64px; } }

/* Sections */
section.section { padding: 84px 0; }
section.section.tight { padding: 56px 0; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { font-size: 1.05rem; }
.alt { background: var(--paper); }

/* Cards / grids */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.feature-card .icon {
  width: 52px; height: 52px; border-radius: 14px; background: rgba(242,169,59,.15);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--gold-dark);
}
.feature-card .icon svg { width: 26px; height: 26px; }

.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.how-step { position: relative; padding-top: 8px; }
.how-step::before {
  counter-increment: step; content: counter(step);
  width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-family: 'Poppins', sans-serif;
  margin-bottom: 16px;
}
@media (max-width: 820px) { .how-steps { grid-template-columns: 1fr; } }

/* Pricing */
.billing-toggle {
  display: inline-flex; align-items: center; gap: 4px; background: var(--paper); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px; margin: 0 auto 40px; box-shadow: var(--shadow);
}
.billing-toggle button {
  border: none; background: transparent; padding: 10px 22px; border-radius: 999px; font-weight: 600;
  cursor: pointer; font-family: 'Inter', sans-serif; color: var(--text-soft);
}
.billing-toggle button.active { background: var(--ink); color: #fff; }
.billing-toggle .save-badge { font-size: .7rem; background: var(--success-bg); color: var(--success); padding: 2px 8px; border-radius: 999px; margin-left: 6px; }

.price-card {
  max-width: 460px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: 24px;
  padding: 44px 40px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.price-card::after {
  content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 100% 0%, rgba(242,169,59,.25), transparent);
  /* Purely decorative - without this it sits on top of the card's content (button included)
     in paint order and silently swallows every click, since it has no z-index of its own to
     lose to `.price-card > *`. Cost a live "Add to Cart does nothing" bug to catch. */
  pointer-events: none;
}
.price-card > * { position: relative; }
.price-card h3 { color: #fff; }
.price-amount { font-family: 'Poppins', sans-serif; font-size: 3rem; font-weight: 800; color: var(--gold); margin: 8px 0 4px; }
.price-amount span { font-size: 1rem; color: rgba(255,255,255,.7); font-weight: 500; }
.price-list { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 12px; }
.price-list li { display: flex; align-items: flex-start; gap: 10px; color: rgba(255,255,255,.85); font-size: .95rem; }
.price-list li svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--gold); margin-top: 2px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item summary { cursor: pointer; font-weight: 700; color: var(--ink); font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--gold-dark); flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin-top: 12px; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%); border-radius: 28px;
  padding: 56px 40px; text-align: center; color: var(--ink-2);
}
.cta-band h2 { color: var(--ink-2); }
.cta-band .btn-ink { box-shadow: 0 10px 24px rgba(19,28,51,.3); }

/* Footer */
.site-footer { background: var(--ink-2); color: rgba(255,255,255,.7); padding: 64px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: rgba(255,255,255,.65); font-size: .92rem; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; font-size: .82rem; flex-wrap: wrap; gap: 8px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Forms */
.form-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink); }
.field .hint { font-size: .78rem; color: var(--text-soft); margin-top: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; background: #fff; color: var(--text); transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }
.text-danger { color: var(--danger); font-size: .82rem; margin-top: 4px; display: block; }
.validation-summary-errors { background: var(--danger-bg); color: var(--danger); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }

.payment-options { display: grid; gap: 12px; margin: 20px 0 28px; }
.payment-option {
  display: flex; align-items: flex-start; gap: 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; cursor: pointer; transition: border-color .15s, background .15s;
}
.payment-option:has(input:checked) { border-color: var(--gold); background: rgba(242,169,59,.08); }
.payment-option input { margin-top: 3px; }
.payment-option strong { display: block; color: var(--ink); }
.payment-option span.desc { font-size: .85rem; color: var(--text-soft); }

.alert { border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; font-size: .92rem; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-danger { background: var(--danger-bg); color: var(--danger); }
.alert-info { background: #eaf1f8; color: #23507a; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge-paid { background: var(--success-bg); color: var(--success); }
.badge-pending { background: #fff4e0; color: var(--gold-dark); }
.badge-failed { background: var(--danger-bg); color: var(--danger); }
.badge-trial { background: #eaf1f8; color: #23507a; }

/* Simple content pages (About/Terms/Privacy) */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }
.prose ul { color: var(--text-soft); }

/* Cart / checkout summary */
.summary-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); position: sticky; top: 100px; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: .92rem; color: var(--text-soft); }
.summary-row:last-of-type { border-bottom: none; }
.summary-total { display: flex; justify-content: space-between; font-weight: 800; color: var(--ink); font-size: 1.15rem; margin-top: 12px; }

.checkout-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } .summary-card { position: static; } }

/* Admin */
.admin-shell { min-height: 100vh; background: var(--cream); }
.admin-topbar { background: var(--ink); color: #fff; padding: 16px 0; }
.admin-topbar .container { display: flex; justify-content: space-between; align-items: center; }
.admin-main { padding: 40px 0; }
table.admin-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.admin-table th, table.admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: .9rem; }
table.admin-table th { background: #f2ede0; color: var(--ink); font-weight: 700; }
table.admin-table tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }

.utility-nav { display: flex; gap: 8px; }

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  section.section { padding: 56px 0; }
  .form-card, .card { padding: 22px; }
}
