/* ============================================================
   Sleeppy marketing site — "Lullaby Dawn" design system
   Soft Sunrise: airy cream surfaces, muted dawn-indigo accents,
   warm peach/tan highlights, ultra-rounded squircle shapes,
   soft tinted shadows, gentle glassmorphism.
   ============================================================ */

:root {
  /* Surfaces (warm cream "Surface Mist") */
  --surface: #fff8f3;
  --surface-low: #fff1e3;
  --surface-container: #ffebd3;
  --surface-high: #f9e5cd;
  --surface-lowest: #ffffff;

  /* Text */
  --on-surface: #241a0b;          /* headings */
  --on-surface-variant: #5b5346;  /* body, warm muted */
  --on-surface-faint: #6f6557;    /* captions */

  /* Primary — muted dawn indigo / slate blue */
  --primary: #4d6076;
  --primary-strong: #3b4d62;
  --on-primary: #ffffff;
  --primary-container: #97abc4;
  --on-primary-container: #2c3f54;
  --primary-light: #b4c8e2;       /* inverse-primary */
  --primary-soft: #dde7f3;        /* tinted tile */

  /* Warmth — peach & tan from the mascot */
  --peach: #fdd9b9;
  --peach-soft: #ffe9d3;
  --tan: #c7a280;
  --tan-soft: #ecd9c2;
  --deep-earth: #2d2420;

  /* Lavender bridge to the app-icon background */
  --lavender-glow: rgba(150, 128, 232, 0.30);

  /* Lines & elevation */
  --card-border: rgba(116, 89, 64, 0.14);
  --hairline: rgba(116, 89, 64, 0.10);
  --shadow-1: 0 2px 8px rgba(139, 154, 176, 0.10);
  --shadow-2: 0 18px 40px -22px rgba(139, 154, 176, 0.50),
              0 4px 14px -8px rgba(139, 154, 176, 0.22);
  --shadow-cta: 0 14px 30px -14px rgba(61, 77, 98, 0.55);

  /* Shape */
  --radius-card: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 9999px;

  /* Rhythm */
  --content-max: 1080px;
  --gap: clamp(16px, 3vw, 24px);
  --pad-x: clamp(20px, 5vw, 48px);

  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  color-scheme: light;
}

/* ---- "Dim" mode (not pure dark) for nighttime check-ins ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #211c18;
    --surface-low: #272019;
    --surface-container: #2d2420;
    --surface-high: #342a23;
    --surface-lowest: #1b1713;

    --on-surface: #ffeedb;
    --on-surface-variant: #d6c9ba;
    --on-surface-faint: #a89a89;

    --primary: #b4c8e2;
    --primary-strong: #c8d8ee;
    --on-primary: #122436;
    --primary-container: #35485e;
    --on-primary-container: #d0e4ff;
    --primary-light: #97abc4;
    --primary-soft: rgba(180, 200, 226, 0.14);

    --peach: #5a422b;
    --peach-soft: rgba(253, 217, 185, 0.12);
    --tan: #c7a280;
    --tan-soft: rgba(199, 162, 128, 0.16);

    --lavender-glow: rgba(150, 128, 232, 0.26);

    --card-border: rgba(255, 255, 255, 0.10);
    --hairline: rgba(255, 255, 255, 0.08);
    --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.40);
    --shadow-2: 0 18px 44px -22px rgba(0, 0, 0, 0.70),
                0 4px 14px -8px rgba(0, 0, 0, 0.45);
    --shadow-cta: 0 14px 30px -16px rgba(0, 0, 0, 0.70);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  color: var(--on-surface-variant);
  background-color: var(--surface);
  /* Layered dawn: a faint lavender + peach + blue sunrise wash at the top */
  background-image:
    radial-gradient(64rem 40rem at 18% -8%, rgba(150, 128, 232, 0.14), transparent 60%),
    radial-gradient(60rem 40rem at 92% -4%, rgba(151, 171, 196, 0.20), transparent 58%),
    radial-gradient(70rem 50rem at 50% -16%, var(--surface-low), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

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

img { max-width: 100%; }

.shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

/* ============================================================
   Glass navigation
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--hairline);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--on-surface);
}

.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  filter: drop-shadow(0 6px 14px rgba(118, 93, 216, 0.28));
}

.brand__word {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  /* soft pillowy inner highlight + tinted lift (spec: inner glow on primary buttons) */
  box-shadow: var(--shadow-cta), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.nav-cta:hover { transform: translateY(-1px); }
.nav-cta:active { transform: translateY(0); }
.nav-cta:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  text-align: center;
  padding-top: clamp(44px, 8vh, 80px);
  padding-bottom: clamp(28px, 5vh, 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__visual {
  position: relative;
  width: clamp(118px, 22vw, 152px);
  aspect-ratio: 1 / 1;
  margin-bottom: clamp(24px, 4vw, 34px);
}
.hero__visual::before {
  content: "";
  position: absolute;
  inset: -26%;
  background: radial-gradient(closest-side, var(--lavender-glow), transparent 72%);
  filter: blur(6px);
  z-index: -1;
}
.hero__visual img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 22px 34px rgba(76, 60, 120, 0.30));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  background: var(--peach);
  border: 1px solid var(--card-border);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(33px, 6.2vw, 54px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--on-surface);
  margin: 0 auto 18px;
  max-width: 17ch;
  text-wrap: balance;
}

.lead {
  font-size: clamp(16px, 2.3vw, 19px);
  line-height: 1.56;
  color: var(--on-surface-variant);
  margin: 0 auto clamp(26px, 3.5vw, 34px);
  max-width: 42ch;
  text-wrap: pretty;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 14px;
  transition: transform 140ms ease;
}
.cta:active { transform: translateY(1px); }
.cta:focus-visible { outline: 3px solid var(--primary); outline-offset: 5px; }
.cta picture { display: inline-flex; }
.cta img {
  display: block;
  height: 52px;
  width: auto;
  /* official Apple badge ratio — pinned so the SVG can't stretch (Safari SVG-in-img) */
  aspect-ratio: 119.66407 / 40;
}

.trust-mark {
  font-size: 13.5px;
  color: var(--on-surface-faint);
  margin: 20px 0 0;
}

/* Feature chips */
.hero__chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: clamp(28px, 4vw, 40px) 0 0;
  max-width: 392px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  background: var(--peach-soft);
  border: 1px solid var(--card-border);
  color: var(--on-surface);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-1);
}
.chip svg { width: 16px; height: 16px; color: var(--primary); flex: none; }

/* ============================================================
   Section scaffolding
   ============================================================ */
section { padding-block: clamp(40px, 6.5vh, 68px); }
.why { padding-top: clamp(28px, 4.5vh, 52px); }

.section-head {
  text-align: center;
  max-width: 40ch;
  margin: 0 auto clamp(32px, 5vw, 48px);
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(25px, 3.8vw, 34px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  margin: 0 0 12px;
  text-wrap: balance;
}
.section-head p {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.55;
  color: var(--on-surface-variant);
  margin: 0;
}

/* Why cards */
.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--surface-lowest);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: clamp(24px, 3vw, 30px);
  box-shadow: var(--shadow-2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 50px -24px rgba(139, 154, 176, 0.58),
              0 6px 16px -8px rgba(139, 154, 176, 0.26);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  margin-bottom: 18px;
}
.card__icon svg { width: 27px; height: 27px; color: var(--primary); }
.card:nth-child(1) .card__icon { background: var(--primary-soft); }
.card:nth-child(2) .card__icon { background: var(--peach); }
.card:nth-child(3) .card__icon { background: var(--tan-soft); }

.card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--on-surface);
  margin: 0 0 9px;
}
.card p {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--on-surface-variant);
  margin: 0;
}

/* What's new panel */
.whats-new__panel {
  position: relative;
  background:
    linear-gradient(165deg, var(--surface-lowest), var(--surface-low));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: clamp(26px, 4vw, 44px);
  box-shadow: var(--shadow-2);
  max-width: 760px;
  margin: 0 auto;
}
.whats-new__tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
}
.whats-new__panel h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--on-surface);
  margin: 0 0 20px;
  text-wrap: balance;
}
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.feature-list li {
  position: relative;
  padding-left: 38px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--on-surface);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234d6076' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Trust note */
.trust__card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface-high);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: clamp(24px, 3.5vw, 34px);
  box-shadow: var(--shadow-1);
}
.trust__icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--surface-lowest);
  border: 1px solid var(--card-border);
}
.trust__icon svg { width: 24px; height: 24px; color: var(--primary); }
.trust__card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--on-surface);
  margin: 2px 0 8px;
}
.trust__card p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--on-surface-variant);
  margin: 0;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  text-align: center;
  padding-block: clamp(48px, 9vh, 84px) 56px;
  margin-top: clamp(20px, 4vh, 40px);
  border-top: 1px solid var(--hairline);
}
.cta--footer { margin-bottom: 30px; }
.cta--footer img { height: 48px; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}
.links a {
  color: var(--on-surface-variant);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  transition: color 120ms ease, background 120ms ease;
}
.links a:hover { color: var(--primary); background: var(--surface-low); }
.links a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.build {
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--on-surface-faint);
}

/* ============================================================
   Motion preferences
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
