@font-face { font-family: Fredoka; src: url(fonts/Fredoka_600SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
:root {
  color-scheme: light dark;
  --bg: #fffdfb; --surface: #faf6f3; --text: #1c2140; --muted: #5d566f; --accent: #c23b5e; --line: #e8e2ec;
  --dusk: #1d1b30; --dusk-2: #2d2845; --on-dusk: #f7f3fb; --on-dusk-muted: #c9c4dc; --rose: #f4b8c8;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15141f; --surface: #1b1a28; --text: #ece9f7; --muted: #aba6c4; --accent: #ee7a98; --line: #2e2b44; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; overflow-wrap: break-word; background: var(--bg); color: var(--text); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1, h2 { font-family: Fredoka, "Segoe UI", Roboto, sans-serif; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 6px; }
.wrap { --gutter: 24px; width: min(1120px, 100%); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 5; padding: 10px 14px; border-radius: 10px; background: #fff; color: #1c2140; }

.hero { position: relative; overflow: hidden; background: linear-gradient(165deg, var(--dusk) 30%, var(--dusk-2) 100%); color: var(--on-dusk); }
.hero::before { content: ""; position: absolute; top: 96px; right: 8%; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(244,184,200,.26), rgba(244,184,200,0) 68%); }
.nav { position: relative; display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; min-height: 44px; align-items: center; gap: 11px; color: inherit; text-decoration: none; font: 600 23px Fredoka, "Segoe UI", Roboto, sans-serif; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.nav-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--on-dusk); font-size: 15px; font-weight: 700; text-decoration: none; padding: 9px 16px; border: 1px solid rgba(255,255,255,.28); border-radius: 22px; }
.nav-link:hover { background: rgba(255,255,255,.1); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; padding-top: 44px; padding-bottom: 92px; }
.eyebrow { margin-bottom: 14px; color: var(--rose); font-size: 13px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
h1 { font-size: clamp(38px, 6.4vw, 74px); line-height: 1.04; }
.hero-text { max-width: 33em; margin: 22px 0 30px; color: var(--on-dusk-muted); font-size: clamp(17px, 1.7vw, 20px); line-height: 1.5; }
.install-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 24px; border-radius: 16px; background: #fff; color: #1c2140; font-size: 17px; font-weight: 800; text-decoration: none; }
a.button:hover { background: #fbe9ef; }
.button-soon { background: rgba(255,255,255,.12); color: var(--on-dusk); border: 1px dashed rgba(255,255,255,.42); }
.button-quiet { background: transparent; color: var(--on-dusk); border: 1px solid rgba(255,255,255,.42); }
a.button-quiet:hover { background: rgba(255,255,255,.12); }
.hero-note { margin-top: 14px; color: var(--on-dusk-muted); font-size: 15px; }
/* The three covers scale from one size, --cover, so they stay inside the column. */
.fan { --cover: 232px; --spread: calc(var(--cover) * .595); position: relative; width: 100%; height: calc(var(--cover) * 1.86); }
.fan .paper { position: absolute; top: 20px; left: 50%; width: var(--cover); margin-left: calc(var(--cover) / -2); }
.fan .paper:nth-child(1) { transform: translateX(calc(var(--spread) * -1)) translateY(8%) rotate(-8deg); }
.fan .paper:nth-child(2) { transform: translateX(var(--spread)) translateY(8%) rotate(7deg); }
.fan .paper:nth-child(3) { z-index: 1; transform: rotate(-1deg); }

.paper { position: relative; padding: 7px 7px 20px; border: 1px solid #e8ddc8; border-radius: 4px; background: #fffdf7; box-shadow: 1px 8px 20px rgba(20,18,40,.28); }
.paper img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.pin { position: absolute; top: -8px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border: 1px solid #f7dad5; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe8de 0 18%, #b84c5c 24%); box-shadow: 0 2px 3px rgba(24,23,41,.34); }

.facts { border-bottom: 1px solid var(--line); }
.facts ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; padding: 26px 0; list-style: none; }
.facts strong { display: block; font: 600 27px/1.2 Fredoka, "Segoe UI", Roboto, sans-serif; }
.facts span { color: var(--muted); font-size: 15px; }

section { padding: clamp(52px, 8vw, 76px) 0; }
.section-head { max-width: 40em; margin-bottom: 40px; }
.overline { margin-bottom: 10px; color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.12; }
.section-head p:last-child { margin-top: 14px; color: var(--muted); font-size: 18px; }

.shelf { display: grid; grid-template-columns: repeat(6, 1fr); gap: 38px 20px; }
.story-open { display: block; color: inherit; text-decoration: none; }
.story-open .paper { transition: transform .18s ease; }
.story-open:focus-visible .paper { transform: translateY(-5px) rotate(0); }
@media (hover: hover) {
  .story-open:hover .paper { transform: translateY(-5px) rotate(0); }
  .story-open:hover h3 { color: var(--accent); }
}
.story:nth-child(odd) .paper { transform: rotate(-1deg); }
.story:nth-child(even) .paper { transform: rotate(1deg); }
.story-tags { display: flex; align-items: center; gap: 8px; margin: 20px 0 8px; }
.tag { padding: 3px 8px; border-radius: 7px; color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .7px; text-transform: uppercase; }
.tag-real { background: #1e7a6e; }
.tag-fiction { background: #6b4fa8; }
.story-period { color: var(--muted); font-size: 14px; }
.story h3 { font-size: 16px; line-height: 1.3; }
.story-tags { flex-wrap: wrap; }

.about { background: var(--surface); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 56px; }
.about-copy p:not(.overline) { margin-top: 18px; color: var(--muted); font-size: 18px; }
.collections { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.collection { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 18px; background: var(--dusk); color: #fff; }
.collection img { width: 100%; height: 100%; object-fit: cover; }
.collection div { position: absolute; inset: auto 0 0; padding: 40px 15px 13px; background: linear-gradient(transparent, rgba(14,13,26,.9)); }
.collection strong { display: block; font-size: clamp(14px, 1.5vw, 16px); line-height: 1.25; }
.collection span { display: block; margin-top: 2px; color: #e3deef; font-size: clamp(12px, 1.3vw, 14px); line-height: 1.3; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 38px; margin: 0; padding: 0; list-style: none; }
.features li { padding-top: 16px; border-top: 2px solid var(--accent); }
.features h3 { font-size: 18px; }
.features p { margin-top: 6px; color: var(--muted); font-size: 16px; }

.install { background: linear-gradient(165deg, var(--dusk), var(--dusk-2)); color: var(--on-dusk); }
.install .overline { color: var(--rose); }
.install h2 { max-width: 15em; }
.install-text { max-width: 36em; margin: 16px 0 28px; color: var(--on-dusk-muted); font-size: 18px; }
.install .hero-note { max-width: 40em; }

.faq { max-width: 760px; }
details { border-bottom: 1px solid var(--line); }
summary { padding: 18px 0; font-size: 18px; font-weight: 700; cursor: pointer; }
details p { padding-bottom: 20px; color: var(--muted); }

footer { padding: 30px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
footer nav a { display: inline-flex; min-height: 44px; align-items: center; }
footer .wrap { align-items: center; }

/* Story teaser window. */
html:has(dialog[open]) { overflow: hidden; }
.teaser { width: min(580px, calc(100vw - 32px)); max-width: none; max-height: min(88vh, 760px); max-height: min(88dvh, 760px); padding: 0; border: 0; border-radius: 22px; overflow: hidden; background: var(--bg); color: var(--text); box-shadow: 0 24px 60px rgba(10,9,22,.45); }
.teaser[open] { display: flex; flex-direction: column; animation: teaser-in .22s ease-out; }
.teaser::backdrop { background: rgba(14,13,26,.72); animation: backdrop-in .22s ease-out; }
@keyframes teaser-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes backdrop-in { from { opacity: 0; } }
.teaser-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.teaser-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 28px 34px; }
.teaser-head { display: flex; align-items: center; gap: 18px; padding-right: 44px; }
.teaser-head img { flex: none; width: 92px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 6px 16px rgba(20,18,40,.28); }
.teaser .story-tags { margin: 0 0 8px; }
.teaser h2 { font-size: clamp(21px, 3.4vw, 27px); line-height: 1.18; }
.teaser-note { margin-top: 18px; padding: 11px 14px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1.45; }
.teaser-text { margin-top: 4px; }
.teaser-text p { margin-top: 16px; font-size: 17px; line-height: 1.65; }
/* The fade shows there's more to scroll, and leads the eye to the button. */
.teaser-end { position: relative; flex: none; padding: 14px 28px 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); text-align: center; }
.teaser-end::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 34px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.teaser-end p { margin-bottom: 10px; color: var(--muted); font-size: 15px; }
.teaser-end .button { width: 100%; justify-content: center; background: #c23b5e; color: #fff; }
.teaser-end a.button:hover { background: #a93050; }

/* Small laptops: smaller covers beside the text. */
@media (max-width: 1100px) {
  .fan { --cover: 172px; }
  .hero-grid { gap: 24px; }
  .shelf { gap: 32px 14px; }
}

/* Tablets: one column, three story cards per row. */
@media (max-width: 960px) {
  .shelf { grid-template-columns: repeat(3, 1fr); gap: 34px 22px; max-width: 720px; margin: 0 auto; }
  .story h3 { font-size: 17px; }
  .features { gap: 28px 30px; }
}
@media (max-width: 860px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 30px; padding-top: 16px; padding-bottom: 44px; }
  .fan { --cover: 190px; max-width: 480px; margin: 0 auto; }
  .about-grid { gap: 36px; }
  .collections { grid-template-columns: repeat(4, 1fr); }
  .collection { aspect-ratio: 3 / 4; }
  .features { grid-template-columns: 1fr 1fr; }
}

/* Phones. */
@media (max-width: 620px) {
  .wrap { --gutter: 18px; }
  .nav { padding-top: 12px; padding-bottom: 12px; }
  .brand { font-size: 21px; }
  .brand img { width: 36px; height: 36px; }
  .hero-text { margin: 16px 0 22px; }
  .button { width: 100%; justify-content: center; }
  .install-buttons { width: 100%; }
  .fan { --cover: 142px; }
  .facts ul { grid-template-columns: 1fr 1fr; gap: 18px 16px; padding: 22px 0; }
  .facts strong { font-size: 23px; }
  .facts span { font-size: 14px; line-height: 1.35; display: block; }
  .section-head { margin-bottom: 30px; }
  .section-head p:last-child { font-size: 17px; }
  .about-copy p:not(.overline) { font-size: 17px; }
  .collections { grid-template-columns: 1fr 1fr; gap: 12px; }
  .collection { aspect-ratio: 1; }
  .features { grid-template-columns: 1fr; gap: 22px; }
  summary { font-size: 17px; }

  /* The teaser rises from the bottom like a native sheet. */
  .teaser { width: 100%; max-height: 90vh; max-height: 90dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .teaser[open] { animation-name: sheet-in; animation-duration: .26s; }
  .teaser-scroll { padding: 22px 20px 32px; }
  .teaser-head { gap: 14px; }
  .teaser-head img { width: 76px; }
  .teaser-end { padding-left: 20px; padding-right: 20px; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }

@media (max-width: 480px) {
  .shelf { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .story h3 { font-size: 16px; }
}
@media (max-width: 360px) {
  .fan { --cover: 118px; }
  .button { gap: 8px; padding: 0 14px; font-size: 15.5px; }
  .teaser-head img { width: 62px; }
  .teaser-text p { font-size: 16px; }
}

/* Phones held sideways: little height, so use the width. */
@media (max-height: 500px) and (min-width: 560px) {
  .hero-grid { grid-template-columns: 1.25fr .75fr; gap: 20px; padding-top: 4px; padding-bottom: 30px; }
  h1 { font-size: 38px; }
  .hero-text { margin: 12px 0 16px; font-size: 16px; }
  .button { width: auto; }
  .fan { --cover: 104px; max-width: none; margin: 0; }

  .teaser { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); margin: auto; border-radius: 18px; }
  .teaser-scroll { padding: 14px 24px 26px; }
  .teaser-head { gap: 0; }
  .teaser-head img { display: none; }
  .teaser-note { margin-top: 10px; }
  .teaser-text p { margin-top: 10px; font-size: 16px; line-height: 1.5; }
  .teaser-end { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 24px; padding-bottom: max(8px, env(safe-area-inset-bottom)); text-align: left; }
  .teaser-end p { margin: 0; }
  .teaser-end .button { flex: none; width: auto; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .teaser[open], .teaser::backdrop { animation: none; }
  .story-open .paper { transition: none; }
}
