/* Blundi website: same warm paper + clay look as the app. Self-hosted fonts, no external requests. */
@font-face { font-family: 'Newsreader'; src: url('/fonts/Newsreader-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('/fonts/Newsreader-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --bg: #F6F3EC; --surface: #FFFDF9; --surface-alt: #EEE9DF; --border: #E4DED2;
  --text: #211F1B; --muted: #6C665C; --faint: #A19A8E;
  --accent: #C46B4A; --accent-soft: #F4E1D7; --sleep: #5B78AE; --sleep-soft: #E2E8F3;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1D1C1A; --surface: #272623; --surface-alt: #312F2B; --border: #3A3833;
    --text: #ECE7DE; --muted: #A59F93; --faint: #716C63;
    --accent: #D98A6B; --accent-soft: #3C2C25; --sleep: #93A9D4; --sleep-soft: #2A3142;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--sans); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

header.site { padding: 22px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 500 24px/1 var(--serif); }
.brand svg { width: 36px; height: 36px; }
nav.lang a { font-size: 15px; color: var(--muted); text-decoration: none; }
nav.lang a:hover { color: var(--text); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: clamp(36px, 6vw, 56px); margin: 0 0 16px; }
h2 { font-size: 30px; margin: 48px 0 12px; }
h3 { font-size: 21px; margin: 28px 0 8px; }
p, li { color: var(--text); }
.muted { color: var(--muted); }
.lede { font: 400 22px/1.5 var(--serif); color: var(--muted); max-width: 34ch; }

.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; padding: 32px 0 24px; }
.hero img { width: 100%; max-width: 380px; justify-self: center; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero img { max-width: 280px; } }

/* Home page promo video (artwork/video), self-hosted; CSP allows media-src 'self'. */
.film { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 40px; align-items: center; margin: 24px 0 40px; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 22px; background: var(--surface-alt); box-shadow: 0 24px 50px -30px rgba(33, 31, 27, 0.45); }
.film h2 { margin-top: 0; }
.film p { max-width: 38ch; }
@media (max-width: 760px) { .film { grid-template-columns: 1fr; gap: 20px; } .film video { max-width: 300px; justify-self: center; } }

.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; }
.button { display: inline-block; padding: 14px 24px; border-radius: 999px; background: var(--accent); color: var(--surface); font-weight: 600; text-decoration: none; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 24px; }
.card img { width: 140px; margin: 0 auto 8px; }
.card h3 { margin-top: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

.promise { background: var(--sleep-soft); border-radius: 22px; padding: 28px; margin: 40px 0; }
.promise h2 { margin-top: 0; }
.promise ul { margin: 0; padding-left: 20px; }

.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .prices { grid-template-columns: 1fr; } }
.price { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 22px; }
.price strong { display: block; font: 500 30px/1.2 var(--serif); margin: 4px 0; }
.price.featured { border: 2px solid var(--accent); }

.draft { background: var(--accent-soft); color: var(--text); border-radius: 16px; padding: 14px 18px; margin: 8px 0 24px; font-size: 15px; }
.legal h2 { font-size: 24px; margin-top: 36px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.legal th { font-weight: 600; }
/* Long Norwegian words would otherwise push a 3-column table wider than a phone. */
.legal td, .legal th { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 480px) { .legal th, .legal td { padding: 8px 5px; } }
.legal h2[id] { scroll-margin-top: 16px; }
.updated { color: var(--faint); font-size: 15px; }

/* Legal pages: "the short version" box and the generated table of contents (scripts/build-pages.mjs). */
.summary { background: var(--sleep-soft); border-radius: 18px; padding: 18px 22px; margin: 20px 0; }
.summary h2 { margin: 0 0 8px; font-size: 22px; }
.summary ul { margin: 0; padding-left: 20px; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 22px; margin: 20px 0 8px; }
.toc-title { margin: 0 0 6px; font-weight: 600; }
.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; font-size: 16px; }
.toc li { break-inside: avoid; }
@media (max-width: 600px) { .toc ol { columns: 1; } }

/* Home page waitlist: a plain form that posts to api.blundi.app (CSP form-action), no JavaScript. */
.waitlist { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 28px; margin: 40px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; scroll-margin-top: 16px; }
@media (max-width: 760px) { .waitlist { grid-template-columns: 1fr; gap: 24px; padding: 22px; } }
.waitlist h2 { margin: 12px 0 8px; }
.waitlist p { margin: 0; }
.perks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.perks li { position: relative; padding-left: 22px; color: var(--muted); font-size: 16px; }
.perks li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px; border-radius: 50%; background: var(--sleep); }
.perks li.star::before { background: var(--accent); }
.perks strong { display: block; color: var(--text); }
.waitlist .spots { margin-top: 14px; font-size: 15px; font-weight: 600; color: var(--accent); }
.waitlist-form { display: grid; gap: 16px; align-content: start; }
.waitlist-form .field, .waitlist-form legend { display: grid; gap: 6px; font-size: 15px; font-weight: 600; }
.waitlist-form input[type=email] { font: inherit; font-weight: 400; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); color: var(--text); width: 100%; }
.waitlist-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.waitlist-form legend { padding: 0; margin-bottom: 8px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); font-size: 15px; cursor: pointer; }
.choices label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.waitlist-form input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
.waitlist-form .button { border: 0; font: inherit; font-weight: 600; cursor: pointer; justify-self: start; }
.waitlist-form :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.waitlist-form .fine { font-size: 14px; color: var(--muted); }
.waitlist-form .hint { margin: -8px 0 0; font-size: 14px; color: var(--muted); }
/* The field only bots fill in: off screen, never focused, hidden from screen readers. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; }

footer.site { margin-top: 64px; padding: 32px 0 48px; border-top: 1px solid var(--border); color: var(--muted); font-size: 15px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
footer.site a { color: var(--muted); }

.soon { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 24px; }
.soon svg { width: 72px; height: 72px; }
