/* motivo landing — same design tokens as the iOS app (App/DesignSystem/Theme.swift, Assets.xcassets).
   Fonts: Apple's system font (SF Pro / SF Pro Rounded) via the system font stack. SF fonts may not be embedded on
   the web (Apple font licence), so other platforms fall back to their own system UI font. */
:root {
  --brand: #7153E8;            /* brand purple: large decorative elements */
  --primary: #6A4BE0;          /* AA-safe primary for text & buttons (5.7:1 under white text) */
  --on-primary: #FFFFFF;
  --surface: #FAF9F6;          /* warm white */
  --surface-raised: #FFFFFF;
  --lavender: #F1EDFF;
  --ink: #232136;
  --ink-2: #5E5A73;
  --otter: #7A5A43;
  --beige: #D8C2A8;
  --coral: #F47743;
  --on-coral: #232136;         /* white on coral fails contrast (2.8:1); ink passes (5.6:1) */
  --success: #187A5E;
  --separator: #E6E1F0;
  --video-bg: #0E0E14;
  --radius-s: 10px; --radius-m: 16px; --radius-l: 24px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #A08CFF; --primary: #A08CFF; --on-primary: #16141F;
    --surface: #16141F; --surface-raised: #221F2E; --lavender: #2C2647;
    --ink: #F3F1FA; --ink-2: #B8B3CB; --otter: #C9A487; --beige: #8A735C;
    --coral: #FF8A5B; --on-coral: #16141F; --success: #3CC398; --separator: #34304A;
  }
}
:root[data-theme="dark"] {
  --brand: #A08CFF; --primary: #A08CFF; --on-primary: #16141F;
  --surface: #16141F; --surface-raised: #221F2E; --lavender: #2C2647;
  --ink: #F3F1FA; --ink-2: #B8B3CB; --otter: #C9A487; --beige: #8A735C;
  --coral: #FF8A5B; --on-coral: #16141F; --success: #3CC398; --separator: #34304A;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); overflow-x: hidden; }
img, video, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-rounded); line-height: 1.2; margin: 0 0 var(--s3); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 var(--s4); }
.muted { color: var(--ink-2); }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--s4); }
.skip { position: absolute; left: -999px; top: var(--s2); background: var(--primary); color: var(--on-primary); padding: var(--s2) var(--s4); border-radius: var(--radius-s); z-index: 10; }
.skip:focus { left: var(--s2); }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--separator); }
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.site-header .wrap { display: flex; align-items: center; gap: var(--s3); min-height: 60px; }
.brand { display: flex; align-items: center; gap: var(--s2); text-decoration: none; color: var(--ink); font: 800 1.35rem var(--font-rounded); }
.brand img { width: 36px; height: 36px; }
.brand .wordmark span { color: var(--primary); }
.site-nav { margin-left: auto; display: flex; gap: var(--s4); }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: var(--s2) 0; }
.site-nav a:hover { color: var(--primary); }
@media (max-width: 640px) { .site-nav .opt { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 50px; padding: 0 var(--s5); border-radius: 999px; font: 650 1rem var(--font); text-decoration: none; border: 0; cursor: pointer; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-secondary { background: var(--lavender); color: var(--primary); }
.btn-coral { background: var(--coral); color: var(--on-coral); }
.btn:hover { filter: brightness(1.06); }

/* hero */
.hero { padding: var(--s7) 0 var(--s8); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s7); align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: var(--s6); } }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3); border-radius: 999px; background: var(--lavender); color: var(--primary); font-weight: 650; font-size: .9rem; margin-bottom: var(--s4); }
.tagline { font-size: clamp(1.15rem, 2.4vw, 1.4rem); color: var(--ink-2); max-width: 34ch; }
.cta { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-top: var(--s5); }
.store-note { font-size: .9rem; color: var(--ink-2); }
.store-badge img { height: 54px; width: auto; }

/* phone mock (generic frame, not an Apple device image) */
.phone { position: relative; width: min(320px, 78vw); margin: 0 auto; aspect-ratio: 9 / 19.5; background: #0B0A10; border-radius: 44px; padding: 12px; box-shadow: 0 30px 60px -20px rgb(35 33 54 / .45), inset 0 0 0 2px #2A2833; }
.phone-screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: var(--video-bg); display: flex; flex-direction: column; }
.phone-video { width: 100%; aspect-ratio: 9 / 16; background: var(--video-bg); object-fit: contain; }   /* never cropped */
.phone-controls { flex: 1; background: #16141F; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.phone-bar { height: 5px; border-radius: 3px; background: #2C2647; overflow: hidden; }
.phone-bar i { display: block; height: 100%; width: 38%; background: #A08CFF; }
.phone-row { display: flex; gap: 8px; align-items: center; }
.phone-ask { flex: 1; text-align: center; background: #FF8A5B; color: #16141F; font: 700 .85rem var(--font); border-radius: 999px; padding: 8px 0; }
/* mascot sits beside the phone, never over the video or its controls */
.hero-otter { position: absolute; width: 112px; left: calc(50% + min(160px, 39vw) + 4px); bottom: 24px; filter: drop-shadow(0 10px 18px rgb(35 33 54 / .25)); }
@media (max-width: 600px) { .hero-otter { display: none; } }
.video-toggle { flex: 0 0 auto; min-width: 72px; min-height: 44px; border-radius: 999px; border: 0; background: #2C2647; color: #F3F1FA; font: 650 .8rem var(--font); padding: 0 12px; cursor: pointer; }

/* sections */
section { padding: var(--s8) 0; }
.section-alt { background: var(--surface-raised); border-block: 1px solid var(--separator); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); counter-reset: step; margin-top: var(--s6); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.card { background: var(--surface-raised); border: 1px solid var(--separator); border-radius: var(--radius-m); padding: var(--s5); }
.section-alt .card { background: var(--surface); }
.step::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--lavender); color: var(--primary); font: 800 1.1rem var(--font-rounded); margin-bottom: var(--s3); }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4); margin-top: var(--s6); }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--lavender); color: var(--primary); margin-bottom: var(--s3); }
.feature-icon svg { width: 24px; height: 24px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.checklist li { display: flex; gap: var(--s3); align-items: flex-start; }
.checklist li::before { content: ""; flex: 0 0 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: var(--success) 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat; }
.chat { display: grid; gap: var(--s3); }
.bubble { max-width: 88%; padding: var(--s3) var(--s4); border-radius: var(--radius-m); font-size: .98rem; }
.bubble.me { justify-self: end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; }
.bubble.teacher { background: var(--surface-raised); border: 1px solid var(--separator); border-bottom-left-radius: 6px; }
.section-alt .bubble.teacher { background: var(--surface); }
.bubble small { display: block; margin-top: var(--s2); color: var(--ink-2); font-size: .8rem; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--lavender); color: var(--primary); font-size: .8rem; font-weight: 650; }

/* FAQ */
.faq { max-width: 780px; }
details { border-bottom: 1px solid var(--separator); padding: var(--s4) 0; }
summary { cursor: pointer; font-weight: 650; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: var(--s4); min-height: 44px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 1.5rem var(--font); color: var(--primary); }
details[open] summary::after { content: "−"; }
details p { margin: var(--s3) 0 0; color: var(--ink-2); }

/* footer */
.site-footer { padding: var(--s7) 0; border-top: 1px solid var(--separator); font-size: .92rem; color: var(--ink-2); }
.site-footer .wrap { display: grid; gap: var(--s4); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.footer-links a { color: var(--ink); text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.legal-note { font-size: .82rem; max-width: 80ch; }

/* legal pages */
.doc { padding: var(--s7) 0 var(--s8); }
.doc .wrap { max-width: 780px; }
.doc h2 { font-size: 1.35rem; margin-top: var(--s6); }
.doc h3 { margin-top: var(--s5); }
.doc table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: var(--s4) 0; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--separator); vertical-align: top; min-width: 140px; }
.doc th { font-weight: 650; }
.todo { background: color-mix(in srgb, var(--coral) 18%, transparent); padding: 0 4px; border-radius: 4px; }
.updated { color: var(--ink-2); font-size: .95rem; }
