/* ─────────────────────────────────────────────────────────────
   Scaffold — coming soon
   Visual system mirrors the production app (tailwind tokens):
   teal #0d5c63 / peach #fe956a, Manrope headings, Inter body.
   ───────────────────────────────────────────────────────────── */
:root {
  --surface:           #f9f9f6;
  --surface-low:       #f4f4f1;
  --surface-container: #eeeeeb;
  --surface-lowest:    #ffffff;
  --ink:               #1a1c1b;
  --ink-muted:         #3f484a;
  --ink-soft:          #6f797a;
  --border:            #e8e8e4;
  --border-strong:     #bfc8c9;
  --teal:              #004349;
  --teal-mid:          #0d5c63;
  --teal-soft:         #e0eeef;
  --teal-tint:         #abeef6;
  --amber:             #e8845a;
  --amber-soft:        #ffdbce;
  --amber-deep:        #984622;
  --error:             #ba1a1a;
  --shadow-card:       0 24px 40px -4px rgba(26, 28, 27, 0.06);
  --shadow-cta:        0 18px 32px -16px rgba(13, 92, 99, 0.5);
  --radius-md:         12px;
  --radius-lg:         18px;
  --radius-xl:         24px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 92% -10%, rgba(13, 92, 99, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(254, 149, 106, 0.16), transparent 60%),
    var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Layout shell ─────────────────────────────────────────── */
.shell { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ── Top nav ──────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(249, 249, 246, 0.85);
  border-bottom: 1px solid rgba(191, 200, 201, 0.18);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--teal-mid);
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand-mark { display: inline-flex; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-mid) 100%);
  color: #fff;
  text-decoration: none;
  transition: opacity 120ms ease, transform 80ms ease;
  box-shadow: var(--shadow-cta);
}
.nav-cta:hover { opacity: 0.92; }
.nav-cta:active { transform: translateY(1px); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0 96px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--amber-deep);
  background: var(--amber-soft);
  border-radius: 999px;
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(232, 132, 90, 0.25);
}

.hero h1 {
  font-size: clamp(38px, 5.5vw, 64px);
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--teal-mid);
}

.lede {
  font-size: 18px;
  color: var(--ink-muted);
  max-width: 56ch;
  margin: 0 0 32px;
}

.bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  display: grid;
  gap: 12px;
}
.bullets li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-muted);
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(232, 132, 90, 0.18);
}
.bullets strong { color: var(--ink); font-weight: 600; }

/* ── Waitlist form ────────────────────────────────────────── */
.waitlist-card {
  background: var(--surface-lowest);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  outline: 1px solid rgba(191, 200, 201, 0.25);
}
.waitlist-title {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
}
.waitlist-sub {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0 0 16px;
}

.row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.row.row-1 { grid-template-columns: 1fr; margin-bottom: 8px; }

input, select, button {
  font: inherit;
  border: 0;
  outline: none;
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface-low);
  color: var(--ink);
  width: 100%;
}
input::placeholder { color: var(--ink-soft); }
input:focus-visible, select:focus-visible {
  outline: 2px solid rgba(13, 92, 99, 0.4);
  outline-offset: 1px;
}
select {
  appearance: none;
  background:
    var(--surface-low)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%233f484a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>")
    no-repeat right 12px center;
  padding-right: 32px;
  color: var(--ink-muted);
}

.submit-btn {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-mid) 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 13px 18px;
  margin-top: 4px;
  transition: opacity 120ms ease, transform 80ms ease;
  box-shadow: var(--shadow-cta);
}
.submit-btn:hover { opacity: 0.92; }
.submit-btn:active { transform: translateY(1px); }
.submit-btn:disabled { opacity: 0.6; cursor: progress; }

.form-note {
  margin: 12px 4px 0;
  min-height: 22px;
  font-size: 13px;
  color: var(--ink-muted);
}
.form-note.error { color: var(--error); }
.form-note.success { color: var(--teal-mid); font-weight: 600; }

.form-fineprint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-soft);
}

/* ── Section: real output preview ─────────────────────────── */
.section {
  padding: 80px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}
.section-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--amber-deep);
}
.section-head h2 {
  font-size: clamp(28px, 3.8vw, 38px);
  margin: 0 0 8px;
}
.section-head p {
  color: var(--ink-muted);
  max-width: 56ch;
  margin: 0 auto;
}

.lesson-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface-lowest);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -40px rgba(26, 28, 27, 0.22);
  padding: 28px;
}
.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.meta-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.meta-pill.subject { background: var(--teal-soft); color: var(--teal-mid); }
.meta-pill.grade { background: var(--surface-container); color: var(--ink-muted); }

.lesson-title {
  font-size: clamp(22px, 3vw, 30px);
  margin-bottom: 18px;
}
.lesson-section { margin-bottom: 14px; }
.lesson-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.lesson-section-body {
  border-left: 2px solid var(--teal-mid);
  padding-left: 14px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}

.lesson-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--ink-soft);
}
.dots { display: inline-flex; gap: 6px; }
.dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--border-strong);
  cursor: pointer;
  transition: width 200ms ease, background 200ms ease;
}
.dot.active {
  width: 18px;
  background: var(--teal-mid);
  border-radius: 999px;
}

/* ── How it works — sticky scroll ─────────────────────────── */
.how {
  position: relative;
  background: var(--surface-low);
  border-radius: var(--radius-xl);
  margin: 80px 24px 80px;
  overflow: hidden;
}

.how-head {
  text-align: center;
  padding: 64px 24px 0;
}

.scroll-stage {
  position: relative;
  height: 320vh;
  padding: 24px 0 0;
}

.scroll-track {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.scroll-visual {
  position: relative;
  height: min(560px, 80vh);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 9 / 16;
  background: var(--surface-lowest);
  border-radius: 32px;
  box-shadow: 0 50px 100px -40px rgba(8, 28, 30, 0.45);
  outline: 1px solid rgba(191, 200, 201, 0.4);
  overflow: hidden;
  isolation: isolate;
}
.device-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-low) 100%);
}
.device-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.device-statusbar .dots-3 {
  display: inline-flex;
  gap: 4px;
}
.device-statusbar .dots-3 span {
  width: 4px; height: 4px;
  border-radius: 999px;
  background: var(--ink-muted);
  opacity: 0.4;
}

/* layered stage visuals — fade in/out by data-active */
.stage-pane {
  position: absolute;
  inset: 56px 22px 22px;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 420ms ease, transform 540ms ease;
  pointer-events: none;
}
.stage-pane.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stage 1 — upload */
.stage-upload {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stage-upload .pill-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface-container);
}
.stage-upload .pill {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 8px;
  border-radius: 6px;
  color: var(--ink-muted);
}
.stage-upload .pill.on {
  background: var(--surface-lowest);
  color: var(--teal-mid);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.dropzone {
  position: relative;
  flex: 1;
  border: 2px dashed rgba(13, 92, 99, 0.4);
  border-radius: 14px;
  background: rgba(13, 92, 99, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 18px;
}
.dropzone-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--teal-soft);
  display: grid;
  place-items: center;
  color: var(--teal-mid);
}
.dropzone-text {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.dropzone-hint {
  font-size: 11px;
  color: var(--ink-soft);
}

/* progress bar floating overlay (animates on stage 1 active) */
.scan-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  background: rgba(255,255,255,0.94);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-mid);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(8, 28, 30, 0.12);
}
.scan-overlay::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid var(--teal-soft);
  border-top-color: var(--teal-mid);
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Stage 2 — configure */
.stage-config {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.config-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.config-field {
  background: var(--surface-container);
  border-radius: 10px;
  padding: 8px 10px;
}
.config-field label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.config-field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.config-section {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.toggle-list { display: flex; flex-direction: column; gap: 6px; }
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-lowest);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  outline: 1px solid rgba(191, 200, 201, 0.3);
}
.toggle .switch {
  width: 28px;
  height: 16px;
  background: var(--border-strong);
  border-radius: 999px;
  position: relative;
  transition: background 200ms ease;
}
.toggle .switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 999px;
  transition: left 200ms ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.toggle.on .switch { background: var(--teal-mid); }
.toggle.on .switch::after { left: 14px; }

/* Stage 3 — lesson plan */
.stage-plan {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.plan-header .title {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}
.plan-header .meta {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--teal-mid);
}
.plan-section { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.plan-section-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}
.plan-section-body {
  border-left: 2px solid var(--teal-mid);
  padding-left: 8px;
  font-size: 11px;
  color: var(--ink);
  line-height: 1.5;
}
.plan-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--ink-soft);
}
.plan-export {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-mid) 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Right column — narrative steps */
.scroll-steps {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 24px 0;
}
.step {
  position: relative;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.6);
  outline: 1px solid rgba(191, 200, 201, 0.3);
  transition: opacity 320ms ease, transform 320ms ease, background 320ms ease, outline-color 320ms ease;
  opacity: 0.45;
  transform: translateY(0) scale(0.99);
}
.step.active {
  opacity: 1;
  background: var(--surface-lowest);
  outline-color: rgba(13, 92, 99, 0.35);
  box-shadow: 0 18px 40px -28px rgba(8, 28, 30, 0.45);
}
.step-num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--teal-mid);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.step-num .bar {
  width: 22px; height: 2px;
  background: var(--teal-mid);
  border-radius: 999px;
}
.step h3 {
  font-size: 22px;
  margin: 0 0 6px;
}
.step p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.55;
}

.scroll-progress {
  position: absolute;
  left: 24px;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scroll-progress .pip {
  width: 4px;
  height: 28px;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background 240ms ease, height 240ms ease;
}
.scroll-progress .pip.active {
  background: var(--teal-mid);
  height: 36px;
}

/* ── CTA strip ────────────────────────────────────────────── */
.cta-strip {
  margin: 96px 0 64px;
  text-align: center;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-mid) 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 56px 28px;
  box-shadow: 0 30px 70px -30px rgba(8, 28, 30, 0.5);
}
.cta-strip h2 {
  color: #fff;
  font-size: clamp(26px, 3.5vw, 36px);
  margin-bottom: 10px;
}
.cta-strip p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 auto 20px;
  max-width: 52ch;
}
.cta-strip a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--teal-mid);
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 120ms ease;
}
.cta-strip a:hover { transform: translateY(-1px); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  padding: 36px 0 48px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  border-top: 1px solid rgba(191, 200, 201, 0.25);
}
footer p { margin: 0; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 0 64px;
  }
  .scroll-track {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .scroll-visual { height: min(440px, 60vh); }
  .device { max-width: 280px; }
  .scroll-progress { display: none; }
  .scroll-stage { height: auto; }
  .scroll-track { position: relative; height: auto; padding: 32px 0; }
  /* On mobile, just stack the stages with fade-in via IntersectionObserver. */
  .stage-pane { position: relative; inset: auto; opacity: 1; transform: none; display: none; }
  .stage-pane.active { display: flex; }
}

@media (max-width: 620px) {
  .row { grid-template-columns: 1fr; }
  .nav-row { padding: 14px 18px; }
  .shell { padding: 0 18px; }
  .how { margin: 56px 16px; }
  .cta-strip { padding: 40px 22px; margin: 64px 0 48px; }
}
