/* LetKiddo site. Palette, type and the hard sticker shadow come from the app:
   src/constants/theme.ts, src/theme/typography.ts, src/theme/shadow.ts.
   Section bands mix a palette colour toward the page background the same way
   src/theme/tint.ts tints a kid's page. */

:root {
  --ink: #1f1b4d;
  --paper: #fff9ec;
  --surround: #efe7cf;
  --sun: #ffd23f;
  --tomato: #ff5a4f;
  --grass: #2ec4a0;
  --sky: #4c8dff;
  --plum: #7c6bff;
  --night: #2b2a6b;

  --bg: var(--surround);
  --card: var(--paper);
  --text: var(--ink);
  --shadow: var(--ink);
  --line: var(--ink);
  /* What a band's colour is mixed toward: paper by day, night after dark. */
  --mixto: var(--paper);
  --band-mix: 76%;
  --border: 3px;
  /* One curve for everything that moves: a strong ease-out. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* The app's evening theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: var(--night);
    --card: #3a3980;
    --text: var(--paper);
    --shadow: #14133f;
    --line: #14133f;
    --mixto: var(--night);
    --band-mix: 82%;
  }
}

:root[data-theme='dark'] {
  --bg: var(--night);
  --card: #3a3980;
  --text: var(--paper);
  --shadow: #14133f;
  --line: #14133f;
  --mixto: var(--night);
  --band-mix: 82%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(38px, 8vw, 64px);
}

h2 {
  font-size: clamp(26px, 4vw, 38px);
  display: flex;
  align-items: center;
  gap: 12px;
}

h3 {
  font-size: 22px;
}

p {
  margin: 0 0 14px;
}

a {
  color: inherit;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  background: var(--card);
  padding: 8px 14px;
  border: var(--border) solid var(--line);
  border-radius: 999px;
}

/* Icons. Stroked, never filled, so they take the colour around them. */

.ic {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ic-lg {
  width: 30px;
  height: 30px;
  stroke-width: 1.9;
}

.ic-head {
  width: 32px;
  height: 32px;
  stroke-width: 2;
}

.fl {
  width: 26px;
  height: 17px;
  flex: none;
  border-radius: 4px;
  border: 2px solid var(--line);
}

/* Bands. Each section is full width, its contents share one column. */

.band {
  padding: 64px 16px;
}

.inner {
  max-width: 1080px;
  margin: 0 auto;
}

.band-paper {
  background: var(--bg);
}

.band-sun {
  background: color-mix(
    in srgb,
    var(--sun) calc(100% - var(--band-mix)),
    var(--mixto)
  );
}

.band-sky {
  background: color-mix(
    in srgb,
    var(--sky) calc(100% - var(--band-mix)),
    var(--mixto)
  );
}

.band-tomato {
  background: color-mix(
    in srgb,
    var(--tomato) calc(100% - var(--band-mix)),
    var(--mixto)
  );
}

.band-grass {
  background: color-mix(
    in srgb,
    var(--grass) calc(100% - var(--band-mix)),
    var(--mixto)
  );
}

.band-plum {
  background: color-mix(
    in srgb,
    var(--plum) calc(100% - var(--band-mix)),
    var(--mixto)
  );
}

.band-night {
  background: var(--night);
  color: var(--paper);
  --card: #3a3980;
  --shadow: #14133f;
  --line: #14133f;
}

/* Header */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 24px;
  text-decoration: none;
}

.brand img {
  border-radius: 12px;
  border: var(--border) solid var(--line);
}

.bar nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 700;
}

.bar nav a {
  text-decoration: none;
}

.bar nav a:hover {
  text-decoration: underline;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sun);
  color: var(--ink);
  padding: 8px 18px;
  border-radius: 999px;
  border: var(--border) solid var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
  transition:
    transform 120ms var(--ease-out),
    box-shadow 120ms var(--ease-out);
}

.pill:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--shadow);
}

/* Hero */

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero {
  padding-top: 24px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  opacity: 0.75;
  margin-bottom: 8px;
}

.lede {
  font-size: 19px;
  max-width: 52ch;
}

/* Calls to action */

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 28px;
}

.badge {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 190px;
  padding: 10px 20px;
  background: var(--card);
  border: var(--border) solid var(--line);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--shadow);
  opacity: 0.85;
}

.badge strong {
  font-weight: 800;
  font-size: 21px;
}

.badge small {
  font-weight: 700;
  font-size: 13.6px;
  opacity: 0.7;
}

.waitlist label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.waitlist .row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.waitlist input {
  flex: 1 1 220px;
  font: inherit;
  font-weight: 700;
  padding: 12px 16px;
  color: var(--ink);
  background: #fff;
  border: var(--border) solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--shadow);
}

.waitlist button {
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 12px 24px;
  color: var(--ink);
  background: var(--grass);
  border: var(--border) solid var(--ink);
  border-radius: 999px;
  box-shadow: 5px 5px 0 var(--shadow);
  transition:
    transform 120ms var(--ease-out),
    box-shadow 120ms var(--ease-out);
}

.waitlist button:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--shadow);
}

.fineprint {
  font-size: 13.6px;
  opacity: 0.7;
  margin: 10px 0 0;
}

.fineprint.centered {
  text-align: center;
}

/* Screenshot frames */

.shots {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.phone {
  margin: 0;
  width: 240px;
  background: var(--card);
  border: var(--border) solid var(--line);
  border-radius: 34px;
  box-shadow: 8px 8px 0 var(--shadow);
  padding: 10px;
  text-align: center;
}

.phone img {
  display: block;
  width: 100%;
  /* The img carries its own width and height, so the ratio needs height: auto
     to win over them. Without it the frame grows to the file's 932px. */
  height: auto;
  aspect-ratio: 9 / 19.5;
  object-fit: cover;
  border-radius: 24px;
  background: color-mix(in srgb, var(--sky) 30%, var(--mixto));
  font-size: 13px;
}

/* The pair beside the reasons. Narrower frames, no tilt, wrapping so a phone
   shows them two up. */

.shots-row {
  flex-wrap: wrap;
}

.shots-row .phone {
  width: 200px;
}

.phone figcaption {
  font-weight: 700;
  font-size: 14px;
  padding-top: 8px;
}

.tilt-left {
  transform: rotate(-3deg);
}

.tilt-right {
  transform: rotate(3deg) translateY(18px);
}

/* The two hero frames rise into place once, on load. The right one follows
   the left by a beat. */
.hero .phone {
  transition:
    opacity 400ms var(--ease-out),
    transform 400ms var(--ease-out);
}

.hero .tilt-right {
  transition-delay: 60ms;
}

@starting-style {
  .hero .phone {
    opacity: 0;
  }

  .hero .tilt-left {
    transform: rotate(-3deg) translateY(12px);
  }

  .hero .tilt-right {
    transform: rotate(3deg) translateY(30px);
  }
}

/* The three claims */

.strip-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.claim {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: var(--border) solid var(--line);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 16px 18px;
}

.claim p {
  margin: 0;
  font-size: 15.2px;
}

.claim strong {
  font-weight: 800;
}

/* Highlights bento */

.bento-band h2,
.bento-band .lede {
  justify-content: center;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(190px, auto);
  gap: 20px;
  margin-top: 28px;
}

.tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tile p {
  font-size: 16px;
}

.tile-big {
  grid-column: span 2;
  grid-row: span 2;
  flex-direction: row;
  gap: 20px;
}

.tile-tall {
  grid-row: span 2;
}

.tile-wide {
  grid-column: span 2;
  flex-direction: row;
  gap: 20px;
}

.tile-copy {
  flex: 1 1 0;
  min-width: 0;
}

.tile-big .tile-copy p {
  font-size: 18px;
}

/* A screenshot cut to fit its tile. The box sets the size, the image covers
   it from the top, since the interesting part of every capture is up there. */

.tile-shot {
  position: relative;
  flex: 0 0 44%;
  align-self: flex-end;
  height: 440px;
  margin: 24px -22px -22px 0;
  border: var(--border) solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-radius: 24px 0 0 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--sky) 30%, var(--mixto));
}

.tile-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.tile-shot-bottom {
  flex: 1 1 auto;
  align-self: stretch;
  height: auto;
  min-height: 200px;
  margin: 20px -22px -22px;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.tile-shot-wide {
  flex: 0 0 38%;
  height: 180px;
}

/* How a day goes */

.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.step {
  position: relative;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  top: -14px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
  background: var(--paper);
  border: var(--border) solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--shadow);
}

/* Why it works */

.why-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.reasons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.reason {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.reason .glyph {
  margin: 0;
  flex: none;
}

.reason h3 {
  font-size: 19px;
  margin-bottom: 4px;
}

.reason p {
  margin: 0;
  font-size: 16px;
  max-width: 44ch;
}

/* Cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.card {
  background: var(--card);
  border: var(--border) solid var(--line);
  border-radius: 26px;
  box-shadow: 6px 6px 0 var(--shadow);
  padding: 22px;
}

.card p {
  margin: 0;
  font-size: 16px;
}

.glyph {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  color: var(--ink);
  border: var(--border) solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--shadow);
}

.g-sun {
  background: var(--sun);
}

.g-tomato {
  background: var(--tomato);
}

.g-grass {
  background: var(--grass);
}

.g-sky {
  background: var(--sky);
}

.g-plum {
  background: var(--plum);
}

/* Chore chips */

.chore-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.chore-chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: var(--border) solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 8px 16px;
  font-weight: 700;
  font-size: 15.2px;
}

.chore-chips .ic {
  width: 18px;
  height: 18px;
  color: var(--grass);
  stroke-width: 3;
}

.chore-chips .own {
  background: var(--sun);
  color: var(--ink);
}

.chore-chips .own .ic {
  color: var(--ink);
}

/* Languages */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border: var(--border) solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 7px 16px 7px 10px;
  font-weight: 700;
  font-size: 15.2px;
}

/* Privacy */

.card.wide {
  padding: 32px;
}

.card.wide p {
  font-size: 18px;
  max-width: 60ch;
}

/* FAQ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 820px;
  margin: 28px 0 0;
}

.faq-list details {
  padding: 18px 22px;
  interpolate-size: allow-keywords;
}

/* The answer slides open in browsers that can interpolate to height: auto
   (Chrome 129+). Elsewhere it opens in one frame, as before. */
.faq-list details::details-content {
  height: 0;
  overflow: clip;
  transition:
    height 200ms var(--ease-out),
    content-visibility 200ms allow-discrete;
}

.faq-list details[open]::details-content {
  height: auto;
}

.faq-list summary {
  font-weight: 800;
  font-size: 19px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

/* The plus turns into a cross when open. */
.faq-list summary::after {
  content: '+';
  font-size: 26px;
  line-height: 1;
  transition: transform 200ms var(--ease-out);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  margin-top: 12px;
}

/* Closer and footer */

.closer .inner {
  text-align: center;
}

.closer h2,
.closer .cta {
  justify-content: center;
}

.textlink {
  font-weight: 800;
}

footer {
  padding: 32px 16px 56px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 15.2px;
  font-weight: 700;
  opacity: 0.8;
}

/* Narrow screens */

@media (max-width: 860px) {
  .hero-inner,
  .why-inner {
    grid-template-columns: 1fr;
  }

  .shots {
    order: -1;
  }

  .why-inner .shots {
    order: 0;
  }

  .strip-inner {
    grid-template-columns: 1fr;
  }

  .band {
    padding: 44px 16px;
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .shots-row .phone {
    width: 160px;
  }

  .bento {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .tile-big,
  .tile-wide {
    grid-column: auto;
    grid-row: auto;
    flex-direction: column;
  }

  .tile-shot,
  .tile-shot-wide {
    flex: none;
    align-self: stretch;
    height: 220px;
    margin: 20px -22px -22px;
    border-left: 0;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* Fades stay, movement goes. The press feedback is 120ms and one pixel,
     so it stays too. */
  .hero .phone {
    transition-property: opacity;
  }

  .faq-list details::details-content,
  .faq-list summary::after {
    transition: none;
  }

  .tilt-left,
  .tilt-right {
    transform: none;
  }
}

/* Privacy policy and terms */

.legal .inner {
  max-width: 760px;
}

.legal h1 {
  font-size: clamp(32px, 6vw, 48px);
}

.legal h2 {
  font-size: 26px;
  margin-top: 36px;
}

.legal p,
.legal li {
  font-size: 17px;
}

.legal ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.legal li {
  margin-bottom: 8px;
}

.updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 14px;
  background: var(--card);
  border: var(--border) solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--shadow);
  margin-bottom: 20px;
}

.legal .card {
  margin-top: 28px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.draft-note {
  background: color-mix(in srgb, var(--sun) 40%, var(--card));
}
