/* Toddlore website. Colours are the app's Terracotta palette (ui/theme/Palettes.kt), type is the app's
   Storybook pair: Fraunces (the app's modified static instances, SOFT 100, WONK 0) for headings and the child's
   words, Figtree for everything else. "Fraunces Display" is the opsz 72 cut for the big headings; "Fraunces" is
   opsz 28 (roman) and 24 (italic), as in the app. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-650.ttf") format("truetype");
  font-weight: 650;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic-500.ttf") format("truetype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Display";
  src: url("/assets/fonts/fraunces-650-display.ttf") format("truetype");
  font-weight: 650;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Display";
  src: url("/assets/fonts/fraunces-italic-500-display.ttf") format("truetype");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f4eee5;
  --surface: #fdfbf8;
  --surface-2: #f1e6dc;
  --surface-3: #ecdfd4;
  --ink: #221a15;
  --muted: #53443c;
  --primary: #a4513a;
  --on-primary: #ffffff;
  --primary-soft: #ffdbcf;
  --on-primary-soft: #3a0b01;
  --sage: #55664a;
  --line: #d8c2b8;
  --band: #843a24;
  --on-band: #ffdbcf;
  --on-band-muted: #f3d3c6;
  --bezel: #2b211b;
  --shadow: 0 1px 2px rgb(60 30 15 / 0.06), 0 12px 40px -12px rgb(90 45 25 / 0.28);
  --blank: #fff3c4;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --display: "Fraunces Display", "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --leaf: 26px 26px 26px 10px;
  --leaf-sm: 16px 16px 16px 5px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #251c17;
    --surface: #2d231c;
    --surface-2: #332720;
    --surface-3: #3e3029;
    --ink: #ede0d9;
    --muted: #d8c2b8;
    --primary: #ffb59e;
    --on-primary: #5e1703;
    --primary-soft: #843a24;
    --on-primary-soft: #ffdbcf;
    --sage: #bccead;
    --line: #5c493e;
    --band: #3e3029;
    --on-band: #ede0d9;
    --on-band-muted: #d8c2b8;
    --bezel: #120d0a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 48px -16px rgb(0 0 0 / 0.6);
    --blank: #5a4a1c;
    --glow: 0.3;
  }
  .phone img:not(.has-dark), .cards img, .m-photo img { filter: brightness(0.9); }
  .phone { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), var(--shadow); }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1, h2 { font-family: var(--display); }
h2 { font-size: clamp(1.85rem, 1.3rem + 2.2vw, 2.75rem); }
h3 { font-size: 1.3rem; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }

/* The child's own words: Fraunces Italic, as in the app. */
.words {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.icon { width: 24px; height: 24px; flex: none; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Fill-in-later blanks (owner's name, contact email, dates): visible on purpose until filled. */
.blank {
  background: var(--blank);
  border-radius: 4px;
  padding: 0 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Header */
.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; color: var(--primary); }
.brand svg { height: 30px; width: auto; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem;
  padding: 8px 12px; border-radius: 999px;
}
.site-nav a:hover { background: var(--surface-2); }
.site-nav .lang { border: 1px solid var(--line); margin-left: 6px; }
@media (max-width: 720px) {
  .site-nav .sec { display: none; }
}

/* Google Play button. While the app isn't out, it reads "Coming soon to Google Play" and leads to /get/.
   LAUNCH: see site/README.md ("Going live on Google Play"); the switch is the block at the end of this file. */
.play {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 22px 8px 18px;
  background: var(--ink); color: var(--bg);
  border-radius: 14px; text-decoration: none; line-height: 1.15;
  transition: transform 0.15s ease;
}
.play:hover { transform: translateY(-1px); }
.play .play-mark { width: 22px; height: 22px; flex: none; }
.play small { display: block; font-size: 0.78rem; font-weight: 500; opacity: 0.85; letter-spacing: 0.01em; }
.play strong { display: block; font-size: 1.15rem; font-weight: 650; }
.play .live { display: none; }
.cta-note { color: var(--muted); font-size: 0.95rem; margin-top: 14px; }

/* Hero */
.hero { padding: clamp(24px, 6vw, 72px) 0 clamp(32px, 4.5vw, 56px); overflow-x: clip; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 6vw, 80px); align-items: center;
}
.eyebrow {
  display: inline-block; font-weight: 600; font-size: 0.95rem; color: var(--primary);
  letter-spacing: 0.01em; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.6rem, 1.5rem + 4.6vw, 4.75rem);
  font-weight: 650; line-height: 1.04; letter-spacing: -0.02em;
}
.hero h1 em { font-style: italic; color: var(--primary); font-weight: 500; }
.hero .lead { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); color: var(--muted); margin: 24px 0 32px; max-width: 34em; }

.stage { position: relative; justify-self: center; width: min(100%, 380px); padding: 0 0 44px 0; isolation: isolate; }
.stage::before {
  content: ""; position: absolute; z-index: -1; inset: 6% -14% 14% 6%;
  background: var(--primary-soft); border-radius: 50%; opacity: var(--glow, 0.7);
}
.phone {
  border-radius: 40px; padding: 9px; background: var(--bezel);
  box-shadow: var(--shadow);
  max-width: 300px; margin-left: auto;
}
.phone img { border-radius: 31px; width: 100%; aspect-ratio: 1080 / 2400; }
.stage .phone { margin-right: 0; }

.leaf-quote {
  position: absolute; left: -40px; bottom: 0; width: 280px;
  background: var(--surface); border-radius: var(--leaf);
  padding: 20px 22px 18px; box-shadow: var(--shadow);
}
.leaf-quote q { quotes: "“" "”"; display: block; font-size: 1.32rem; line-height: 1.25; color: var(--ink); }
.leaf-quote .meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 0.86rem; color: var(--muted); }
.leaf-quote .meta .icon { width: 18px; height: 18px; color: var(--primary); }
.leaf-quote .meta span:first-of-type { white-space: nowrap; }
.leaf-quote .clip { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
:lang(lt) .leaf-quote q { quotes: "„" "“"; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .stage { width: min(100%, 360px); }
  .leaf-quote { left: 0; width: 260px; }
}
@media (max-width: 400px) {
  .phone { max-width: 240px; }
  .leaf-quote { width: 268px; padding: 16px 18px 14px; }
  .leaf-quote .meta > .icon { display: none; }
  .leaf-quote q { font-size: 1.18rem; }
}

/* Sections */
.section { padding: clamp(36px, 5vw, 68px) 0; }
.section-head { max-width: 40em; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head p { color: var(--muted); margin-top: 16px; font-size: 1.12rem; }

/* What you can keep: moments drawn the way the app draws them, each with a caption */
.journal { columns: 3 300px; column-gap: 20px; }
.specimen { break-inside: avoid; margin: 0 0 28px; }
.moment {
  background: var(--surface); border-radius: var(--leaf); padding: 22px 24px 18px;
  box-shadow: 0 1px 2px rgb(60 30 15 / 0.05);
}
.m-quote { font-size: 1.55rem; line-height: 1.22; color: var(--ink); }
.m-word { font-family: var(--serif); font-weight: 650; font-size: 1.9rem; line-height: 1.1; }
.m-detail { color: var(--muted); margin-top: 8px; font-size: 0.98rem; }
.m-caption { font-weight: 600; font-size: 1.05rem; }
.m-note { font-size: 1.05rem; line-height: 1.55; }
.m-meta { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.86rem; font-weight: 500; color: var(--muted); }
.m-meta .icon { width: 18px; height: 18px; color: var(--primary); }
.m-clip { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.m-photo { padding: 10px 10px 18px; }
.m-photo img { border-radius: 18px 18px 18px 6px; margin-bottom: 14px; }
.m-photo .m-caption, .m-photo .m-meta { padding: 0 14px; }
.wave { display: block; width: 100%; height: 36px; margin-top: 14px; color: var(--primary); opacity: 0.75; }
.specimen figcaption { color: var(--muted); font-size: 0.95rem; line-height: 1.5; padding: 12px 6px 0; }
.specimen figcaption strong { color: var(--ink); font-weight: 650; }
.kinds-foot { color: var(--muted); margin-top: 8px; }

/* Feature chapters: a screenshot and its story, alternating sides */
.chapter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.chapter + .chapter { margin-top: clamp(56px, 7vw, 96px); }
.chapter .text { max-width: 30em; }
.chapter .text p { color: var(--muted); margin-top: 18px; font-size: 1.08rem; }
.chapter .text ul { margin: 20px 0 0; padding: 0; list-style: none; color: var(--muted); }
.chapter .text li { position: relative; padding-left: 22px; margin-top: 8px; text-wrap: balance; }
.chapter .text li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em; width: 9px; height: 9px;
  background: var(--primary); border-radius: 5px 5px 5px 2px; opacity: 0.8;
}
.chapter .media { display: flex; justify-content: center; }
.chapter .phone { margin: 0; width: min(100%, 300px); }
.chapter.flip .media { order: -1; }
.kicker { display: flex; align-items: center; gap: 10px; color: var(--primary); font-weight: 600; margin-bottom: 14px; }
.kicker .icon { width: 26px; height: 26px; }
@media (max-width: 860px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter.flip .media { order: 0; }
  .chapter .phone { width: min(100%, 280px); }
}

/* Picture cards in a row, as they come out of the app */
.chapter.wide { grid-template-columns: 1fr; gap: 40px; }
.chapter.wide .text { max-width: 40em; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px); }
.cards img { border-radius: 8px; box-shadow: var(--shadow); width: 100%; }
.cards li:nth-child(1) { transform: rotate(-2deg); }
.cards li:nth-child(2) { transform: translateY(18px) rotate(1.2deg); }
.cards li:nth-child(3) { transform: rotate(-0.8deg); }
@media (max-width: 760px) {
  .cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 12px 4px 28px; margin: 0 calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .cards li { scroll-snap-align: center; }
  .cards li:nth-child(2) { transform: rotate(1.2deg); }
}

/* Two parents, backups */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--surface); border-radius: 28px; padding: clamp(24px, 4vw, 40px); }
.panel .badge { width: 52px; height: 52px; margin-bottom: 20px; }
.panel p { color: var(--muted); margin-top: 14px; }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } }

/* Privacy band */
.band { background: var(--band); color: var(--on-band); border-radius: clamp(24px, 4vw, 40px); padding: clamp(32px, 6vw, 72px); }
.band h2 { color: var(--on-band); max-width: 14em; }
.band .intro { color: var(--on-band-muted); max-width: 36em; margin-top: 18px; font-size: 1.12rem; }
.promises { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.promises li { border-top: 1px solid color-mix(in srgb, var(--on-band) 30%, transparent); padding-top: 16px; }
.promises strong { display: block; font-family: var(--serif); font-weight: 650; font-size: 1.2rem; line-height: 1.2; }
.promises span { display: block; color: var(--on-band-muted); font-size: 0.97rem; margin-top: 6px; line-height: 1.5; }
.band a { color: var(--on-band); font-weight: 600; }
.band .more { margin-top: 32px; }
@media (max-width: 900px) { .promises { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .promises { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 16px;
  padding: 20px 4px; font-weight: 600; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; margin-left: auto; flex: none; width: 10px; height: 10px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.faq .answer { padding: 0 4px 22px; color: var(--muted); max-width: 40em; }
.faq .answer p + p { margin-top: 12px; }

/* Closing call */
.closing { text-align: center; padding: clamp(48px, 7vw, 88px) 0; }
.closing .line { font-family: var(--display); font-size: clamp(2rem, 1.2rem + 3.6vw, 3.6rem); line-height: 1.1; max-width: 16em; margin: 0 auto 36px; text-wrap: balance; }
.closing .line span { color: var(--primary); }
.closing .line .words { font-family: var(--display); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 16px 40px; align-items: start; }
.site-footer .brand svg { height: 24px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; }
.site-footer a { color: var(--ink); }
.site-footer .fine { grid-column: 1 / -1; font-size: 0.85rem; }
@media (max-width: 640px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer ul { justify-content: flex-start; }
}

/* Plain text pages: privacy policy, coming-soon page */
.doc { max-width: 720px; padding-top: clamp(16px, 4vw, 48px); padding-bottom: clamp(56px, 8vw, 96px); }
.doc h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.2rem); margin-bottom: 12px; }
.doc h2 { font-family: var(--serif); font-size: clamp(1.45rem, 1.2rem + 1vw, 1.8rem); margin: 44px 0 14px; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 14px; }
.doc strong { color: var(--ink); font-weight: 650; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 14px 0; }
.doc li { margin-top: 8px; }
.doc ol > li { padding-left: 4px; }
.doc ol > li::marker { color: var(--primary); font-weight: 650; }
.doc code { font-size: 0.9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
.doc .updated { color: var(--muted); font-style: italic; }
.doc .summary { background: var(--surface); border-radius: var(--leaf); padding: 22px 26px; margin: 28px 0 8px; }
.doc .summary p { color: var(--ink); }
.doc .back { margin-top: 40px; }

/* ---------------------------------------------------------------------------------------------
   LAUNCH: when Toddlore is live on Google Play, replace the .play rules' "Coming soon" text with the
   official badge by uncommenting this block (and putting the badge images in /assets/img/, see README).

.play { background: none; padding: 0; min-height: 0; border-radius: 0; }
.play .soon, .play .play-mark { display: none; }
.play .live { display: block; width: 180px; height: 70px; background: url("/assets/img/google-play-badge-en.png") center / contain no-repeat; }
:lang(lt) .play .live { background-image: url("/assets/img/google-play-badge-lt.png"); }
.play .live > * { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
--------------------------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.panel h2 { font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); }
