/* ==========================================================
   Nightcap — Design System
   Palette: ink #1c2530 | parchment #f6f2e9 | amber #b8863b
   Type: Fraunces (display) | Source Serif 4 (body) | JetBrains Mono (data)
   ========================================================== */

:root {
  --ink: #1c2530;
  --ink-soft: #2d3947;
  --parchment: #f6f2e9;
  --parchment-warm: #efe8d8;
  --amber: #b8863b;
  --amber-deep: #8f6427;
  --sage: #6d8471;
  --wine: #8c3b3b;
  --stone: #8a8478;
  --stone-light: #d9d3c4;
  --line: #e2dcc9;

  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --measure: 640px;
  --measure-wide: 780px;
  --shadow-soft: 0 8px 32px -12px rgba(28, 37, 48, 0.18);
  --shadow-deep: 0 20px 48px -20px rgba(28, 37, 48, 0.35);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

/* Typography scale */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 400; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
h4 { font-size: 1.1rem; }
p { font-size: inherit; }
p + p { margin-top: 1em; }
strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

/* Chapter/eyebrow labels */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-deep);
}

/* Layout containers */
.container { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--measure-wide); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   NIGHTCAP GLOW — signature background element
   ============================================================ */
.glow-wrap { position: relative; isolation: isolate; }
.glow-wrap::before {
  content: '';
  position: absolute;
  inset: -20% -30% 0 -30%;
  background: radial-gradient(ellipse at 50% 20%, rgba(184, 134, 59, 0.18) 0%, rgba(184, 134, 59, 0.06) 30%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

/* ============================================================
   TOP MENU
   ============================================================ */
.topbar {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  background: var(--parchment);
}
.topbar-inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 26px; height: 26px;
  background: var(--ink);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, var(--amber) 0%, transparent 70%);
}
.brand:hover { color: var(--amber-deep); }
.topbar-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--stone); letter-spacing: 0.15em; text-transform: uppercase; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}
.hero .eyebrow { margin-bottom: 24px; display: inline-block; }
.hero h1 { max-width: 18ch; margin: 0 auto 26px; }
.hero-sub {
  max-width: 32em;
  margin: 0 auto 40px;
  font-size: 1.15rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.hero-mockup {
  margin: 0 auto 40px;
  max-width: 260px;
}
.hero-trust {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--stone);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-trust .dot { color: var(--amber); margin: 0 8px; }

/* Product mockup — digital guide cover */
.guide-mockup {
  aspect-ratio: 3 / 4;
  background: linear-gradient(155deg, var(--ink) 0%, var(--ink-soft) 100%);
  border-radius: 4px 12px 12px 4px;
  box-shadow:
    -1px 0 0 rgba(255, 255, 255, 0.08) inset,
    var(--shadow-deep);
  position: relative;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--parchment);
  overflow: hidden;
}
.guide-mockup::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(to right, rgba(0,0,0,0.35), transparent);
}
.guide-mockup-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.28em;
  color: var(--amber);
  text-transform: uppercase;
}
.guide-mockup-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.15;
  margin-top: 8px;
}
.guide-mockup-title em { font-style: italic; color: var(--amber); }
.guide-mockup-glow {
  position: absolute;
  bottom: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(184, 134, 59, 0.28) 0%, transparent 65%);
  pointer-events: none;
}
.guide-mockup-foot {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: rgba(246, 242, 233, 0.55);
  text-transform: uppercase;
  border-top: 1px solid rgba(246, 242, 233, 0.15);
  padding-top: 10px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   CTA BUTTON — premium double-border
   ============================================================ */
.cta {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--parchment);
  background: var(--ink);
  padding: 20px 44px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: transform 0.15s ease, background 0.2s ease;
  box-shadow:
    inset 0 0 0 1px var(--ink),
    inset 0 0 0 5px var(--parchment),
    inset 0 0 0 6px var(--ink),
    var(--shadow-soft);
  letter-spacing: 0.01em;
}
.cta:hover { background: var(--amber-deep); color: var(--parchment); transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px var(--amber-deep),
    inset 0 0 0 5px var(--parchment),
    inset 0 0 0 6px var(--amber-deep),
    var(--shadow-deep);
}
.cta-price {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--amber);
  margin-left: 6px;
}
.cta:hover .cta-price { color: var(--parchment); }

/* ============================================================
   TRUST BAR
   ============================================================ */
.trustbar {
  background: var(--parchment-warm);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.trustbar-inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.trust-item {}
.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}
.trust-item span {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--stone);
  text-transform: uppercase;
}

/* ============================================================
   SECTION — editorial chapter
   ============================================================ */
.chapter {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}
.chapter:last-child { border-bottom: none; }
.chapter-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--amber-deep);
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}
.chapter h2 {
  margin-bottom: 32px;
  max-width: 20ch;
}
.chapter h2.centered { margin-left: auto; margin-right: auto; text-align: center; max-width: 22ch;}
.chapter p { margin-bottom: 1em; color: var(--ink-soft); font-size: 1.05rem; }
.chapter p.lead { font-size: 1.2rem; color: var(--ink); font-weight: 400; }
.chapter p:last-child { margin-bottom: 0; }

/* Pull-quote */
.pullquote {
  margin: 40px 0;
  padding: 32px 0 32px 32px;
  border-left: 3px solid var(--amber);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--ink);
}
.pullquote-cite {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
  font-style: normal;
}

/* Symptom checklist */
.symptoms {
  list-style: none;
  padding: 24px 28px;
  background: var(--parchment-warm);
  border-left: 3px solid var(--wine);
  margin: 32px 0;
}
.symptoms li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--ink);
  font-size: 1.02rem;
}
.symptoms li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  width: 14px;
  height: 1px;
  background: var(--wine);
}

/* Feature list */
.features {
  list-style: none;
  margin: 32px 0;
}
.features li {
  padding: 18px 0 18px 42px;
  border-top: 1px solid var(--line);
  position: relative;
}
.features li:last-child { border-bottom: 1px solid var(--line); }
.features-num {
  position: absolute;
  left: 0;
  top: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--amber-deep);
}
.features-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  display: block;
}
.features li p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0;
}

/* ============================================================
   OFFER STACK
   ============================================================ */
.offer {
  background: var(--parchment-warm);
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.offer-card {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px;
}
.offer-card h2 { text-align: center; margin-bottom: 8px; }
.offer-card > p.eyebrow { text-align: center; margin-bottom: 40px; }

.offer-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px dashed var(--line);
  align-items: baseline;
}
.offer-line:last-of-type { border-bottom: none; }
.offer-line-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}
.offer-line-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--stone);
  margin-top: 2px;
}
.offer-line-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ink);
  white-space: nowrap;
}
.offer-line-value.strike { color: var(--stone); text-decoration: line-through; }
.offer-line-value.free { color: var(--sage); font-weight: 500; }

.offer-total {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 24px 0 8px;
  border-top: 2px solid var(--ink);
  margin-top: 12px;
  align-items: baseline;
}
.offer-total-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
}
.offer-total-value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--stone);
  text-decoration: line-through;
}
.offer-today {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 12px 0 24px;
  align-items: baseline;
}
.offer-today-label {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
}
.offer-today-value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 2rem;
  color: var(--wine);
}
.offer-cta-wrap { text-align: center; margin-top: 24px; }

/* ============================================================
   GUARANTEE BOX
   ============================================================ */
.guarantee {
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 40px 32px;
  margin: 40px 0;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  align-items: center;
}
.guarantee-seal {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--amber);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  text-align: center;
  border: 3px double var(--amber);
  flex-shrink: 0;
}
.guarantee-seal strong { font-size: 2rem; line-height: 1; font-weight: 400; }
.guarantee-seal span {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 4px;
}
.guarantee h3 { margin-bottom: 8px; }
.guarantee p { color: var(--ink-soft); font-size: 1rem; margin-top: 6px; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.tests { display: grid; gap: 32px; margin-top: 32px; }
.test {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.test:first-child { border-top: none; padding-top: 0; }
.test-body {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 14px;
}
.test-body::before { content: '“'; color: var(--amber); font-size: 1.5em; line-height: 0; vertical-align: -0.2em; margin-right: 4px; }
.test-body::after { content: '”'; color: var(--amber); font-size: 1.5em; line-height: 0; vertical-align: -0.2em; margin-left: 2px; }
.test-cite {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--stone);
  text-transform: uppercase;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq { margin-top: 24px; }
.faq-item {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  list-style: none;
  padding-right: 32px;
  position: relative;
  font-weight: 500;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  font-size: 1.5rem;
  font-family: var(--font-body);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

/* ============================================================
   FINAL CTA SECTION
   ============================================================ */
.final-cta {
  padding: 80px 0;
  text-align: center;
}
.final-cta h2 { max-width: 22ch; margin: 0 auto 24px; }
.final-cta p { max-width: 32em; margin: 0 auto 32px; font-size: 1.1rem; color: var(--ink-soft); }
.final-cta .hero-trust { margin-top: 24px; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--ink);
  color: var(--parchment);
  padding: 56px 0 32px;
  font-size: 0.92rem;
  line-height: 1.55;
}
footer .footer-inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 24px;
}
footer .brand { color: var(--parchment); font-size: 1.5rem; margin-bottom: 8px; }
footer .brand-mark { background: var(--parchment); }
footer .brand-mark::after { background: radial-gradient(circle at 40% 35%, var(--amber) 0%, transparent 70%); }
footer h4 {
  color: var(--parchment);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 24px 0 12px;
  font-weight: 500;
}
footer p, footer a { color: rgba(246, 242, 233, 0.72); font-size: 0.9rem; }
footer a { color: var(--amber); text-decoration: none; }
footer a:hover { color: var(--parchment); text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-disclaimer {
  border-top: 1px solid rgba(246, 242, 233, 0.12);
  padding-top: 24px;
  margin-top: 24px;
  font-size: 0.78rem;
  color: rgba(246, 242, 233, 0.55);
  line-height: 1.6;
}
.footer-disclaimer p + p { margin-top: 12px; }
.footer-copy {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 242, 233, 0.4);
}

/* ============================================================
   LEGAL PAGES (privacy, terms, etc)
   ============================================================ */
.legal {
  padding: 64px 0 96px;
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.legal .eyebrow { display: block; margin-bottom: 12px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 8px; }
.legal .updated {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--stone);
  text-transform: uppercase;
  margin-bottom: 40px;
}
.legal h2 {
  font-size: 1.4rem;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.legal h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.legal h3 { font-size: 1.15rem; margin-top: 24px; margin-bottom: 8px; }
.legal p, .legal li { color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.legal p + p { margin-top: 12px; }
.legal ul, .legal ol { margin: 12px 0 12px 24px; }
.legal li { margin: 6px 0; }
.legal a { word-break: break-word; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .hero { padding: 48px 0 40px; }
  .hero-mockup { max-width: 200px; }
  .chapter { padding: 56px 0; }
  .trustbar-inner { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .guarantee { grid-template-columns: 80px 1fr; gap: 20px; padding: 28px 20px; }
  .guarantee-seal { width: 80px; height: 80px; }
  .guarantee-seal strong { font-size: 1.5rem; }
  .cta { padding: 18px 32px; font-size: 1rem; }
  .offer-today-value { font-size: 1.7rem; }
  .pullquote { font-size: 1.15rem; padding: 24px 0 24px 20px; }
}

@media (max-width: 460px) {
  .topbar-meta { display: none; }
}

/* Print-friendly (some 50+ users print to read) */
@media print {
  .cta, .topbar, footer { display: none; }
  body { font-size: 12pt; }
}
