/* Mindful Haven website — shared styles. Palette mirrors the app (src/ui/theme.ts, PALETTES.night) and the logo's moon gold. */
:root {
  --bg: #11151c;
  --bg-deep: #0b0e14;
  --scene: #303b47;
  --surface: rgba(48, 59, 71, 0.42);
  --surface-strong: #252c35;
  --ink: #eef0ff;
  --ink-soft: rgba(238, 240, 255, 0.68);
  --hairline: rgba(238, 240, 255, 0.1);
  --glow: #cfe3ff;
  --gold: #e9bd6a;
  --gold-deep: #c99a45;
  --gold-soft: rgba(233, 189, 106, 0.14);
  --clock: #ff4a4a;
  --sea: #47a7a1;
  --dusk: #94a1d9;
  --ember: #d17c6d;
  --meadow: #71b293;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --max: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
a:hover { color: var(--ink); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h1, h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); }
h3 { font-size: 1.12rem; font-weight: 600; }
p { margin: 0 0 1em; }
.lower { text-transform: lowercase; }

.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 10; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(17, 21, 28, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 1.18rem; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--ink); }
@media (max-width: 720px) { .nav-links .hide-sm { display: none; } .nav-links { gap: 14px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 1rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: #1a1406; box-shadow: 0 12px 30px -12px rgba(233, 189, 106, 0.6); }
.btn-primary:hover { color: #1a1406; background: #f3cd85; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--hairline); }
.btn-ghost:hover { background: rgba(48, 59, 71, 0.7); }
.badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-weight: 600; font-size: 0.85rem; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 80px 0 64px; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 78% 30%, rgba(207, 227, 255, 0.12), transparent 70%),
    radial-gradient(40% 40% at 15% 10%, rgba(233, 189, 106, 0.08), transparent 70%),
    linear-gradient(180deg, var(--bg-deep), var(--bg));
}
.stars { position: absolute; inset: 0; z-index: -1; opacity: 0.55; background-image:
  radial-gradient(1px 1px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 32% 8%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 52% 30%, #fff, transparent), radial-gradient(1px 1px at 68% 12%, #fff, transparent),
  radial-gradient(1px 1px at 88% 40%, #fff, transparent), radial-gradient(1.5px 1.5px at 6% 60%, #fff, transparent),
  radial-gradient(1px 1px at 44% 70%, #fff, transparent), radial-gradient(1px 1px at 94% 78%, #fff, transparent); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 36ch; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.hero small { color: var(--ink-soft); }
.hero-visual { position: relative; justify-self: center; width: min(440px, 100%); }
.hero-visual .cover { border-radius: 28px; box-shadow: var(--shadow); border: 1px solid var(--hairline); }
.hero-visual .float-mascot { position: absolute; width: 120px; left: -36px; bottom: -28px; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.6)); }
.now-playing {
  position: absolute; right: -14px; top: 22px; padding: 10px 14px; border-radius: 16px;
  background: rgba(17, 21, 28, 0.82); border: 1px solid var(--hairline); backdrop-filter: blur(10px);
  font-size: 0.82rem; line-height: 1.35; box-shadow: var(--shadow);
}
.now-playing b { display: block; font-weight: 600; }
.now-playing span { color: var(--ink-soft); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero .cta { justify-content: center; }
  .hero-visual .float-mascot { left: -8px; width: 92px; }
  .now-playing { right: 8px; }
}

/* ---------- sections ---------- */
section { padding: 80px 0; }
.alt { background: var(--bg-deep); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 44px; }
.section-head p { color: var(--ink-soft); font-size: 1.06rem; }
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 28px; }

/* the 03:25 story */
.night { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.night .clock { border-radius: 20px; border: 1px solid var(--hairline); box-shadow: var(--shadow); }
.night blockquote { margin: 0 0 18px; font-family: 'Fraunces', Georgia, serif; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.3; }
.night p { color: var(--ink-soft); }
.problems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.problem { text-align: center; padding: 22px 16px; }
.problem img { height: 120px; width: auto; margin: 0 auto 10px; object-fit: contain; }
.problem h3 { margin-bottom: 4px; text-transform: lowercase; }
.problem p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 860px) { .night { grid-template-columns: 1fr; } .problems { grid-template-columns: repeat(2, 1fr); } }

/* phases */
.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: phase; }
.phase { position: relative; padding-top: 44px; }
.phase::before {
  counter-increment: phase; content: counter(phase);
  position: absolute; top: -20px; left: 28px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); color: #1a1406; font-weight: 700;
}
.phase p { color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) { .phases { grid-template-columns: 1fr; gap: 40px; } }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature img { width: 64px; height: 64px; margin-bottom: 14px; padding: 6px; border-radius: 50%; background: radial-gradient(circle, rgba(207, 227, 255, 0.22), rgba(207, 227, 255, 0.04) 70%); }
.feature p { color: var(--ink-soft); margin: 0; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* stories */
.stories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.story { margin: 0; border-radius: 20px; overflow: hidden; background: var(--surface-strong); border: 1px solid var(--hairline); }
.story img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.story figcaption { padding: 14px 16px 16px; font-weight: 600; line-height: 1.3; }
.story figcaption span { display: block; font-weight: 400; color: var(--ink-soft); font-size: 0.86rem; margin-top: 4px; }
@media (max-width: 960px) { .stories { grid-template-columns: repeat(2, 1fr); } }

/* sounds */
.sounds { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.sound { text-align: center; font-size: 0.82rem; color: var(--ink-soft); }
.sound img { width: 64px; height: 64px; margin: 0 auto 8px; padding: 10px; border-radius: 50%; background: radial-gradient(circle, rgba(71, 167, 161, 0.35), rgba(71, 167, 161, 0.05) 70%); }
.sound:nth-child(3n+2) img { background: radial-gradient(circle, rgba(148, 161, 217, 0.38), rgba(148, 161, 217, 0.05) 70%); }
.sound:nth-child(3n) img { background: radial-gradient(circle, rgba(209, 124, 109, 0.35), rgba(209, 124, 109, 0.05) 70%); }
@media (max-width: 860px) { .sounds { grid-template-columns: repeat(4, 1fr); } }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.pill { padding: 8px 16px; border-radius: 999px; font-weight: 500; font-size: 0.92rem; background: var(--surface); border: 1px solid var(--hairline); }
.pill b { color: var(--gold); font-weight: 700; }

/* privacy promise */
.promise { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; }
.promise ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.promise li { display: flex; gap: 12px; align-items: flex-start; }
.promise li::before { content: '✓'; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; margin-top: 1px; }
.promise img { width: min(280px, 60vw); margin: 0 auto; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.6)); }
@media (max-width: 760px) { .promise { grid-template-columns: 1fr; } }

/* final CTA */
.final { text-align: center; }
.final .card { padding: 56px 24px; background: radial-gradient(70% 90% at 50% 0%, rgba(233, 189, 106, 0.14), transparent 70%), var(--surface); }
.final img { width: 96px; margin: 0 auto 18px; border-radius: 22px; }
.final p { color: var(--ink-soft); }

/* ---------- document pages (privacy, support) ---------- */
.doc { padding: 56px 0 88px; }
.doc .container { max-width: 780px; }
.doc header.doc-head { margin-bottom: 32px; }
.doc .meta { color: var(--ink-soft); }
.doc h2 { font-size: 1.5rem; margin-top: 2.2em; scroll-margin-top: 80px; }
.doc h3 { margin-top: 1.4em; }
.doc p, .doc li { color: rgba(238, 240, 255, 0.86); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.45em; }
.doc table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
.doc th, .doc td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; font-size: 0.94rem; }
.doc th { background: rgba(233, 189, 106, 0.1); color: var(--ink); }
.doc .summary { margin: 0 0 28px; background: radial-gradient(80% 100% at 0% 0%, rgba(233, 189, 106, 0.12), transparent 70%), var(--surface); }
.toc { columns: 2; font-size: 0.95rem; }
@media (max-width: 560px) { .toc { columns: 1; } .doc table { display: block; overflow-x: auto; } }

.faq details { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 12px 0 0; color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding: 36px 0; font-size: 0.95rem; color: var(--ink-soft); background: var(--bg-deep); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; padding: 0; margin: 0; }
.site-footer .note { margin-top: 18px; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
