/* The marketing site's only stylesheet.
   ------------------------------------------------------------------------
   Hand-written, and deliberately sharing no code with the app: the app is a
   dark full-screen PWA shell and this is a document. What the two DO share is
   the palette and the two vendored families, so they read as one product.

   There is no build step here. site/ is copied to dist-site/ by
   `npm run build:site`, so what you read is what is served. */

:root {
  --bg: #15151A;
  --line: #31313E;
  --text: #F2F1F6;
  --soft: #A3A1B4;
  --violet: #8F86FF;
  /* The subject accents, lifted from TOPICS in src/content/catalog.jsx so a
     card here is the colour a child sees on that subject in the app. */
  --maths: #8F86FF;
  --english: #E1567C;
  --thinking: #E08A3C;
  --time: #0FA98F;
  --games: #E8A013;
  /* One measure for every block on the page. Prose this size wants roughly 65
     characters a line, and a single column keeps the reading order obvious on
     a phone, which is where a parent will actually open this. */
  --col: 44rem;
}

* { box-sizing: border-box; margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  /* The same wash as the share card, so arriving from a shared link feels
     like the same place. It sits behind the first screenful and settles into
     flat --bg below it, rather than tinting the whole document. */
  background: var(--bg) radial-gradient(120% 90% at 8% 0%, #24213a 0%, rgba(21,21,26,0) 58%) no-repeat;
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  padding: 0 20px env(safe-area-inset-bottom);
}

main, header, footer { max-width: var(--col); margin: 0 auto; }

header { padding: 56px 0 8px; }

/* The wordmark is a lockup: the app's own four tiles beside the name, so this
   page, the installed icon and the home screen all read as one thing. The
   icon's backing square is #15151A, the same as this page, so the SVG here
   drops it and crops to the tiles instead: identical on screen, and it lets
   the tiles fill the box rather than float in padding at 30px. */
.mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 800; letter-spacing: -.01em;
  color: var(--violet); text-decoration: none;
}
.mark svg { flex: none; }

h1 {
  font-size: clamp(30px, 7vw, 44px); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.1; margin: 18px 0 0;
}

/* The serif is doing a job, not decoration: it separates the one sentence that
   explains the product from the headline above and the body below it. */
.lede {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(18px, 3.4vw, 21px); color: var(--soft); margin: 14px 0 0;
}

/* The short accent rule above each h2 is the page's only decoration. It marks
   a section without another line of copy, and it is what stops a long dark
   document reading as one undifferentiated column. */
h2 {
  font-size: 23px; font-weight: 800; letter-spacing: -.02em;
  margin: 56px 0 0; padding-top: 20px;
  border-top: 3px solid var(--violet);
  display: inline-block;
}

p { margin: 12px 0 0; color: var(--soft); }
p strong, li strong { color: var(--text); font-weight: 700; }

ul { margin: 12px 0 0; padding-left: 22px; color: var(--soft); }
li { margin: 6px 0 0; }

a { color: var(--violet); }

/* ------------------------------ subjects ------------------------------- */

.subjects {
  display: grid; gap: 12px; margin: 20px 0 0;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.subject {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 15px 16px;
  background: #1B1B23;
  border: 1px solid var(--line);
  /* The accent is a left edge rather than a background wash: it colours the
     card without dropping the contrast of the text sitting on it. */
  border-left: 3px solid var(--accent, var(--violet));
  border-radius: 12px;
}
.subject svg { flex: none; margin-top: 1px; }
.subject h3 { font-size: 16px; font-weight: 800; color: var(--accent, var(--text)); margin: 0; }
.subject p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; }

/* -------------------------------- FAQ ---------------------------------- */

/* Native <details>, so this collapses with no JavaScript at all. The only
   script on this site is migration plumbing, and a disclosure widget is not
   worth breaking that. Crawlers and answer engines read the closed content
   normally: it is in the DOM either way. */
.faq {
  border-bottom: 1px solid var(--line);
  padding: 2px 0;
}
.faq summary {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 0; cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
/* A chevron built from a rotated square: no icon font, no extra request. */
.faq summary::before {
  content: ""; flex: none;
  width: 7px; height: 7px; margin-top: 5px;
  border-right: 2px solid var(--violet);
  border-bottom: 2px solid var(--violet);
  transform: rotate(-45deg);
  transition: transform .15s ease;
}
.faq[open] summary::before { transform: rotate(45deg); }
.faq summary h3.q { font-size: 17px; font-weight: 800; margin: 0; }
.faq > p { margin: 0 0 16px 17px; }

.cta {
  display: inline-block; margin: 28px 0 0; padding: 14px 24px;
  background: var(--violet); color: #16161B; border-radius: 12px;
  font-weight: 800; font-size: 16px; text-decoration: none;
}
.cta-note { font-size: 14.5px; margin: 10px 0 0; }

footer {
  margin: 72px 0 0; padding: 24px 0 48px;
  border-top: 1px solid var(--line); font-size: 14.5px;
}
footer p { font-size: 14.5px; }

/* A hover state sticks after a tap on a touchscreen, so a button would look
   pressed when it is not. Gated exactly as the app gates its own hovers. */
@media (hover: hover) and (pointer: fine) {
  .cta:hover { filter: brightness(1.08); }
  .faq summary:hover h3.q { color: var(--violet); }
}

/* The chevron is the only thing on the page that moves. */
@media (prefers-reduced-motion: reduce) {
  .faq summary::before { transition: none; }
}
