/* Bebe Sleepy marketing site
   Apple-leaning aesthetic: solid black, generous whitespace, system font,
   subtle red glow on the hero. No third-party fonts, no icon libraries. */

:root {
  --bg: #000000;
  --bg-elev: #0d0d0f;
  --bg-card: #131316;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-secondary: #a1a1a6;
  --text-muted: #6e6e73;
  --accent: #ff3b30;
  --accent-soft: #ff6b5d;
  --accent-deep: #c2110a;
  --space: 24px;
  --radius: 22px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* TYPOGRAPHY ---------------------------------------------------------- */
h1 {
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 16px 0 24px;
}
h2 {
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
h3 {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}
p { margin: 0 0 18px; color: var(--text-secondary); }
.lead {
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 32px;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent-soft);
  font-weight: 600;
  margin: 0 0 24px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--accent-soft);
  font-weight: 600;
  margin: 0 0 14px;
}
.eyebrow.centered, .centered { text-align: center; }
.micro {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 14px;
}
.section-lead {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-secondary);
  max-width: 720px;
}
.centered.section-lead { margin-left: auto; margin-right: auto; }

/* TOPBAR -------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 14px 32px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.35);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px 6px auto auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: -2px 4px 0 0 rgba(0, 0, 0, 0.4);
}
.brand-word { font-size: 15px; font-weight: 600; }
.topnav {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 14px;
  color: var(--text-secondary);
}
.topnav a:hover { color: var(--text); }
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--text);
  color: #000;
  transition: transform 120ms ease, box-shadow 200ms ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,255,255,0.18); }
@media (max-width: 880px) {
  .topnav { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
}

/* HERO ---------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 96px 24px 64px;
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: -200px 0 auto 0;
  height: 600px;
  background:
    radial-gradient(ellipse 60% 60% at 50% 0%,
      rgba(255, 59, 48, 0.45) 0%,
      rgba(255, 59, 48, 0.15) 40%,
      rgba(0, 0, 0, 0) 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; }
.hero h1 { color: #fff; }
.cta-row {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 140ms ease, box-shadow 200ms ease, background 200ms ease, border-color 200ms ease;
}
.btn.primary {
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  color: #fff;
  box-shadow: 0 14px 32px rgba(255, 59, 48, 0.35);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 18px 40px rgba(255, 59, 48, 0.5); }
.btn.ghost { border-color: rgba(255,255,255,0.18); color: var(--text); }
.btn.ghost:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.32); }

/* HERO PHONE MOCK ---------------------------------------------------- */
.hero-mock {
  position: relative;
  z-index: 1;
  margin: 64px auto 0;
  max-width: 320px;
}
.phone {
  position: relative;
  border-radius: 44px;
  background: linear-gradient(180deg, #1a1a1d, #0a0a0c);
  padding: 14px;
  box-shadow:
    0 60px 120px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255,255,255,0.05);
}
.phone::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 44px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent 40%);
  pointer-events: none;
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  border-radius: 16px;
  background: #000;
  z-index: 2;
}
.phone-screen {
  border-radius: 32px;
  background: #000;
  padding: 56px 18px 26px;
  position: relative;
  min-height: 480px;
}
.screen-top {
  position: absolute;
  top: 18px;
  left: 22px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}
.screen-card {
  border-radius: 22px;
  padding: 28px 0 12px;
  display: flex;
  justify-content: center;
}
.ring {
  position: relative;
  width: 200px;
  height: 200px;
}
.ring-track,
.ring-fill {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}
.ring-track {
  border: 12px solid rgba(255,255,255,0.06);
}
.ring-fill {
  border: 12px solid transparent;
  background:
    conic-gradient(from 270deg,
      var(--accent-soft) 0%,
      var(--accent) 60%,
      transparent 92%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 78px, black 79px);
          mask: radial-gradient(circle, transparent 0 78px, black 79px);
  filter: drop-shadow(0 0 12px rgba(255,59,48,0.35));
}
.ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-hours { font-size: 56px; font-weight: 700; color: #fff; line-height: 1; }
.ring-unit { font-size: 14px; color: var(--text-secondary); margin-left: 4px; }
.ring-mins { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.screen-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 28px;
}
.screen-stats > div {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}
.screen-stats span { font-size: 11px; color: var(--text-secondary); display: block; }
.screen-stats strong { font-size: 16px; color: #fff; font-weight: 600; }

/* SECTIONS ------------------------------------------------------------ */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px 24px;
}
.section.narrow { max-width: 880px; text-align: center; }
.section.feature {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 64px;
}
.section.feature.reverse { direction: rtl; }
.section.feature.reverse > * { direction: ltr; }
@media (max-width: 880px) {
  .section.feature { grid-template-columns: 1fr; gap: 32px; }
}

.bullet-clean {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 14px;
}
.bullet-clean li {
  position: relative;
  padding-left: 28px;
  color: var(--text-secondary);
}
.bullet-clean li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 0 4px rgba(255,59,48,0.12);
}

/* FEATURE ART --------------------------------------------------------- */
.feature-art {
  position: relative;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 36px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.feature-art::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(ellipse at 30% 20%, var(--art-color, rgba(255,59,48,0.45)), transparent 60%);
  filter: blur(40px);
  z-index: 0;
}
.feature-art > * { position: relative; z-index: 1; }
.glow-coral { --art-color: rgba(255, 90, 95, 0.45); }
.glow-amber { --art-color: rgba(255, 170, 80, 0.40); }
.glow-pink  { --art-color: rgba(255, 110, 160, 0.45); }
.glow-violet { --art-color: rgba(170, 130, 255, 0.40); }

/* Album stack (Music section) */
.album-stack {
  position: relative;
  width: 220px;
  height: 240px;
}
.album {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 18px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.01em;
  box-shadow: 0 18px 36px rgba(0,0,0,0.5);
}
.album.a1 {
  left: 20px; top: 20px; transform: rotate(-8deg);
  background: linear-gradient(135deg, #ff6b6b, #c2110a);
}
.album.a2 {
  left: 60px; top: 30px; transform: rotate(2deg);
  background: linear-gradient(135deg, #ffae6c, #b35c0a);
}
.album.a3 {
  left: 40px; top: 70px; transform: rotate(8deg);
  background: linear-gradient(135deg, #f4d35e, #b07d10);
}

/* Tracking cardlet */
.cardlet {
  width: 280px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(14px);
}
.cardlet-row { display: flex; align-items: center; gap: 8px; }
.cardlet-title { font-weight: 600; color: #fff; font-size: 14px; }
.cardlet-time { margin-left: auto; font-size: 12px; color: var(--text-secondary); }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,59,48,0.18);
}
.dot.live { animation: pulse 1.6s infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255,59,48,0.18); }
  50%      { box-shadow: 0 0 0 9px rgba(255,59,48,0.05); }
}
.cardlet-big {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 14px 0 18px;
}
.cardlet-cta {
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  color: #fff;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  padding: 10px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(255,59,48,0.4);
}

/* Apple Health rainbow arcs */
.rainbow {
  position: relative;
  width: 240px;
  height: 240px;
}
.arc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 14px solid transparent;
  -webkit-mask: linear-gradient(180deg, transparent 0 35%, black 35% 100%);
          mask: linear-gradient(180deg, transparent 0 35%, black 35% 100%);
}
.arc.r1 { inset: 0;   border-color: #ff6b6b; }
.arc.r2 { inset: 22px; border-color: #ffae6c; }
.arc.r3 { inset: 44px; border-color: #f4d35e; }
.arc.r4 { inset: 66px; border-color: #ffafc7; }

/* Schedule card */
.schedule-card {
  width: 280px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.sched-row { display: flex; align-items: center; gap: 12px; }
.sched-icon {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  position: relative;
}
.sched-icon.moon::after,
.sched-icon.sun::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
}
.sched-icon.moon::after { background: radial-gradient(circle at 35% 35%, transparent 35%, var(--bg-card) 36% 60%, transparent 60%); }
.sched-icon.sun::after  { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.85) 30%, transparent 35%); }
.sched-divider { width: 1px; height: 36px; background: var(--line); }
.sched-label { font-size: 11px; color: var(--text-secondary); }
.sched-value { font-size: 22px; font-weight: 700; color: #fff; }

/* PRIVACY GRID -------------------------------------------------------- */
.privacy-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: left;
}
@media (max-width: 760px) {
  .privacy-grid { grid-template-columns: 1fr; }
}
.privacy-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.pkey {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-soft);
  margin-bottom: 10px;
}
.pval { font-size: 18px; line-height: 1.4; color: #fff; }

/* WAITLIST ------------------------------------------------------------ */
.waitlist { padding-top: 64px; }
.waitlist-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin: 24px auto 0;
}
.waitlist-form input[type="email"] {
  flex: 1;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.waitlist-form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,59,48,0.18);
}
.waitlist-form button { white-space: nowrap; }
@media (max-width: 540px) {
  .waitlist-form { flex-direction: column; }
}

/* FOOTER -------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 24px 40px;
  margin-top: 32px;
}
.footer-row {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.footer-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.footer-nav a:hover { color: #fff; }
.footer-fine {
  max-width: var(--max);
  margin: 32px auto 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* DOCUMENT PAGES (privacy / terms / support / 404) -------------------- */
.doc {
  max-width: 760px;
  margin: 0 auto;
  /* Vertical padding scales down on small screens; horizontal uses
     max() against the safe-area inset so the doc never touches a
     notched screen's edge. */
  padding:
    clamp(28px, 6vw, 64px)
    max(20px, env(safe-area-inset-right))
    clamp(48px, 10vw, 96px)
    max(20px, env(safe-area-inset-left));
  line-height: 1.65;
}
.doc h1 {
  /* Cap minimum at 28px so the H1 never crowds out the eyebrow on
     narrow phones; vw-tracked middle keeps it lively. */
  font-size: clamp(28px, 7vw, 56px);
  line-height: 1.15;
  margin: 12px 0 8px;
  letter-spacing: -0.01em;
}
.doc h2 {
  font-size: clamp(20px, 3.2vw, 28px);
  line-height: 1.25;
  margin: clamp(36px, 6vw, 56px) 0 12px;
  color: #fff;
}
.doc h3 {
  font-size: clamp(17px, 2.6vw, 22px);
  line-height: 1.3;
  margin: clamp(24px, 4vw, 36px) 0 10px;
  color: #fff;
}
.doc p {
  font-size: clamp(15px, 2.4vw, 17px);
  color: var(--text-secondary);
  /* Legal copy occasionally has long URLs / emails / company names.
     Allow them to break softly so they don't blow out the viewport. */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.doc ul, .doc ol {
  font-size: clamp(15px, 2.4vw, 17px);
  color: var(--text-secondary);
  padding-inline-start: 22px;
  margin: 0 0 18px;
}
.doc li { margin-bottom: 8px; }
.doc a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  /* Same long-URL guard as paragraphs. */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.doc a:hover { color: var(--text); }
.doc-meta {
  color: var(--text-muted);
  font-size: clamp(13px, 2vw, 14px);
  margin-bottom: clamp(20px, 4vw, 32px);
}
.doc .bullet-clean { margin-top: 12px; }
.doc-back {
  margin-top: clamp(40px, 8vw, 64px);
  font-size: 15px;
}

/* Tighter sticky topbar on phones so it doesn't eat 60+ pt of the
   already-short legal page above the fold. */
@media (max-width: 540px) {
  .topbar { padding: 10px 16px; gap: 12px; }
  .brand-word { font-size: 14px; }
  .nav-cta { padding: 7px 12px; font-size: 12px; }
}
.support-contact {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 4vw, 28px);
  margin: clamp(16px, 4vw, 24px) 0 clamp(32px, 6vw, 48px);
}
.support-contact .btn {
  margin-bottom: 8px;
  /* Ensure CTA buttons inside the contact card never overflow the
     card on narrow screens. */
  max-width: 100%;
}

.not-found {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 64px 24px;
  text-align: center;
}
.not-found-inner { position: relative; z-index: 1; max-width: 600px; }
.not-found h1 {
  font-size: clamp(40px, 6vw, 72px);
  margin-bottom: 18px;
}

/* REVEAL ON SCROLL ---------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
