/* Palette and type follow the app's own theme (vaulted-front-end/src/theme.js):
   indigo primary, amber "spark" accent, Plus Jakarta Sans, 12px corners. */
:root {
  --indigo: #4f46e5;
  --indigo-light: #818cf8;
  --indigo-dark: #3730a3;
  --indigo-ink: #1e1b4b;
  --amber: #d97706;
  --amber-light: #fbbf24;
  --ink: #1e1b2e;
  --ink-2: rgba(30, 27, 46, 0.68);
  --ink-3: rgba(30, 27, 46, 0.5);
  --line: rgba(30, 27, 46, 0.12);
  --bg: #f7f7fc;
  --paper: #ffffff;
  --tint: rgba(79, 70, 229, 0.06);
  --tint-2: rgba(79, 70, 229, 0.12);
  --error: #dc2626;
  --error-bg: #fef2f2;
  --success: #059669;
  --success-bg: #ecfdf5;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(30, 27, 46, 0.08);
  --shadow-lg: 0 1px 3px rgba(30, 27, 46, 0.08), 0 12px 32px rgba(30, 27, 46, 0.08);
  --font: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--indigo-dark); }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { text-wrap: pretty; }
h2 { text-wrap: balance; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--indigo-light); outline-offset: 2px; border-radius: 6px; }

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

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 247, 252, 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand b { color: var(--indigo); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 8px 12px; border-radius: 8px; }
.nav a:not(.btn):hover { color: var(--ink); background: var(--tint); }
.nav .btn { margin-left: 8px; }

@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.975rem; line-height: 1;
  padding: 13px 20px; border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, box-shadow 0.15s, transform 0.15s, color 0.15s;
}
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-dark); color: #fff; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: rgba(30, 27, 46, 0.24); background: #fff; }
.btn-small { padding: 9px 14px; font-size: 0.9rem; }
.btn-large { padding: 16px 26px; font-size: 1.05rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Hero ---------- */

.hero { padding: 72px 0 96px; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); margin-bottom: 20px; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .shot { margin-top: 56px; }

@media (max-width: 920px) {
  .hero { padding: 48px 0 72px; }
  .hero .shot { margin-top: 40px; }
}

/* Screenshots of vaulted-front-end with demo data, captured at 2x. */
.shot { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 42rem; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 14px; }
.section-head p { color: var(--ink-2); font-size: 1.08rem; }

@media (max-width: 720px) { .section { padding: 72px 0; } }

/* Features: ruled rows, heading on the left */
.features { border-top: 1px solid var(--line); }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px 48px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.feature h3 { font-size: 1.15rem; line-height: 1.35; letter-spacing: -0.01em; }
.feature p { color: var(--ink-2); max-width: 38em; }
@media (max-width: 720px) { .feature { grid-template-columns: 1fr; } }

/* Roles */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.role { border-top: 2px solid var(--ink); padding-top: 20px; }
.role h3 { font-size: 1.2rem; margin-bottom: 12px; }
.role ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; color: var(--ink-2); font-size: 0.97rem; }
.role li::marker { color: var(--ink-3); }
@media (max-width: 880px) { .roles { grid-template-columns: 1fr; gap: 36px; } }

/* Teacher review: heading beside the text, screenshot below */
.review-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px 48px; margin-bottom: 48px; }
.review-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.review-head p { color: var(--ink-2); font-size: 1.05rem; max-width: 38em; }
.review-head p + p { margin-top: 14px; }
@media (max-width: 880px) { .review-head { grid-template-columns: 1fr; margin-bottom: 36px; } }

/* Steps: same ruled columns as the roles, numbered in plain text */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: step; }
.step { border-top: 2px solid var(--ink); padding-top: 20px; }
.step::before { counter-increment: step; content: counter(step); display: block; font-weight: 700; color: var(--indigo); margin-bottom: 6px; }
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 0.96rem; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; gap: 36px; } }

/* CTA band */
.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px;
  border-radius: var(--radius); padding: 48px; color: #fff; background: var(--indigo-ink);
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 8px; }
.cta-band p { color: rgba(255, 255, 255, 0.78); font-size: 1.05rem; }
.cta-band .btn-primary { background: #fff; color: var(--indigo-ink); }
.cta-band .btn-primary:hover { background: #eef2ff; color: var(--indigo-ink); }
@media (max-width: 600px) { .cta-band { padding: 36px 24px; } }

/* ---------- Footer ---------- */

.site-footer { padding: 40px 0 48px; color: var(--ink-3); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Sign-up page ---------- */

.signup { padding: 48px 0 96px; }
.signup .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 56px; align-items: start; }
.signup-aside { position: sticky; top: 108px; }
.signup-aside h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 16px; }
.signup-aside > p { color: var(--ink-2); font-size: 1.05rem; }
.aside-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.aside-list li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.aside-list .n { width: 36px; height: 36px; border-radius: 10px; background: var(--tint-2); color: var(--indigo); display: grid; place-items: center; font-weight: 700; }
.aside-list strong { display: block; font-size: 0.98rem; }
.aside-list span { color: var(--ink-2); font-size: 0.93rem; }
@media (max-width: 920px) {
  .signup { padding-top: 32px; }
  .signup .wrap { grid-template-columns: 1fr; gap: 32px; }
  .signup-aside { position: static; }
  .aside-list { display: none; }
}

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; }
@media (max-width: 600px) { .card { padding: 24px 20px; } }

fieldset { border: 0; padding: 0; margin: 0 0 32px; min-width: 0; }
legend { padding: 0; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.legend-note { color: var(--ink-3); font-size: 0.9rem; margin-bottom: 20px; }
.fieldset-divider { border: 0; border-top: 1px solid var(--line); margin: 0 0 28px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* Keeps a focused field (and its label) clear of the sticky header when validation jumps to it. */
.field input, .field select { scroll-margin-top: 120px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field label .opt { font-weight: 500; color: var(--ink-3); }
.field input, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(30, 27, 46, 0.2); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field select {
  appearance: none; padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%231e1b2e' stroke-opacity='.6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 16px no-repeat;
}
.field input:hover, .field select:hover { border-color: rgba(30, 27, 46, 0.34); }
.field input:focus, .field select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px var(--tint-2); }
.field .hint { font-size: 0.83rem; color: var(--ink-3); margin-top: 6px; }
.field.invalid input, .field.invalid select { border-color: var(--error); }
.field.invalid input:focus, .field.invalid select:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14); }
.field .error-text { display: none; font-size: 0.83rem; color: var(--error); margin-top: 6px; font-weight: 500; }
.field.invalid .error-text { display: block; }
.field.invalid .hint { display: none; }

/* Stepper for learner count */
.stepper { display: flex; align-items: stretch; max-width: 260px; }
.stepper input { text-align: center; border-radius: 0; border-inline: 0; font-variant-numeric: tabular-nums; font-weight: 600; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper button {
  flex: 0 0 48px; font: inherit; font-size: 1.25rem; font-weight: 600; color: var(--indigo);
  background: #fafaff; border: 1px solid rgba(30, 27, 46, 0.2); cursor: pointer;
}
.stepper button:first-child { border-radius: 10px 0 0 10px; }
.stepper button:last-child { border-radius: 0 10px 10px 0; }
.stepper button:hover { background: var(--tint-2); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-actions .btn { min-width: 200px; }
.form-legal { font-size: 0.85rem; color: var(--ink-3); flex: 1 1 220px; }

.alert { border-radius: 12px; padding: 14px 16px; margin-bottom: 24px; font-size: 0.95rem; }
.alert-error { background: var(--error-bg); color: #991b1b; border: 1px solid rgba(220, 38, 38, 0.2); }
.alert strong { display: block; margin-bottom: 2px; }
.alert code { font-size: 0.88em; background: rgba(255, 255, 255, 0.7); padding: 1px 6px; border-radius: 6px; user-select: all; }

.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success */
.success-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 28px; }
.success-icon { flex: 0 0 48px; height: 48px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: grid; place-items: center; }
.success-head h2 { font-size: 1.6rem; margin-bottom: 6px; }
.success-head p { color: var(--ink-2); }

.key-box { border: 1px dashed rgba(79, 70, 229, 0.45); background: #fafaff; border-radius: 14px; padding: 18px; margin-bottom: 24px; }
.key-box .label { font-size: 0.9rem; font-weight: 700; color: var(--indigo); margin-bottom: 8px; }
.key-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.key-row code {
  flex: 1 1 240px; min-width: 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.95rem;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; overflow-wrap: anywhere; user-select: all;
}
.key-box .hint { font-size: 0.85rem; color: var(--ink-2); margin-top: 10px; }

.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 28px; }
.summary div { background: #fff; padding: 14px 16px; }
.summary dt { font-size: 0.78rem; color: var(--ink-3); font-weight: 600; }
.summary dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 480px) { .summary { grid-template-columns: 1fr; } }

.next-steps h3 { font-size: 1.05rem; margin-bottom: 10px; }
.next-steps ol { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 6px; }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound h1 { font-size: 2.4rem; margin-bottom: 12px; }
.notfound p { color: var(--ink-2); margin-bottom: 24px; }
