/* TaleHill marketing site. Tokens mirror src/constants/theme.ts in the app. */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("/assets/fonts/nunito-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("/assets/fonts/nunito-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD }

/* Layout: a picture-book page that walks from day (linen) into night (indigo band), the way bedtime does. */
:root {
  --bg: #F6F5F0; --surface: #FFFFFF; --muted-surface: #EEEDE6; --border: #E1DFD6;
  --ink: #1D1B38; --ink-muted: #5C5A74;
  --brand: #4A43B8; --brand-soft: #E9E9F8; --on-brand: #FFFFFF;
  --honey: #B8770F; --honey-soft: #F8EFD6; --hill: #7FC0A4; --hill-soft: #E4F2EA;
  /* the bedtime band is always dark */
  --night: #121429; --night-surface: #1B1E37; --night-border: #343957;
  --night-ink: #F1F1F8; --night-muted: #A6A9C6; --night-brand: #A29DFF; --night-honey: #F0BE5E;
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 6px 24px rgba(27,26,58,.07);
  --radius: 24px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121429; --surface: #1B1E37; --muted-surface: #252946; --border: #343957;
  --ink: #F1F1F8; --ink-muted: #A6A9C6; --brand: #A29DFF; --brand-soft: #2B2D5A; --on-brand: #121429;
  --honey: #F0BE5E; --honey-soft: #332D22; --hill: #6FCDA6; --hill-soft: #1F3530;
  --night: #0B0C1D; --night-surface: #17192F; --shadow: none; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #121429; --surface: #1B1E37; --muted-surface: #252946; --border: #343957;
  --ink: #F1F1F8; --ink-muted: #A6A9C6; --brand: #A29DFF; --brand-soft: #2B2D5A; --on-brand: #121429;
  --honey: #F0BE5E; --honey-soft: #332D22; --hill: #6FCDA6; --hill-soft: #1F3530;
  --night: #0B0C1D; --night-surface: #17192F; --shadow: none; color-scheme: dark }

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased }
a { color: inherit }
img { height: auto; max-width: 100% }
h1, h2, h3 { margin: 0; line-height: 1.12; text-wrap: balance; letter-spacing: -0.02em; font-weight: 900 }
p { margin: 0 }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)) }
.lead { font-size: 19px; color: var(--ink-muted); max-width: 34em }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px; font-weight: 800; font-size: 17px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; transition: transform .15s ease, box-shadow .15s ease }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 20px rgba(74,67,184,.25) }
.btn-primary:hover { transform: translateY(-1px) }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--border) }

/* header */
header.top { padding-block: 18px }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 26px; letter-spacing: -0.02em }
.brand .word span { color: var(--brand) }
.top nav { display: flex; align-items: center; gap: 10px }
.lang { display: inline-flex; background: var(--muted-surface); border-radius: 999px; padding: 4px }
.lang a { font-weight: 800; font-size: 14px; color: var(--ink-muted); padding: 7px 14px; border-radius: 999px; text-decoration: none }
.lang a[aria-current="page"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow) }
.top .btn { min-height: 44px; padding: 0 20px; font-size: 15px }

/* hero */
.hero { padding-block: 28px 72px }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center }
.hero h1 { font-size: clamp(38px, 5.4vw, 64px) }
.hero h1 em { font-style: normal; color: var(--brand) }
.hero-copy { display: grid; gap: 22px; min-width: 0 }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center }
.hero-art { position: relative; min-width: 0 }
.hero-art img { width: 100%; aspect-ratio: 925/575; object-fit: cover; border-radius: 32px; display: block; box-shadow: 0 20px 50px rgba(27,26,58,.16) }
.story-chip { position: absolute; left: -24px; bottom: -28px; background: var(--surface); border-radius: 20px; padding: 14px 18px 14px 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 14px 36px rgba(27,26,58,.18); max-width: 330px }
.story-chip img { width: 54px; height: 54px !important; border-radius: 14px; aspect-ratio: 1; box-shadow: none }
.story-chip b { display: block; font-size: 16px; line-height: 1.25 }
.story-chip small { color: var(--ink-muted); font-size: 13px; font-weight: 700 }
.play { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; margin-left: auto }
.play svg { fill: var(--on-brand) }


/* sections */
section.block { padding-block: 72px }
.head { display: grid; gap: 12px; margin-bottom: 40px; max-width: 640px }
.head h2 { font-size: clamp(30px, 3.6vw, 44px) }

/* how it works: a trail up the hill to the lit window */
.climb { position: relative; padding-top: 150px; padding-bottom: 44px; padding-inline: 0; border-radius: 0 0 32px 32px; background: linear-gradient(var(--hill-soft), var(--hill-soft)) 0 249px / 100% calc(100% - 249px) no-repeat }
.hillpath { position: absolute; inset: 0 0 auto 0; width: 100%; height: 250px; z-index: 0 }
.hillfill { fill: var(--hill-soft) }
.trail { fill: none; stroke: var(--hill); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round }
.house { position: absolute; right: calc(7% - 28px); top: -2px; width: 56px; height: 56px; z-index: 1 }
.steps { list-style: none; margin: 0; padding: 0 24px; position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: s }
.step { display: grid; gap: 8px; align-content: start; min-width: 0 }
.step:nth-child(1) { margin-top: 70px } .step:nth-child(2) { margin-top: 20px } .step:nth-child(3) { margin-top: -40px }
.step::before { counter-increment: s; content: counter(s); width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 900; display: grid; place-items: center; font-size: 19px; box-shadow: 0 0 0 6px var(--hill-soft) }
.step h3 { font-size: 22px }
.step p { color: var(--ink-muted); max-width: 26em }
.soon { color: var(--ink-muted); font-size: 15px; max-width: 30em }

/* hero builder showcase */
.builder { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); min-width: 0 }
.card h3 { font-size: 20px; margin-bottom: 16px }
.field { display: grid; gap: 6px; margin-bottom: 14px }
.field label { font-size: 14px; font-weight: 800; color: var(--ink-muted) }
.field .val { background: var(--muted-surface); border-radius: 14px; padding: 11px 14px; font-weight: 700 }
.hero-row { display: flex; gap: 14px; align-items: center; margin-bottom: 18px }
.hero-row img { width: 64px; height: 64px !important; border-radius: 50%; border: 3px solid var(--brand-soft) }
.hero-row b { font-size: 22px; display: block; line-height: 1.2 }
.hero-row small { color: var(--ink-muted); font-weight: 700 }
.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 14px }
.chip.honey { background: var(--honey-soft); color: var(--honey) }
.chip.hill { background: var(--hill-soft); color: var(--ink) }
.result { background: var(--night); color: var(--night-ink); border: 0; display: grid; gap: 16px; align-content: start }
.result .cover { display: flex; gap: 16px; align-items: center }
.result .cover img { width: 96px; height: 96px !important; border-radius: 18px }
.result .cover small { color: var(--night-muted); font-weight: 700; font-size: 14px }
.result h3 { margin: 0; font-size: 24px; color: var(--night-ink) }
.excerpt { font-size: 18px; line-height: 1.75; color: var(--night-muted) }
.excerpt mark { background: rgba(240,190,94,.18); color: var(--night-ink); border-radius: 6px; padding: 1px 4px }
.bar { height: 6px; background: var(--night-border); border-radius: 99px; overflow: hidden }
.bar i { display: block; height: 100%; width: 38%; background: var(--night-brand); border-radius: 99px }
.times { display: flex; justify-content: space-between; font-size: 13px; color: var(--night-muted); font-weight: 700; font-variant-numeric: tabular-nums }

/* bedtime band */
.night { background: var(--night); color: var(--night-ink); position: relative; overflow: hidden }
.night .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding-block: 88px }
.night .night h2 { font-size: clamp(30px, 3.6vw, 44px) }
.night .lead { color: var(--night-muted) }
.night img.scene { width: 100%; border-radius: 28px; display: block; aspect-ratio: 1200/669; object-fit: cover }
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin-top: 28px }
.feat div { padding-block: 14px; border-top: 1px solid var(--night-border); min-width: 0 }
.feat b { display: block; font-size: 17px; margin-bottom: 2px; color: var(--night-honey) }
.feat span { color: var(--night-muted); font-size: 15px; line-height: 1.45; display: block }

/* trust */
#trust .wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; align-items: start }
.trust-head { margin: 0 }
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 40px }
.trust div { display: grid; gap: 6px; align-content: start; min-width: 0; padding-left: 34px; position: relative }
.trust div::before { content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--hill-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6.5 11.5l3 3 6-6' fill='none' stroke='%232A7652' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/22px no-repeat }
.trust h3 { font-size: 19px }
.trust p { color: var(--ink-muted); font-size: 16px }

/* languages */
.langs { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center }
.say { display: grid; gap: 10px }
.say div { display: flex; gap: 14px; align-items: baseline; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 18px }
.say code { font-family: inherit; font-weight: 800; color: var(--brand); width: 84px; flex: none; font-size: 15px }
.say span { min-width: 0 }

/* shelf */
.shelf { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px }
.shelf figure { margin: 0; display: grid; gap: 8px; min-width: 0 }
.shelf img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 20px; display: block }
.shelf figcaption { font-weight: 800; font-size: 15px; line-height: 1.3 }
.shelf small { display: block; color: var(--ink-muted); font-weight: 700; font-size: 13px }

/* faq */
.faq { display: grid; gap: 12px; max-width: 780px }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 4px 22px }
.faq summary { font-weight: 800; font-size: 18px; cursor: pointer; padding-block: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px }
.faq summary::after { content: "+"; color: var(--brand); font-size: 24px; line-height: 1 }
.faq details[open] summary::after { content: "–" }
.faq details p { color: var(--ink-muted); padding-bottom: 18px }

/* final cta */
.final { text-align: center; display: grid; gap: 20px; justify-items: center; padding-block: 80px; background: var(--brand-soft); border-radius: 36px }
.final h2 { font-size: clamp(30px, 4vw, 48px); max-width: 16em }

footer { padding-block: 48px 40px; color: var(--ink-muted); font-size: 15px }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: space-between; align-items: center }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px }
footer a { text-decoration: none; font-weight: 700 }
footer a:hover { color: var(--brand) }

@media (max-width: 900px) {
  .hero .wrap, .builder, .night .wrap, .langs { grid-template-columns: 1fr }
  #trust .wrap { grid-template-columns: 1fr }
  .shelf { grid-template-columns: repeat(3, 1fr) }
  .story-chip { left: 12px; bottom: -24px }
  .hero { padding-bottom: 56px }
}
@media (max-width: 520px) {
  body { font-size: 16px }
  .trust, .feat { grid-template-columns: 1fr }
  .climb { padding-top: 0; background: none; padding-bottom: 0 }
  .hillpath, .house { display: none }
  .steps { grid-template-columns: 1fr; gap: 26px; border-left: 3px dotted var(--hill); margin-left: 21px; padding-left: 26px }
  .step:nth-child(n) { margin-top: 0 }
  .step::before { margin-left: -50px; margin-bottom: -46px }
  .step h3, .step p { margin-left: 8px }
  .shelf { grid-template-columns: repeat(2, 1fr) }
  .top .btn { display: none }
  .brand { font-size: 21px; gap: 8px }
  .brand svg { width: 34px; height: 34px }
  .story-chip { right: 12px; max-width: none }
  .final { border-radius: 24px }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }

/* legal and support pages */
.doc { padding-block: 24px 72px }
.doc article { max-width: 720px; display: grid; gap: 14px }
.doc h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 4px }
.doc h2 { font-size: 22px; margin-top: 22px; letter-spacing: -0.01em }
.doc p, .doc li { color: var(--ink-muted) }
.doc ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px }
.doc .updated { font-size: 15px; font-weight: 700 }
.doc a { color: var(--brand); font-weight: 700 }
.doc .mail { display: inline-block; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 18px; font-weight: 800; color: var(--brand); font-size: 18px; text-decoration: none }
.doc h3 { font-size: 18px; margin-top: 8px; letter-spacing: -0.01em }
