/* "Ocean Dawn": the My Mornings palette, from src/theme.ts in the app. */
:root {
  --bg: #E3F6F8;
  --sky-2: #D2EDF4;
  --dawn: #FFE4D6;
  --navy: #163447;
  --slate: #5B7A8C;
  --muted: rgba(91, 122, 140, 0.7);
  --line: rgba(22, 52, 71, 0.1);
  --coral: #FF6F4E;
  --coral-deep: #EE5068;
  --teal: #2FB3A3;
  --streak: #FF9600;
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #FFFFFF;
  --radius: 28px;
  --shadow: 0 18px 50px -24px rgba(22, 52, 71, 0.35);
  --font: 'Nunito', ui-rounded, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  color: var(--navy);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
h1, h2 { font-weight: 900; }
h3 { font-weight: 800; font-size: 1.2rem; }
p { margin: 0; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(227, 246, 248, 0.78);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.2rem; }
.brand img { border-radius: 10px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; color: var(--slate); }
.nav-links a:hover { color: var(--navy); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--coral); color: #fff; font-weight: 800;
  border-radius: 999px; padding: 14px 24px;
  box-shadow: 0 10px 24px -10px rgba(255, 111, 78, .8);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-small { padding: 10px 18px; font-size: .95rem; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--bg) 0%, var(--sky-2) 55%, var(--dawn) 100%);
  padding: 56px 0 90px;
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border-radius: 999px; padding: 6px 14px;
  color: var(--slate); font-size: .9rem;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); margin: 20px 0 22px; }
.hero h1 .nowrap { white-space: nowrap; }
.accent {
  background: linear-gradient(90deg, #FFA877, var(--coral) 55%, var(--coral-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.2rem; color: var(--slate); max-width: 34em; }
.cta-row { display: flex; align-items: center; gap: 22px; margin: 32px 0 28px; flex-wrap: wrap; }
.link-arrow { color: var(--coral); font-weight: 800; }
.link-arrow:hover { text-decoration: underline; }

.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--navy); color: #fff; border-radius: 16px;
  padding: 10px 22px 10px 16px; line-height: 1.05; font-weight: 800; font-size: 1.35rem;
  transition: transform .15s;
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge svg { width: 30px; height: 30px; }
.store-badge small { display: block; font-size: .7rem; font-weight: 700; opacity: .85; }
.store-badge-light { background: #fff; color: var(--navy); }
.store-badge-apk { background: var(--teal); color: #fff; }
.store-badge-soon { opacity: .6; cursor: default; font-size: 1rem; padding: 8px 16px 8px 12px; border-radius: 14px; }
.store-badge-soon svg { width: 22px; height: 22px; }
.store-badge-soon small { font-size: .62rem; }
.store-badge-soon:hover { transform: none; }
.store-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--slate); font-size: .95rem; }

.hero-visual { position: relative; display: flex; justify-content: center; min-height: 600px; }
.phone {
  position: relative;
  width: 300px; aspect-ratio: 1284 / 2778;
  border-radius: 48px; padding: 10px;
  background: #0f1d27;
  box-shadow: var(--shadow), 0 0 0 1.5px rgba(255,255,255,.35) inset;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 39px; }
.phone-hero { transform: rotate(4deg) translateX(40px); z-index: 1; }
.sun-stage { position: absolute; left: -90px; bottom: 60px; z-index: 2; text-align: center; }
.sun-caption {
  display: table; margin: -26px auto 0; font-size: .85rem; color: var(--slate); position: relative;
  background: rgba(255,255,255,.85); border-radius: 999px; padding: 4px 12px; transition: opacity .3s;
}

/* The Mood Sun: drawn by main.js, same geometry as src/components/Orb.tsx. */
.mood-sun {
  display: block; width: 230px; height: 230px; padding: 0; border: 0; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: breathe 5.2s ease-in-out infinite;
}
.mood-sun svg { width: 100%; height: 100%; overflow: visible; }
.mood-sun .body { transform-origin: 85px 85px; transform-box: view-box; }
.mood-sun.wobble .body { animation: jelly .9s cubic-bezier(.28,.84,.42,1); }
.mood-sun:focus-visible { outline: 3px solid var(--coral); outline-offset: 6px; border-radius: 50%; }
@keyframes breathe { 50% { transform: translateY(-6px) scale(1.03); } }
@keyframes jelly {
  0% { transform: scale(.94, .94); }
  25% { transform: scale(1.06, .94); }
  45% { transform: scale(.96, 1.05); }
  65% { transform: scale(1.03, .98); }
  85% { transform: scale(.99, 1.01); }
  100% { transform: scale(1, 1); }
}
.eye { transform-box: fill-box; transform-origin: center; animation: blink 4s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }

/* ---------- Strip ---------- */
.strip { background: var(--navy); color: #fff; padding: 34px 0; }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.strip strong { display: block; font-size: 2.4rem; font-weight: 900; color: #FFB08A; line-height: 1.1; }
.strip span { color: rgba(255,255,255,.75); font-size: .95rem; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-soft { background: linear-gradient(180deg, var(--bg), #F1FAFB); }
.section-warm { background: linear-gradient(180deg, #FFF5EE, var(--dawn)); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head p:last-child:not(.kicker) { color: var(--slate); font-size: 1.12rem; margin-top: 16px; }
.kicker { color: var(--coral); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin-bottom: 12px; }
.section h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }

/* Missions */
/* Flex, not grid, so a short last row sits centred. */
.missions { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; max-width: 900px; margin: 0 auto; }
.missions > .mission { flex: 0 1 calc((100% - 60px) / 4); }
.mission {
  background: var(--card-solid); border-radius: var(--radius); padding: 28px 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 14px;
  border-top: 6px solid var(--tint); text-align: center;
  transition: transform .2s;
}
.mission:hover { transform: translateY(-4px); }
.mission-emoji {
  width: 72px; height: 72px; border-radius: 22px; background: var(--tint);
  display: grid; place-items: center; font-size: 36px;
}
.mission h3 { color: var(--ink); font-size: 1.3rem; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.steps li { background: var(--card); border-radius: var(--radius); padding: 32px 28px; }
.step-num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--coral); color: #fff; font-weight: 900; font-size: 1.2rem; margin-bottom: 18px;
}
.steps p { color: var(--slate); margin-top: 10px; }

/* Split sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-reverse .split-copy { order: 2; }
.split-copy p:not(.kicker) { color: var(--slate); font-size: 1.12rem; margin-top: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip {
  font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer;
  border: 2px solid transparent; border-radius: 999px; padding: 9px 16px;
  background: var(--tint); color: var(--ink); transition: border-color .15s, transform .15s;
}
.chip:hover { transform: translateY(-1px); }
.chip.active { border-color: var(--ink); }

.speak-card {
  background: linear-gradient(180deg, #D4F1F6, #C0E5F1 55%, #FFD0BB);
  border-radius: 36px; padding: 56px 36px; text-align: center; box-shadow: var(--shadow);
}
.speak-label { color: var(--slate); }
.speak-phrase { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 900; margin: 14px 0 30px; min-height: 2.4em; display: grid; place-items: center; transition: opacity .25s; }
.speak-bars { display: flex; gap: 10px; justify-content: center; }
.speak-bars span { width: 64px; height: 10px; border-radius: 99px; background: rgba(255,255,255,.6); overflow: hidden; position: relative; }
.speak-bars span::after { content: ''; position: absolute; inset: 0; background: var(--teal); transform: scaleX(0); transform-origin: left; }
.speak-card.run .speak-bars span:nth-child(1)::after { animation: fill 5.4s infinite; }
.speak-card.run .speak-bars span:nth-child(2)::after { animation: fill2 5.4s infinite; }
.speak-card.run .speak-bars span:nth-child(3)::after { animation: fill3 5.4s infinite; }
@keyframes fill { 0% { transform: scaleX(0); } 15%, 92% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes fill2 { 0%, 30% { transform: scaleX(0); } 45%, 92% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes fill3 { 0%, 60% { transform: scaleX(0); } 75%, 92% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
.speak-hint { color: var(--slate); margin-top: 22px; font-size: .95rem; }

.faiths { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.faiths li {
  background: rgba(255,255,255,.8); border-radius: 20px; padding: 16px 22px;
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline; flex-wrap: wrap;
}
.faiths strong { font-weight: 900; }
.faiths span { color: #9A6A00; font-size: .95rem; }

/* Streaks */
.streak-demo {
  display: flex; align-items: center; justify-content: center; gap: 36px; flex-wrap: wrap;
  background: var(--card); border-radius: var(--radius); padding: 28px; max-width: 820px; margin: 0 auto 36px;
}
.flame-chip { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 999px; padding: 10px 22px; box-shadow: var(--shadow); }
.flame { font-size: 1.8rem; display: inline-block; animation: flicker 1.6s ease-in-out infinite; transform-origin: bottom; }
@keyframes flicker { 50% { transform: scale(1.08, .94) rotate(-2deg); } }
.flame-chip strong { color: var(--streak); font-size: 2rem; font-weight: 900; }
.flame-chip span:last-child { color: var(--slate); }
.week { display: flex; gap: 10px; }
.day {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.7);
  display: grid; place-items: center; position: relative; color: #fff; font-weight: 900;
}
.day.done { background: var(--coral); }
.day.today { box-shadow: 0 0 0 4px rgba(255,111,78,.25); }
.day small { position: absolute; top: 54px; color: var(--slate); font-size: .8rem; }

.medals { list-style: none; padding: 20px 0 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
.medals li {
  background: #fff; border-radius: 22px; padding: 22px 10px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 8px 26px -18px rgba(22,52,71,.4);
}
.medal { font-size: 2rem; width: 58px; height: 58px; border-radius: 50%; background: #FFF1C7; display: grid; place-items: center; margin-bottom: 4px; }
.medals strong { font-weight: 900; font-size: .95rem; line-height: 1.2; }
.medals small { color: var(--slate); }
.medals .legend { background: linear-gradient(180deg, #FFF5D6, #FFE4D6); }

/* Mood Sun phases */
.phases { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.phases figure { margin: 0; text-align: center; }
.phases figcaption { color: var(--slate); font-size: .9rem; margin-top: -6px; }
.mini-sun { cursor: pointer; }
.mini-sun svg { width: 100%; height: auto; overflow: visible; }
.mini-sun .body { transform-origin: 85px 85px; transform-box: view-box; }
.mini-sun.wobble .body { animation: jelly .9s cubic-bezier(.28,.84,.42,1); }

/* Trust */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trust > div { background: var(--card-solid); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow); }
.trust span { font-size: 2rem; }
.trust h3 { margin: 14px 0 8px; }
.trust p { color: var(--slate); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: 22px; padding: 0 24px; box-shadow: 0 8px 26px -20px rgba(22,52,71,.4); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 32px 22px 0; font-weight: 800; font-size: 1.08rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; background: #FFE3DB; color: var(--coral);
  display: grid; place-items: center; font-weight: 900; transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--slate); padding: 0 0 22px; }
.faq details a { color: var(--coral); text-decoration: underline; }

/* Download */
.download {
  background: linear-gradient(135deg, #FFA877 0%, var(--coral) 50%, var(--coral-deep) 100%);
  color: #fff; padding: 110px 0; text-align: center; position: relative; overflow: hidden;
}
.download::before {
  content: ''; position: absolute; width: 700px; height: 700px; left: 50%; top: 50%; transform: translate(-50%, -30%);
  background: radial-gradient(circle, rgba(255,255,255,.28), rgba(255,255,255,0) 65%);
}
.download-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.download-logo { border-radius: 22px; box-shadow: 0 16px 40px -16px rgba(120, 30, 20, .6); margin-bottom: 8px; }
.download h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.download p { font-size: 1.2rem; opacity: .92; margin-bottom: 14px; }

/* Footer */
.footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 34px 0; font-size: .95rem; }
.footer-inner { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer .brand { color: #fff; font-size: 1.05rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-left: auto; }
.footer nav a:hover { color: #fff; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Legal pages ---------- */
.legal { padding: 64px 0 100px; background: linear-gradient(180deg, var(--bg), #F1FAFB 40%); }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 8px; }
.legal .updated { color: var(--slate); margin-bottom: 36px; }
.legal h2 { font-size: 1.4rem; margin: 36px 0 10px; }
.legal p, .legal li { color: #2F4B5C; font-weight: 600; margin-bottom: 12px; }
.legal a { color: var(--coral); text-decoration: underline; }
.legal ul { padding-left: 1.25rem; margin: 0 0 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .missions > .mission { flex-basis: calc((100% - 40px) / 3); }
  .medals { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-inner .btn { margin-left: auto; }
  .hero { padding-top: 36px; }
  .hero-inner, .split { grid-template-columns: 1fr; gap: 48px; }
  .split-reverse .split-copy { order: 0; }
  .hero-copy { text-align: center; }
  .lead { margin-inline: auto; }
  .cta-row, .hero-points { justify-content: center; }
  .hero-visual { min-height: 0; }
  .phone { width: 250px; }
  .phone-hero { transform: rotate(3deg) translateX(34px); }
  .sun-stage { left: calc(50% - 200px); bottom: 0; }
  .mood-sun { width: 170px; height: 170px; }
  .steps, .trust { grid-template-columns: 1fr; }
  .strip-inner { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .section { padding: 80px 0; }
  .split-copy { text-align: center; }
  .chips { justify-content: center; }
}
@media (max-width: 560px) {
  .missions > .mission { flex-basis: calc((100% - 20px) / 2); }
  .medals { grid-template-columns: repeat(2, 1fr); }
  .medals .legend { grid-column: span 2; }
  .phases { grid-template-columns: repeat(3, 1fr); row-gap: 16px; }
  .week { gap: 6px; }
  .day { width: 38px; height: 38px; }
  .sun-stage { left: calc(50% - 175px); }
  .mood-sun { width: 140px; height: 140px; }
  .phone { width: 220px; }
  .footer nav { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
