/* Fall Asleep Fan · Nightstand brand (docs/design/DESIGN.md)
   Dark theme locked deliberately: a sleep product lives at night. */

@font-face {
  font-family: 'Outfit';
  src: url('assets/fonts/outfit-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('assets/fonts/outfit-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'JBMono';
  src: url('assets/fonts/jbmono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg0: #0B0F17;
  --bg1: #121826;
  --bg2: #1A2233;
  --ink: #E8ECF4;
  --muted: #8A94A8;
  --line: rgba(232, 236, 244, .08);
  --accent: #D9A05B;
  --accent-ink: #20180C;
  --sans: 'Outfit', system-ui, sans-serif;
  --mono: 'JBMono', ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg0);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.08; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.15rem; }

p { color: var(--muted); max-width: 46ch; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 2rem;
  height: 68px; padding: 0 clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--bg0) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.brand img { border-radius: 9px; }
.brand em { font-style: normal; color: var(--muted); font-weight: 400; }
.nav nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav nav a { color: var(--muted); font-size: .92rem; transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.nav-cta {
  padding: .55rem 1.1rem; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: .92rem;
  transition: transform .15s var(--ease);
}
.nav-cta:active { transform: translateY(1px); }
@media (max-width: 640px) { .nav nav { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
#night-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1160px; margin: 0 auto;
  padding: clamp(3rem, 7vh, 5.5rem) clamp(1rem, 4vw, 3rem) 4rem;
  display: grid; grid-template-columns: 1.15fr .85fr;
  align-items: center; gap: clamp(2rem, 5vw, 5rem);
  min-height: calc(100dvh - 68px);
}
.hero-copy p { margin: 1.2rem 0 2rem; font-size: 1.12rem; }
.badge-link img { height: 64px; width: auto; }
.badge-link {
  display: inline-block;
  transition: transform .2s var(--ease);
}
.badge-link:hover { transform: translateY(-2px); }
.badge-link:active { transform: translateY(0); }

/* ---------- phone frames ---------- */
.phone {
  width: min(340px, 78vw);
  margin: 0 auto;
  border-radius: 42px;
  padding: 10px;
  background: #05070C;
  border: 1px solid var(--line);
  box-shadow:
    0 40px 90px -30px rgba(3, 5, 9, .9),
    0 0 90px -30px rgba(217, 160, 91, .18);
}
.phone img { border-radius: 32px; }
.phone.small { width: min(300px, 74vw); }

/* ---------- split sections ---------- */
.split {
  max-width: 1160px; margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1rem, 4vw, 3rem);
  display: grid; grid-template-columns: .9fr 1.1fr;
  align-items: center; gap: clamp(2rem, 5vw, 5rem);
}
.split.flip { grid-template-columns: 1.1fr .9fr; }
.split-copy p { margin-top: 1rem; }
.mono-note {
  margin-top: 1.6rem;
  font-family: var(--mono); font-size: .85rem;
  color: var(--accent);
  letter-spacing: .04em;
}
.sound-chips {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-top: 1.6rem; max-width: 34rem;
}
.sound-chips li {
  padding: .45rem .9rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg2);
  font-family: var(--mono); font-size: .8rem;
  color: var(--ink);
}

/* ---------- bento ---------- */
.night {
  max-width: 1160px; margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1rem, 4vw, 3rem);
}
.night h2 { margin-bottom: 2.2rem; }
.bento {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  grid-template-rows: auto auto;
  gap: 14px;
}
.cell {
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--bg1);
  padding: 1.6rem;
}
.cell p { margin-top: .6rem; font-size: .95rem; max-width: none; }
.cell.accent {
  grid-row: span 2;
  background:
    radial-gradient(120% 90% at 15% 0%, rgba(217, 160, 91, .16), transparent 55%),
    var(--bg1);
  display: flex; flex-direction: column; justify-content: end;
}
.cell.accent h3 { font-size: 1.5rem; }
.cell.accent p { font-size: 1rem; }
.cell.shot {
  grid-column: 3; grid-row: span 2;
  padding: 0; overflow: hidden;
  background: #05070C;
}
.cell.shot img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 78%;
}

/* ---------- cta ---------- */
.cta {
  position: relative;
  text-align: center;
  padding: clamp(5rem, 14vh, 8rem) 1rem;
  background:
    radial-gradient(60% 55% at 50% 100%, rgba(217, 160, 91, .14), transparent 70%),
    var(--bg0);
  border-top: 1px solid var(--line);
}
.cta p { margin: .8rem auto 2rem; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 2.2rem clamp(1rem, 4vw, 3rem) 2.6rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2.4rem;
  background: var(--bg1);
}
.foot-brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.foot-brand img { border-radius: 7px; }
.foot nav { display: flex; gap: 1.6rem; }
.foot a { color: var(--muted); font-size: .9rem; transition: color .2s; }
.foot a:hover { color: var(--ink); }
.foot p { margin-left: auto; font-size: .82rem; color: var(--muted); }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }

/* ---------- privacy page ---------- */
.doc {
  max-width: 46rem; margin: 0 auto;
  padding: 3.5rem clamp(1rem, 4vw, 3rem) 5rem;
}
.doc h1 { font-size: 2rem; margin-bottom: .4rem; }
.doc h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
.doc p, .doc li { color: var(--muted); font-size: .97rem; }
.doc ul { padding-left: 1.2rem; margin-top: .5rem; }
.doc .updated { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.doc a { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; text-align: center; }
  .hero-copy p { margin-inline: auto; }
  .split, .split.flip { grid-template-columns: 1fr; }
  .split.flip .split-copy { order: 1; }
  .split.flip .phone { order: 2; }
  .sound-chips { justify-content: flex-start; }
  .bento { grid-template-columns: 1fr 1fr; }
  .cell.accent { grid-row: auto; grid-column: span 2; }
  .cell.shot { grid-column: span 2; grid-row: auto; max-height: 320px; }
  .foot p { margin-left: 0; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .cell.accent, .cell.shot { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
