/* SchoolTutor public sales site (RC9.2). Mobile-first (360 px up), then tablet and desktop.
   SchoolTutor identity only: the app's colours (#2c1f5e, #5b4cdb, #3f2aa8, #ffd166) and its
   system font stack; no external fonts or assets. Logical properties throughout so a
   right-to-left page needs only dir="rtl". No inline styles (CSP style-src 'self'). */

:root {
  --ink: #1d1b3a;
  --ink-2: #4b4775;
  --night: #2c1f5e;
  --brand: #5b4cdb;
  --brand-ink: #3f2aa8;
  --sun: #ffd166;
  --sun-deep: #ffc94a;
  --lav: #f1edff;
  --lav-2: #e4dcff;
  --paper: #ffffff;
  --bg: #faf8ff;
  --line: #d9d1f5;
  --ok-bg: #e3efff;   /* "available": blue, distinct from amber for every common colour-vision type */
  --ok-ink: #0b3d91;
  --mid-bg: #fff1cc;  /* "being improved": amber */
  --mid-ink: #6b3f00;
  --soon-bg: #ececf1; /* "coming": neutral grey */
  --soon-ink: #33334d;
  --radius: 22px;
  --shadow: 0 10px 30px rgb(44 31 94 / 12%);
  --wrap: 72rem;
  color-scheme: light;
}

*, *::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.site {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", "Baloo 2", "Varela Round", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 4px solid var(--sun-deep); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 900; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 6.2vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 4.6vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 0.9em; }
.muted { color: var(--ink-2); }
.small { font-size: 0.92rem; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }

.skip {
  position: absolute; inset-inline-start: 8px; inset-block-start: -80px; z-index: 50;
  padding: 12px 16px; border-radius: 12px; background: var(--paper); color: var(--brand-ink); font-weight: 800;
}
.skip:focus { inset-block-start: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 20;
  background: rgb(44 31 94 / 96%); color: #fff;
  box-shadow: 0 2px 12px rgb(20 10 60 / 25%);
}
.site-header .wrap { display: flex; align-items: center; gap: 10px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 900; font-size: 1.2rem; min-height: 48px; }
.brand:hover { color: #fff; }
.brand img { width: 36px; height: 36px; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.nav-inline { display: none; }
.nav-inline a, .nav-menu a { color: #fff; text-decoration: none; font-weight: 800; }
.nav-menu { position: relative; }
.nav-menu > summary {
  list-style: none; cursor: pointer; min-height: 48px; min-width: 48px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 14px;
  background: rgb(255 255 255 / 12%); font-weight: 800;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu[open] > summary { background: rgb(255 255 255 / 22%); }
.nav-menu nav {
  position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 8px);
  width: min(86vw, 18rem); padding: 8px; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow);
  display: grid;
}
.nav-menu nav a { color: var(--ink); min-height: 48px; display: flex; align-items: center; padding: 0 12px; border-radius: 12px; }
.nav-menu nav a:hover, .nav-menu nav a[aria-current="page"] { background: var(--lav); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: 52px; padding: 10px 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 900; text-decoration: none; cursor: pointer; line-height: 1.25;
}
.btn--primary { background: var(--sun); color: var(--night); border-color: var(--sun-deep); box-shadow: 0 6px 18px rgb(255 190 50 / 35%); }
.btn--primary:hover { background: var(--sun-deep); color: var(--night); }
.btn--ghost { background: transparent; color: var(--brand-ink); border-color: var(--brand); }
.btn--ghost:hover { background: var(--lav); }
.btn--light { background: rgb(255 255 255 / 12%); color: #fff; border-color: rgb(255 255 255 / 55%); }
.btn--light:hover { background: rgb(255 255 255 / 22%); color: #fff; }
.btn--small { min-height: 48px; padding: 6px 16px; }
.btn--block { display: flex; width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row .btn { flex: 1 1 14rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 90% at 85% 10%, #6e5ce6 0%, transparent 60%), linear-gradient(160deg, #3a2a86 0%, var(--night) 70%);
  padding-block: 22px 30px;
}
.hero .wrap { display: grid; gap: 20px; }
.hero h1 { margin-block-end: 0.3em; }
.hero h1 .h1-brand { display: block; color: var(--sun); font-size: 0.62em; letter-spacing: 0.02em; }
.tagline { font-weight: 900; font-size: 1.15rem; color: var(--sun); margin-block-end: 0.6em; }
.hero-lead { font-size: 1.08rem; color: #ece8ff; }
.hero-figure { margin: 0; position: relative; }
.hero-figure img { border-radius: 28px; box-shadow: 0 18px 40px rgb(10 5 40 / 45%); aspect-ratio: 900 / 745; object-fit: cover; width: 100%; }
.hero-figure figcaption {
  position: absolute; inset-inline-start: 12px; inset-block-end: 12px; max-width: calc(100% - 24px);
  padding: 8px 14px; border-radius: 16px; background: rgb(255 255 255 / 94%); color: var(--ink); font-weight: 800; font-size: 0.95rem;
}
.ai-note {
  display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 16px;
  background: rgb(255 255 255 / 10%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 25%); color: #fff; font-weight: 700; font-size: 0.98rem;
}
.ai-note strong { color: var(--sun); }

/* ---------- Sections ---------- */
.section { padding-block: 40px; }
.section--tint { background: var(--lav); }
.section--night { background: var(--night); color: #fff; }
.section--night a:not(.btn) { color: var(--sun); }
.section-head { max-width: 46rem; margin-block-end: 22px; }
.eyebrow { margin: 0 0 6px; font-weight: 900; color: var(--brand); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; }
.section--night .eyebrow { color: var(--sun); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.card {
  background: var(--paper); border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--shadow);
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px;
}
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--ink-2); }
.card .chip { align-self: flex-start; }
.card-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--lav); color: var(--brand-ink); font-weight: 900; font-size: 1.35rem;
}

/* Availability chips: always a word plus a shape, never colour alone. */
.chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 12px; border-radius: 999px;
  font-size: 0.86rem; font-weight: 900; line-height: 1.4;
}
.chip::before { font-size: 0.9em; }
.chip--available { background: var(--ok-bg); color: var(--ok-ink); }
.chip--available::before { content: "\2714"; }
.chip--improving { background: var(--mid-bg); color: var(--mid-ink); }
.chip--improving::before { content: "\25D0"; }
.chip--coming { background: var(--soon-bg); color: var(--soon-ink); }
.chip--coming::before { content: "\25CB"; }
.chip--offer { background: var(--sun); color: var(--night); }
.chip--offer::before { content: "\2605"; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 18px; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps li {
  counter-increment: step; position: relative; padding: 14px 16px; padding-inline-start: 64px; border-radius: 18px;
  background: var(--paper); border: 1px solid var(--line); min-height: 56px; font-weight: 700;
}
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 14px; inset-block-start: 12px;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 900;
}
.steps li[aria-current="step"] { border: 2px solid var(--brand); background: var(--lav); }
.steps .muted { display: block; font-weight: 600; font-size: 0.92rem; }

.split { display: grid; gap: 20px; align-items: center; }
.ticks { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-inline-start: 30px; }
.ticks li::before { content: "\2714"; position: absolute; inset-inline-start: 0; color: var(--brand); font-weight: 900; }
.section--night .ticks li::before { color: var(--sun); }

.offer {
  border-radius: 28px; padding: 24px 18px; color: var(--night);
  background: linear-gradient(150deg, #fff6d9 0%, #ffe39a 100%); border: 2px solid var(--sun-deep); box-shadow: var(--shadow);
}
.offer h2 { color: var(--night); }

.demo-box {
  border-radius: 24px; padding: 22px 18px; background: rgb(255 255 255 / 8%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 25%); text-align: center;
}
.demo-video { width: 100%; border-radius: 18px; background: #000; }

.notice { border-radius: 18px; padding: 16px; margin-block-end: 16px; border: 2px solid var(--line); background: var(--paper); }
.notice p:last-child { margin-block-end: 0; }
.notice--info { border-color: var(--brand); background: var(--lav); }
.notice--warn { border-color: var(--sun-deep); background: #fff7df; }
.notice h2, .notice h3 { font-size: 1.2rem; }

/* ---------- Plans ---------- */
.plan-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.plan-card {
  background: var(--paper); border-radius: 26px; padding: 22px 18px; border: 2px solid var(--line); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.plan-card--founding { border-color: var(--sun-deep); }
.plan-name { margin: 0; font-size: 1.35rem; }
.plan-price { margin: 0; font-size: 2rem; font-weight: 900; color: var(--night); }
.plan-price--tbc { font-size: 1.15rem; color: var(--ink-2); }
.plan-per { font-size: 1rem; font-weight: 700; color: var(--ink-2); }
.plan-facts { margin: 0; padding-inline-start: 1.1em; display: grid; gap: 6px; }
.plan-note { margin: 0; font-size: 0.92rem; color: var(--ink-2); }
.plan-card .btn { margin-block-start: auto; }
.pay-status { margin-block: 10px 0; font-weight: 700; }

/* ---------- Early Access List (built by site.js only while the waitlist is on) ---------- */
.waitlist { margin-block-start: 22px; padding-block-start: 18px; border-block-start: 2px solid var(--sun-deep); }
.waitlist[hidden] { display: none; }
.waitlist-form { display: grid; gap: 12px; max-inline-size: 34rem; }
.waitlist-form .field { display: grid; gap: 6px; margin: 0; }
.waitlist-form label { font-weight: 700; }
.waitlist-form input[type="email"], .waitlist-form input[type="text"], .waitlist-form input[type="tel"] {
  min-height: 48px; padding-inline: 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--paper); font: inherit; color: inherit;
}
.waitlist-form .field--check { grid-template-columns: auto 1fr; align-items: start; }
.waitlist-form .field--check label { font-weight: 400; }
.waitlist-form input[type="checkbox"] { inline-size: 24px; block-size: 24px; margin-block-start: 2px; }
.waitlist-form .hp { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.is-tbc { font-style: italic; color: var(--ink-2); }

/* ---------- Policy pages ---------- */
.page-hero { background: var(--night); color: #fff; padding-block: 26px; }
.page-hero h1 { font-size: clamp(1.6rem, 5.4vw, 2.6rem); margin: 0 0 0.3em; }
.page-hero p { margin: 0; color: #ece8ff; }
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.35rem; margin-block-start: 1.6em; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin-block-end: 0.4em; }
.facts { width: 100%; border-collapse: collapse; margin-block-end: 1.2em; background: var(--paper); border-radius: 16px; overflow: hidden; }
.facts th, .facts td { text-align: start; vertical-align: top; padding: 12px 14px; border-block-end: 1px solid var(--line); }
.facts th { width: 42%; font-weight: 800; background: var(--lav); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 18px; }
.toc a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--lav); text-decoration: none; font-weight: 800; }

/* ---------- Footer ---------- */
.site-footer { background: #1f1546; color: #ddd7ff; padding-block: 34px 28px; font-size: 0.98rem; }
.site-footer a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.footer-grid h2 { font-size: 1rem; color: var(--sun); margin: 0 0 6px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-legal { margin-block-start: 22px; padding-block-start: 16px; border-block-start: 1px solid rgb(255 255 255 / 18%); }
.footer-legal p { margin: 0 0 6px; }
.site-footer .is-tbc { color: #c8c0f0; }

/* ---------- Tablet and desktop ---------- */
@media (min-width: 720px) {
  .wrap { padding-inline: 24px; }
  .section { padding-block: 56px; }
  .hero { padding-block: 40px 52px; }
  .split { grid-template-columns: 1fr 1fr; gap: 36px; }
  .offer { padding: 32px; }
}
@media (min-width: 960px) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px; }
  .nav-inline { display: flex; gap: 4px; align-items: center; }
  .nav-inline a { min-height: 48px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 12px; }
  .nav-inline a:hover, .nav-inline a[aria-current="page"] { background: rgb(255 255 255 / 14%); color: #fff; }
  .nav-menu { display: none; }
}
