/* ==========================================================
   IB Weakness Scanner — visual redesign
   Light premium SaaS. One brand color: #2D2F8F (accents only).
   Semantic colors live ONLY inside report mockups.
   ========================================================== */

:root {
  --indigo: #2D2F8F;
  --indigo-deep: #232470;
  --indigo-tint: rgba(45, 47, 143, 0.07);
  --indigo-ring: rgba(45, 47, 143, 0.22);

  --ink: #16181F;
  --ink-2: #4B4F5C;
  --ink-3: #7A7E8C;
  --border: #E8E9EE;
  --border-strong: #DCDEE5;
  --bg: #FFFFFF;        /* card / field surface */
  --bg-soft: #F7F8FA;
  --page: #FBFBFD;      /* page background — slightly off-white so white cards lift */

  /* semantic — report mockups only */
  --sem-bad-ink: #B42318;
  --sem-bad-bg: #FEF1F0;
  --sem-ok-ink: #197A4B;
  --sem-ok-bg: #EAF6EF;

  --font: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --r-card: 14px;
  --r-field: 10px;
  --shadow-1: 0 1px 2px rgba(22, 24, 31, 0.04);
  --shadow-2: 0 1px 2px rgba(22, 24, 31, 0.05), 0 16px 40px -16px rgba(22, 24, 31, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--indigo); }

.container { width: min(1104px, 100% - 48px); margin-inline: auto; }
.container--narrow { width: min(800px, 100% - 48px); }

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

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 60;
  background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 8px; text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

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

section[id], section[aria-labelledby] { scroll-margin-top: 88px; }

/* ---------- shared section anatomy ---------- */

.section { padding: clamp(64px, 8vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--border); }

.eyebrow {
  margin: 0 0 14px;
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--indigo);
}
.section__title {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
}
.section__head { max-width: 720px; margin-bottom: clamp(32px, 4vw, 52px); }

/* ==========================================================
   COMPONENTS (defined once, reused)
   ========================================================== */

/* ----- buttons & fields ----- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: inherit; font-size: 15.5px; font-weight: 600;
  border-radius: var(--r-field); border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn--primary { background: var(--indigo); color: #fff; }
.btn--primary:hover { background: var(--indigo-deep); }
.btn--quiet {
  background: var(--bg); color: var(--ink);
  border-color: var(--border-strong); box-shadow: var(--shadow-1);
}
.btn--quiet:hover { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-ring); }
.btn[disabled] { opacity: 0.55; cursor: default; }

.field {
  min-height: 48px; padding: 0 16px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--r-field);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field::placeholder { color: var(--ink-3); }
.field:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-ring); }

/* ----- waitlist form ----- */

.waitlist-form { margin-top: 28px; }
.field-row { display: flex; flex-wrap: wrap; gap: 10px; }
.field-row .field { flex: 1 1 230px; }
.field-row--optional { margin-top: 10px; }
.field--select { flex: 0 1 330px; }
.form-status { min-height: 22px; margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }
.form-status[data-state="ok"] { color: var(--sem-ok-ink); font-weight: 600; }
.form-status[data-state="err"] { color: var(--sem-bad-ink); }

/* ----- chips (report mockups only) ----- */

.chip {
  display: inline-flex; align-items: center;
  padding: 2.5px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.chip--bad { background: var(--sem-bad-bg); color: var(--sem-bad-ink); }
.chip--ok { background: var(--sem-ok-bg); color: var(--sem-ok-ink); }

/* ----- misconception card (signature element) ----- */

.mis-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  padding: 20px 22px 18px 25px;
}
.mis-card::before {
  content: "";
  position: absolute; left: -1px; top: 14px; bottom: 14px;
  width: 3px; border-radius: 3px;
  background: var(--sem-bad-ink);
}
.mis-card__quote { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; }
.mis-card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-top: 10px;
  color: var(--ink-3); font-size: 14px;
}
.mis-card__meta svg { flex: none; }
.mis-card__evidence { display: inline-flex; align-items: center; gap: 6px; }
.mis-card__action {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--ink-2); font-size: 15px;
}

/* ----- report card ----- */

.report-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-2);
  padding: 24px;
}
.report-card__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.report-card__meta { display: grid; gap: 2px; }
.report-card__student { font-weight: 700; font-size: 17px; }
.report-card__paper { color: var(--ink-3); font-size: 13.5px; }

.score-badge {
  flex: none; display: inline-flex; align-items: baseline; gap: 1px;
  padding: 7px 13px; border-radius: 10px;
  background: var(--bg-soft); border: 1px solid var(--border);
  font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.score-badge__sep { color: var(--ink-3); font-weight: 400; }

.weak-areas { margin: 0; padding: 2px 0 0; }
.wa-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0;
}
.wa-row + .wa-row { border-top: 1px solid var(--border); }
.wa-node { font-size: 15px; color: var(--ink-2); }
.wa-score {
  margin: 0; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.report-card__block { padding-top: 20px; }
.report-card__block + .report-card__block { margin-top: 20px; border-top: 1px solid var(--border); }
.report-card__h {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; letter-spacing: 0;
  margin-bottom: 13px;
}
.report-card__h-tag {
  padding: 1.5px 9px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.report-card__note { color: var(--ink-2); font-size: 15px; }
.report-card__block--ok .report-card__h { color: var(--sem-ok-ink); }

.report-card__todo {
  margin-top: 22px; display: grid; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 20px;
  font-size: 15px; color: var(--ink-2);
}
.report-card__todo strong { color: var(--ink); }

.report-card__more {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px;
  font-size: 14.5px; font-weight: 600; text-decoration: none;
}
.report-card__more:hover { text-decoration: underline; }

/* ----- step card ----- */

.step-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-1);
  padding: 26px 24px 28px;
}
.step-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.step-card__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--indigo-tint); color: var(--indigo);
}
.step-card__num {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
}
.step-card__title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.step-card__text { margin-top: 9px; color: var(--ink-2); font-size: 15px; }

/* ----- reteach plan (sample report) ----- */

.plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.plan-row {
  display: grid; grid-template-columns: auto 1fr; gap: 16px;
  background: var(--bg);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-1);
  padding: 18px 20px;
}
.plan-row__num {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--indigo-tint); color: var(--indigo);
  font-size: 14px; font-weight: 700;
}
.plan-row__topic {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em;
}
.plan-row__ref { font-weight: 500; font-size: 13.5px; color: var(--ink-3); }
.plan-row__why, .plan-row__do { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.plan-row__why strong, .plan-row__do strong { color: var(--ink); font-weight: 650; }
.plan-row__do { padding-top: 8px; border-top: 1px solid var(--border); }

/* ----- subject pill ----- */

.subject-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 68px; padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
}
.subject-pill--open { border-color: var(--indigo); }
.subject-pill__name { font-weight: 600; font-size: 16px; }
.subject-pill__status {
  flex: none; padding: 3.5px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.status--open { background: var(--indigo-tint); color: var(--indigo); }
.status--next { background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--border); }
.status--planned { background: var(--bg-soft); color: var(--ink-3); }

/* ==========================================================
   SECTIONS
   ========================================================== */

/* ----- header ----- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(10px); }
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); font-size: 16.5px;
  min-height: 44px;
}
.wordmark__mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--indigo); color: #fff;
}
.wordmark__text strong { font-weight: 700; }

/* ----- hero ----- */

.hero { padding: clamp(56px, 7.5vw, 96px) 0 clamp(48px, 6vw, 80px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.hero__title {
  font-size: clamp(38px, 4.8vw, 58px);
  font-weight: 700; letter-spacing: -0.028em;
}
.subhead {
  margin-top: 20px; max-width: 52ch;
  font-size: 18.5px; line-height: 1.65; color: var(--ink-2);
}
.hero__secondary { margin-top: 22px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  min-height: 44px;
}
.link-arrow svg { transition: transform 0.18s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

.microtrust {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 30px; padding-top: 22px;
  border-top: 1px solid var(--border);
  max-width: 52ch; color: var(--ink-2); font-size: 14.5px; line-height: 1.6;
}
.microtrust svg { flex: none; margin-top: 3px; color: var(--indigo); }

.hero__proof { min-width: 0; }
.hero__proof .report-card { padding: 22px; }

/* ----- problem ----- */

.problem { text-align: center; }
.problem .section__title { max-width: 19ch; margin-inline: auto; font-size: clamp(28px, 3.6vw, 42px); }
.problem__lead {
  margin: 22px auto 0; max-width: 60ch;
  font-size: 19px; line-height: 1.7; color: var(--ink-2);
}
.problem__lead em { font-style: italic; }

/* ----- how it works ----- */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
}

/* ----- the difference ----- */

.compare {
  display: grid;
  grid-template-columns: minmax(0, 5fr) auto minmax(0, 7fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: stretch;
}
.compare__label {
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 14px;
}

/* left: what a typical grader returns — deliberately thin */
.grader-card {
  flex: 1;
  display: flex; flex-direction: column;
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-card);
  background: var(--bg-soft);
  padding: 22px 24px;
  color: var(--ink-2);
}
.grader-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border-strong);
  font-size: 13.5px; color: var(--ink-3);
}
.grader-rows { margin: 4px 0 0; padding: 0; }
.grader-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; font-size: 15px;
}
.grader-row + .grader-row { border-top: 1px solid var(--border-strong); }
.grader-row dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grader-row__mark { color: var(--sem-bad-ink); margin-right: 6px; }
.grader-card__comment {
  margin-top: auto; padding-top: 14px;
  font-style: italic; font-size: 15px; color: var(--ink-3);
}
.compare__col { display: flex; flex-direction: column; }

.report-card--diff { flex: 1; display: flex; flex-direction: column; padding: 22px 24px; }
.report-card--diff .grader-card__head { border-bottom-color: var(--border); }
.report-card--diff .grader-row { color: var(--ink); }
.report-card--diff .grader-row + .grader-row { border-top-color: var(--border); }
.diff-feedback {
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.diff-feedback__label {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--indigo); margin-bottom: 8px;
}
.diff-feedback__why, .diff-feedback__do { font-size: 15px; color: var(--ink-2); }
.diff-feedback__why strong, .diff-feedback__do strong { color: var(--ink); font-weight: 650; }
.diff-feedback__do { margin-top: 8px; }
.diff-feedback .chip { vertical-align: 1px; margin-left: 2px; }
.compare__score {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-card);
  background: var(--bg-soft);
  padding: 36px 24px;
}
.big-number {
  font-size: clamp(56px, 7vw, 84px); font-weight: 700;
  letter-spacing: -0.045em; line-height: 1;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.big-number__sep { color: var(--ink-3); font-weight: 400; }
.compare__vs {
  align-self: center;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
}
.compare__diagnosis { display: flex; flex-direction: column; }
.compare__diagnosis .mis-card { flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* ----- for teachers ----- */

.for-teachers__card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-1);
  padding: clamp(36px, 5vw, 60px);
  text-align: center;
}
.for-teachers__text {
  margin: 18px auto 0; max-width: 56ch;
  font-size: 17.5px; line-height: 1.7; color: var(--ink-2);
}
.for-teachers__text strong { color: var(--ink); }

/* ----- subjects ----- */

.subjects-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 13px;
}

/* ----- sample report ----- */

.diagnosis-list { display: grid; gap: 13px; }
.sample__note {
  margin-top: 22px; text-align: center;
  color: var(--ink-3); font-size: 14.5px;
}

/* ----- final CTA ----- */

.final-cta__inner { text-align: center; }
.final-cta .section__title { max-width: 24ch; margin-inline: auto; }
.final-cta__lead { margin-top: 14px; font-size: 18px; color: var(--ink-2); }
.waitlist-form--center { max-width: 560px; margin-inline: auto; }
.waitlist-form--center .field-row,
.waitlist-form--center .field-row--optional { justify-content: center; }

.pay-intent { margin-top: 40px; }
.pay-intent__btn {
  font: inherit; font-size: 15px; font-weight: 600;
  color: var(--indigo); background: transparent;
  border: 1.5px dashed var(--indigo-ring);
  border-radius: 999px;
  min-height: 44px; padding: 9px 22px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pay-intent__btn:hover { background: var(--indigo-tint); }
.pay-intent__btn[data-sent] { border-style: solid; cursor: default; }
.pay-intent__note { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }

/* ----- footer ----- */

.site-footer { border-top: 1px solid var(--border); padding: 32px 0 44px; }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px;
  color: var(--ink-3); font-size: 14px;
}
.site-footer__brand { font-weight: 700; color: var(--ink); }
.site-footer__note { flex: 1 1 320px; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__proof { max-width: 540px; }
  .steps { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .compare__vs { justify-self: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .field-row { flex-direction: column; }
  .field-row .field, .field-row .btn { width: 100%; }
  .field--select { flex-basis: auto; }
  .wa-row { flex-wrap: wrap; }
  .report-card { padding: 18px; }
}

/* ==========================================================
   MOTION — last, minimal, opt-in
   ========================================================== */

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
  html.anim-ready .hero__copy > * { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  html.anim-ready .hero__copy > *:nth-child(2) { animation-delay: 0.05s; }
  html.anim-ready .hero__copy > *:nth-child(3) { animation-delay: 0.1s; }
  html.anim-ready .hero__copy > *:nth-child(4) { animation-delay: 0.15s; }
  html.anim-ready .hero__copy > *:nth-child(5) { animation-delay: 0.2s; }
  html.anim-ready .hero__proof { animation: rise 0.6s 0.18s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

  html.anim-ready .mis-card[data-reveal], html.anim-ready .plan-row[data-reveal], html.anim-ready .report-card--diff[data-reveal] {
    opacity: 0; transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  html.anim-ready .mis-card[data-reveal="in"], html.anim-ready .plan-row[data-reveal="in"], html.anim-ready .report-card--diff[data-reveal="in"] { opacity: 1; transform: translateY(0); }
}
