/* SleepEasy — landing
   Warm-paper editorial minimalism. Fraunces display, Instrument Sans text,
   ink + navy, one muted spectrum accent borrowed from the extension itself. */

:root {
  --paper: #faf8f3;
  --ink: #16171d;
  --muted: #6f6a5e;
  --faint: #a39d8e;
  --hairline: #e6e1d5;
  --navy: #0e1726;
  --navy-soft: #1d2a40;
  --card: #ffffff;
  --green: #79b292;
  --sand: #ddc287;
  --clay: #d99087;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Instrument Sans", ui-sans-serif, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 50% -160px, rgba(14, 23, 38, 0.045), transparent 70%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--navy); color: var(--paper); }

/* ── Masthead ── */

.masthead {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand img { border-radius: 6px; display: block; }

.masthead nav { display: flex; gap: 22px; }

.masthead nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.masthead nav a:hover { color: var(--ink); }

/* ── Layout ── */

main { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ── Type ── */

h1, h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 7.5vw, 58px); line-height: 1.06; }
h2 { font-size: clamp(26px, 4.4vw, 33px); line-height: 1.18; margin-bottom: 18px; }

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 18px;
}

p { max-width: 60ch; }
p + p { margin-top: 14px; }

a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86em;
  background: rgba(14, 23, 38, 0.06);
  border-radius: 4px;
  padding: 1px 5px;
}

strong { font-weight: 600; }

/* ── Hero ── */

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

.hero .lead {
  margin-top: 24px;
  font-size: 18.5px;
  color: var(--muted);
  max-width: 54ch;
}

.actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:hover { box-shadow: 0 2px 10px rgba(14, 23, 38, 0.08); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #f6f4ee;
}

.btn.primary:hover { background: var(--navy-soft); }

/* ── Module replica ── */

.module-figure { margin: 44px 0 0; }

.module {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 22px 24px 18px;
  box-shadow: 0 18px 50px -28px rgba(14, 23, 38, 0.28);
}

.module-figure figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--faint);
  text-align: center;
}

.m-head { display: flex; justify-content: space-between; align-items: flex-start; }

.m-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6b7280;
}

.m-place { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; margin-top: 1px; }

.m-info {
  width: 20px; height: 20px;
  border: 1.4px solid #d1d5db;
  border-radius: 999px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  font-family: Georgia, serif;
}

.m-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
  margin: 10px 0 6px;
}

.m-metric { margin-bottom: 13px; }

.m-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

.m-name { font-size: 13.5px; font-weight: 700; }

.m-value strong { font-size: 14.5px; font-weight: 700; font-variant-numeric: tabular-nums; }

.m-value em {
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
}

.m-sub { align-items: center; margin-top: 5px; }

.m-track {
  position: relative;
  flex: 1 1 auto;
  height: 3.5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--sand) 55%, var(--clay));
}

.m-dot {
  position: absolute;
  top: 50%;
  width: 10px; height: 10px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #1f2937;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.m-rank {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.m-controls { display: flex; gap: 8px; margin-top: 4px; }

.m-select {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  border: 1px solid #e0ddd3;
  border-radius: 6px;
  padding: 4px 10px;
  background: #fff;
}

.m-foot { margin-top: 10px; font-size: 11px; color: #9ca3af; }

/* ── Chapters ── */

.chapter {
  padding: 76px 0 0;
  margin-top: 76px;
  border-top: 1px solid var(--hairline);
}

.chapter:first-of-type { border-top: 0; }

.facts {
  list-style: none;
  display: flex;
  gap: 36px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.facts li { font-size: 14px; color: var(--muted); }

.facts strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
}

/* ── Triptych ── */

.triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 30px 0;
}

.triptych figure { margin: 0; }

.triptych img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  display: block;
}

.triptych figcaption {
  font-size: 12px;
  color: var(--faint);
  margin-top: 7px;
  text-align: center;
}

/* ── Accuracy table ── */

.accuracy {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0 14px;
  font-size: 14.5px;
}

.accuracy th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0 14px 9px 0;
  border-bottom: 1px solid var(--hairline);
}

.accuracy td {
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums;
}

.accuracy td strong { font-size: 16px; }

.fineprint { font-size: 13.5px; color: var(--muted); }

/* ── Install paths ── */

.path { margin-top: 34px; }

.path h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

.path h3 span { font-weight: 400; color: var(--muted); font-size: 15px; }

.path ol { margin: 14px 0 0 20px; }

.path li { margin-bottom: 7px; }

.path pre {
  margin-top: 16px;
  background: var(--navy);
  color: #dce3ee;
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}

.path pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

.path pre .comment { color: #76839b; }

.path .fineprint { margin-top: 12px; }

/* ── FAQ ── */

#faq details {
  border-top: 1px solid var(--hairline);
  padding: 16px 0;
}

#faq details:last-of-type { border-bottom: 1px solid var(--hairline); }

#faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

#faq summary::-webkit-details-marker { display: none; }

#faq summary::after {
  content: "+";
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
  color: var(--faint);
  transition: transform 0.18s ease;
  flex: 0 0 auto;
}

#faq details[open] summary::after { transform: rotate(45deg); }

#faq details p { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ── Footer ── */

.footer {
  max-width: 720px;
  margin: 90px auto 0;
  padding: 28px 24px 48px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--faint);
}

.footer p + p { margin-top: 10px; }

.footer a { color: var(--muted); }

/* ── Reveal animation (load only) ── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(0.2, 0.65, 0.25, 1) forwards;
}

.d1 { animation-delay: 0.08s; }
.d2 { animation-delay: 0.16s; }
.d3 { animation-delay: 0.24s; }
.d4 { animation-delay: 0.34s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ── Privacy page ── */

.prose { padding: 64px 0 40px; }

.prose h1 { font-size: clamp(32px, 6vw, 44px); margin-bottom: 8px; }

.prose .updated { color: var(--faint); font-size: 14px; margin-bottom: 36px; }

.prose h2 {
  font-size: 21px;
  margin: 40px 0 10px;
}

.prose ul { margin: 12px 0 12px 22px; }

.prose li { margin-bottom: 6px; }

/* ── Small screens ── */

@media (max-width: 560px) {
  .hero { padding-top: 64px; }
  .masthead nav { gap: 14px; }
  .triptych { grid-template-columns: 1fr; }
  .triptych img { aspect-ratio: 16 / 9; }
  .facts { gap: 24px; }
  .m-rank { font-size: 10px; }
}
