/* Gradehatch Learning: Clear Grade (B2) */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #14123A;
  --navy-deep: #0A2A66;
  --frame: #1D2B4F;
  --text: #2A2850;
  --text-soft: #4F4D6E;
  --muted: #5A5878;
  --blue: #0A7CFF;
  --action: #0062E0;
  --action-dark: #003F94;
  --link: #0058CC;
  --soft-blue: #EAF2FF;
  --mist: #F5F8FF;
  --mist-2: #F2F6FF;
  --line: #E4E7F2;
  --line-2: #DCE3F2;
  --gold: #FFD866;
  --gold-btn: #FFC93C;
  --gold-dark: #B88A00;
  --green: #1E9E4A;
  --radius: 24px;
  --shadow-frame: 0 30px 60px rgba(20, 18, 58, 0.14);
  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--navy);
  background: #FFFFFF;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--navy); }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
mark { background: var(--gold); color: var(--navy); border-radius: 5px; padding: 0 5px; }

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

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--blue); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: #FFFFFF; padding: 10px 16px; border-radius: 10px; font-weight: 700;
}
.skip-link:focus { top: 12px; color: #FFFFFF; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; font-size: 17px; line-height: 1.2;
  border: 0; border-radius: 14px; padding: 15px 28px; min-height: 48px;
  text-decoration: none; cursor: pointer;
  transition: transform 0.07s ease-out, box-shadow 0.07s ease-out, background-color 0.15s;
}
.btn:active { transform: translateY(3px); }
.btn-sm { font-size: 16px; padding: 12px 20px; border-radius: 12px; min-height: 44px; }
.btn-lg { font-size: 18px; padding: 16px 28px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--action); color: #FFFFFF; box-shadow: 0 5px 0 var(--action-dark); }
.btn-primary:hover { background: #0057C9; color: #FFFFFF; }
.btn-primary:active { box-shadow: 0 2px 0 var(--action-dark); }
.btn-soft { background: var(--soft-blue); color: var(--link); }
.btn-soft:hover { background: #DCE9FF; color: var(--link); }
.btn-gold { background: var(--gold-btn); color: var(--navy); box-shadow: 0 4px 0 var(--gold-dark); border-radius: 12px; }
.btn-gold:hover { background: #FFD45C; color: var(--navy); }
.btn-gold:active { box-shadow: 0 1px 0 var(--gold-dark); }
.btn-white { background: #FFFFFF; color: var(--navy-deep); font-weight: 800; box-shadow: 0 5px 0 var(--navy-deep); }
.btn-white:hover { background: #F2F6FF; color: var(--navy-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #EEF0F6;
}
.header-inner { display: flex; align-items: center; gap: 12px 28px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand-word { font-weight: 800; font-size: 23px; letter-spacing: -0.045em; }
.brand-tag { font-weight: 700; font-size: 13px; background: var(--gold); border-radius: 6px; padding: 1px 7px; }
.site-nav { display: flex; gap: 26px; flex: 1; font-size: 16px; font-weight: 500; }
.site-nav a { color: var(--text); text-decoration: none; padding: 6px 0; }
.site-nav a:hover { color: var(--blue); }
.menu-toggle {
  display: none; margin-left: auto;
  font: inherit; font-weight: 700; font-size: 15px; color: var(--navy);
  background: var(--mist); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-height: 44px; cursor: pointer;
}

/* Hero */
.hero { background: linear-gradient(180deg, #F2F7FF 0%, #FFFFFF 100%); }
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 72px; padding-bottom: 80px; }
.hero-copy { flex: 1 1 460px; display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.proof-pill {
  display: inline-flex; align-self: flex-start; align-items: center; gap: 12px;
  background: #E3EEFF; border: 1px solid #CFE0FF; border-radius: 14px; padding: 8px 16px 8px 8px;
  font-size: 15px; line-height: 1.4;
}
.pill-pets { display: flex; flex-shrink: 0; }
.pill-pet {
  width: 38px; height: 38px; border-radius: 10px; border: 2px solid #FFFFFF;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pill-pet + .pill-pet { margin-left: -8px; }
.pill-pet--gold { background: #FFF4CF; }
.pill-pet--pink { background: #FBE3F1; }
.pill-pet--mint { background: #DFF5EE; }
h1 { font-size: clamp(42px, 5.4vw, 68px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; }
.lead { font-size: 19px; line-height: 1.6; color: var(--text-soft); max-width: 560px; }
.checks-inline { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; font-weight: 600; color: #3E3C5C; }
.checks-inline li { display: flex; align-items: center; gap: 6px; }
.checks-inline li::before {
  content: ""; width: 16px; height: 16px; flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%231E9E4A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* room under the Learn menu for the taller phone (a percentage, so it scales with the frames) */
.hero-media { flex: 1 1 520px; position: relative; min-width: 0; padding-bottom: 11%; }

/* Device frames and screenshot placeholders */
.frame { position: relative; overflow: hidden; background: #FFFFFF; border: 10px solid var(--frame); border-radius: 26px; box-shadow: var(--shadow-frame); }
.frame img { display: block; width: 100%; height: auto; }
.frame--hero { background: var(--frame); }
/* the phone covers the Learn menu's avatar panel (bottom-right), the least important part, and hangs below it */
.frame--phone { position: absolute; right: -24px; bottom: 0; width: 27%; border-width: 8px; border-radius: 30px; box-shadow: 0 24px 44px rgba(20, 18, 58, 0.22); }
.frame--note { border-radius: 24px; }
.frame--quiz { position: relative; z-index: 1; width: 66%; border-radius: 22px; }
.frame-tag { position: absolute; right: 14px; top: 14px; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 6px 12px; }
.frame-tag--blue { background: var(--action); color: #FFFFFF; }
.frame-tag--gold { background: var(--gold); color: var(--navy); font-size: 12px; }

.shot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 16px; text-align: center; color: #3E4A6B;
  background: repeating-linear-gradient(135deg, #F2F6FD 0 14px, #E9EFFA 14px 28px);
}
.shot--learn { aspect-ratio: 1565 / 892; }
.shot--note-gcse { aspect-ratio: 1877 / 960; }
.shot--note-alevel { aspect-ratio: 1200 / 740; }
.shot--run { aspect-ratio: 1902 / 968; }
.shot-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.shot-label { font-size: 17px; font-weight: 800; color: var(--navy); }

/* Sections */
.section { padding: 72px 0; }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 680px; margin-bottom: 32px; }
.section-head--center { align-items: center; text-align: center; margin: 0 auto; }
.section-head h2, h2 { font-size: clamp(34px, 3.6vw, 46px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; }
.section-head p { font-size: 17px; line-height: 1.6; color: var(--text-soft); }
h2.display { font-size: clamp(38px, 4.8vw, 58px); letter-spacing: -0.04em; line-height: 1.04; }
h2.display-sm { font-size: clamp(36px, 4.6vw, 54px); letter-spacing: -0.04em; line-height: 1.04; }
h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }

/* Subjects */
.subjects { padding-top: 56px; }
.subjects-inner { display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }
.tabs { display: inline-flex; gap: 4px; background: var(--mist-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.tab {
  font: inherit; font-size: 16px; font-weight: 700; color: #3E3C5C;
  background: transparent; border: 0; border-radius: 10px; padding: 10px 28px; min-height: 44px; cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--action); color: #FFFFFF; box-shadow: 0 3px 0 var(--action-dark); }
.tab:not([aria-selected="true"]):hover { color: var(--blue); }
.subject-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 34px; max-width: 980px; }
.subject { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 700; }
.tile {
  position: relative; width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; letter-spacing: -0.02em;
}
.tile-num { position: absolute; left: 5px; top: 3px; font-size: 9px; font-weight: 700; }
.tile--blue { background: #EAF2FF; color: #0050B8; box-shadow: 0 3px 0 #CFE0FF; }
.tile--green { background: #E3F6E9; color: #146B33; box-shadow: 0 3px 0 #C3EBCF; }
.tile--orange { background: #FFF1E0; color: #9A4A00; box-shadow: 0 3px 0 #FADDB8; }
.tile--purple { background: #F1EDFF; color: #4527B8; box-shadow: 0 3px 0 #DCD3FF; }
.tile--pink { background: #FBE7F3; color: #9D1E66; box-shadow: 0 3px 0 #F4CDE3; }
.tile--gold { background: #FFF4CF; color: #7A4B00; box-shadow: 0 3px 0 #F7E3A0; }
.tile--grey { background: #F1F2F6; color: #3E3C5C; box-shadow: 0 3px 0 #DEE0E8; }
.subject--more { color: #3E3C5C; }
.nojs-only { display: none; }
.no-js .tabs { display: none; }
.no-js .subject-panel[hidden] { display: block; }
.no-js .nojs-only { display: block; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 8px 0 14px; }

/* Ticks */
.checks { display: flex; flex-direction: column; gap: 12px; font-size: 17px; font-weight: 600; }
.checks li { display: flex; align-items: flex-start; gap: 10px; }
.checks li::before {
  content: ""; width: 22px; height: 22px; flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='%231E9E4A'/%3E%3Cpath d='M6 10.3l2.6 2.6L14 7.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.checks mark { margin-left: 5px; }
.checks--sm { font-size: 16px; font-weight: 400; line-height: 1.45; color: var(--text); }
.checks--sm li::before { width: 20px; height: 20px; margin-top: 1px; }
.checks--body { font-size: 16px; font-weight: 400; line-height: 1.5; color: var(--text); }
.checks--body li::before { width: 20px; height: 20px; margin-top: 2px; }

/* Split layouts */
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.split-copy { flex: 1 1 380px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.split-copy .btn { align-self: flex-start; }
.split-media { flex: 1.45 1 560px; position: relative; min-width: 0; }
.notes { padding-bottom: 88px; }
.notes .lead { font-size: 18px; }

/* Quiz panel */
.quizzes { padding-bottom: 40px; }
.quiz-panel { position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: 32px; background: var(--mist-2); padding: 40px; }
/* guided practice overlaps the run's right edge, clear of the question, doors and answer box */
.quiz-practice {
  position: absolute; z-index: 2; right: 32px; top: 50%; width: 38%;
  transform: translateY(-50%) rotate(1.5deg);
}
.quiz-practice > img { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 30px rgba(20, 18, 58, 0.22)); }
.frame--run-crop { display: none; }
.float-card {
  position: relative; z-index: 3; width: 300px; margin: -72px 0 0 24px;
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(255, 255, 255, 0.97); border: 1px solid var(--line); border-radius: 22px; padding: 24px;
  box-shadow: 0 20px 40px rgba(20, 18, 58, 0.12);
}
.icon-tile { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.icon-tile--blue { background: var(--soft-blue); box-shadow: 0 3px 0 #CFE0FF; }
.icon-tile--mint { background: #E8FBF6; box-shadow: 0 3px 0 #C6EFE3; }
.icon-tile--gold { background: #FFF4CF; box-shadow: 0 3px 0 #FBE3A0; }

/* Cards */
.card-row { display: flex; flex-wrap: wrap; gap: 20px; }
.card {
  flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 22px; padding: 24px;
}
.card h3 { margin-bottom: 4px; }
.card--feature { border-radius: 24px; padding: 28px; gap: 12px; }
.card--feature .icon-tile { width: 56px; height: 56px; border-radius: 16px; }
.card--feature h3 { font-size: 22px; margin: 0; }
.card--feature p { font-size: 15px; line-height: 1.6; color: var(--text-soft); }

/* Tutor */
.tutor { padding-top: 40px; padding-bottom: 40px; }
.tutor-panel { border: 1px solid var(--line-2); border-radius: 32px; background: var(--mist-2); padding: 48px 44px; }
.tutor-panel .section-head { margin-bottom: 36px; max-width: 640px; }
.tutor-panel .section-head p { font-size: 18px; }
.meter { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.meter-head { display: flex; justify-content: space-between; font-weight: 600; }
.meter-head span:last-child { font-weight: 700; }
.meter-track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 999px; }
.meter-fill--low { background: #E2552B; }
.meter-fill--high { background: var(--green); }
.w-17 { width: 17%; }
.w-84 { width: 84%; }
.step-row { display: flex; align-items: center; gap: 10px; background: var(--mist); border-radius: 14px; padding: 12px; }
.step-row span { display: flex; flex-direction: column; }
.step-row b { font-size: 15px; }
.step-row small { font-size: 13px; color: var(--muted); }
.goal { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.goal::before {
  content: ""; width: 18px; height: 18px; flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Crect x='1' y='1' width='16' height='16' rx='5' fill='none' stroke='%23B8BDD3' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.goal--done::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Crect width='18' height='18' rx='5' fill='%231E9E4A'/%3E%3Cpath d='M4.5 9.5l3 3 6-6.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.countdown { font-size: 14px; font-weight: 700; color: var(--navy-deep); }

/* Features */
.features { padding-top: 40px; }

/* Trust */
.trust { background: var(--mist); padding: 80px 0; }
.trust .section-head { max-width: 720px; margin-bottom: 36px; }
.card-row--two { gap: 24px; }
.card-row--two .card { flex: 1 1 420px; border-radius: 24px; padding: 32px; gap: 16px; }
.card-row--two h3 { font-size: 24px; margin: 0; }
.doc-link { align-self: flex-start; font-weight: 700; font-size: 16px; text-decoration: none; margin-top: auto; padding-top: 4px; }
.doc-link:hover { text-decoration: underline; }
.card--schools { background: var(--navy-deep); border-color: var(--navy-deep); color: #FFFFFF; }
.card--schools p { font-size: 16px; line-height: 1.6; color: #D6E2FA; }

/* Waitlist */
.waitlist { display: flex; flex-direction: column; gap: 10px; }
.waitlist label { font-size: 14px; font-weight: 700; }
.waitlist-row { display: flex; flex-wrap: wrap; gap: 10px; }
.waitlist input[type="email"] {
  flex: 1 1 220px; min-width: 0; min-height: 50px;
  font: inherit; font-size: 16px; color: var(--navy);
  padding: 14px 16px; border: 2px solid transparent; border-radius: 12px; background: #FFFFFF;
}
.waitlist input[type="email"]:focus-visible { outline: 3px solid var(--gold-btn); outline-offset: 2px; }
.waitlist .btn-gold { min-height: 50px; }
.waitlist-status { min-height: 1.5em; font-size: 15px; font-weight: 600; color: #FFFFFF; }
.waitlist-status.is-error { color: #FFD0C4; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Final CTA */
.cta { padding: 80px 0; }
.cta-panel {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
  background: var(--blue); border-radius: 32px; padding: 56px 48px;
}
.cta-panel > div { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.cta-panel h2 { color: #FFFFFF; font-size: clamp(32px, 3.4vw, 44px); line-height: 1.08; }
.cta-panel p { font-size: 17px; color: #E3EEFF; }

/* Text pages (parent FAQ, privacy policy) */
.doc-hero { background: linear-gradient(180deg, #F2F7FF 0%, #FFFFFF 100%); }
.doc-hero .container { max-width: 840px; padding-top: 64px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 14px; }
.doc-kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); }
.doc-hero h1 { font-size: clamp(36px, 4.4vw, 52px); }
.doc-hero p { font-size: 18px; line-height: 1.6; color: var(--text-soft); max-width: 640px; }
.doc-updated { font-size: 14px; color: var(--muted); }
.doc { max-width: 840px; margin: 0 auto; padding: 16px 24px 80px; }
.doc h2 { font-size: clamp(26px, 3vw, 32px); letter-spacing: -0.03em; margin: 48px 0 16px; scroll-margin-top: 88px; }
.doc h3 { font-size: 19px; margin: 28px 0 8px; }
.doc p, .doc li { font-size: 17px; line-height: 1.7; color: var(--text); }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { margin: 10px 0 14px; padding-left: 22px; list-style: disc; }
.doc ol { list-style: decimal; }
.doc li + li { margin-top: 6px; }
.doc a { font-weight: 600; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0 18px; font-size: 16px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); line-height: 1.55; }
.doc th { background: var(--mist); font-weight: 700; font-size: 14px; color: var(--muted); }
.table-scroll { overflow-x: auto; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 8px; padding: 0; list-style: none !important; }
.toc li { margin: 0 !important; }
.toc a { display: inline-block; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--link); background: var(--soft-blue); border-radius: 999px; padding: 7px 14px; }
.toc a:hover { background: #DCE9FF; color: var(--link); }

.callout { border-radius: 18px; padding: 20px 22px; margin: 18px 0; background: var(--mist); border: 1px solid var(--line-2); }
.callout--promise { background: #F2FBF5; border-color: #CDEBD8; }
.callout--alert { background: #FFF6F2; border-color: #F6D5C7; }
.callout h3 { margin-top: 0; }
.callout ul { margin-bottom: 0; }

/* FAQ questions open and close without JavaScript */
.faq { border: 1px solid var(--line); border-radius: 16px; margin: 10px 0; background: #FFFFFF; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 20px; font-size: 17px; font-weight: 700; color: var(--navy); border-radius: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; font-size: 24px; font-weight: 500; line-height: 1; color: var(--link); transition: transform 0.2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: var(--mist); }
.faq-body { padding: 0 20px 18px; }
.faq-body > :first-child { margin-top: 0; }

/* Facts only the owner can fill in. Highlighted so none slips onto the live site unnoticed. */
.fill { background: #FFF3C4; border: 1px dashed #D9A300; border-radius: 6px; padding: 0 6px; font-weight: 600; color: #6B4A00; }

@media (max-width: 720px) {
  .doc-hero .container { padding-top: 36px; }
  .doc { padding: 8px 16px 56px; }
  .doc p, .doc li { font-size: 16px; }
  .faq summary { padding: 14px 16px; font-size: 16px; }
  .faq-body { padding: 0 16px 16px; }
}

/* Footer */
.site-footer { border-top: 1px solid #EEF0F6; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-top: 36px; padding-bottom: 48px; font-size: 14px; color: var(--muted); }
.footer-brand { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.footer-brand .brand-word { font-size: 18px; color: var(--navy); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-nav a { color: #3E3C5C; }

/* Entrance animations. Hidden only while <html> has .anim (set by js/anim-init.js when motion is welcome), so the
   page is fully visible without JavaScript or with reduced motion. Uses the separate translate / scale properties,
   so elements that already have a transform (the tilted guided practice and run crop) keep their tilt. */
.d1 { --d: 90ms; } .d2 { --d: 180ms; } .d3 { --d: 270ms; } .d4 { --d: 360ms; }
.anim .reveal, .anim .reveal-children > * {
  opacity: 0; translate: 0 18px;
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), scale 0.55s cubic-bezier(0.34, 1.45, 0.64, 1);
  transition-delay: var(--d, 0ms);
}
.anim .reveal.pop { translate: 0 10px; scale: 0.92; }
.anim .reveal.is-in, .anim .reveal-children.is-in > * { opacity: 1; translate: none; scale: none; }
/* lists and card rows cascade, one item after another */
.reveal-children > :nth-child(2) { --d: 70ms; }
.reveal-children > :nth-child(3) { --d: 140ms; }
.reveal-children > :nth-child(4) { --d: 210ms; }
.reveal-children > :nth-child(5) { --d: 280ms; }
.reveal-children > :nth-child(6) { --d: 350ms; }
.reveal-children > :nth-child(7) { --d: 420ms; }

/* Tablet and down */
@media (max-width: 900px) {
  .hero-inner { padding-top: 48px; padding-bottom: 56px; gap: 40px; }
  .frame--phone { right: -6px; }
  .quiz-panel { padding: 20px; }
  .frame--quiz { width: 100%; }
  .quiz-practice { position: relative; display: block; top: auto; right: auto; width: min(88%, 460px); margin: -28px auto 0; transform: none; }
  .float-card { width: auto; margin: 16px 0 0; }
}

/* Phone */
@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: 0;
    border-top: 1px solid var(--line); padding-top: 6px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 0; font-size: 17px; }
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .header-cta { display: none; }
  .no-js .site-nav { display: flex; }
  .no-js .menu-toggle { display: none; }
  .brand-word { font-size: 21px; }

  .container { padding-left: 16px; padding-right: 16px; }
  .section { padding: 56px 0; }
  .proof-pill { font-size: 14px; }
  .lead { font-size: 17px; }
  .btn-lg { width: 100%; }
  .hero-media, .split-media { flex-basis: 100%; }
  .section { padding: 48px 0; }

  /* subjects: a tidy two-column grid instead of a ragged wrap */
  .subject-panel { width: 100%; }
  .subject-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; text-align: left; }
  .subject { font-size: 16px; gap: 10px; }
  .tile { width: 40px; height: 40px; font-size: 16px; }

  /* notes: picture first, like the hero */
  .split { gap: 28px; }
  .split--notes .split-media { order: -1; }

  /* feature cards: a swipeable row (the next card peeks in), icon beside the title */
  .card-row { gap: 14px; }
  .features { padding-top: 8px; padding-bottom: 24px; }
  .features .card-row {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    gap: 12px; padding-top: 4px; padding-bottom: 10px; scroll-padding-left: 16px;
  }
  .features .card-row::-webkit-scrollbar { display: none; }
  .features .card--feature { flex: 0 0 80%; scroll-snap-align: start; }
  .card--feature { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: start; padding: 18px; }
  .card--feature .icon-tile { grid-row: span 2; width: 48px; height: 48px; border-radius: 14px; }
  .card--feature .icon-tile img { width: 30px; height: 30px; }
  .card--feature h3 { font-size: 19px; }
  .waitlist .btn-gold { width: 100%; }
  .tutor-panel { padding: 28px 20px; border-radius: 24px; }

  /* hero: pictures first, then the headline */
  .hero-inner { padding-top: 28px; gap: 32px; }
  .hero-media { order: -1; }
  h1 { font-size: 38px; }
  /* the lessons pill sits under the buttons on phones, and pops in after them */
  .proof-pill { order: 1; --d: 360ms; }
  .checks-inline { order: 2; --d: 450ms; }

  /* thinner bezels so the screenshots get the room */
  .frame { border-width: 5px; border-radius: 16px; box-shadow: 0 16px 32px rgba(20, 18, 58, 0.14); }
  .frame--phone { border-width: 4px; border-radius: 18px; }
  .frame-tag { right: 10px; top: 10px; font-size: 12px; padding: 4px 10px; }

  /* quizzes: guided practice full width, with a crop of the run hovering over its lower left */
  .quiz-panel { border-radius: 24px; padding: 16px; }
  .frame--quiz { display: none; }
  .quiz-practice { width: 100%; margin: 0; }
  .frame--run-crop {
    display: block; position: absolute; z-index: 3; left: -8px; bottom: 4%; width: 48%;
    border-width: 4px; border-radius: 12px; transform: rotate(-4deg);
    box-shadow: 0 14px 28px rgba(20, 18, 58, 0.28);
  }
  .float-card { display: none; }
  .card-row--two .card { padding: 24px; }
  .cta-panel { padding: 36px 24px; border-radius: 24px; }
  .cta-panel .btn { width: 100%; }
}
