/* Nodding Off: the app's Eyelids look on the web, laid out like a streaming home page. Colors match src/ui/theme.ts. */
:root {
  --night: #0b0807;
  --text: #fbf4ee;
  --dim: rgba(251, 244, 238, 0.68);
  --over-field: rgba(255, 255, 255, 0.82);
  --line: rgba(255, 255, 255, 0.12);
  --ember: radial-gradient(75% 55% at 28% 26%, #f39a57 0%, transparent 72%), radial-gradient(80% 70% at 82% 78%, #a9342a 0%, transparent 70%), radial-gradient(60% 50% at 70% 20%, #e0703f 0%, transparent 70%), linear-gradient(#3a140d, #3a140d);
  --honey: radial-gradient(75% 60% at 30% 30%, #f6cd78 0%, transparent 72%), radial-gradient(80% 70% at 80% 80%, #b8692a 0%, transparent 70%), linear-gradient(#3b230d, #3b230d);
  --rose: radial-gradient(75% 60% at 30% 30%, #eb9a8f 0%, transparent 72%), radial-gradient(80% 70% at 80% 80%, #8c3249 0%, transparent 70%), linear-gradient(#2b1017, #2b1017);
  --clay: radial-gradient(75% 60% at 30% 30%, #d9a184 0%, transparent 72%), radial-gradient(80% 70% at 80% 80%, #6e3a2c 0%, transparent 70%), linear-gradient(#24130e, #24130e);
  --gallery: radial-gradient(75% 60% at 30% 30%, #6f9a7e 0%, transparent 72%), radial-gradient(80% 70% at 80% 80%, #1f4a3f 0%, transparent 70%), linear-gradient(#0f2520, #0f2520);
  --storm: radial-gradient(75% 60% at 30% 30%, #8fa9be 0%, transparent 72%), radial-gradient(80% 70% at 80% 80%, #3d5a78 0%, transparent 70%), linear-gradient(#16212b, #16212b);
  --gutter: clamp(16px, 5vw, 64px);
  --face: -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { background: var(--night); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { background: var(--night); color: var(--text); font: 400 1.0625rem/1.5 var(--face); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 9px; font-family: ui-rounded, var(--face); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; text-decoration: none; }
.brand svg { width: 30px; height: auto; }
.lid { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

/* A floating layer: content scrolls under it. */
.top { position: fixed; inset: 0 0 auto; z-index: 20; height: 56px; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: rgba(11, 8, 7, 0.62); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); }
.top nav { display: flex; gap: clamp(16px, 3vw, 32px); font-size: 0.9375rem; font-weight: 600; }
.top nav a { text-decoration: none; color: var(--over-field); }
.top nav a:hover { color: #fff; }
.top .soon { justify-self: end; font-size: 0.8125rem; color: var(--dim); }

/* The hero: one feature per slide. Scroll snapping keeps every swipe native and interruptible. */
.hero { position: relative; padding-top: 56px; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; min-height: min(calc(100svh - 120px), 820px); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--gutter) 76px; background: var(--field); isolation: isolate; }
.slide::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.72) 92%); }
.slide .phone { position: absolute; z-index: -2; top: 28px; left: 50%; width: min(62vw, 300px); translate: -50% 0; }
.slide h1, .slide h2 { font-size: clamp(2.5rem, 7.4vw, 5.25rem); line-height: 1; letter-spacing: -0.032em; font-weight: 700; max-width: 12ch; text-wrap: balance; }
.slide p { margin-top: 12px; font-size: clamp(1.0625rem, 1.8vw, 1.3125rem); line-height: 1.35; color: var(--over-field); max-width: 34ch; }
.slide .pill { margin-top: 20px; align-self: flex-start; }
.nod { width: 92px; height: auto; margin-bottom: 18px; overflow: visible; color: #fff; }
.nod g { transform-origin: 256px 40px; animation: nod 5.2s cubic-bezier(0.45, 0, 0.3, 1) 0.5s both; }
@keyframes nod {
  0% { transform: scaleY(-1); }
  34% { transform: scaleY(0.25); }
  50% { transform: scaleY(-0.45); }
  76% { transform: scaleY(0.5); }
  84% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}
.dots { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; justify-content: center; gap: 2px; }
.dots button { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.38); transition: background-color 200ms ease; }
.dots button[aria-current="true"]::before { background: #fff; }

.pill { display: inline-block; padding: 11px 22px; border-radius: 999px; background: #fff; color: #1a100b; font-weight: 600; font-size: 1rem; line-height: 1.25; text-decoration: none; transition: transform 100ms ease-out; }
.pill:active { transform: scale(0.97); }

.gallery { --field: var(--gallery); }
.honey { --field: var(--honey); }
.rose { --field: var(--rose); }
.clay { --field: var(--clay); }
.ember { --field: var(--ember); }
.storm { --field: var(--storm); }

/* The phone frame around a real screen of the app. */
.phone { aspect-ratio: 1206 / 2622; padding: 1.6%; border-radius: 15% / 7%; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 24px 60px rgba(0, 0, 0, 0.45); }
.phone img { width: 100%; height: 100%; border-radius: 13.5% / 6.2%; }

/* Shelves: side-scrolling rows of tiles. */
.shelf { padding: clamp(36px, 6vw, 56px) 0 0; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); }
.shelf h2 { font-size: 1.3125rem; line-height: 1.25; letter-spacing: -0.012em; font-weight: 700; }
.arrows { display: none; gap: 6px; }
.arrows button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: var(--text); font: inherit; cursor: pointer; display: grid; place-items: center; }
.arrows button:hover { background: rgba(255, 255, 255, 0.18); }
.arrows svg { width: 12px; height: 12px; }
.row { list-style: none; display: flex; gap: 14px; padding: 14px var(--gutter) 6px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: var(--gutter); scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row > li { flex: 0 0 auto; scroll-snap-align: start; }

.feature { width: min(78vw, 340px); }
.feature figure { position: relative; height: 216px; overflow: hidden; border-radius: 14px; background: var(--field); }
.feature .phone { position: absolute; left: 50%; top: 18px; width: 150px; translate: -50% 0; }
.feature .phone.low { top: auto; bottom: 18px; }
.feature h3 { margin-top: 11px; font-size: 1.0625rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.008em; }
.feature p { margin-top: 2px; font-size: 0.9375rem; line-height: 1.4; color: var(--dim); }

.cover { width: min(42vw, 196px); }
.cover img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.cover p { margin-top: 8px; font-size: 0.9375rem; line-height: 1.3; font-weight: 500; }

.faq { padding: clamp(48px, 8vw, 80px) var(--gutter) 24px; max-width: calc(760px + 2 * var(--gutter)); margin: 0 auto; }
.faq h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.1; letter-spacing: -0.024em; font-weight: 700; margin-bottom: 16px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { padding: 15px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; margin: 6px 4px 0 0; border-right: 2px solid var(--dim); border-bottom: 2px solid var(--dim); rotate: 45deg; transition: rotate 200ms ease; }
.faq details[open] summary::after { rotate: 225deg; margin-top: 10px; }
.faq details p { padding-bottom: 16px; color: var(--dim); max-width: 62ch; }

footer { padding: 24px var(--gutter) 104px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--dim); font-size: 0.875rem; }
footer nav { display: flex; gap: 20px; }

/* The offer stays in view, on the same material as the top bar. */
.offer { position: fixed; inset: auto 0 0; z-index: 20; padding: 11px var(--gutter) calc(11px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(40, 20, 12, 0.72); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); }
.offer strong { display: block; font-size: 1rem; line-height: 1.25; font-weight: 650; }
.offer div span { display: block; font-size: 0.8125rem; line-height: 1.3; color: var(--over-field); }
.offer .pill { flex: none; padding: 8px 16px; font-size: 0.875rem; }

/* Reading pages: privacy, terms and support. */
.bar { padding: 20px var(--gutter); }
.page { padding: clamp(24px, 6vw, 64px) var(--gutter) 72px; max-width: calc(68ch + 2 * var(--gutter)); }
.page h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; }
.page .meta { margin-top: 10px; color: var(--dim); }
.page h2 { margin-top: 36px; font-size: 1.3125rem; line-height: 1.25; letter-spacing: -0.012em; font-weight: 650; }
.page p, .page ul { margin-top: 10px; }
.page ul { padding-left: 1.2em; }
.page li + li { margin-top: 6px; }

.reading footer { padding-bottom: 40px; border-top: 1px solid var(--line); }

@media (min-width: 820px) {
  .slide { padding-bottom: 88px; }
  .slide::after { background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 58%); }
  .slide .phone { top: 44px; left: auto; right: max(var(--gutter), 11vw); width: min(25vw, 340px); translate: none; }
  .slide h1, .slide h2 { max-width: 11ch; }
  .arrows { display: flex; }
}
@media (max-width: 560px) {
  .top { grid-template-columns: 1fr auto; }
  .top nav { display: none; }
  .slide::after { background: linear-gradient(to bottom, rgba(11, 8, 7, 0) 30%, rgba(11, 8, 7, 0.92) 58%); }
  .slide .phone { width: 56vw; top: 20px; }
  .slide { min-height: calc(100svh - 120px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nod g { animation: none; }
  .pill, .faq summary::after, .dots button::before { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .top, .offer { -webkit-backdrop-filter: none; backdrop-filter: none; background: #1a100d; }
}
