@font-face {
  font-family: 'Fredoka';
  src: url('/fonts/fredoka-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

/* The app's palette (src/app/styles.css), so the site and the app look like one product. */
:root {
  color-scheme: light dark;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #1e2440;
  --muted: #5d6382;
  --line: #dde1ec;
  --night: #7468c9;
  --nap: #c27a10;
  --link: #5b4fb8;
  --primary: #2e3577;
  --on-primary: #f3e6b8;
  --accent: #7c5cff;
  --sky-night: #232a5c;
  --sky-night-deep: #12163a;
  --sky-night-ink: #f3e6b8;
  --sky-night-muted: #c9c6e8;
  --sky-dawn: #f6c9a8;
  --sky-day: #cfe3f2;
  --moonlight: #f6e7b0;
  --nap-soft: #fff1d6;
  --night-soft: #ebe8ff;
  --day-soft: #e3f0fa;
  --font-display: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --radius-panel: 28px;
  --radius-control: 14px;
  --shadow-soft: 0 1px 2px rgb(30 36 64 / 0.06), 0 12px 32px -12px rgb(30 36 64 / 0.18);
  --shadow-lift: 0 2px 4px rgb(30 36 64 / 0.08), 0 24px 48px -16px rgb(30 36 64 / 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12152b;
    --surface: #1b1f3b;
    --ink: #e9eaf4;
    --muted: #a2a6c4;
    --line: #2c3156;
    --link: #b9b0ff;
    --nap-soft: #3a2f1c;
    --night-soft: #2a2754;
    --day-soft: #1c2b44;
    --shadow-soft: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.5);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.3), 0 24px 48px -16px rgb(0 0 0 / 0.6);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font-body);
  overflow-x: hidden;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 550;
  line-height: 1.12;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.3rem, 7vw, 3.9rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.75rem, 4.4vw, 2.6rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

.wrap {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 40rem) {
  .wrap {
    padding: 0 24px;
  }
}

.narrow {
  max-width: 44rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 40px;
}

.section-head p {
  color: var(--muted);
  font-size: 1.1rem;
}

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

/* Header */

.site-header {
  position: relative;
  z-index: 2;
  padding: 18px 0;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.brand img {
  width: 36px;
  height: 36px;
  transition: transform 0.4s var(--ease-spring);
}

.brand:hover img {
  transform: rotate(-10deg) scale(1.08);
}

.site-nav {
  display: flex;
  gap: 20px;
  font-weight: 600;
}

.site-nav a {
  color: inherit;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.3s var(--ease-out);
  padding-bottom: 2px;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  background-size: 100% 2px;
}

.night .site-header {
  color: var(--sky-night-ink);
}

/* The night sky: a deep gradient, a moon, twinkling stars, and clouds where it meets the day below. */

.night {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90% 60% at 50% 115%, #4a4c9a 0%, transparent 60%),
    linear-gradient(180deg, var(--sky-night-deep) 0%, var(--sky-night) 70%, #3a3f86 100%);
  color: var(--sky-night-ink);
  isolation: isolate;
}

.stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.stars span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 1px rgb(255 255 255 / 0.7);
  animation: twinkle 3.2s ease-in-out infinite;
}

.stars span:nth-child(3n) {
  background: var(--moonlight);
  width: 4px;
  height: 4px;
}

.stars span:nth-child(1) { left: 6%; top: 14%; animation-delay: -0.2s; }
.stars span:nth-child(2) { left: 18%; top: 34%; animation-delay: -1.4s; }
.stars span:nth-child(3) { left: 27%; top: 8%; animation-delay: -2.1s; }
.stars span:nth-child(4) { left: 39%; top: 22%; animation-delay: -0.8s; }
.stars span:nth-child(5) { left: 48%; top: 6%; animation-delay: -2.6s; }
.stars span:nth-child(6) { left: 56%; top: 30%; animation-delay: -1.1s; }
.stars span:nth-child(7) { left: 66%; top: 12%; animation-delay: -0.4s; }
.stars span:nth-child(8) { left: 74%; top: 42%; animation-delay: -1.9s; }
.stars span:nth-child(9) { left: 92%; top: 26%; animation-delay: -2.9s; }
.stars span:nth-child(10) { left: 9%; top: 58%; animation-delay: -1.6s; }
.stars span:nth-child(11) { left: 33%; top: 66%; animation-delay: -0.6s; }
.stars span:nth-child(12) { left: 86%; top: 62%; animation-delay: -2.3s; }
.stars span:nth-child(13) { left: 52%; top: 52%; animation-delay: -3s; }
.stars span:nth-child(14) { left: 97%; top: 8%; animation-delay: -1.2s; }

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.shooting-star {
  position: absolute;
  top: 12%;
  left: 60%;
  width: 120px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgb(255 255 255 / 0.9), transparent);
  transform: rotate(-20deg);
  opacity: 0;
  animation: shoot 11s ease-in 4s infinite;
  z-index: -1;
}

@keyframes shoot {
  0% {
    opacity: 0;
    translate: 0 0;
  }
  2% {
    opacity: 1;
  }
  8% {
    opacity: 0;
    translate: -360px 130px;
  }
  100% {
    opacity: 0;
    translate: -360px 130px;
  }
}

.moon {
  position: absolute;
  top: 70px;
  right: max(16px, calc(50% - 33rem));
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8dc 0%, var(--moonlight) 55%, #e8d28a 100%);
  box-shadow:
    0 0 40px 10px rgb(246 231 176 / 0.25),
    0 0 120px 40px rgb(246 231 176 / 0.12);
  z-index: -1;
  animation: glow 6s ease-in-out infinite;
}

.moon::before,
.moon::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgb(214 190 120 / 0.45);
}

.moon::before {
  width: 14px;
  height: 14px;
  top: 20px;
  left: 38px;
}

.moon::after {
  width: 9px;
  height: 9px;
  top: 44px;
  left: 22px;
}

@keyframes glow {
  0%,
  100% {
    box-shadow:
      0 0 40px 10px rgb(246 231 176 / 0.25),
      0 0 120px 40px rgb(246 231 176 / 0.12);
  }
  50% {
    box-shadow:
      0 0 52px 14px rgb(246 231 176 / 0.32),
      0 0 140px 50px rgb(246 231 176 / 0.16);
  }
}

@media (max-width: 52rem) {
  .moon {
    width: 48px;
    height: 48px;
    top: 84px;
  }

  .moon::before {
    width: 10px;
    height: 10px;
    top: 12px;
    left: 26px;
  }

  .moon::after {
    width: 6px;
    height: 6px;
    top: 30px;
    left: 14px;
  }
}

/* Clouds where the night sky meets the page: two layered SVG shapes drifting slowly. */

.clouds {
  position: relative;
  height: 90px;
  margin-top: -1px;
}

.clouds svg {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 200%;
  height: 100%;
  fill: var(--bg);
}

.clouds .back {
  opacity: 0.5;
  animation: drift 60s linear infinite;
}

.clouds .front {
  animation: drift 90s linear infinite reverse;
}

@keyframes drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Hero */

.hero {
  padding: 24px 0 24px;
}

.hero .wrap {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 56rem) {
  .hero .wrap {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
  }
}

.hero .eyebrow {
  color: var(--moonlight);
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.14);
  padding: 6px 12px;
  border-radius: 999px;
}

.hero h1 {
  color: var(--sky-night-ink);
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #ffd9a0, #f6b8d8, #b9b0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  font-size: 1.2rem;
  color: var(--sky-night-muted);
  max-width: 34rem;
}

.waitlist {
  margin-top: 28px;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-panel);
  padding: 22px 22px 14px;
  max-width: 30rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.45);
}

.waitlist h2 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.waitlist p {
  color: var(--muted);
  font-size: 0.95rem;
}

.waitlist iframe {
  width: 100%;
  border: 0;
}

.fine {
  font-size: 0.85rem;
  color: var(--muted);
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--sky-night-muted);
  font-size: 0.92rem;
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust svg {
  width: 16px;
  height: 16px;
  color: var(--moonlight);
}

/* The phone: the app's Today screen at night, peeking, drawn with the app's own layout and its dark-mode night
   colours. */

.stage {
  position: relative;
  justify-self: center;
  width: min(100%, 320px);
}

.phone {
  position: relative;
  aspect-ratio: 9 / 18.5;
  border-radius: 46px;
  padding: 10px;
  background: linear-gradient(160deg, #3b3f6e, #15183a);
  box-shadow:
    inset 0 0 0 1.5px rgb(255 255 255 / 0.14),
    0 40px 80px -24px rgb(0 0 0 / 0.65),
    0 0 0 1px rgb(0 0 0 / 0.4);
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-1.2deg);
  }
  50% {
    transform: translateY(-12px) rotate(0.6deg);
  }
}

.screen {
  /* The app's night in dark mode, whatever the page's own theme: the phone always shows Mia asleep. The surface,
     ink, muted, line and night colours copy the app's dark palette in src/app/styles.css; keep them in step. */
  --app-sky: var(--sky-night);
  --app-sky-ink: var(--sky-night-ink);
  --app-surface: #1b1f3b;
  --app-ink: #e9eaf4;
  --app-muted: #a2a6c4;
  --app-line: #2c3156;
  --app-night: #8c82d9;
  position: relative;
  height: 100%;
  border-radius: 37px;
  overflow: hidden;
  background:
    radial-gradient(70% 40% at 85% 6%, rgb(124 108 220 / 0.35), transparent 70%),
    var(--app-sky);
  color: var(--app-sky-ink);
  padding: 44px 12px 0;
  font-size: 0.8rem;
  line-height: 1.4;
  text-align: center;
}

.screen::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  width: 84px;
  height: 22px;
  border-radius: 20px;
  background: #0b0d22;
  translate: -50% 0;
  z-index: 3;
}

.screen p {
  margin: 0;
}

.app-moon {
  position: absolute;
  top: 46px;
  right: 22px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: -6px 2px 0 0 var(--moonlight);
  transform: rotate(-20deg);
}

.app-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--moonlight);
  opacity: 0.7;
}

.app-star-1 {
  left: 14%;
  top: 12%;
}

.app-star-2 {
  left: 80%;
  top: 30%;
}

.app-star-3 {
  left: 20%;
  top: 22%;
}

.app-hero {
  position: relative;
  padding-top: 26px;
}

.app-lead {
  font-size: 0.92rem;
}

.app-hero img {
  width: 132px;
  margin: 6px auto 2px;
  animation: breathe 4s ease-in-out infinite;
  transform-origin: 50% 80%;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035, 0.975);
  }
}

.app-time {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 6px !important;
}

.app-detail {
  font-size: 0.72rem;
  opacity: 0.8;
  text-wrap: balance;
}

/* On the narrowest phones the screen is shorter too, so the sky's content shrinks to stay clear of the sheet. */
@media (max-width: 380px) {
  .app-hero {
    padding-top: 14px;
  }

  .app-hero img {
    width: 104px;
  }

  .app-time {
    font-size: 2.6rem;
  }
}

/* The sheet peeks up from behind the dock, with tonight's pebbles. */
.app-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 54px;
  padding: 6px 12px 82px;
  border-radius: 22px 22px 0 0;
  background: var(--app-surface);
  color: var(--app-ink);
  text-align: left;
}

.app-handle {
  display: block;
  width: 32px;
  height: 4px;
  margin: 0 auto 8px;
  border-radius: 2px;
  background: var(--app-line);
}

.app-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 4px 8px !important;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.app-sheet-head > span:last-child {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--app-muted);
}

.app-pebbles {
  display: flex;
  gap: 8px;
}

.app-pebble {
  display: flex;
  flex-direction: column;
  width: 92px;
  padding: 8px 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--app-night) 18%, var(--app-surface));
  font-variant-numeric: tabular-nums;
}

.app-pebble i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-bottom: 4px;
  border-radius: 7px;
  background: var(--app-night);
  color: #12152b;
}

.app-pebble svg {
  width: 13px;
  height: 13px;
}

.app-pebble b {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: 1.05rem;
}

.app-pebble small {
  color: var(--app-muted);
  font-size: 0.62rem;
}

.app-pebble-add {
  width: 48px;
  justify-content: center;
  align-items: center;
  background: none;
  border: 2px dashed var(--app-line);
  color: var(--app-night);
  font-size: 1.2rem;
}

.app-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 54px;
  padding: 10px 12px 12px;
}

.app-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 550;
  background: #3d5f80;
  color: #f2f6fb;
  box-shadow:
    0 4px 0 #263e56,
    0 10px 20px rgb(0 0 0 / 0.25);
}

.app-action svg {
  width: 20px;
  height: 20px;
}

.app-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 54px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--app-surface);
  border-top: 1px solid var(--app-line);
  padding-bottom: 6px;
}

.app-tabs span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--app-muted);
}

.app-tabs i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 22px;
  border-radius: 11px;
}

.app-tabs svg,
.app-tabs img {
  width: 16px;
  height: 16px;
}

.app-tabs .on {
  color: var(--app-night);
}

.app-tabs .on i {
  background: color-mix(in srgb, var(--app-night) 16%, transparent);
}

/* Just above the sheet, wherever its top lands. */
.toasts {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(100% + 10px);
  z-index: 2;
}

.toast {
  position: absolute;
  inset: auto 0 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--app-ink);
  color: var(--app-surface);
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 30px -8px rgb(0 0 0 / 0.5);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  animation: toast 10s var(--ease-out) infinite;
}

.toast:nth-child(2) {
  animation-delay: 5s;
}

@keyframes toast {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  5%,
  40% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  46%,
  100% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
}

.bubble {
  position: absolute;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: var(--shadow-lift);
  white-space: nowrap;
  animation: bob 6s ease-in-out infinite;
}

.bubble .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.bubble-nap {
  right: calc(100% - 20px);
  top: 46%;
}

.bubble-nap .dot {
  background: var(--nap);
}

.bubble-night {
  left: calc(100% - 64px);
  top: 67%;
  animation-delay: -3s;
}

.bubble-night .dot {
  background: var(--night);
}

@media (min-width: 64rem) {
  .bubble {
    display: inline-flex;
  }
}

@keyframes bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

/* Sections */

section {
  padding: 80px 0;
}

.steps {
  display: grid;
  gap: 20px;
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps li {
  position: relative;
  padding: 28px 24px 24px;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: #fff;
  background: linear-gradient(160deg, var(--accent), var(--primary));
}

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

.features {
  display: grid;
  gap: 20px;
}

@media (min-width: 44rem) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius-panel);
  padding: 26px;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

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

.icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  margin-bottom: 16px;
  transition: transform 0.4s var(--ease-spring);
}

.card:hover .icon {
  transform: rotate(-6deg) scale(1.08);
}

.icon svg {
  width: 26px;
  height: 26px;
}

.icon-night {
  background: var(--night-soft);
  color: var(--night);
}

.icon-nap {
  background: var(--nap-soft);
  color: var(--nap);
}

.icon-day {
  background: var(--day-soft);
  color: #2f6fa8;
}

@media (prefers-color-scheme: dark) {
  .icon-day {
    color: #8fc3ee;
  }

  .icon-nap {
    color: #f0b552;
  }

  .icon-night {
    color: #b9b0ff;
  }
}

/* Ages strip */

.ages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.ages li {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Nubbin's forms, joined by a path that fills in as they appear. */

.nubbin-section {
  background: linear-gradient(180deg, var(--bg) 0%, var(--night-soft) 50%, var(--bg) 100%);
}

.stages {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.stages::before {
  content: '';
  position: absolute;
  top: 38%;
  left: 16%;
  right: 16%;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--nap), var(--accent), #f6b8d8);
  opacity: 0.35;
  transform-origin: left;
  transform: scaleX(var(--path, 1));
  transition: transform 1.6s var(--ease-out) 0.2s;
}

.stages.is-hidden {
  --path: 0;
}

.stages li {
  position: relative;
}

.stages img {
  width: min(100%, 11rem);
  filter: drop-shadow(0 18px 18px rgb(30 36 64 / 0.18));
  transition: transform 0.4s var(--ease-spring);
}

.stages li:hover img {
  transform: translateY(-6px) rotate(-3deg);
}

.stages strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.stages span {
  color: var(--muted);
  font-size: 0.9rem;
}

.moods {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 3vw, 28px);
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.moods li {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.moods img {
  display: block;
  width: clamp(56px, 13vw, 96px);
  margin: 0 auto 4px;
  transition: transform 0.4s var(--ease-spring);
}

.moods li:hover img {
  transform: translateY(-8px) scale(1.06);
}

/* Privacy and calculator split sections */

.split {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 52rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.split > img {
  justify-self: center;
  width: min(70%, 18rem);
}

.checks {
  padding: 0;
  margin: 0 0 20px;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 10px;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--night-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%237468c9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E")
    center / 20px no-repeat;
}

.day-card {
  position: relative;
  overflow: hidden;
  border-radius: 36px;
  padding: 40px 28px;
  background:
    radial-gradient(60% 80% at 100% 0%, #ffdf6e 0%, #ffeba8 35%, transparent 70%),
    linear-gradient(180deg, #bcd8ef, var(--sky-day));
  color: #1e2440;
}

@media (min-width: 52rem) {
  .day-card {
    padding: 56px;
  }
}

.day-card p {
  color: #3d4466;
}

.day-card .split > img {
  width: min(60%, 16rem);
  animation: float 6s ease-in-out infinite;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 16px;
  padding: 14px 22px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 0 #1c2150;
  transition:
    transform 0.15s var(--ease-out),
    box-shadow 0.15s var(--ease-out);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1c2150;
}

.button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #1c2150;
}

.button svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease-out);
}

.button:hover svg {
  transform: translateX(3px);
}

.final {
  text-align: center;
  padding-bottom: 96px;
}

.final img {
  width: 140px;
  animation: float 5s ease-in-out infinite;
}

/* Page heads on the inner pages */

.page-head {
  padding: 24px 0 8px;
}

.page-head p {
  color: var(--muted);
  font-size: 1.1rem;
}

main.narrow h2 {
  margin-top: 2.75rem;
}

/* FAQ */

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--night-soft);
  color: var(--night);
  font-weight: 700;
  transition: transform 0.3s var(--ease-out);
}

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

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

.faq details[open] p {
  animation: reveal-down 0.35s var(--ease-out);
}

@keyframes reveal-down {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* Wake window tool */

.tool {
  background: var(--surface);
  border-radius: var(--radius-panel);
  padding: 24px;
  margin: 24px 0 48px;
  box-shadow: var(--shadow-soft);
}

.tool-fields {
  display: grid;
  gap: 16px;
}

@media (min-width: 36rem) {
  .tool-fields {
    grid-template-columns: 1fr 1fr;
  }
}

.tool label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.tool select,
.tool input {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  width: 100%;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.tool select:focus,
.tool input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(124 92 255 / 0.18);
}

.tool-summary {
  margin: 20px 0 8px;
  font-size: 1.05rem;
}

.schedule {
  list-style: none;
  margin: 0;
  padding: 0;
}

.schedule li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  margin-bottom: 6px;
  background: var(--bg);
  animation: reveal-down 0.4s var(--ease-out) backwards;
}

.schedule li:nth-child(2) {
  animation-delay: 0.06s;
}

.schedule li:nth-child(3) {
  animation-delay: 0.12s;
}

.schedule li:nth-child(4) {
  animation-delay: 0.18s;
}

.schedule li:nth-child(5) {
  animation-delay: 0.24s;
}

.schedule time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.schedule .nap {
  border-left: 5px solid var(--nap);
}

.schedule .bed {
  border-left: 5px solid var(--night);
}

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

table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0 24px;
}

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

th {
  font-weight: 600;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  color: inherit;
}

/* Scroll reveal: site.js adds .reveal to elements below the fold and .is-visible as they scroll in. Without
   JavaScript nothing is hidden. */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero-in {
  animation: hero-in 0.9s var(--ease-out) backwards;
}

.hero-in:nth-child(2) {
  animation-delay: 0.08s;
}

.hero-in:nth-child(3) {
  animation-delay: 0.16s;
}

.hero-in:nth-child(4) {
  animation-delay: 0.24s;
}

.hero-in:nth-child(5) {
  animation-delay: 0.32s;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.stage.hero-in {
  animation-delay: 0.25s;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .toast:first-child {
    opacity: 1;
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
