/* Fabelo landing page. Every colour comes from tokens.css, which is generated from
   apps/mobile/src/theme/tokens.ts — see project CLAUDE.md. */

/* Fonts are self-hosted on purpose: a Google Fonts CDN would send every visitor's IP to
   Google, which is hard to square with the privacy promise this page is making. */
@font-face {
  font-family: 'Baloo 2';
  src: url('/fonts/Baloo2_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Baloo 2';
  src: url('/fonts/Baloo2_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url('/fonts/Nunito_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url('/fonts/Nunito_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-cream);
  color: var(--color-ink);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 60px); }
h2 { font-size: clamp(26px, 4vw, 38px); }
h3 { font-size: 21px; }
p { margin: 0 0 16px; }
a { color: var(--color-violet); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--space-screen); }
.narrow { max-width: 760px; }

/* ── header ─────────────────────────────────────────────────────────── */
.site-head { padding: 22px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display);
         font-weight: 800; font-size: 23px; color: var(--color-ink); text-decoration: none; }
.brand img { width: 44px; height: 44px; }

/* ── buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  padding: 15px 28px; border-radius: var(--radius-button);
  text-decoration: none; border: 0; cursor: pointer;
  /* the app's chunky 6px lip, so the site feels like the product */
  box-shadow: 0 var(--space-xs) 0 var(--color-violet-deep);
  background: var(--color-violet); color: #fff;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(1px); box-shadow: 0 3px 0 var(--color-violet-deep); }
.btn:active { transform: translateY(4px); box-shadow: none; }
.btn.ghost {
  background: var(--color-violet); color: #fff;
  box-shadow: 0 var(--space-xs) 0 var(--color-violet-deep);
}

/* ── hero ───────────────────────────────────────────────────────────── */
.hero { padding: 40px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.lede { font-size: 20px; color: var(--color-ink-soft); margin: 20px 0 28px; }
.pill {
  display: inline-block; background: var(--color-violet-surface); color: var(--color-violet-deep);
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
  padding: 7px 15px; border-radius: var(--radius-pill); margin-bottom: 20px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cta-note { font-size: 14px; color: var(--color-ink-muted); margin: 16px 0 0; }

/* ── generic band ───────────────────────────────────────────────────── */
.band { padding: 72px 0; }
.band.tint { background: #fff; }
.band.violet { background: var(--color-violet); color: #fff; }
.band.violet h2 { color: #fff; }
.band.violet p { color: var(--color-violet-on-dark); }
.band > .wrap > h2 { margin-bottom: 12px; }
.band-sub { color: var(--color-ink-soft); font-size: 19px; max-width: 620px; margin-bottom: 40px; }

/* ── cards ──────────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--color-cream); border: 2px solid var(--color-mist);
  border-radius: var(--radius-card-md); padding: 26px 24px;
}
.band.tint .card { background: var(--color-cream); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--color-ink-soft); margin: 0; font-size: 16px; }
.card .num {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px;
  border-radius: var(--radius-chip); background: var(--color-violet);
  color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 20px;
}
.card .num.mint { background: var(--color-mint); }
.card .num.sky { background: var(--color-sky); }

/* ── promises ───────────────────────────────────────────────────────── */
.promises { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 32px; list-style: none;
            padding: 0; margin: 0; }
.promises li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; }
.promises .tick {
  flex: none; width: 26px; height: 26px; border-radius: var(--radius-pill);
  background: var(--color-mint); color: var(--color-mint-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 15px; margin-top: 2px;
}
.band.violet .promises li { color: #fff; }
.band.violet .tick { background: var(--color-violet-on-dark); color: var(--color-violet-deep); }

/* ── price ──────────────────────────────────────────────────────────── */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 720px; }
.price {
  background: #fff; border: 2px solid var(--color-mist);
  border-radius: var(--radius-card-md); padding: 28px 26px;
}
.price.hero-offer { border-color: var(--color-violet); }
.price .amount { font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1; }
.price .per { color: var(--color-ink-muted); font-size: 15px; }
.price h3 { margin-bottom: 10px; }
.price .tag {
  display: inline-block; background: var(--color-violet); color: #fff; font-size: 13px;
  font-weight: 700; padding: 4px 12px; border-radius: var(--radius-pill); margin-bottom: 12px;
}

/* ── faq ────────────────────────────────────────────────────────────── */
.faq { max-width: 760px; }
.faq details {
  border-bottom: 2px solid var(--color-mist); padding: 18px 0;
}
.faq summary {
  font-family: var(--font-display); font-weight: 700; font-size: 19px;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--color-violet); font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 14px 0 0; color: var(--color-ink-soft); }

/* ── footer ─────────────────────────────────────────────────────────── */
.site-foot { background: var(--color-ink); color: var(--color-violet-on-dark-soft); padding: 48px 0 40px; }
.site-foot a { color: #fff; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }
.site-foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-foot small { display: block; margin-top: 10px; opacity: .75; }

/* ── legal pages ────────────────────────────────────────────────────── */
.legal { padding: 48px 0 96px; }
.legal h1 { margin-bottom: 6px; }
.legal h2 { font-size: 23px; margin: 36px 0 10px; }
.legal .updated { color: var(--color-ink-muted); margin-bottom: 32px; }
.legal table { border-collapse: collapse; width: 100%; margin: 14px 0 22px; }
.legal th, .legal td {
  text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--color-mist);
  vertical-align: top; font-size: 16px;
}
.legal th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-ink-muted); }
.legal ul { color: var(--color-ink-soft); }
/* ── release log ────────────────────────────────────────────────────── */
.releases { list-style: none; padding: 0; margin: 0; }
.releases li { padding: 14px 0; border-bottom: 1px solid var(--color-mist); }
.releases li:last-child { border-bottom: 0; }
.releases .what { margin: 0; font-weight: 700; color: var(--color-ink); }
.releases .at {
  font-variant-numeric: tabular-nums; color: var(--color-ink-muted);
  font-weight: 600; margin-right: 8px;
}
.releases .why { margin: 4px 0 0; color: var(--color-ink-soft); font-size: 16px; }

.note {
  background: var(--color-ochre-surface); border: 1px solid var(--color-ochre-border);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 24px 0;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .cards, .promises, .price-grid { grid-template-columns: 1fr; }
  .band { padding: 56px 0; }
}

/* ── hero art ───────────────────────────────────────────────────────── */
/* Replaces the lone mascot portrait. The illustrations are 3:2, so the frame is too —
   letterboxing the one image a visitor sees first is a poor first impression. */
.hero-art { margin: 0; }
.hero-art img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-card-md);
  border: 2px solid var(--color-mist);
  background: var(--color-cream);
}
.hero-art figcaption {
  font-size: 14px; color: var(--color-ink-muted); margin-top: 10px; text-align: center;
}

/* ── real cards from the app ────────────────────────────────────────── */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.shot {
  margin: 0; background: var(--color-cream);
  border: 2px solid var(--color-mist); border-radius: var(--radius-card-md);
  overflow: hidden;
}
.shot img { width: 100%; height: auto; display: block; aspect-ratio: 3 / 2; object-fit: cover; }
.shot figcaption {
  display: flex; align-items: baseline; gap: 10px; padding: 14px 18px 16px;
}
.shot figcaption b { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.shot figcaption span { color: var(--color-ink-muted); font-size: 16px; }

/* ── tour carousel ──────────────────────────────────────────────────── */
/* Every slide is 9:16, because the product is a phone. They scroll rather than fade:
   a strip you can push with a thumb is the same gesture the app itself uses, and it
   keeps working with JavaScript off — the arrows and dots are the only part that needs
   any. The neighbours stay half in frame on purpose, so it reads as "there is more". */
.tour { position: relative; }
.tour-track {
  list-style: none; margin: 0; padding: 4px 0 14px;
  display: flex; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 0;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tour-track::-webkit-scrollbar { display: none; }
.tour-item {
  flex: 0 0 auto; width: 280px; scroll-snap-align: start;
  position: relative; border-radius: var(--radius-card-md); overflow: hidden;
  background: var(--color-violet);
  box-shadow: 0 10px 28px rgb(36 26 82 / 18%);
}
.tour-item img, .tour-item video {
  display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover;
}
/* Full screen is a landscape box around a portrait film. Without this the slide's own
   9:16 and `cover` survive into it, and the player fills the width by cutting the top
   and bottom off the phone. Let it letterbox instead — the whole frame, on black. */
.tour-item video:fullscreen {
  width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; background: #000;
}
.tour-item video:-webkit-full-screen {
  width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; background: #000;
}
/* The recording leads the strip and is the same size as the rest: a wider first slide
   made the whole row sit at two different heights. Its badge is what marks it out. */
.tour-badge {
  /* Above the player's own controls, not over them, and clear of the caption the
     poster frame carries at the top. */
  position: absolute; left: 14px; bottom: 56px;
  background: rgb(26 18 52 / 82%); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  padding: 6px 13px; border-radius: var(--radius-pill);
  pointer-events: none;
}
.tour-item.is-video video::-webkit-media-controls-panel { border-radius: 0; }

.tour-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border: 0; border-radius: var(--radius-pill);
  background: #fff; color: var(--color-violet);
  font-size: 30px; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 14px rgb(36 26 82 / 22%);
  display: none; place-items: center;
}
.tour-arrow.prev { left: -14px; }
.tour-arrow.next { right: -14px; }
.tour-arrow:disabled { opacity: .35; cursor: default; }
/* Shown only once the script that drives them is running. */
.tour.is-live .tour-arrow { display: grid; }

.tour-dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.tour-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: var(--radius-pill);
  background: var(--color-mist); cursor: pointer;
}
.tour-dots button[aria-current='true'] { background: var(--color-violet); width: 22px; }

@media (max-width: 860px) {
  .tour-item { width: 232px; }
  .tour-arrow { display: none !important; }
}

/* ── curriculum ─────────────────────────────────────────────────────── */
.themes {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.themes li {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 2px solid var(--color-mist);
  border-radius: var(--radius-card-sm); padding: 14px 16px;
  font-weight: 700; font-size: 16px;
}
.themes li span {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: var(--radius-chip); background: var(--color-violet-surface);
  color: var(--color-violet-deep); font-family: var(--font-display); font-size: 15px;
}

@media (max-width: 860px) {
  .shots { grid-template-columns: 1fr; }
  .themes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .themes { grid-template-columns: 1fr; }
}

/* ── Google Play badge ──────────────────────────────────────────────── */
/* Google's own artwork, unaltered: their brand guidelines forbid redrawing it, and
   the asset already carries its own padding — so no border, no shadow, no lip. */
.badge { display: inline-block; line-height: 0; }
.badge img { width: 200px; height: auto; }
.badge:hover { opacity: .88; }
