/* ==========================================================================
   Twenty Minutes Dead: Sales Page Styles
   Design concept: the flatline that becomes a heartbeat.
   Palette: deep night navy, phosphor monitor green, candlelight gold.
   Type: Fraunces (display) / Source Serif 4 (reading body) / IBM Plex Mono (labels, citations)
   ========================================================================== */

:root {
  /* Color */
  --color-bg:        #0B1220;
  --color-bg-alt:    #0F1729;
  --color-bg-card:   #141F36;
  --color-text:      #F1EEE7;
  --color-text-muted:#93A0B8;
  --color-monitor:   #35D399;
  --color-monitor-dim: #1F7A5C;
  --color-gold:      #E3B573;
  --color-gold-dim:  #8A6C3F;
  --color-border:    rgba(241,238,231,0.10);
  --color-border-soft: rgba(241,238,231,0.06);

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Layout */
  --wrap: 1100px;
  --wrap-narrow: 720px;
  --wrap-prose: 640px;
  --radius: 3px;

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-monitor);
  color: #04150E;
  padding: 0.75em 1.25em;
  z-index: 1000;
  font-family: var(--font-mono);
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid var(--color-monitor);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.wrap--narrow { max-width: var(--wrap-narrow); }
.wrap--prose { max-width: var(--wrap-prose); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11,18,32,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95em 1.6em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-monitor);
  color: #04150E;
  box-shadow: 0 0 0 0 rgba(53,211,153,0);
}
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(53,211,153,0.25); }
.btn--large { padding: 1.15em 2.1em; font-size: 0.95rem; }
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover { border-color: var(--color-monitor); color: var(--color-monitor); }
.btn--small { padding: 0.6em 1.1em; font-size: 0.75rem; }
.btn__price {
  font-weight: 500;
  border-left: 1px solid rgba(4,21,14,0.25);
  padding-left: 0.6em;
}
.btn--ghost .btn__price { border-left-color: var(--color-border); }

/* ---------- Eyebrow / section headings ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-monitor);
  margin: 0 0 1rem;
}
.section-heading {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
  margin-bottom: 1.4rem;
  color: var(--color-text);
}
.section-heading--center { text-align: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 3.25rem 0 2.5rem;
  overflow: hidden;
}
.hero__field {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% -10%, rgba(227,181,115,0.14), transparent 60%),
    radial-gradient(1px 1px at 20% 30%, rgba(241,238,231,0.5), transparent 60%),
    radial-gradient(1px 1px at 70% 20%, rgba(241,238,231,0.4), transparent 60%),
    radial-gradient(1px 1px at 85% 55%, rgba(241,238,231,0.35), transparent 60%),
    radial-gradient(1px 1px at 40% 65%, rgba(241,238,231,0.3), transparent 60%),
    radial-gradient(1px 1px at 55% 15%, rgba(241,238,231,0.4), transparent 60%),
    radial-gradient(1px 1px at 10% 70%, rgba(241,238,231,0.3), transparent 60%);
  pointer-events: none;
}
.hero__inner { position: relative; text-align: center; }

.ekg { width: 100%; height: 60px; display: block; margin: 0 auto 2.2rem; }
.ekg--hero { height: 44px; margin: 0 auto 1.3rem; max-width: 640px; }
.ekg path { fill: none; stroke: var(--color-monitor); stroke-width: 2; }
.ekg--hero .ekg__flatline {
  opacity: 1;
  stroke-dasharray: 1000;
  stroke-dashoffset: 0;
}
.ekg--hero .ekg__pulse {
  opacity: 0;
}
.ekg--hero.is-alive .ekg__flatline { animation: fade-out 0.4s ease forwards; }
.ekg--hero.is-alive .ekg__pulse {
  opacity: 1;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-pulse 1.6s 0.5s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes fade-out { to { opacity: 0; } }
@keyframes draw-pulse { to { stroke-dashoffset: 0; } }

.ekg--small path { stroke: var(--color-gold); stroke-width: 2; fill: none; }
.ekg--small { width: 100%; max-width: 340px; height: 36px; margin: 0 auto 1.6rem; }

.hero__headline {
  font-size: clamp(1.9rem, 1.4rem + 2.1vw, 2.9rem);
  line-height: 1.16;
  max-width: 22ch;
  margin: 0 auto 1rem;
  letter-spacing: -0.01em;
}
.hero__subhead {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem);
  color: var(--color-text-muted);
  max-width: 34ch;
  margin: 0 auto 1.7rem;
}
.hero__actions { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.hero__guarantee {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
  margin: 0;
}

.hero__visual { margin-top: 3.5rem; }

/* ---------- Image placeholders ---------- */
.img-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(160deg, var(--color-bg-card), var(--color-bg-alt));
  border-top: 1px solid var(--color-border-soft);
  border-bottom: 1px solid var(--color-border-soft);
}
.img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) brightness(0.55) contrast(1.05);
}
.img-placeholder--portrait { aspect-ratio: 4 / 5; }
.img-placeholder--wide { max-width: var(--wrap); margin: 3rem auto 0; aspect-ratio: 21 / 8; }
.img-placeholder__label {
  display: none;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.55em 1em;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
  background: linear-gradient(0deg, rgba(11,18,32,0.85), transparent);
}
.img-placeholder__label a { color: var(--color-gold); text-decoration: none; }
.img-placeholder__label a:hover { text-decoration: underline; }

.img-placeholder--broken img { display: none; }
.img-placeholder--broken {
  background:
    radial-gradient(ellipse at top left, rgba(227,181,115,0.10), transparent 55%),
    repeating-linear-gradient(135deg, rgba(241,238,231,0.03) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, var(--color-bg-card), var(--color-bg-alt));
  display: flex;
  align-items: flex-end;
}
.img-placeholder--broken .img-placeholder__label { display: block; position: static; background: none; }

/* The book cover is a final, fully art-directed asset with its own color
   grading, skip the moody desaturation filter used on the mood-board shots. */
.book-cover__face img { filter: none; }

/* The author portrait needs to read clearly (it's a face, not a mood shot),
   so it gets a lighter, higher-contrast treatment than the other mood-board images. */
.img-placeholder--author img { filter: grayscale(0.1) brightness(0.95) contrast(1.15); }

/* The tunnel-of-light image is the emotional centerpiece of "The Hook"
   section: it needs its glow and warm/dark contrast intact, not the muted,
   desaturated treatment used on the other mood-board shots. */
.img-placeholder--luminous img { filter: brightness(1.05) contrast(1.35) saturate(1.1); }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section--dark { background: var(--color-bg-alt); }

.lede {
  font-size: 1.2rem;
  color: var(--color-text);
}
.wrap--prose p { font-size: 1.08rem; }

.credibility-note {
  margin-top: 2.4rem;
  padding: 1.3rem 1.5rem;
  border-left: 2px solid var(--color-gold-dim);
  background: rgba(227,181,115,0.05);
}
.credibility-note p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}
.credibility-note cite { font-style: italic; color: var(--color-text); }

/* ---------- EKG divider ---------- */
.ekg-divider { padding: 2.5rem 0; }
.ekg-divider svg { display: block; width: 100%; max-width: 500px; height: 30px; margin: 0 auto; }
.ekg-divider path { fill: none; stroke: var(--color-monitor-dim); stroke-width: 1.5; }

/* ---------- Stage list ---------- */
.stage-list {
  list-style: none;
  margin: 2.6rem auto;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}
.stage-list__item {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--color-border);
}
.stage-list__mark {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-monitor);
  min-width: 2ch;
}
.stage-list__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
}

/* ---------- Who list ---------- */
.who-list { list-style: none; }
.who-list li {
  position: relative;
  padding: 1.1rem 0 1.1rem 1.8rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 1.08rem;
}
.who-list li:first-child { border-top: 1px solid var(--color-border); }
.who-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.55rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-gold);
}

/* ---------- Table of contents list ---------- */
.toc-list { list-style: none; }
.toc-list li {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 1.05rem;
}
.toc-list li:first-child { border-top: 1px solid var(--color-border); }
.toc-list__num {
  font-family: var(--font-mono);
  color: var(--color-monitor);
  flex-shrink: 0;
}

/* ---------- Book cover ---------- */
.book-cover {
  max-width: clamp(240px, 70vw, 360px);
  margin: 3.5rem auto 0;
  display: flex;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,0.45));
}
.book-cover__spine {
  width: 12px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0A1C16, var(--color-monitor-dim));
  border-radius: 2px 0 0 2px;
}
.book-cover__face {
  flex: 1;
  aspect-ratio: 210 / 297;
  border: 1px solid rgba(227,181,115,0.25);
  border-left: none;
  border-radius: 0 2px 2px 0;
}

/* ---------- Why section ---------- */
.why-section__inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}
.why-section__text p { font-size: 1.06rem; }
.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--color-gold);
  margin-bottom: 1.2rem;
}
.signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-text);
  margin-top: 1.6rem;
}

/* ---------- Guarantee ---------- */
.guarantee { text-align: center; }
.guarantee__text {
  font-size: 1.1rem;
  color: var(--color-text-muted);
}

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }
.final-cta__inner { display: flex; flex-direction: column; align-items: center; }
.final-cta__headline {
  font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.3rem);
  line-height: 1.25;
  max-width: 20ch;
  margin-bottom: 2rem;
}
.final-cta .btn { margin-bottom: 1rem; }

/* ---------- FAQ / accordion ---------- */
.accordion__item { border-bottom: 1px solid var(--color-border); }
.accordion__item:first-child { border-top: 1px solid var(--color-border); }
.accordion__item h3 { margin: 0; }
.accordion__trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--color-text);
  padding: 1.3rem 2.2rem 1.3rem 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  cursor: pointer;
  position: relative;
}
.accordion__trigger::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  color: var(--color-monitor);
  font-size: 1.3rem;
  transition: transform 0.2s ease;
}
.accordion__trigger[aria-expanded="true"]::after {
  content: "\2212";
}
.accordion__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s ease;
}
.accordion__panel p {
  padding-bottom: 1.4rem;
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 60ch;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border-soft);
  padding: 2rem 0 3rem;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.site-footer a { color: var(--color-gold); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  body { font-size: 16.5px; }
  .hero { padding: 2.75rem 0 2rem; }
  .why-section__inner { grid-template-columns: 1fr; }
  .why-section__inner .img-placeholder { max-width: 220px; margin: 0 auto; }
  .site-header__inner .btn--small span.btn__price { display: none; }
}

@media (max-width: 480px) {
  .stage-list__item { gap: 1rem; }
  .wordmark { font-size: 0.88rem; }
  .site-header__inner { gap: 0.75rem; }
  .site-header__inner .btn--small { padding: 0.55em 0.85em; font-size: 0.68rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ekg--hero .ekg__flatline { opacity: 0; }
  .ekg--hero .ekg__pulse { opacity: 1; stroke-dashoffset: 0; animation: none; }
  .btn, .accordion__panel { transition: none; }
}
