/* Snoreman — site styles. No build step, no external requests. */

:root {
  --ink: #1f2e2c;
  --ink-soft: #4a5b58;
  --ink-faint: #576965;
  --line: rgba(31, 46, 44, 0.10);
  --card: rgba(255, 255, 255, 0.66);
  --card-solid: #ffffff;
  --accent: #6c5ce7;
  --accent-ink: #574ac2;
  --sage: #688552;
  --amber: #e8912a;
  --rose: #e2574c;
  --bg-1: #e6ecea;
  --bg-2: #d9e4e4;
  --bg-3: #e9e4d8;
  --radius: 22px;
  --shadow-sm: 0 1px 2px rgba(31, 46, 44, .06), 0 8px 24px -12px rgba(31, 46, 44, .18);
  --shadow-lg: 0 2px 6px rgba(31, 46, 44, .05), 0 40px 80px -40px rgba(31, 46, 44, .35);
  color-scheme: light;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui,
          "Helvetica Neue", "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC", sans-serif;
}

/* Dark palette. theme.js sets data-theme="dark" — from the system preference by
   default, or from the visitor's stored choice. The media query is the fallback
   for when JavaScript is unavailable; keep the two blocks in sync. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef3f1;
  --ink-soft: #a9bcb7;
  --ink-faint: #90a29e;
  --line: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.055);
  --card-solid: #182220;
  --accent: #9b8dff;
  --accent-ink: #b3a8ff;
  --sage: #a3c088;
  --bg-1: #101917;
  --bg-2: #16211f;
  --bg-3: #1b201c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 40px 80px -40px rgba(0, 0, 0, .8);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --ink: #eef3f1;
    --ink-soft: #a9bcb7;
    --ink-faint: #90a29e;
    --line: rgba(255, 255, 255, 0.12);
    --card: rgba(255, 255, 255, 0.055);
    --card-solid: #182220;
    --accent: #9b8dff;
    --accent-ink: #b3a8ff;
    --sage: #a3c088;
    --bg-1: #101917;
    --bg-2: #16211f;
    --bg-3: #1b201c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 40px 80px -40px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--bg-1);
  background-image:
    radial-gradient(1100px 700px at 12% -10%, var(--bg-3), transparent 60%),
    radial-gradient(900px 600px at 92% 4%, var(--bg-2), transparent 62%),
    radial-gradient(1200px 900px at 50% 108%, var(--bg-2), transparent 65%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--bg-1) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; box-shadow: var(--shadow-sm); border-radius: 6px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink-soft); font-size: 14.5px; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 720px) { .nav-links a.hide-sm { display: none; } }
@media (max-width: 520px) { .nav-links { gap: 14px; } .nav-links a.hide-xs { display: none; } }

/* Theme switch. Hidden until theme.js sets data-theme, so it never shows up
   as a dead control when JavaScript is unavailable. */
.theme-toggle { display: none; }
:root[data-theme] .theme-toggle {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
}
.theme-toggle button {
  width: 27px; height: 27px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-faint); cursor: pointer;
  display: grid; place-items: center; transition: color .15s ease, background .15s ease;
}
.theme-toggle button:hover { color: var(--ink); }
.theme-toggle button[aria-pressed="true"] {
  background: var(--card-solid); color: var(--ink); box-shadow: var(--shadow-sm);
}
.theme-toggle svg { width: 15px; height: 15px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg-1); box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); backdrop-filter: blur(10px); }
.btn .apple { width: 17px; height: 20px; flex: none; }
.btn-store { padding: 11px 22px; text-align: left; line-height: 1.15; }
.btn-store .sup { display: block; font-size: 10.5px; font-weight: 500; opacity: .75; letter-spacing: .04em; text-transform: uppercase; }
.btn-store .main { display: block; font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } .hero { padding-top: 44px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  background: var(--card); border: 1px solid var(--line);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 22px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); flex: none; }

h1 {
  font-size: clamp(38px, 6vw, 60px); line-height: 1.05; letter-spacing: -.032em;
  font-weight: 700; margin: 0 0 20px;
}
.lede { font-size: clamp(17px, 2.1vw, 19.5px); color: var(--ink-soft); margin: 0 0 30px; max-width: 30em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-meta { margin-top: 20px; font-size: 13.5px; color: var(--ink-faint); }

.hero-shot { position: relative; }
.hero-shot img {
  border-radius: 26px; box-shadow: var(--shadow-lg);
  max-height: 680px; width: auto; margin: 0 0 0 auto;
}
@media (max-width: 900px) { .hero-shot img { margin: 0 auto; } }

/* ---------- trust strip ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 56px 0 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.trust div { background: var(--card); backdrop-filter: blur(10px); padding: 20px 18px; text-align: center; }
.trust b { display: block; font-size: 15px; letter-spacing: -.01em; }
.trust span { font-size: 13px; color: var(--ink-faint); }
@media (max-width: 720px) { .trust { grid-template-columns: repeat(2, 1fr); } }

/* ---------- sections ---------- */
section { padding: 76px 0; }
section[id], [id] { scroll-margin-top: 76px; }
.section-head { max-width: 640px; margin-bottom: 44px; }
h2 { font-size: clamp(27px, 3.6vw, 38px); line-height: 1.15; letter-spacing: -.028em; font-weight: 700; margin: 0 0 14px; }
.section-head p { color: var(--ink-soft); font-size: 17px; margin: 0; }
h3 { font-size: 18px; letter-spacing: -.015em; font-weight: 650; margin: 0 0 8px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 28px; backdrop-filter: blur(12px); box-shadow: var(--shadow-sm);
}
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  margin-bottom: 16px; background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-ink);
}
.icon svg { width: 20px; height: 20px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; gap: 22px; } }
.step { padding-top: 20px; border-top: 2px solid var(--line); }
.step .num {
  font-size: 13px; font-weight: 700; color: var(--accent-ink);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px;
}
.step p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 800px) {
  .gallery { grid-auto-flow: column; grid-auto-columns: 74%; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
    margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
  .gallery figure { scroll-snap-align: center; }
}
.gallery figure { margin: 0; }
.gallery img { border-radius: 20px; box-shadow: var(--shadow-lg); }

/* ---------- price ---------- */
.price-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 28px;
  padding: 44px 36px; text-align: center; backdrop-filter: blur(12px); box-shadow: var(--shadow-lg);
  max-width: 560px; margin: 0 auto;
}
.price { font-size: 56px; font-weight: 700; letter-spacing: -.04em; line-height: 1; margin: 0; }
.price small { font-size: 16px; font-weight: 500; color: var(--ink-faint); letter-spacing: 0; }
.price-note { color: var(--ink-soft); margin: 14px 0 26px; }
.price-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; text-align: left; }
.price-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-soft); }
.check { color: var(--sage); flex: none; margin-top: 3px; }

/* ---------- faq ---------- */
.faq { max-width: 760px; }
details {
  border-bottom: 1px solid var(--line); padding: 4px 0;
}
details summary {
  cursor: pointer; list-style: none; padding: 18px 30px 18px 0; position: relative;
  font-weight: 600; font-size: 16.5px; letter-spacing: -.01em;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details .answer { padding: 0 30px 20px 0; color: var(--ink-soft); font-size: 15.5px; }
details .answer p { margin: 0 0 10px; }
details .answer p:last-child { margin-bottom: 0; }

/* ---------- prose (privacy / support) ---------- */
.page-head { padding: 64px 0 8px; }
.page-head h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 10px; }
.page-head .updated { color: var(--ink-faint); font-size: 14px; }
.prose { padding: 24px 0 80px; font-size: 16.5px; color: var(--ink-soft); }
.prose h2 { font-size: 23px; margin: 44px 0 12px; color: var(--ink); }
.prose h3 { font-size: 17.5px; margin: 26px 0 8px; color: var(--ink); }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--ink); }
.callout {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin: 26px 0; backdrop-filter: blur(10px);
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 44px 0 56px; font-size: 14px; color: var(--ink-faint); }
.foot-grid { display: flex; flex-wrap: wrap; gap: 18px 34px; align-items: center; }
.foot-grid nav { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
footer a { color: var(--ink-soft); }
.languages {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 24px;
  font-size: 14px; align-items: baseline;
}
.languages span[aria-current] { color: var(--ink); font-weight: 600; }

.disclaimer { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 700px; font-size: 13px; line-height: 1.6; }
