/* Sleepytime website. Light and calm like the app: ivory, sage, ink, rounded type. */
:root {
  --bg: #faf6ed;          /* ivory */
  --card: #ffffff;
  --ink: #2e3a2f;
  --ink-soft: #6f7a6c;
  --ink-subtle: #a79c8d;
  --sage: #4c694f;
  --sage-dark: #3e5841;
  --sage-pale: #e1e9d9;
  --sage-mist: #b4c3b0;
  --sand-light: #eae2d6;
  --divider: #f0eadf;
  --oat-line: #d8cabb;
  --radius: 20px;
  --max: 1120px;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.sage { color: var(--sage); }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 6px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 246, 237, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sand-light);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .icon { width: 34px; height: 34px; border-radius: 9px; }
.brand .wordmark { height: 22px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px; border-radius: 999px;
  background: var(--sage); color: #faf6ed !important; font-weight: 700; font-size: 15px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--sage-dark); transform: translateY(-1px); }

/* App Store badge (Apple's badge proportions, black) */
.appstore {
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 22px 0 18px; border-radius: 13px;
  background: #000; color: #fff;
  transition: transform 0.15s ease;
}
.appstore:hover { transform: translateY(-2px); }
.appstore svg { width: 26px; height: 26px; fill: #fff; margin-top: -3px; }
.appstore span { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore small { font-size: 11px; font-weight: 500; letter-spacing: 0.01em; }
.appstore strong { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.appstore.soon { cursor: default; }
.appstore.soon:hover { transform: none; }

/* Hero */
.hero { padding: 72px 0 48px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.14em;
  color: var(--sage); text-transform: uppercase; margin-bottom: 18px;
}
h1 {
  font-size: clamp(44px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -0.035em;
  font-weight: 800; margin: 0 0 22px;
}
.lede { font-size: 19px; color: var(--ink-soft); max-width: 29em; margin: 0 0 32px; }
.hero-note { font-size: 14px; color: var(--ink-subtle); margin-top: 18px; }

/* Phones: the Today screen in front, two tilted behind it */
.stage { position: relative; display: flex; justify-content: center; }
.stage::before {
  content: ""; position: absolute; width: 560px; height: 560px; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(225, 233, 217, 0.95), rgba(225, 233, 217, 0.4) 45%, transparent 70%);
}
.phones { position: relative; width: 100%; max-width: 540px; height: 640px; }
.phone {
  --w: 290px;
  position: absolute; width: var(--w); aspect-ratio: 1179 / 2556;
  border: 3px solid transparent; padding: calc(var(--w) * 0.026); border-radius: calc(var(--w) * 0.175);
  background:
    linear-gradient(#111, #111) padding-box,
    linear-gradient(150deg, #c9ccd1 0%, #8b8f96 18%, #5d6067 48%, #8b8f96 80%, #c9ccd1 100%) border-box;
  box-shadow: 0 30px 70px rgba(46, 58, 47, 0.22);
}
.screen { width: 100%; height: 100%; border-radius: calc(var(--w) * 0.145); overflow: hidden; background: var(--bg); }
.screen img { width: 100%; height: 100%; object-fit: cover; }
.phone.main { left: 50%; top: 0; transform: translateX(-50%); z-index: 3; }
.phone.side { --w: 232px; top: 70px; z-index: 1; opacity: 0.9; }
.phone.left { left: 0; transform: rotate(-7deg); }
.phone.right { right: 0; transform: rotate(7deg); }

/* Sections */
section { padding: 96px 0; }
.rule { border-top: 1px solid var(--sand-light); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
h2 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 14px; }
.section-head p { color: var(--ink-soft); font-size: 18px; margin: 0; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { background: var(--card); border: 1px solid var(--sand-light); border-radius: var(--radius); padding: 28px; }
.step img { height: 64px; width: auto; margin-bottom: 18px; }
.step-num { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; color: var(--sage); }
.step h3 { font-size: 22px; letter-spacing: -0.02em; margin: 6px 0 8px; }
.step p { color: var(--ink-soft); margin: 0; font-size: 16px; }

/* Benefits */
.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.benefit-art { display: flex; justify-content: center; }
.benefit-art img { width: min(440px, 100%); }
.benefit-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 26px; }
.benefit-list li { display: grid; grid-template-columns: 28px 1fr; gap: 16px; }
.tick {
  width: 26px; height: 26px; border-radius: 50%; background: var(--sage);
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.tick svg { width: 14px; height: 14px; stroke: #faf6ed; stroke-width: 2.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.benefit-list strong { display: block; font-size: 20px; letter-spacing: -0.015em; }
.benefit-list span { color: var(--ink-soft); }

/* Sounds */
.sounds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sound img { width: 100%; aspect-ratio: 160 / 112; border-radius: 16px; }
.sound strong { display: block; font-size: 16px; margin-top: 10px; }
.sound span { display: block; font-size: 14px; color: var(--ink-soft); }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--sand-light); padding: 22px 0; }
.faq summary {
  cursor: pointer; list-style: none; font-size: 19px; font-weight: 700; letter-spacing: -0.01em;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--sage); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); margin: 12px 0 0; }
.faq a { color: var(--sage); font-weight: 700; }

/* Final call to action */
.cta { text-align: center; }
.cta .app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 20px; box-shadow: 0 12px 30px rgba(46, 58, 47, 0.16); }
.cta p { color: var(--ink-soft); font-size: 18px; margin: 0 0 30px; }

/* Footer */
footer { border-top: 1px solid var(--sand-light); padding: 48px 0 56px; color: var(--ink-soft); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px 32px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a:hover { color: var(--ink); }
.small-print { width: 100%; color: var(--ink-subtle); font-size: 13px; margin: 0; }

/* Legal, safety and support pages */
.page { padding: 64px 0 96px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(38px, 6vw, 56px); }
.page .updated { color: var(--ink-subtle); margin: -8px 0 36px; }
.page h2 { font-size: 23px; letter-spacing: -0.015em; margin: 44px 0 12px; }
.page h3 { font-size: 18px; margin: 26px 0 8px; }
.page p, .page li { color: #46523f; }
.page ul, .page ol { padding-left: 22px; }
.page li { margin: 6px 0; }
.page a { color: var(--sage); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.page strong { color: var(--ink); }
.page .table-wrap { overflow-x: auto; }
.page table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.page th, .page td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--sand-light); vertical-align: top; }
.page td { color: #46523f; }
.callout {
  background: var(--sage-pale); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0;
}
.callout p { margin: 0; color: var(--ink); }
.actions { display: grid; gap: 12px; margin: 32px 0 48px; }
.action {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--sand-light); font-weight: 700; font-size: 17px;
  color: var(--ink) !important; text-decoration: none !important;
}
.action:hover { border-color: var(--sage-mist); }
.action span { color: var(--sage); }

/* Safety page */
.safety-section { margin-top: 36px; }
.safety-head { display: flex; align-items: center; gap: 12px; }
.badge { width: 40px; height: 40px; border-radius: 50%; background: var(--sage-pale); display: flex; align-items: center; justify-content: center; flex: none; }
.badge svg { width: 20px; height: 20px; stroke: var(--sage); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.safety-head h2 { margin: 0; font-size: 21px; }
.bullets { list-style: none; margin: 14px 0 0; padding: 6px 18px; background: var(--card); border: 1px solid var(--sand-light); border-radius: var(--radius); }
.bullets li { position: relative; padding: 12px 0 12px 20px; margin: 0; border-top: 1px solid var(--divider); color: var(--ink); }
.bullets li:first-child { border-top: none; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 21px; width: 6px; height: 6px; border-radius: 50%; background: var(--sage-mist); }
.sources { font-size: 14px; color: var(--ink-soft); }

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero .wrap, .benefits { grid-template-columns: 1fr; text-align: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .steps { grid-template-columns: 1fr; }
  .benefit-list { text-align: left; max-width: 460px; margin: 24px auto 0; }
  .sounds { grid-template-columns: repeat(2, 1fr); }
  .nav-links a:not(.btn) { display: none; }
  .phones { height: 500px; max-width: 360px; }
  .phone.main { --w: 228px; }
  .phone.side { --w: 176px; top: 56px; }
  section { padding: 72px 0; }
}
@media (max-width: 420px) {
  .phones { height: 440px; max-width: 320px; }
  .phone.main { --w: 200px; }
  .phone.side { --w: 152px; }
}
