/* Dawnlet marketing site — design tokens lifted 1:1 from the iOS app's
   ios/Dawnlet/DesignSystem/Palette.swift (same RGB floats, converted to hex),
   switched light/dark via prefers-color-scheme exactly like Palette's own
   Color(light:dark:) helper. */

/* Self-hosted variable fonts (each file covers its family's full weight
   range, so one @font-face with a weight range replaces per-weight files). */
@font-face {
  font-family: "Fredoka";
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/fredoka-variable.woff2") format("woff2-variations"), url("../fonts/fredoka-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Karla";
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/karla-variable.woff2") format("woff2-variations"), url("../fonts/karla-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Caveat";
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/caveat-variable.woff2") format("woff2-variations"), url("../fonts/caveat-variable.woff2") format("woff2");
}

:root {
  --color-background: #f7f5f1;
  --color-card: #fefdfb;
  --color-text: #3d3229;
  --color-text-muted: #8c8074;
  --color-line: #e8e3db;

  --color-peach: #d97b4f;
  --color-peach-bg: #f5dcc9;
  --color-sage: #5c8a6a;
  --color-sage-bg: #dceadd;
  --color-lavender: #8670a8;
  --color-lavender-bg: #e8e0f2;
  --color-sky: #4e86a0;
  --color-sky-bg: #dce9ee;

  --font-heading: "Fredoka", "SF Rounded", ui-rounded, system-ui, sans-serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-hand: "Caveat", cursive;

  --radius-card: 22px;
  --radius-pill: 999px;
  --shadow-card: 0 10px 30px -12px rgba(61, 50, 41, 0.18);
  --shadow-device: 0 30px 60px -20px rgba(61, 50, 41, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #1d1a18;
    --color-card: #2b2724;
    --color-text: #f2efea;
    --color-text-muted: #a79d92;
    --color-line: #453f3a;

    --color-peach: #e89c68;
    --color-peach-bg: #4c3425;
    --color-sage: #7fb38c;
    --color-sage-bg: #2f3e32;
    --color-lavender: #b09ccd;
    --color-lavender-bg: #373142;
    --color-sky: #7ab1c8;
    --color-sky-bg: #29383f;

    --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.45);
    --shadow-device: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0 0 0.4em;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--color-text);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* ---------- App background: the same scattered-blob treatment as
   AppBackground(tint:) in the iOS app - fixed behind all content, tint
   swapped per page via a modifier class. ---------- */

.app-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  color: var(--color-peach-bg);
}

.app-background.tint-sage { color: var(--color-sage-bg); }
.app-background.tint-lavender { color: var(--color-lavender-bg); }
.app-background.tint-sky { color: var(--color-sky-bg); }

.app-background .blob {
  position: absolute;
  fill: currentColor;
}

.app-background .blob-1 {
  width: min(320px, 36vw);
  aspect-ratio: 1;
  left: 88%;
  top: 2%;
  opacity: 0.55;
  transform: translate(-50%, -50%) rotate(0deg);
}
.app-background .blob-2 {
  width: min(180px, 20vw);
  aspect-ratio: 1;
  left: 3%;
  top: 26%;
  opacity: 0.4;
  transform: translate(-50%, -50%) rotate(35deg);
}
.app-background .blob-3 {
  width: min(140px, 15vw);
  aspect-ratio: 1;
  left: 92%;
  top: 55%;
  opacity: 0.35;
  transform: translate(-50%, -50%) rotate(-20deg);
}
.app-background .blob-4 {
  width: min(110px, 12vw);
  aspect-ratio: 1;
  left: 18%;
  top: 82%;
  opacity: 0.3;
  transform: translate(-50%, -50%) rotate(60deg);
}
.app-background .blob-5 {
  width: min(150px, 16vw);
  aspect-ratio: 1;
  left: 55%;
  top: 96%;
  opacity: 0.25;
  transform: translate(-50%, -50%) rotate(15deg);
}

/* ---------- Squiggle divider ---------- */

.squiggle {
  display: block;
  width: 64px;
  height: 10px;
  margin: 10px 0 18px;
}
.squiggle path {
  fill: none;
  stroke: var(--color-peach);
  stroke-width: 2.2;
  stroke-linecap: round;
}
.squiggle.center { margin-left: auto; margin-right: auto; }

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--color-background) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-line);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 19px;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--color-peach); }
.nav-cta {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--color-line);
  color: var(--color-text-muted) !important;
  font-size: 13px !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 24px;
  cursor: pointer;
}

/* ---------- Buttons / pills ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: default;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-coming-soon {
  background: var(--color-peach);
  color: #fff;
  box-shadow: 0 12px 24px -10px color-mix(in srgb, var(--color-peach) 70%, transparent);
}
.btn-coming-soon .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
  opacity: 0.85;
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-line);
  font-weight: 600;
}
.btn-secondary:hover { border-color: var(--color-peach); color: var(--color-peach); }

/* ---------- Trust badge row ---------- */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 30px;
  color: var(--color-text-muted);
  font-size: 13.5px;
  font-weight: 600;
}
.badge-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.badge-row span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-sage);
}

/* ---------- Device mockups (reusable iPhone / Apple Watch illustrations) ----------
   Markup is generated in assets/js/site.js from a `.device-mockup` placeholder div
   (data-kind="phone"|"watch", data-img, data-alt) - one definition shared by the
   hero and every feature-row instance. */

.device-mockup {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-copy { max-width: 560px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--radius-pill);
  background: var(--color-card);
  border: 1px solid var(--color-line);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 22px;
}
.hero-sun-badge {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-peach-bg);
  flex: none;
}
.hero-sun-badge .sun {
  position: absolute;
  left: 50%;
  top: 62%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: var(--color-peach);
  animation: badge-sun-rise 2.4s ease-in-out infinite alternate;
}
@keyframes badge-sun-rise {
  from { transform: translateY(3px); }
  to { transform: translateY(-3px); }
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin-bottom: 18px;
}
.hero-title .accent {
  font-family: var(--font-hand);
  color: var(--color-peach);
  font-weight: 500;
  display: block;
  font-size: 0.62em;
  line-height: 1;
  margin-bottom: 6px;
}

.hero-description {
  color: var(--color-text-muted);
  font-size: 18px;
  max-width: 480px;
  margin-bottom: 28px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.hero-device-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-device {
  width: min(300px, 78vw);
  transform: rotate(2deg);
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.35)) drop-shadow(0 26px 46px rgba(0, 0, 0, 0.4));
}
.hero-device-glow {
  position: absolute;
  inset: -10% -10% -10% -10%;
  background: radial-gradient(closest-side, var(--color-peach-bg), transparent 70%);
  opacity: 0.7;
  z-index: -1;
  filter: blur(4px);
}
.hero-float-card {
  position: absolute;
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow-card);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 9px;
}
.hero-float-card.streak {
  top: 8%;
  left: -6%;
  color: var(--color-peach);
}
.hero-float-card.streak::before { content: "\1F525"; font-size: 15px; }
.hero-float-card.mood {
  bottom: 12%;
  right: -8%;
  color: var(--color-lavender);
}
.hero-float-card.mood::before { content: "\1F642"; font-size: 15px; }

.hero-watch {
  position: absolute;
  width: min(190px, 46vw);
  left: -12%;
  bottom: 14%;
  transform: rotate(-6deg);
  z-index: 3;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3)) drop-shadow(0 22px 38px rgba(0, 0, 0, 0.45));
}

.spotlight-watch-wrap {
  display: flex;
  justify-content: center;
}
.spotlight-watch {
  width: min(168px, 44vw);
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3)) drop-shadow(0 18px 32px rgba(0, 0, 0, 0.3));
}

/* ---------- Section shell ---------- */

.section {
  padding: 96px 0;
}
.section.tight { padding: 60px 0; }
.section-header {
  text-align: center;
  margin: 0 auto 56px;
  max-width: 620px;
}
.section-header h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}
.section-header p {
  color: var(--color-text-muted);
  font-size: 16.5px;
}
.section-eyebrow {
  font-family: var(--font-hand);
  font-size: 23px;
  color: var(--color-peach);
  margin: 0 0 2px;
}

/* ---------- Feature spotlight (alternating rows) ---------- */

.spotlight-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  grid-template-areas: "device header" "device copy";
  gap: 4px 56px;
  align-items: center;
}
.spotlight-row + .spotlight-row {
  margin-top: 88px;
}
.spotlight-row.reverse {
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-areas: "header device" "copy device";
}

.spotlight-header { grid-area: header; align-self: end; }
.spotlight-copy { grid-area: copy; align-self: start; }

.spotlight-device-wrap {
  grid-area: device;
  position: relative;
  display: flex;
  justify-content: center;
}
.spotlight-device {
  width: min(240px, 60vw);
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.3)) drop-shadow(0 20px 34px rgba(0, 0, 0, 0.28));
}

.spotlight-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 18px;
}
.spotlight-icon svg {
  width: 24px;
  height: 24px;
}
.spotlight-icon.peach { background: var(--color-peach); }
.spotlight-icon.sage { background: var(--color-sage); }
.spotlight-icon.sky { background: var(--color-sky); }
.spotlight-icon.lavender { background: var(--color-lavender); }

.spotlight-header h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin-bottom: 10px;
}
.spotlight-copy p {
  color: var(--color-text-muted);
  font-size: 16.5px;
}
.spotlight-points {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.spotlight-points li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  color: var(--color-text);
}
.spotlight-points li::before {
  content: "\2713";
  color: var(--color-sage);
  font-weight: 700;
}

/* ---------- Plus comparison ---------- */

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 780px;
  margin: 0 auto;
}
.compare-card {
  border-radius: 26px;
  padding: 32px 28px;
  border: 1px solid var(--color-line);
  background: var(--color-card);
}
.compare-card.plus {
  background: var(--color-sky-bg);
  border-color: transparent;
  position: relative;
}
.compare-card.plus::after {
  content: "One-time purchase";
  position: absolute;
  top: -13px;
  right: 24px;
  background: var(--color-sky);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
.compare-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 4px;
}
.compare-card.plus .compare-title { color: var(--color-sky); }
.compare-price {
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.compare-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
}
.compare-list li::before {
  content: "\2713";
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-text-muted);
  color: var(--color-card);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.compare-card.plus .compare-list li::before { background: var(--color-sky); color: #fff; }
.compare-list li.muted { color: var(--color-text-muted); }
.compare-list li.muted::before { content: "\2013"; background: transparent; color: var(--color-text-muted); }

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

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: 18px;
  padding: 4px 22px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 700;
  font-size: 15.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--color-text-muted);
  font-weight: 400;
  flex: none;
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  color: var(--color-text-muted);
  font-size: 14.5px;
  padding-bottom: 18px;
  margin: 0;
}

/* ---------- Closing CTA ---------- */

.closing-cta {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.closing-cta h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.closing-cta p {
  color: var(--color-text-muted);
  font-size: 16.5px;
  margin-bottom: 28px;
}

/* ---------- Content pages (Privacy / Terms / Support) ---------- */

.page-header {
  padding: 56px 0 20px;
  text-align: center;
}
.page-header h1 {
  font-size: 34px;
}

.content-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 80px;
}
.content-card {
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.content-card h3 {
  font-size: 16px;
}
.content-card p:last-child { margin-bottom: 0; }
.eyebrow-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 10px 4px;
}
.placeholder-note {
  background: var(--color-sage-bg);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  color: var(--color-text);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-line);
  padding: 40px 0 48px;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 13.5px;
}
.footer-links a:hover { color: var(--color-peach); }
.footer-credit {
  color: var(--color-text-muted);
  font-size: 13px;
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: 100%; margin: 0 auto; }
  .hero-description { margin-left: auto; margin-right: auto; }
  .hero-cta-row { justify-content: center; }
  .hero-device-wrap { margin-top: 32px; }

  .spotlight-row,
  .spotlight-row.reverse {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "device" "copy";
    gap: 20px;
    text-align: center;
  }
  .spotlight-header,
  .spotlight-copy { align-self: auto; }
  .spotlight-icon { margin-left: auto; margin-right: auto; }
  .spotlight-points { align-items: center; }
  .spotlight-points li { text-align: left; }
  .spotlight-row + .spotlight-row { margin-top: 64px; }

  .compare-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-line);
  }
  .nav-cta { text-align: center; }
  .nav-toggle { display: block; }

  .section { padding: 64px 0; }
  .hero-float-card { display: none; }
}
