/* Quill marketing site. Mobile first. Colors follow the app's theme file. */

@font-face { font-family: "Nunito"; src: url("../fonts/nunito-var.woff2") format("woff2"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Patrick Hand"; src: url("../fonts/patrickhand-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  /* The app's palette */
  --ink: #1D2227;          /* graphite */
  --ink-2: #505A65;        /* secondary text, 7:1 on white */
  --bg: #F4F6F8;           /* app background */
  --paper: #FBFAF7;        /* drawing paper */
  --white: #FFFFFF;
  --line: #DCE1E7;
  --blue: #2B63E0;         /* primary, 5:1 with white text */
  --blue-dark: #1C47A8;
  --blue-deep: #16357E;
  --blue-soft: #E8EFFD;
  --pink: #FF1F8E;         /* only for "draw this now" */
  --err: #B3261E;
  /* From Quill himself */
  --wood: #F3E3C8;
  --wood-2: #FBF3E6;
  --bark: #6B4526;

  --display: "Nunito", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hand: "Patrick Hand", "Comic Neue", "Segoe Print", cursive;

  --r: 16px;
  --r-lg: 28px;
  --gutter: 16px;
  --max: 1160px;
  --tap: 48px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--body);   /* 18px body */
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-weight: 900; font-size: clamp(2.35rem, 8.5vw, 4.1rem); letter-spacing: -.02em; }
h2 { font-weight: 900; font-size: clamp(1.9rem, 5.6vw, 2.9rem); }
h3 { font-weight: 800; font-size: 1.3rem; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; }
.skip:focus { top: 8px; }
.ph { font-size: .8em; color: var(--ink-2); background: #FFF3C4; border-radius: 4px; padding: 0 4px; }

section { padding-block: 64px; }
.section-lede { color: var(--ink-2); margin-top: 12px; max-width: 60ch; font-size: 1.2rem; }
.eyebrow { font-family: var(--display); font-weight: 800; font-size: 1rem; color: var(--blue-dark); letter-spacing: .02em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 22px;
  font: 800 1.1rem/1 var(--display); color: #fff; text-decoration: none;
  background: var(--blue); border: 0; border-radius: var(--r);
  border-bottom: 4px solid var(--blue-dark);   /* tactile, like the app */
  cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, border-bottom-width .12s ease, background-color .15s;
}
.btn:hover { background: #2458CC; color: #fff; }
.btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 1rem; }
.btn-light { background: #fff; color: var(--blue-deep); border-bottom-color: #BCCBEA; }
.btn-light:hover { background: #F2F6FF; color: var(--blue-deep); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active { transform: none; } }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 246, 248, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  padding-top: env(safe-area-inset-top, 0px);
}
.top.scrolled { border-bottom-color: var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-height: var(--tap); }
.brand-face { width: 34px; height: auto; }
.brand-word { font: 900 1.6rem/1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.nav { display: none; }
.top .btn-small { margin-left: auto; }
@media (min-width: 860px) {
  .nav { display: flex; gap: 4px; margin-left: 24px; }
  .nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px; color: var(--ink); text-decoration: none; font-weight: 700; border-radius: 12px; }
  .nav a:hover { background: var(--white); color: var(--ink); }
}

/* ---------- Hero ---------- */
.hero { padding-block: 24px 56px; }
.hero-grid { display: grid; gap: 28px; grid-template-areas: "copy" "art" "form"; }
.hero-copy { grid-area: copy; display: grid; gap: 14px; }
.hero-art { grid-area: art; }
.hero-form { grid-area: form; display: grid; gap: 18px; }
.lede { font-size: 1.25rem; color: var(--ink-2); max-width: 34ch; }

.hero-art { position: relative; margin: 0; display: grid; grid-template-columns: 1fr 1.18fr; align-items: center; padding: 8px 0 118px; }
.card { position: relative; background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 1px 0 rgba(29,34,39,.06), 0 14px 32px -12px rgba(29,34,39,.28); }
.card img { border-radius: 8px; width: 100%; }
.photo-card { transform: rotate(-4deg); z-index: 1; margin-right: -14px; }
.paper-card { transform: rotate(2.5deg); background: var(--paper); z-index: 2; }
.card-tag {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  font: 800 .9rem/1 var(--display); background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.paper-card .card-tag { background: var(--blue); left: 34%; }
.hero-arrow { position: absolute; left: 34%; top: -6px; width: 22%; z-index: 3; fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
/* Quill sits under the paper's lower-right corner, his line to his left */
.hero-quill { position: absolute; right: -4px; bottom: 0; left: 0; z-index: 4; display: flex; align-items: flex-end; justify-content: flex-end; gap: 4px; pointer-events: none; }
.hero-quill img { width: 38%; max-width: 230px; }
.hero-quill .bubble { margin-bottom: 30px; }
.hero-quill .bubble-left::after { right: -9px; left: auto; bottom: 16px; transform: rotate(-45deg); }
@media (min-width: 720px) { .hero-art { padding-bottom: 140px; } .hero-quill img { width: 34%; } }

.bubble { margin-right: 18%; margin-bottom: -4px; }

.bubble {
  position: relative; background: #fff; color: var(--ink);
  font: 400 1.2rem/1.2 var(--hand);
  padding: 10px 14px; border-radius: 18px; border: 2px solid var(--ink);
  max-width: 22ch; width: max-content;
}
.bubble::after { content: ""; position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--ink); border-top: 0; border-left: 0; }
.bubble-left::after { right: 26px; bottom: -9px; transform: rotate(45deg); }
.bubble-up::after { left: 30px; top: -9px; transform: rotate(-135deg); }
.bubble-big { font-size: 1.45rem; padding: 14px 18px; max-width: 18ch; }
.bubble-big::after { left: 40px; bottom: -9px; transform: rotate(45deg); }

@media (min-width: 720px) {
  .hero { padding-block: 40px 80px; }
  .hero-art { max-width: 620px; margin-inline: auto; }
}
@media (min-width: 1040px) {
  .hero-grid { grid-template-columns: 1fr 1.05fr; grid-template-areas: "copy art" "form art"; column-gap: 56px; row-gap: 28px; align-items: start; }
  .hero-copy { align-self: end; padding-top: 32px; }
  .hero-art { max-width: none; align-self: center; }
}

/* ---------- Waitlist form ---------- */
.waitlist { background: #fff; border-radius: var(--r-lg); padding: 20px; display: grid; gap: 14px; box-shadow: 0 1px 0 rgba(29,34,39,.05), 0 10px 30px -18px rgba(29,34,39,.35); max-width: 560px; }
.form-title { font: 800 1.2rem/1.25 var(--display); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 1rem; }
.input-row { display: flex; flex-direction: column; gap: 10px; }
.waitlist input[type="email"] {
  min-height: 52px; width: 100%; padding: 0 14px;
  font: 400 1.125rem/1 var(--body); color: var(--ink);
  background: #fff; border: 2px solid #9AA5B1; border-radius: 14px;
}
.waitlist input[type="email"]:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.waitlist input[aria-invalid="true"] { border-color: var(--err); }
.input-row .btn { min-height: 52px; }
@media (min-width: 480px) { .input-row { flex-direction: row; } .input-row input { flex: 1; min-width: 0; } }

.check { display: flex; align-items: center; gap: 12px; min-height: var(--tap); }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 28px; height: 28px; margin: 0; border: 2px solid #7D8793; border-radius: 8px; background: #fff; display: grid; place-content: center; cursor: pointer; }
.check input::before { content: ""; width: 14px; height: 8px; border: 3px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -2px); opacity: 0; }
.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::before { opacity: 1; }
.check input[aria-invalid="true"] { border-color: var(--err); }
.check label { font-weight: 700; cursor: pointer; flex: 1; min-height: var(--tap); display: flex; align-items: center; }
.err { color: var(--err); font-weight: 700; font-size: 1rem; display: flex; gap: 6px; align-items: baseline; }
.err::before { content: "!"; flex: none; display: inline-grid; place-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--err); color: #fff; font-size: .8rem; transform: translateY(2px); }
.fine { font-size: 1rem; color: var(--ink-2); }
.kid-note { font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success { display: grid; gap: 6px; background: #E6F5EC; color: #14532D; border-radius: 14px; padding: 14px 16px; font-weight: 700; }
.success:focus { outline: none; }
.success .ph { font-weight: 400; }
.waitlist.is-done .field, .waitlist.is-done .check, .waitlist.is-done > .err { display: none; }
.waitlist button[disabled] { opacity: .7; cursor: progress; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font: 800 1rem/1 var(--display); background: var(--white); border: 1.5px solid var(--line); padding: 9px 13px; border-radius: 999px; }


/* ---------- How it works ---------- */
.how { background: var(--white); }
.steps { display: grid; gap: 40px; margin-top: 36px; counter-reset: none; }
.step { display: grid; gap: 10px; align-content: start; }
.step h3 { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.step p { color: var(--ink-2); }
.step-n { flex: none; display: inline-grid; place-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; font: 900 1.05rem/1 var(--display); }
.step-art { position: relative; aspect-ratio: 4 / 3; border-radius: 22px; background: var(--bg); overflow: hidden; display: grid; place-items: center; }
.step-art-photo img { width: 58%; border-radius: 10px; transform: rotate(-3deg); box-shadow: 0 10px 24px -12px rgba(29,34,39,.4); }
.viewfinder { position: absolute; inset: 12% 16%; pointer-events: none;
  background:
    linear-gradient(var(--ink), var(--ink)) top left / 28px 4px no-repeat, linear-gradient(var(--ink), var(--ink)) top left / 4px 28px no-repeat,
    linear-gradient(var(--ink), var(--ink)) top right / 28px 4px no-repeat, linear-gradient(var(--ink), var(--ink)) top right / 4px 28px no-repeat,
    linear-gradient(var(--ink), var(--ink)) bottom left / 28px 4px no-repeat, linear-gradient(var(--ink), var(--ink)) bottom left / 4px 28px no-repeat,
    linear-gradient(var(--ink), var(--ink)) bottom right / 28px 4px no-repeat, linear-gradient(var(--ink), var(--ink)) bottom right / 4px 28px no-repeat; }
.step-art-line svg { width: 78%; }
.mini-paper { fill: var(--paper); stroke: #C9D0D8; }
.mini-grid { fill: none; stroke: #C7D6F5; stroke-width: 1; stroke-dasharray: 3 4; }
.mini-done { fill: none; stroke: #6B7480; stroke-width: 3; stroke-linecap: round; }
.mini-under { fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round; }
.mini-now { fill: none; stroke: var(--pink); stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 120; stroke-dashoffset: 0; }
.mini-dot { fill: var(--pink); }
.step.in-view .mini-now { animation: mini-draw 2.4s ease-in-out infinite; }
@keyframes mini-draw { 0% { stroke-dashoffset: 120; } 55%, 100% { stroke-dashoffset: 0; } }
.step-quill { position: absolute; right: 6%; bottom: -4%; width: 26%; }
.step-art-done > img:first-child { width: 46%; transform: rotate(2deg); border-radius: 8px; box-shadow: 0 10px 24px -12px rgba(29,34,39,.4); }
.step-art-done .step-quill { width: 34%; right: 4%; bottom: -2%; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

/* ---------- Lesson demo ---------- */
.demo { background: var(--blue-deep); color: #fff; }
.demo h2 { color: #fff; }
.demo .section-lede { color: #D5E0F7; }
.player { margin-top: 32px; display: grid; gap: 20px; }
.player-side { display: grid; grid-template-columns: 38% 1fr; gap: 14px; align-items: end; }
.player-photo { margin: 0; background: #fff; padding: 6px; border-radius: 12px; transform: rotate(-2deg); }
.player-photo img { border-radius: 7px; }
.player-quill { display: grid; gap: 12px; justify-items: start; }
.player-quill img { width: 104px; }
.player-quill .bubble { font-size: 1.15rem; max-width: 100%; width: auto; min-height: 3.2em; }
.player-main { background: #fff; color: var(--ink); border-radius: var(--r-lg); padding: 14px; display: grid; gap: 10px; }
.player-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-chip { font: 800 1rem/1 var(--display); background: var(--blue-soft); color: var(--blue-deep); padding: 8px 12px; border-radius: 999px; }
.step-count { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 1rem; }
.progress { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 99px; transition: width .3s ease; }
.paper { position: relative; background: var(--paper); border-radius: 12px; border: 1px solid var(--line); overflow: hidden; aspect-ratio: 443 / 640; max-height: 72vh; margin-inline: auto; width: 100%; }
.paper svg, .paper .paper-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.paper.ready .paper-fallback { display: none; }
.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.icon-btn { flex: none; width: var(--tap); height: var(--tap); border-radius: var(--r); border: 2px solid var(--line); border-bottom-width: 4px; background: #fff; color: var(--ink); display: grid; place-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--bg); }
.icon-btn svg, .play svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.play svg { fill: currentColor; stroke: none; }
.play .i-pause, .play[aria-pressed="true"] .i-play { display: none; }
.play[aria-pressed="true"] .i-pause { display: block; }
.play { min-width: 116px; }
.scrub { flex: 1 1 160px; min-width: 0; height: var(--tap); accent-color: var(--blue); cursor: pointer; }
/* Lesson drawing (built by demo.js) */
.d-guide { fill: none; stroke: #BFD0F2; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.d-box { fill: none; stroke: #9DB4E6; stroke-width: 1.6; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.d-line { fill: none; stroke: #2A2F35; stroke-linecap: round; stroke-linejoin: round; }
.d-under { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.d-now { fill: none; stroke: var(--pink); stroke-linecap: round; stroke-linejoin: round; }
.d-dot { fill: var(--pink); stroke: #fff; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.d-tone-now { fill: var(--pink); opacity: .55; }
.d-guides-done .d-guide, .d-guides-done .d-box { opacity: 0; transition: opacity .6s; }

@media (min-width: 900px) {
  .player { grid-template-columns: 280px minmax(0, 560px); justify-content: center; gap: 48px; align-items: start; }
  .player-side { grid-template-columns: 1fr; gap: 28px; position: sticky; top: 96px; }
  .player-photo { max-width: 250px; }
  .player-quill img { width: 150px; }
  .player-main { padding: 20px; max-width: 560px; }
}

/* ---------- Meet Quill ---------- */
.meet { background: var(--wood-2); }
.meet-grid { display: grid; gap: 32px; align-items: center; }
.meet-art { display: grid; justify-items: center; gap: 0; position: relative; }
.meet-art .bubble { order: -1; margin-bottom: 12px; align-self: start; justify-self: center; }
.quill-react { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 24px; width: min(260px, 70%); }
.quill-react img { width: 100%; transform-origin: 50% 100%; }
.quill-react:hover img, .quill-react:focus-visible img { animation: hop .45s ease-out; }
.quill-react.hop img { animation: hop .45s ease-out; }
@keyframes hop { 0% { transform: translateY(0) scale(1, 1); } 25% { transform: translateY(0) scale(1.04, .95); } 55% { transform: translateY(-14px) scale(.98, 1.03); } 100% { transform: translateY(0) scale(1, 1); } }
@media (prefers-reduced-motion: reduce) { .quill-react:hover img, .quill-react:focus-visible img, .quill-react.hop img { animation: none; } }
.meet-copy { display: grid; gap: 16px; }
.meet-copy > p { max-width: 52ch; }
.poses { display: flex; gap: 10px; margin-top: 4px; }
.poses li { width: 72px; background: #fff; border-radius: 18px; padding: 6px; }
.hint { font-size: 1rem; color: var(--bark); font-weight: 700; }
@media (min-width: 860px) { .meet-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; } }

/* ---------- Levels ---------- */
.levels { background: var(--white); }
.levels-grid { margin-top: 32px; display: grid; gap: 24px; }
.level-photo { margin: 0; display: grid; gap: 8px; max-width: 200px; }
.level-photo img { border-radius: 14px; }
.level-photo figcaption { font: 800 1rem/1 var(--display); color: var(--ink-2); }
.level-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.level { display: grid; gap: 6px; align-content: start; }
.level img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 6px; }
.level h3 { margin-top: 6px; }
.level-meta { font-weight: 700; font-size: 1rem; color: var(--blue-dark); font-variant-numeric: tabular-nums; }
.level p:last-child { font-size: 1rem; color: var(--ink-2); }
.note { margin-top: 28px; color: var(--ink-2); }
@media (min-width: 720px) {
  .levels-grid { grid-template-columns: 180px 1fr; align-items: start; }
  .level-photo { position: sticky; top: 96px; }
}
@media (min-width: 1040px) { .level-list { grid-template-columns: repeat(4, 1fr); gap: 20px; } .levels-grid { grid-template-columns: 200px 1fr; gap: 32px; } }

/* ---------- Parents ---------- */
.parents { background: var(--bg); }
.facts { margin-top: 36px; display: grid; gap: 14px; }
.fact { background: #fff; border-radius: 20px; padding: 20px; display: grid; gap: 8px; align-content: start; }
.fact svg { width: 32px; height: 32px; fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fact p { color: var(--ink-2); }
.parents-more { margin-top: 28px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .facts { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

/* ---------- Testimonials (hidden until real quotes) ---------- */
.quotes { display: grid; gap: 16px; margin-top: 28px; }
.quotes figure { margin: 0; background: #fff; border-radius: 20px; padding: 20px; }
.quotes blockquote { margin: 0; }

/* ---------- FAQ ---------- */
.faq { background: var(--white); }
.faq-wrap { display: grid; gap: 28px; }
.faq-list { display: grid; gap: 10px; }
.faq details { border: 1.5px solid var(--line); border-radius: 18px; background: #fff; }
.faq details[open] { border-color: #B7C7EA; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 12px 18px; border-radius: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 1.15rem; font-weight: 800; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 3px solid var(--blue); border-bottom: 3px solid var(--blue); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { padding: 0 18px 18px; color: var(--ink-2); max-width: 68ch; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
@media (min-width: 1040px) { .faq-wrap { grid-template-columns: 1fr 2fr; gap: 56px; align-items: start; } .faq-wrap h2 { position: sticky; top: 96px; } }

/* ---------- Final CTA ---------- */
.final { background: var(--blue); color: #fff; }
.final-grid { display: grid; gap: 20px; justify-items: center; text-align: center; }
.final h2 { color: #fff; }
.final-copy { display: grid; gap: 14px; justify-items: center; }
.final-copy > p { color: #EAF0FD; font-size: 1.2rem; max-width: 44ch; }
.final-quill { width: 170px; }
.waitlist-dark { text-align: left; width: 100%; margin-top: 10px; background: var(--blue-deep); box-shadow: none; }
.waitlist-dark .form-title, .waitlist-dark .field label, .waitlist-dark .check label { color: #fff; }
.waitlist-dark .fine { color: #D5E0F7; }
.waitlist-dark a { color: #fff; }
.waitlist-dark input[type="email"] { border-color: transparent; }
.waitlist-dark .check input { border-color: #fff; background: transparent; }
.waitlist-dark .check input:checked { background: #fff; border-color: #fff; }
.waitlist-dark .check input:checked::before { border-color: var(--blue-deep); }
.waitlist-dark .err { color: #FFD9D6; }
.waitlist-dark .err::before { background: #FFD9D6; color: var(--blue-deep); }
.waitlist-dark input[aria-invalid="true"] { border-color: #FFB4AB; }
.waitlist-dark .success { background: #fff; }
@media (min-width: 900px) {
  .final-grid { grid-template-columns: 260px 1fr; text-align: left; justify-items: start; gap: 48px; align-items: center; }
  .final-copy { justify-items: start; }
  .final-quill { width: 240px; }
}

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: #D8DDE3; padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); }
.foot .brand-word { color: #fff; }
.foot-grid { display: grid; gap: 18px; }
.foot-brand p { margin-top: 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.foot-links a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 8px; color: #fff; font-weight: 700; }
.foot-links li:first-child a { padding-left: 0; }
.handle { color: #fff; font-weight: 700; }
.foot .ph { background: #4A4020; color: #FFF3C4; }
.foot-legal { font-size: 1rem; color: #AEB6BF; }
.foot a:focus-visible { outline-color: #fff; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.2fr 1fr 1fr; align-items: center; } .foot-legal { grid-column: 1 / -1; } }

/* ---------- Legal and contact pages ---------- */
.doc { padding-block: 40px 72px; }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(2.1rem, 7vw, 3rem); }
.doc h2 { font-size: 1.6rem; margin-top: 40px; }
.doc h3 { font-size: 1.2rem; margin-top: 24px; }
.doc p, .doc li { max-width: 68ch; }
.doc p + p { margin-top: 12px; }
.doc ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 6px; margin-top: 10px; }
.doc .updated { color: var(--ink-2); margin-top: 10px; }
.review-banner { margin-top: 20px; background: #FFF3C4; border: 2px solid #E3C552; border-radius: 16px; padding: 14px 16px; font-weight: 700; }
.doc .toc { background: #fff; border-radius: 18px; padding: 18px 20px; margin-top: 24px; }
.doc .toc ol { list-style: decimal; padding-left: 1.3em; display: grid; gap: 4px; margin-top: 8px; }
.doc .toc a { display: inline-flex; align-items: center; min-height: var(--tap); }
.doc .card-plain { background: #fff; border-radius: 18px; padding: 20px; margin-top: 16px; }
.email { font: 800 1.3rem/1.3 var(--display); overflow-wrap: anywhere; }
.back { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; }
.doc .toc-title { margin-top: 0; font-size: 1.2rem; }
.back-row { margin-top: 40px; }

/* ---------- Store badges ----------
   Official artwork, never recolored or stretched. --bh is the visible badge height (Apple minimum 40px).
   Clear space: Apple needs 1/4 of the badge height on every side (the margin below);
   Google's PNG already has that padding built in (41 of 250 px), so it is drawn at 250/168 of --bh. */
.stores { --bh: 48px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 2px; }
.store { display: grid; justify-items: center; }
.store-link { display: block; line-height: 0; border-radius: 12px; }
.store-link[href]:focus-visible { outline: 3px solid var(--blue); outline-offset: -4px; }
.badge-apple { height: var(--bh); width: auto; margin: calc(var(--bh) / 4); }
.badge-google { height: calc(var(--bh) * 250 / 168); width: auto; }
.store.is-soon .store-link { cursor: default; }
.soon { font: 800 .9rem/1 var(--display); color: var(--ink-2); background: var(--white); border: 1.5px solid var(--line); padding: 6px 10px; border-radius: 999px; margin-top: -6px; }
.store.is-live .soon { display: none; }
.dl-title { font: 900 1.6rem/1.1 var(--display); color: var(--ink); }
.hero-form .stores { margin: -6px 0 0 calc(var(--bh) / -4); }
.notify .waitlist { padding: 16px 18px; gap: 10px; }
.notify .form-title { font-size: 1.05rem; }
.final .dl-title { color: #fff; }
.final .stores { justify-content: center; }
@media (min-width: 900px) { .final .stores { justify-content: flex-start; margin-left: calc(var(--bh) / -4); } }
.foot-stores { display: grid; gap: 4px; }
.foot-stores .stores { --bh: 40px; margin-left: calc(var(--bh) / -4); }
.foot-stores-title { font: 800 1rem/1 var(--display); color: #fff; }
.foot .soon { background: #2E353C; border-color: #3C454E; color: #D8DDE3; }

/* ---------- Sticky download bar ----------
   Phones and tablets: a bar at the bottom. Desktop (1100px+): top right, inside the header's height.
   site.js hides it (fade) while the hero, #download or the footer is on screen. */
.dl-bar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  box-shadow: 0 -10px 28px -18px rgba(29, 34, 39, .45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear 0s;
}
.dl-bar.is-hidden { opacity: 0; transform: translateY(14px); visibility: hidden; pointer-events: none; transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; }
.dl-bar .stores { --bh: 40px; flex: none; flex-wrap: nowrap; }
.dl-bar .soon { display: none; }
.dl-bar[data-platform="android"] [data-store="apple"], .dl-bar[data-platform="ios"] [data-store="google"] { display: none; }
.dl-bar-face { width: 34px; flex: none; }
.dl-bar-text { flex: 1; min-width: 0; line-height: 1.15; font-size: 1rem; color: var(--ink-2); }
.dl-bar-text strong { display: block; font: 900 1.15rem/1.1 var(--display); color: var(--ink); }
.dl-bar-notify { flex: none; display: inline-flex; align-items: center; min-height: var(--tap); max-width: 9.5em; font-weight: 700; font-size: 1rem; line-height: 1.2; color: var(--blue-dark); }
@media (max-width: 479px) {
  .dl-bar-text { display: none; }
  .dl-bar { justify-content: center; }
  .dl-bar[data-platform="both"] .dl-bar-face, .dl-bar[data-platform="both"] .dl-bar-notify { display: none; }
}
@media (min-width: 1100px) {
  .dl-bar {
    left: auto; bottom: auto; top: env(safe-area-inset-top, 0px);
    right: max(16px, calc((100vw - var(--max)) / 2 + 8px));
    height: 64px; padding: 0; gap: 4px;
    background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .dl-bar.is-hidden { transform: translateY(-10px); }
  .dl-bar-face, .dl-bar-text { display: none; }
  .dl-bar-notify { order: -1; max-width: none; margin-right: 6px; }
}
@media (prefers-reduced-motion: reduce) { .dl-bar, .dl-bar.is-hidden { transition: none; transform: none; } }

/* =====================================================================
   Launch layout (13+): phone-mockup hero, before/after, features.
   These rules come last on purpose and override the earlier hero/player rules.
   ===================================================================== */
.brand-icon { width: 32px; height: 32px; border-radius: 9px; }

/* Hero art: the photo, the app on a phone, Quill pointing at it */
.hero-cta { grid-area: form; display: grid; gap: 14px; justify-items: start; }
.hero-art { display: block; position: relative; aspect-ratio: 1 / .98; width: 100%; max-width: 560px; margin-inline: auto; padding: 0; grid-template-columns: none; }
.hero-art .photo-card { position: absolute; left: 0; top: 14%; width: 40%; margin: 0; transform: rotate(-6deg); z-index: 1; }
.hero-art .photo-card .card-tag { left: 50%; }
.phone { position: absolute; left: 29%; top: 0; width: 43%; z-index: 2; background: #15191D; padding: 2.4%; border-radius: 13% / 6%; box-shadow: 0 2px 0 rgba(29,34,39,.08), 0 26px 50px -22px rgba(29,34,39,.55); }
.phone img { width: 100%; border-radius: 10.5% / 4.9%; }
.hero-art .hero-quill { position: absolute; left: auto; right: -2%; bottom: 0; width: 33%; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 0; pointer-events: none; }
.hero-art .hero-quill img { width: 100%; max-width: none; }
.hero-art .hero-quill .bubble { margin: 0 6% -2px 0; font-size: 1.05rem; max-width: 11ch; }
.hero-art .hero-quill .bubble-left::after { right: 30px; left: auto; bottom: -9px; transform: rotate(45deg); }
@media (min-width: 720px) { .hero-art .hero-quill .bubble { font-size: 1.2rem; } }
@media (min-width: 1040px) { .hero-art { max-width: 600px; } }

/* Before / after: photo, live lesson, finished drawing */
.ba { margin-top: 32px; display: grid; gap: 18px; grid-template-columns: 1fr 1fr; grid-template-areas: "before after" "mid mid"; align-items: start; }
.ba-before { grid-area: before; }
.ba-after { grid-area: after; }
.ba-mid { grid-area: mid; display: grid; gap: 10px; }
.ba-end { margin: 0; display: grid; gap: 10px; }
.ba-end img { background: #fff; padding: 6px; border-radius: 14px; width: 100%; }
.ba-after img { background: var(--paper); }
.ba-label { display: inline-flex; align-items: center; gap: 8px; font: 800 1.05rem/1 var(--display); color: #fff; }
.ba-n { display: inline-grid; place-content: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--blue-deep); font-size: .95rem; }
.ba .player { display: block; margin: 0; }
.ba .player-main { max-width: none; }
.player-say { display: flex; align-items: center; gap: 10px; }
.player-say img { width: 56px; flex: none; }
.player-say p { flex: 1; min-height: 3.3em; display: flex; align-items: center; background: var(--bg); border-radius: 14px; padding: 8px 12px; font: 400 1.15rem/1.2 var(--hand); color: var(--ink); }
@media (min-width: 1000px) {
  .ba { grid-template-columns: 1fr 1.35fr 1fr; grid-template-areas: "before mid after"; gap: 28px; align-items: center; }
  .ba-end img { padding: 8px; }
}

/* Features */
.features { background: var(--white); }
.feature-grid { margin-top: 32px; display: grid; gap: 14px; }
.feature { background: var(--bg); border-radius: 20px; padding: 20px; display: grid; gap: 8px; align-content: start; }
.feature svg { width: 32px; height: 32px; fill: none; stroke: var(--blue); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--ink-2); }
@media (min-width: 720px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .feature-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.levels { margin-top: 56px; }
.levels-title { font-size: clamp(1.4rem, 4vw, 1.8rem); font-weight: 900; }
.levels-lede { color: var(--ink-2); margin-top: 8px; max-width: 60ch; }
.level h4 { font: 800 1.2rem/1.1 var(--display); margin: 6px 0 0; }

/* Footer email + bar note */
.foot-mail { color: #fff; font-weight: 700; display: inline-flex; align-items: center; min-height: var(--tap); }
.dl-bar-soon { flex: none; font: 800 1rem/1.2 var(--display); color: var(--ink-2); }
@media (min-width: 1100px) { .dl-bar-soon { order: -1; margin-right: 6px; } }
@media (max-width: 479px) { .dl-bar[data-platform="both"] .dl-bar-face, .dl-bar[data-platform="both"] .dl-bar-soon { display: none; } }

/* Launch layout fixes after the 375 / 768 / 1440 check */
.hero-art .hero-quill .bubble { width: max-content; max-width: 13ch; }
.hero-art .photo-card .card-tag { left: 10px; transform: none; }
@media (max-width: 479px) { .stores { --bh: 44px; } .dl-bar .stores { --bh: 40px; } }
@media (max-width: 999px) { .ba { max-width: 620px; margin-inline: auto; } }
@media (max-width: 479px) { .hero-art .photo-card .card-tag { left: 4px; font-size: .8rem; padding: 7px 9px; } }
@media (min-width: 1040px) { .level-list.level-list-2 { grid-template-columns: repeat(2, minmax(0, 280px)); } }
