/* ─────────────────────────────────────────────────────────────
   Simply Sleep Sounds — site styles
   Dark, italic-serif heavy, low-saturation. Designed to feel like
   the app at rest. Single CSS file for index + install.
   ───────────────────────────────────────────────────────────── */

/* Self-hosted Crimson Text (latin subset) — no third-party requests. */
@font-face {
  font-family: 'Crimson Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/crimson-text-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Crimson Text';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/crimson-text-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Crimson Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/crimson-text-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Crimson Text';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/crimson-text-600-italic.woff2') format('woff2');
}

:root {
  --bg: #050505;
  --bg-deep: #020203;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-strong: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #e9e6e0;
  --text-strong: #ffffff;
  --text-mute: rgba(255, 255, 255, 0.55);
  --text-faint: rgba(255, 255, 255, 0.4);
  --text-ghost: rgba(255, 255, 255, 0.28);
  --accent: #A88670;        /* brown noise — UI accent, matches the app */
  --neon-cyan: #5DDDFF;
  --neon-purple: #B274FF;
  --neon-pink: #FF4DD2;

  --display: "Crimson Text", ui-serif, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --max: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: inherit; }

::selection { background: var(--neon-purple); color: #fff; }

/* ─── Top nav ─── */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 5, 5, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: inherit;
}
.nav-brand img {
  width: 36px; height: 36px; border-radius: 9px;
  display: block;
}
.nav-brand span {
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 500; color: rgba(255, 255, 255, 0.85);
}
.nav-links {
  display: flex; gap: 32px;
}
.nav-links a {
  font-size: 13.5px; color: var(--text-mute);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-strong); }

.nav-mobile-toggle {
  display: none;
  background: transparent; border: 0; padding: 8px;
  color: var(--text); cursor: pointer;
}

/* ─── Page chrome ─── */
.page { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.section { padding: 80px 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: 0; }

/* ─── Typography ─── */
.eyebrow {
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--text-faint); font-weight: 500;
  margin-bottom: 14px;
}
.display {
  font-family: var(--display);
  font-style: italic; font-weight: 400;
  line-height: 1.02; letter-spacing: -0.5px;
  color: var(--text-strong);
  margin: 0;
}
.h1 { font-size: clamp(56px, 9vw, 96px); letter-spacing: -1.5px; }
.h2 { font-size: clamp(36px, 4.5vw, 56px); }
.h3 { font-size: 28px; }

.lede {
  font-size: 17px;
  color: var(--text-mute);
  line-height: 1.55;
  max-width: 560px;
}
.mono {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.5px;
  color: var(--text-faint);
}

/* ─── Hero ─── */
.hero {
  position: relative;
  padding: 80px 0 100px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero-halo {
  position: absolute; pointer-events: none;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 980px; height: 480px;
  background: radial-gradient(50% 50% at 50% 50%,
    rgba(178, 116, 255, 0.18),
    rgba(93, 221, 255, 0.06) 40%,
    transparent 70%);
  z-index: 0;
}
.hero > *:not(.hero-halo) { position: relative; z-index: 1; }
.hero-logo {
  width: 144px; height: 144px;
  display: block;
  margin-bottom: 28px;
  filter: drop-shadow(0 0 36px rgba(178, 116, 255, 0.45))
          drop-shadow(0 0 60px rgba(93, 221, 255, 0.18));
  animation: hero-breathe 4s ease-in-out infinite;
}
@keyframes hero-breathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 36px rgba(178, 116, 255, 0.45)) drop-shadow(0 0 60px rgba(93, 221, 255, 0.18)); }
  50%      { transform: scale(1.03); filter: drop-shadow(0 0 48px rgba(178, 116, 255, 0.6)) drop-shadow(0 0 80px rgba(93, 221, 255, 0.3)); }
}

.three-no {
  margin-top: 28px;
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 18px;
  font-family: var(--display);
  font-style: italic; font-size: clamp(18px, 2.4vw, 24px);
  color: rgba(255, 255, 255, 0.85);
  max-width: 720px;
}
.three-no .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--neon-purple);
  opacity: 0.7;
  flex-shrink: 0;
}

.hero-lede {
  margin: 30px auto 0;
  font-size: 17px;
  color: var(--text-mute);
  line-height: 1.55;
  max-width: 560px;
}

.cta-row {
  display: flex; gap: 14px; margin-top: 40px;
  align-items: flex-start; flex-wrap: wrap; justify-content: center;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font: 500 14px/1 var(--sans);
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform 0.15s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: #fff; color: #0a0807;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 8px 28px rgba(255,255,255,0.06);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,255,255,0.16), 0 12px 32px rgba(255,255,255,0.1); }
.btn-secondary {
  background: transparent; color: var(--text-strong);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-strong); }
.btn-coming-soon {
  position: relative;
  background: transparent; color: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border-strong);
  cursor: not-allowed;
}
.btn-coming-soon::after {
  content: "Soon";
  position: absolute; top: -8px; right: -6px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--neon-purple); color: #fff;
  font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(178, 116, 255, 0.55);
}

.hero-meta {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-ghost);
  letter-spacing: 0.5px;
}

/* ─── Section headers ─── */
.section-head {
  margin-bottom: 36px;
  max-width: 620px;
}
.section-head .lede {
  margin-top: 12px;
}

/* ─── Five colors ─── */
.colors {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.color-row {
  display: grid;
  grid-template-columns: 40px 180px 1fr 140px;
  align-items: center; gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.color-dot {
  width: 22px; height: 22px; border-radius: 50%;
  justify-self: center;
  box-shadow: 0 0 14px currentColor;
}
.color-name {
  font-family: var(--display);
  font-style: italic; font-size: 30px;
  color: var(--text-strong);
}
.color-desc {
  font-size: 14.5px;
  color: var(--text-mute);
  line-height: 1.5;
}
.color-curve {
  height: 36px;
  opacity: 0.9;
}

/* ─── Made for 3am ─── */
.why {
  display: grid;
  grid-template-columns: minmax(0, 360px) 1fr;
  gap: 56px;
  align-items: start;
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 36px;
}
.why-item {
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.why-item h3 {
  font-family: var(--display);
  font-style: italic; font-weight: 400; font-size: 22px;
  color: var(--text-strong);
  margin: 0 0 6px;
}
.why-item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-mute);
  line-height: 1.55;
}

/* ─── Install card (home) ─── */
.install-card {
  background: linear-gradient(180deg, rgba(178,116,255,0.06), rgba(93,221,255,0.02));
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.install-card::before {
  content: "";
  position: absolute; pointer-events: none;
  inset: 0;
  background: radial-gradient(40% 60% at 100% 0%,
    rgba(178, 116, 255, 0.18), transparent 60%);
  z-index: 0;
}
.install-card > * { position: relative; z-index: 1; }

.install-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0 36px;
}
.install-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 8px;
}
.install-step .num {
  font-family: var(--mono);
  font-size: 11px; color: var(--text-ghost);
  letter-spacing: 2px;
  margin-bottom: 2px;
}
.install-step h4 {
  font-family: var(--display);
  font-style: italic; font-weight: 400; font-size: 20px;
  margin: 0; color: var(--text-strong);
}
.install-step p {
  margin: 4px 0 0;
  font-size: 13px; color: var(--text-mute);
  line-height: 1.55;
}

.install-cta {
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
.install-cta .meta {
  display: flex; flex-direction: column; gap: 2px;
}
.install-cta .filename {
  font-family: var(--mono);
  font-size: 13px; color: var(--text-strong);
}
.install-cta .checksum {
  font-family: var(--mono);
  font-size: 11px; color: var(--text-ghost);
}

/* ─── Quick Start (graphic, non-technical) ─── */
.quickstart {
  text-align: center;
}
.quickstart .section-head {
  margin: 0 auto 48px;
  text-align: center;
}
.qs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.qs-card {
  position: relative;
  background: linear-gradient(180deg, rgba(178,116,255,0.04), transparent 60%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px 24px 28px;
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
}
.qs-card::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 50% at 50% 0%, rgba(93,221,255,0.07), transparent 60%);
  border-radius: 22px;
  z-index: 0;
}
.qs-card > * { position: relative; z-index: 1; }
.qs-illust {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
}
.qs-illust svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 24px rgba(178, 116, 255, 0.2));
}
.qs-step-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--neon-purple);
  text-transform: uppercase;
}
.qs-label {
  font-family: var(--display);
  font-style: italic; font-weight: 400;
  font-size: 26px; color: var(--text-strong);
  margin: 0;
  line-height: 1.1;
}
.qs-sub {
  font-size: 14px;
  color: var(--text-mute);
  margin: 0;
  max-width: 220px;
  line-height: 1.5;
}
.qs-arrow {
  display: none;
}
@media (min-width: 861px) {
  .qs-arrow {
    display: block;
    position: absolute;
    top: 50%; right: -28px;
    transform: translateY(-50%);
    width: 32px; height: 32px;
    color: var(--text-ghost);
    pointer-events: none;
    z-index: 2;
  }
  .qs-card:last-child .qs-arrow { display: none; }
}
.qs-footnote {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}
.qs-footnote a {
  color: var(--neon-cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(93, 221, 255, 0.3);
  transition: border-color 0.2s;
}
.qs-footnote a:hover { border-bottom-color: var(--neon-cyan); }

@media (max-width: 860px) {
  .qs-grid { grid-template-columns: 1fr; }
  .qs-card { padding: 28px 22px 24px; }
}
/* ─── Footer ─── */
.footer {
  padding: 64px 0 48px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-cta {
  margin-bottom: 64px;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}
.footer-bottom .links {
  display: flex; gap: 22px;
}
.footer-bottom a {
  color: inherit; text-decoration: none;
}
.footer-bottom a:hover { color: var(--text-strong); }
.footer-mark {
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-mark img {
  width: 18px; height: 18px; border-radius: 4px;
}

.breathing-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: sitebreathe 3.2s ease-in-out infinite;
}
@keyframes sitebreathe {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.25); opacity: 1; box-shadow: 0 0 18px var(--accent); }
}

/* ─── Install page ─── */
.install-hero {
  padding: 64px 0 40px;
  text-align: center;
}
.install-hero .display { margin-bottom: 16px; }
.install-hero .lede { margin: 0 auto; }

.install-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 760px; margin: 0 auto;
}
.install-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
}
.install-detail h2 {
  font-family: var(--display);
  font-style: italic; font-weight: 400;
  font-size: 26px; margin: 0 0 10px;
  color: var(--text-strong);
  display: flex; align-items: center; gap: 14px;
}
.install-detail h2 .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(178, 116, 255, 0.18);
  border: 1px solid rgba(178, 116, 255, 0.4);
  font-family: var(--mono); font-style: normal;
  font-size: 14px; color: var(--text-strong);
}
.install-detail p {
  margin: 0;
  color: var(--text-mute);
  font-size: 14.5px;
  line-height: 1.6;
}
.install-detail .tip {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.55;
}
.install-detail .tip strong {
  color: var(--neon-cyan);
  font-weight: 600;
}

details.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  margin-top: 12px;
}
details.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  font-family: var(--mono); font-size: 18px;
  color: var(--text-faint);
}
details.faq[open] summary::after { content: "−"; }
details.faq[open] summary { border-bottom: 1px solid var(--border); }
details.faq .answer {
  padding: 16px 20px 20px;
  font-size: 13.5px;
  color: var(--text-mute);
  line-height: 1.6;
}
details.faq .answer p { margin: 0 0 10px; }
details.faq .answer p:last-child { margin-bottom: 0; }
details.faq .answer code {
  font-family: var(--mono); font-size: 12.5px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 4px;
  color: var(--neon-cyan);
}

/* ─── Phone mock illustration ─── */
.phone-illust {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(60% 60% at 50% 50%, rgba(178,116,255,0.12), transparent 70%);
  padding: 22px 0 8px;
  margin-top: 14px;
  border-radius: 14px;
}
.phone-illust svg {
  display: block;
}

/* ─── Responsive ─── */
@media (max-width: 860px) {
  .nav-inner { padding: 14px 22px; }
  .page { padding: 0 22px; }
  .section { padding: 56px 0; }
  .why {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .why-grid { grid-template-columns: 1fr; column-gap: 0; }
  .color-row {
    grid-template-columns: 32px 1fr;
    gap: 16px 16px;
  }
  .color-row .color-desc { grid-column: 2; margin-top: -8px; }
  .color-row .color-curve { display: none; }
  .install-steps { grid-template-columns: 1fr; }
  .install-card { padding: 32px 22px; }
  .install-detail { padding: 22px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(5,5,5,0.96);
    backdrop-filter: blur(14px);
    flex-direction: column; gap: 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .nav-links a { padding: 14px 22px; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-mobile-toggle { display: inline-flex; }
  .nav.menu-open .nav-links {
    transform: translateY(0); opacity: 1;
    pointer-events: auto;
  }
  .footer-bottom {
    flex-direction: column; gap: 16px;
  }
  .hero-logo { width: 116px; height: 116px; }
}
