@font-face {
  font-family: 'Figtree';
  src: url('/fonts/Figtree_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/Figtree_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/Figtree_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}

/* Same tokens as the app (src/theme/tokens.ts). */
:root {
  --ink: #14202b;
  --ink-soft: #3d4752;
  --muted: #5b6673;
  --line: #e3e7ec;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --blue: #3554d1;
  --blue-deep: #253fa6;
  --blue-tint: #e8edfc;
  --blue-text: #2b47b8;
  --ok-bg: #e2f3ea;
  --ok: #1b6b45;
  --part-bg: #fff1cc;
  --part: #7a5200;
  --no-bg: #fde8e7;
  --no: #b42318;
  --purple-bg: #efeafb;
  --purple: #5a3aae;
  --teal-bg: #e1f4f1;
  --teal: #0c736c;
  --orange-bg: #fcefe3;
  --orange: #a84d0c;
  --shadow-card: 0 1px 2px rgba(20, 32, 43, 0.06), 0 18px 40px -18px rgba(20, 32, 43, 0.28);
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--blue-text); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { left: 8px; }

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

/* Header: stays on top so "Get the app" is always one tap away. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 246, 248, 0.9);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.site-nav > a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.975rem; padding: 10px 0; }
.site-nav > a:not(.btn):hover { color: var(--ink); }
.site-nav a[aria-current='page'] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms ease-out, border-color 150ms ease-out, transform 150ms ease-out;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-quiet { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: #c4ccd6; color: var(--ink); }
.btn-small { min-height: 44px; padding: 0 16px; border-radius: 12px; font-size: 0.95rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Apple's badge, unchanged; 52 px tall to line up with the buttons, with
   Apple's minimum clear space (a quarter of its height) kept by the gap. */
.store-badge { display: inline-flex; border-radius: 10px; flex: none; }
.store-badge img { height: 52px; width: auto; }

/* QR code for visitors on a computer; hidden on phones and touch screens. */
.scan { display: none; align-items: center; gap: 16px; margin-top: 28px; max-width: 26em; }
.scan img { width: 88px; height: 88px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-sizing: content-box; }
.scan p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
@media (hover: hover) and (pointer: fine) and (min-width: 861px) { .scan { display: flex; } }

/* Chips, matching the app's plan and outcome colours */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.4;
  white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-part { background: var(--part-bg); color: var(--part); }
.chip-iep { background: var(--blue-tint); color: var(--blue-text); }
.chip-504 { background: var(--purple-bg); color: var(--purple); }
.chip-esl { background: var(--teal-bg); color: var(--teal); }
.chip-mtss { background: var(--orange-bg); color: var(--orange); }

/* Hero */
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding-top: clamp(20px, 5vw, 56px);
  padding-bottom: clamp(48px, 7vw, 88px);
}
.hero h1 {
  margin: 0 0 20px;
  font-weight: 800;
  font-size: clamp(2.5rem, 5.4vw, 4.125rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 12ch;
}
.hero .lede {
  margin: 0 0 32px;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 32em;
}
.hero .fine { margin: 18px 0 0; font-size: 0.925rem; color: var(--muted); }

/* The phone sits on a brand-blue panel; two log entries slide out of it once. */
.hero-visual {
  position: relative;
  min-height: 620px;
  display: grid;
  place-items: center;
}
.hero-panel {
  position: absolute;
  inset: 36px 0 36px 12%;
  border-radius: 32px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
    var(--blue);
}
/* An iPhone bezel sized to the screenshots (1320 x 2868, iPhone Pro Max), so
   nothing is cropped or stretched. Corner radii are percentages, so the
   shape holds at any width. */
.device {
  position: relative;
  padding: 3.2%;
  border-radius: 16.5% / 7.6%;
  background: #0f1820;
  box-shadow:
    inset 0 0 0 1.5px #3a4652,
    0 30px 60px -24px rgba(20, 32, 43, 0.45);
}
.device img {
  width: 100%;
  height: auto;
  aspect-ratio: 1320 / 2868;
  border-radius: 13.5% / 6.2%;
}
.device-hero { width: min(260px, 60%); z-index: 1; }

.deck { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.entry {
  position: absolute;
  width: min(300px, 70%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-card);
}
.entry-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.student { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.entry-meta { margin: 0 0 2px; font-size: 0.8125rem; color: var(--muted); }
.entry-title { margin: 0; font-weight: 800; font-size: 1rem; line-height: 1.3; letter-spacing: -0.01em; }
.entry-2 { top: 13%; left: 0; transform: rotate(-4deg); }
.entry-1 { bottom: 12%; right: 0; transform: rotate(2.5deg); }

@media (prefers-reduced-motion: no-preference) {
  .entry { animation: slide-out 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .entry-2 { --from: 70px; animation-delay: 250ms; }
  .entry-1 { --from: -70px; animation-delay: 450ms; }
  @keyframes slide-out {
    from { opacity: 0; transform: translateX(var(--from)) rotate(0deg) scale(0.94); }
  }
}

/* Audience paths */
.paths .wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: clamp(16px, 3vw, 24px);
}
.path {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease-out;
}
.path:hover { border-color: var(--blue); color: var(--ink); }
.path strong { display: block; font-weight: 800; letter-spacing: -0.01em; }
.path span span { display: block; font-size: 0.925rem; color: var(--muted); }
.path-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: var(--blue-tint);
  color: var(--blue-text);
}
.path-icon svg { width: 22px; height: 22px; }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-title {
  margin: 0 0 14px;
  font-weight: 800;
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 20ch;
}
.intro { margin: 0; color: var(--ink-soft); max-width: 38em; font-size: 1.125rem; }

/* Feature rows: text on one side, the product on the other, alternating. */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  margin-top: clamp(56px, 8vw, 96px);
}
.feature.flip .feature-text { order: 2; }
.feature h3 { margin: 16px 0 8px; font-weight: 800; font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.15; letter-spacing: -0.02em; }
.feature p { margin: 0; color: var(--ink-soft); max-width: 30em; }
.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.feature-icon svg { width: 24px; height: 24px; }
.tone-blue { background: var(--blue-tint); color: var(--blue-text); }
.tone-teal { background: var(--teal-bg); color: var(--teal); }
.tone-purple { background: var(--purple-bg); color: var(--purple); }
.tone-amber { background: var(--part-bg); color: var(--part); }
.plan-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; }
.plan-list .chip { font-size: 0.9375rem; padding: 5px 14px; }

.feature-visual { display: grid; place-items: center; padding: clamp(24px, 4vw, 44px); border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
.feature-visual .device { width: min(260px, 100%); }

/* Small pieces of the app's UI, drawn in HTML. */
.ui-card {
  container-type: inline-size;
  width: min(420px, 100%);
  background: var(--paper);
  border-radius: 20px;
  padding: 18px;
}
.ui-label { margin: 6px 4px 10px; font-weight: 600; font-size: 0.8125rem; color: var(--muted); }
.ui-check {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  background: var(--surface);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
}
.ui-check:nth-of-type(2) { border-radius: 14px 14px 0 0; }
.ui-check:nth-of-type(4) { border-radius: 0 0 14px 14px; border-bottom: 0; margin-bottom: 8px; }
.ui-check .box { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 2px solid #858f9c; }
.ui-check.on { font-weight: 600; }
.ui-check.on .box {
  border-color: var(--blue);
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.ui-outcomes { display: flex; flex-wrap: wrap; gap: 8px; }
.ui-out {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 6px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  white-space: nowrap;
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-weight: 600;
  font-size: 0.8125rem;
  text-align: center;
}
.ui-out svg { width: 14px; height: 14px; flex: none; }
.ui-out.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
/* Too narrow for three side by side: stack them, as the app does on small phones. */
@container (max-width: 340px) {
  .ui-outcomes { flex-direction: column; }
}
.ui-title { margin: 4px 4px 0; font-weight: 800; font-size: 1.125rem; letter-spacing: -0.01em; }
.ui-sub { margin: 0 4px 14px; font-size: 0.875rem; color: var(--muted); }
.ui-teacher {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 14px;
  margin-top: 8px;
}
.ui-teacher strong { display: block; font-size: 0.95rem; }
.ui-teacher span span { display: block; font-size: 0.8125rem; color: var(--muted); }
.ui-teacher.pending { background: transparent; border: 1.5px dashed #c4ccd6; }
.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.8125rem;
}
.a1 { background: var(--blue-tint); color: var(--blue-text); }
.a2 { background: var(--purple-bg); color: var(--purple); }
.a3 { background: var(--paper); color: var(--muted); font-size: 1.125rem; }

/* Privacy, on the app's ink colour so it reads as its own chapter */
.section-ink { background: var(--ink); color: #fff; }
.section-ink .intro { color: #c9d1db; }
.section-ink a { color: #b9c7ff; }
.section-ink a:hover { color: #fff; }
.section-ink :focus-visible { outline-color: #b9c7ff; }
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(32px, 5vw, 48px);
}
.privacy-grid h3 { margin: 0 0 12px; font-weight: 800; font-size: 1.1875rem; letter-spacing: -0.01em; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 11px 0 11px 34px; border-top: 1px solid var(--line); }
.ticks li:last-child { border-bottom: 1px solid var(--line); }
.section-ink .ticks li { border-color: rgba(255, 255, 255, 0.14); color: #e8edf3; }
.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 15px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ok-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b6b45' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.ticks.never li::before {
  background: var(--no-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b42318' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.more { margin: 28px 0 0; font-weight: 600; }

/* Schools */
.schools {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.facts { margin: 0; display: grid; gap: 22px; }
.facts dt { font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.01em; }
.facts dd { margin: 4px 0 0; color: var(--ink-soft); }

.faq { margin-top: clamp(48px, 7vw, 72px); }
.faq-title { margin: 0 0 12px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.015em; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  width: 12px;
  height: 12px;
  flex: none;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 200ms ease-out;
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); max-width: 44em; }

/* Closing band */
.band { background: var(--blue); color: #fff; }
.band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: clamp(40px, 6vw, 64px);
  padding-bottom: clamp(40px, 6vw, 64px);
}
.band h2 { margin: 0; font-weight: 800; font-size: clamp(1.625rem, 3vw, 2.25rem); letter-spacing: -0.025em; line-height: 1.1; max-width: 18ch; }
.band .btn-primary { background: #fff; color: var(--blue-deep); }
.band .btn-primary:hover { background: var(--blue-tint); color: var(--blue-deep); }
.band .btn-quiet { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.band .btn-quiet:hover { border-color: #fff; color: #fff; }
.band :focus-visible { outline-color: #fff; }

/* Footer */
.site-footer { padding: 36px 0 48px; font-size: 0.95rem; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }

/* Policy and support pages */
.doc { padding: clamp(24px, 5vw, 56px) 0 clamp(56px, 8vw, 96px); }
.doc .wrap { max-width: calc(720px + 2 * var(--gutter)); }
.doc h1 { margin: 0 0 14px; font-weight: 800; font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.05; letter-spacing: -0.035em; }
.doc .updated { margin: 0 0 28px; color: var(--muted); }
.doc .lead { font-size: 1.1875rem; color: var(--ink-soft); margin: 0 0 8px; }
.doc h2 { margin: 44px 0 10px; font-weight: 800; font-size: 1.375rem; letter-spacing: -0.015em; line-height: 1.25; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 1.2em; }
.doc li { margin: 0 0 8px; }
.doc li::marker { color: var(--blue); }
.help-card {
  margin: 28px 0 8px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.help-card p { margin: 0 0 14px; }
.help-card .actions { gap: 10px; }

@media (max-width: 960px) {
  .site-nav .hide-md { display: none; }
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { min-height: 600px; }
  .hero-panel { inset: 24px 6%; }
  .paths .wrap { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-text { order: 0; }
  .privacy-grid, .schools { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-nav .hide-sm { display: none; }
  .hero .actions .btn, .band .actions .btn { flex: 1 1 100%; }
  .hero .actions .store-badge, .band .actions .store-badge { flex: 0 0 auto; }
  .hero-visual { min-height: 520px; }
  .hero-panel { inset: 20px 0; border-radius: 24px; }
  .device-hero { width: min(220px, 60%); }
  .entry { width: min(230px, 70%); padding: 10px 12px 12px; }
  .entry-head { margin-bottom: 6px; }
  .entry-title { font-size: 0.9375rem; }
  .entry-2 { top: 3%; left: 0; }
  .entry-1 { bottom: 4%; right: 0; }
  .ui-card { padding: 14px; }
  .ui-out { padding: 0 12px; }
}
