@font-face {
  font-family: 'Nunito';
  src: url('/fonts/nunito-extrabold.ttf') format('truetype');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --bg: #fffcf8;
  --surface: #ffffff;
  --text: #2a2740;
  --muted: #6b6880;
  --line: #ece7f3;
  --accent: #6e61d4;
  --peach: #f59a73;
  --sage: #55946a;
  --ink: #1e1b2e;
  --shadow: 0 24px 60px rgba(30, 27, 46, 0.12);
  /* Page tints the home page fades through while scrolling (site.js sets --tint). */
  --tint-cream: #fffcf8;
  --tint-sleep: #efecfd;
  --tint-names: #eef6f0;
  --tint-moments: #fff2ea;
  /* Each app's own colours. */
  --sleep-1: #e4e0fb;
  --sleep-2: #c9c3f7;
  --names-1: #eaf4ec;
  --names-2: #bfdcc7;
  --moments-1: #ffede3;
  --moments-2: #ffc9ae;
  --display: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1020;
    --surface: #181a2e;
    --text: #eceaf6;
    --muted: #a5a2bd;
    --line: #2a2c45;
    --accent: #a99ff0;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --tint-cream: #0f1020;
    --tint-sleep: #17163a;
    --tint-names: #10201a;
    --tint-moments: #23150f;
    --sleep-1: #232046;
    --sleep-2: #2e2a5c;
    --names-1: #13261c;
    --names-2: #1c3626;
    --moments-1: #2b1a12;
    --moments-2: #3a2216;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--tint, var(--bg));
  color: var(--text);
  font:
    17px/1.6 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  transition: background-color 0.8s ease;
  overflow-x: hidden;
}

h1,
h2,
h3,
summary,
.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  margin: 32px 0 12px;
}

h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  margin: 40px 0 10px;
}

h3 {
  font-size: 19px;
  margin: 24px 0 4px;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
}

/* --- Layout ------------------------------------------------------------------------------- */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Text pages (privacy, terms, 404) keep a narrow column. */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

main.landing {
  max-width: none;
  padding: 0;
}

.prose {
  max-width: 720px;
}

.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

section.band {
  padding: 96px 0;
}

.eyebrow {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.lead {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
  max-width: 620px;
}

.center .lead,
.lead.center {
  margin-left: auto;
  margin-right: auto;
}

.updated {
  color: var(--muted);
  font-size: 15px;
}

/* --- Header and footer --------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-header a.home {
  display: block;
  line-height: 0;
}

.site-header a.home img {
  width: auto;
  height: 44px;
}

.site-header nav {
  display: flex;
  gap: 4px;
}

.site-header nav a {
  font-family: var(--display);
  font-weight: 800;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  transition:
    background 0.2s,
    color 0.2s;
}

.site-header nav a::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--dot);
}

.site-header nav a:hover,
.site-header nav a[aria-current='page'] {
  color: var(--text);
  background: var(--surface);
}

.nav-sleep {
  --dot: #8f84e6;
}

.nav-names {
  --dot: #7bb58b;
}

.nav-moments {
  --dot: #f59a73;
}

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 24px;
}

.site-footer img {
  height: 40px;
  width: auto;
}

.site-footer .title {
  font-family: var(--display);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}

.site-footer a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 6px;
}

.site-footer a:hover {
  color: var(--text);
}

.site-footer .copy {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px 40px;
}

/* --- Home: hero ---------------------------------------------------------------------------- */

.hero-home {
  position: relative;
  padding: 56px 0 72px;
}

.hero-home .wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}

.blob.a {
  width: 420px;
  height: 420px;
  background: var(--sleep-2);
  top: -80px;
  right: 8%;
}

.blob.b {
  width: 340px;
  height: 340px;
  background: var(--names-2);
  bottom: -40px;
  right: 34%;
}

.blob.c {
  width: 300px;
  height: 300px;
  background: var(--moments-2);
  top: 30%;
  right: -60px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 15px;
  color: var(--muted);
  box-shadow: 0 6px 20px rgba(30, 27, 46, 0.06);
}

.pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7bb58b;
  box-shadow: 0 0 0 4px rgba(123, 181, 139, 0.25);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.button {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  padding: 12px 22px;
  border-radius: 999px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 35%, transparent);
}

.button:hover {
  transform: translateY(-2px);
}

.phones {
  position: relative;
  height: 520px;
}

.phones img {
  position: absolute;
  width: 46%;
  height: auto;
  border-radius: 28px;
  box-shadow: var(--shadow);
  translate: 0 var(--lift, 0px);
}

.phones img:nth-child(1) {
  left: 0;
  top: 70px;
  rotate: -8deg;
  animation: float 6s ease-in-out infinite;
}

.phones img:nth-child(2) {
  left: 27%;
  top: 0;
  z-index: 2;
  animation: float 6s ease-in-out -2s infinite;
}

.phones img:nth-child(3) {
  right: 0;
  top: 90px;
  rotate: 8deg;
  animation: float 6s ease-in-out -4s infinite;
}

@keyframes float {
  50% {
    transform: translateY(-14px);
  }
}

/* --- Promo video --------------------------------------------------------------------------- */

.promo {
  position: relative;
  max-width: 1040px;
  margin: 32px auto 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
  aspect-ratio: 16 / 9;
}

.promo video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sound {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: none;
  align-items: center;
  gap: 10px;
  font: 800 17px var(--display);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(30, 27, 46, 0.25);
  transition: transform 0.2s;
}

.sound:hover {
  transform: scale(1.05);
}

.promo.muted .sound,
.demo.muted .sound {
  display: inline-flex;
}

/* On a demo the button sits in the empty corner above the caption, clear of the phone. */
.demo .sound {
  left: 16px;
  top: 16px;
  translate: none;
  font-size: 15px;
  padding: 10px 18px;
}

/* --- Cards --------------------------------------------------------------------------------- */

.apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

a.app {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

a.app:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.app .art {
  display: grid;
  place-items: center;
  height: 180px;
  background: linear-gradient(160deg, var(--c1), var(--c2));
}

.app .art img {
  width: 110px;
  height: 110px;
  border-radius: 26px;
  box-shadow: 0 12px 30px rgba(30, 27, 46, 0.18);
  transition: transform 0.4s;
}

a.app:hover .art img {
  transform: scale(1.08) rotate(-4deg);
}

.app .body {
  padding: 20px 22px 24px;
}

.app h3 {
  margin: 0 0 4px;
  font-size: 21px;
}

.app p {
  margin: 0;
  color: var(--muted);
}

.app .more {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--display);
  font-weight: 800;
  color: var(--c3);
}

.sleep-colors {
  --c1: var(--sleep-1);
  --c2: var(--sleep-2);
  --c3: #6e61d4;
}

.names-colors {
  --c1: var(--names-1);
  --c2: var(--names-2);
  --c3: #55946a;
}

.moments-colors {
  --c1: var(--moments-1);
  --c2: var(--moments-2);
  --c3: #c8643a;
}

@media (prefers-color-scheme: dark) {
  .sleep-colors {
    --c3: #a99ff0;
  }

  .names-colors {
    --c3: #8fcb9f;
  }

  .moments-colors {
    --c3: #f5a37f;
  }
}

.more-apps {
  margin-top: 96px;
  padding-top: 64px;
  border-top: 1px solid var(--line);
}

.apps.two {
  grid-template-columns: repeat(2, 1fr);
}

/* --- Stages: cards that stack while scrolling ---------------------------------------------- */

.stages {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
}

.stages li {
  position: sticky;
  top: calc(96px + var(--i) * 18px);
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 24px;
  align-items: center;
  min-height: 300px;
  margin-bottom: 40px;
  padding: 36px 40px;
  border-radius: 28px;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: 0 -8px 40px rgba(30, 27, 46, 0.08);
  overflow: hidden;
}

.stages .step {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c3);
}

.stages h3 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 6px 0 8px;
}

.stages p {
  margin: 0;
  max-width: 460px;
}

.stages img {
  width: 100%;
  height: auto;
  border-radius: 22px;
  rotate: 4deg;
  box-shadow: 0 16px 40px rgba(30, 27, 46, 0.2);
}

/* --- Values -------------------------------------------------------------------------------- */

.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.values > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px 22px;
}

.values .icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 24px;
  background: var(--c1);
}

.values h3 {
  margin: 16px 0 6px;
}

.values p {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}

/* --- FAQ ----------------------------------------------------------------------------------- */

.faq {
  max-width: 760px;
  margin: 32px auto 0;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 4px 22px;
  margin-bottom: 12px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--accent);
  transition: rotate 0.25s;
}

.faq details[open] summary::after {
  rotate: 45deg;
}

.faq details p {
  color: var(--muted);
  margin: 0 0 16px;
}

/* --- Call to action ------------------------------------------------------------------------- */

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-radius: 32px;
  padding: 64px 24px;
  background: linear-gradient(135deg, var(--sleep-2), var(--names-2) 55%, var(--moments-2));
}

.cta h2 {
  margin-top: 0;
}

.cta .bee {
  width: 120px;
  height: auto;
  animation: buzz 3s ease-in-out infinite;
}

@keyframes buzz {
  25% {
    transform: translate(6px, -8px) rotate(4deg);
  }
  75% {
    transform: translate(-6px, -4px) rotate(-3deg);
  }
}

/* --- App pages ----------------------------------------------------------------------------- */

.app-hero {
  position: relative;
  padding: 64px 0 160px;
  background: linear-gradient(170deg, var(--c1), var(--c2));
  overflow: hidden;
}

.app-hero .wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-bee {
  position: absolute;
  right: 12%;
  top: 70px;
  width: 220px;
  height: auto;
  animation: buzz 3s ease-in-out infinite;
}

.app-hero .icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(30, 27, 46, 0.18);
}

.app-hero h1 {
  max-width: 760px;
}

.app-hero .lead {
  color: var(--text);
  opacity: 0.8;
}

.app-content > h2,
.app-content > p {
  max-width: 720px;
}

.demo {
  margin-top: -110px;
  position: relative;
  z-index: 2;
}

.demo video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items: center;
  margin: 96px 0;
}

.feature.flip {
  grid-template-columns: 1fr 380px;
}

.feature.flip img {
  order: 2;
}

.feature img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.feature h2 {
  margin-top: 0;
}

.features {
  padding-left: 20px;
}

.features li {
  margin-bottom: 10px;
}

.note {
  background: var(--surface);
  border-left: 4px solid var(--peach);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 24px 0;
}

/* --- Tables (privacy) ---------------------------------------------------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
}

/* --- Scroll animations (site.js adds .in when an element comes into view) ------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    translate: 0 40px;
    transition:
      opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
      translate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
      scale 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--d, 0ms);
  }

  .js [data-reveal='scale'] {
    translate: 0 30px;
    scale: 0.92;
  }

  .js [data-reveal='left'] {
    translate: -60px 0;
  }

  .js [data-reveal='right'] {
    translate: 60px 0;
  }

  .js [data-reveal].in {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .phones img,
  .hero-bee,
  .cta .bee {
    animation: none;
  }
}

/* --- Small screens ------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-home .wrap {
    grid-template-columns: 1fr;
  }

  .phones {
    height: 420px;
    max-width: 520px;
  }

  .apps,
  .values {
    grid-template-columns: 1fr 1fr;
  }

  .feature,
  .feature.flip {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 64px 0;
  }

  .feature.flip img {
    order: 0;
  }

  .feature img {
    max-width: 360px;
  }

  .stages li {
    grid-template-columns: 1fr;
  }

  .stages img {
    display: none;
  }
}

@media (max-width: 640px) {
  section.band {
    padding: 64px 0;
  }

  .apps,
  .apps.two,
  .values {
    grid-template-columns: 1fr;
  }

  .site-header nav a {
    padding: 6px 8px;
    font-size: 15px;
  }

  .site-header nav a::before {
    margin-right: 5px;
  }

  .site-header a.home img {
    height: 34px;
  }

  .phones {
    height: 340px;
  }

  .promo {
    aspect-ratio: 9 / 16;
    max-width: 420px;
  }

  .stages li {
    padding: 28px 24px;
    min-height: 240px;
  }

  .site-footer .wrap {
    grid-template-columns: 1fr;
  }

  .app-hero {
    padding-bottom: 120px;
  }

  .hero-bee {
    width: 110px;
    top: 24px;
    right: 16px;
  }

  .demo {
    margin-top: -80px;
  }

  .demo .sound {
    left: 10px;
    top: 10px;
    font-size: 13px;
    padding: 7px 12px;
  }
}
