/* ============================================================
   OUR BROKEN HOME — Editorial Sales Experience
   Design system derived from the book cover's own palette:
   an overcast sky, weathered stone, a cracked gate, and warm
   interior light breaking through the grey.
   ============================================================ */

:root {
  /* ---- Color: pulled from the cover art, not a stock palette ---- */
  --color-page: #F2EEE6;           /* page background — weathered stone/paper */
  --color-page-deep: #E7E0D3;      /* section shading */
  --color-ink: #2E2A24;            /* primary text — deep umber-charcoal */
  --color-slate: #5C6570;          /* secondary text — overcast sky grey */
  --color-gold: #C99A45;           /* accent — the warm light breaking through */
  --color-gold-deep: #A67A2E;      /* accent — deeper gold, CTAs */
  --color-storm: #6E7C89;          /* cool counter-note — the storm sky */
  --color-line: rgba(46, 42, 36, 0.14); /* hairline dividers */
  --color-white: #FFFDF8;

  /* ---- Type ---- */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --measure: 720px;

  /* ---- Spacing scale ---- */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--color-page);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--color-gold); color: var(--color-white); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-gold-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   SIGNATURE ELEMENT — reading progress as light breaking
   through a crack. The line starts as a hairline fracture in
   cool grey and fills with warm gold light as the reader
   moves through the book's argument, top to bottom.
   ============================================================ */
.sunset-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-line);
  z-index: 500;
}

.sunset-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-storm), var(--color-gold));
  width: 0%;
  transition: width 0.1s linear;
}

.sunset-progress__sun {
  position: absolute;
  top: -5px;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFE7B4, var(--color-gold) 60%, var(--color-gold-deep));
  box-shadow: 0 0 10px rgba(201, 154, 69, 0.65);
  transform: translateX(-50%);
  transition: left 0.1s linear;
  will-change: left;
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.container { max-width: var(--measure); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; }
.section--tight { padding: var(--space-lg) 0; }
.section--shaded { background: var(--color-page-deep); }

.divider { width: 48px; height: 1px; background: var(--color-slate); opacity: 0.4; margin: var(--space-lg) auto; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold-deep);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  color: var(--color-ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: var(--space-sm); }

p { margin-bottom: var(--space-sm); color: var(--color-ink); }

.lede { font-family: var(--font-display); font-size: 1.45rem; font-style: italic; color: var(--color-slate); line-height: 1.5; }

.article-body p { font-size: 1.15rem; line-height: 1.85; color: #3A342C; margin-bottom: 1.4rem; }

blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-style: italic;
  color: var(--color-slate);
  line-height: 1.4;
  border-left: 2px solid var(--color-gold);
  padding: var(--space-sm) 0 var(--space-sm) var(--space-md);
  margin: var(--space-lg) 0;
}

.pull-quote { text-align: center; border: none; padding: 0 var(--space-md); margin: var(--space-xl) auto; max-width: 560px; position: relative; }
.pull-quote::before { content: ''; display: block; width: 32px; height: 1px; background: var(--color-gold); margin: 0 auto var(--space-sm); }

/* ============================================================
   READING GATE
   ============================================================ */
.gate {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-md);
  background: rgba(242, 238, 230, 0.9);
  backdrop-filter: blur(14px) saturate(110%);
  -webkit-backdrop-filter: blur(14px) saturate(110%);
  opacity: 1;
  transition: opacity 0.7s var(--ease), visibility 0.7s var(--ease);
}

.gate[data-hidden="true"] { opacity: 0; visibility: hidden; pointer-events: none; }
.gate__card { max-width: 460px; text-align: center; animation: gateRise 0.9s var(--ease) both; }

@keyframes gateRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.gate__headline { font-size: clamp(1.8rem, 5vw, 2.3rem); margin-bottom: var(--space-sm); }
.gate__body { color: var(--color-slate); font-size: 1.05rem; line-height: 1.75; margin-bottom: var(--space-md); }
.gate__form { display: flex; flex-direction: column; gap: 0.75rem; }

.gate__input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--color-line);
  background: var(--color-white);
  border-radius: 6px;
  color: var(--color-ink);
  transition: border-color 0.25s var(--ease);
}

.gate__input:focus { border-color: var(--color-gold-deep); outline: none; }
.gate__error { color: var(--color-gold-deep); font-size: 0.85rem; min-height: 1.2em; text-align: left; }
.gate__privacy { margin-top: var(--space-md); font-size: 0.8rem; color: var(--color-slate); opacity: 0.8; }

.article-locked { filter: blur(6px); user-select: none; pointer-events: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 1rem 2rem; border: none; border-radius: 6px; cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.btn--primary {
  background: linear-gradient(120deg, var(--color-gold), var(--color-gold-deep));
  color: var(--color-white);
  box-shadow: 0 8px 22px rgba(166, 122, 46, 0.28);
}

.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(166, 122, 46, 0.38); }
.btn--full { width: 100%; }
.btn--ghost { background: transparent; color: var(--color-ink); border: 1px solid var(--color-line); }
.btn--ghost:hover { border-color: var(--color-slate); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: var(--space-xl) 0 var(--space-lg); text-align: center; }
.hero__eyebrow { justify-content: center; display: flex; }
.hero__title { margin-bottom: var(--space-sm); }
.hero__lede { max-width: 580px; margin: 0 auto var(--space-md); }
.hero__ctas { display: flex; gap: var(--space-sm); justify-content: center; flex-wrap: wrap; margin-top: var(--space-md); }

/* ============================================================
   BOOK SECTION
   ============================================================ */
.book-feature { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-lg); align-items: center; }
.book-feature__cover img { border-radius: 4px; box-shadow: 0 30px 60px -20px rgba(46, 42, 36, 0.32); }
.book-feature__title { margin-bottom: var(--space-xs); }
.book-feature__subtitle { font-family: var(--font-display); font-style: italic; color: var(--color-slate); margin-bottom: var(--space-md); }

@media (max-width: 640px) {
  .book-feature { grid-template-columns: 1fr; text-align: center; }
  .book-feature__cover img { max-width: 220px; margin: 0 auto; }
}

/* ============================================================
   AUTHOR SECTION
   ============================================================ */
.author { display: flex; gap: var(--space-md); align-items: center; }

.author__photo {
  width: 120px; height: 120px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  box-shadow: 0 12px 24px rgba(46, 42, 36, 0.2);
}

.author__photo img { width: 100%; height: 100%; object-fit: cover; }
.author__name { margin-bottom: 0.25rem; }
.author__role { color: var(--color-slate); font-size: 0.95rem; margin-bottom: var(--space-sm); }

@media (max-width: 640px) { .author { flex-direction: column; text-align: center; } }

/* ============================================================
   INSIDE THE BOOK (theme-by-theme breakdown, unique to this book)
   ============================================================ */
.stages { display: grid; gap: var(--space-md); }
.stage { display: grid; grid-template-columns: 44px 1fr; gap: var(--space-sm); align-items: start; }

.stage__marker {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-page-deep); border: 1px solid var(--color-line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-style: italic; color: var(--color-gold-deep); font-size: 1.1rem;
}

.stage__title { font-family: var(--font-display); font-size: 1.3rem; color: var(--color-ink); margin-bottom: 0.2rem; }
.stage__poems { font-size: 0.85rem; color: var(--color-gold-deep); font-style: italic; margin-bottom: 0.35rem; }
.stage__text { color: var(--color-slate); font-size: 1rem; line-height: 1.7; }

/* ============================================================
   "WHO NEEDS TO READ THIS" LIST
   ============================================================ */
.audience-list { list-style: none; display: grid; gap: 0.9rem; max-width: 560px; margin: var(--space-md) auto 0; }

.audience-list li {
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 1.05rem; color: var(--color-ink); line-height: 1.6;
}

.audience-list li::before {
  content: '';
  flex-shrink: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-gold);
  margin-top: 0.55em;
}

/* ============================================================
   ENDORSEMENTS
   ============================================================ */
.endorsements { display: grid; gap: var(--space-md); }

.endorsement { padding: var(--space-md); background: var(--color-white); border: 1px solid var(--color-line); border-radius: 8px; }
.endorsement__quote { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--color-ink); margin-bottom: var(--space-sm); line-height: 1.5; }
.endorsement__attribution { font-size: 0.85rem; color: var(--color-slate); font-weight: 600; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-item { border-bottom: 1px solid var(--color-line); }
.faq-item:first-child { border-top: 1px solid var(--color-line); }

.faq-question {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 1.4rem 0; display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm);
  font-family: var(--font-display); font-size: 1.2rem; color: var(--color-ink);
}

.faq-question__icon { flex-shrink: 0; width: 20px; height: 20px; position: relative; transition: transform 0.35s var(--ease); }
.faq-question__icon::before, .faq-question__icon::after { content: ''; position: absolute; background: var(--color-gold-deep); top: 50%; left: 50%; transform: translate(-50%, -50%); }
.faq-question__icon::before { width: 14px; height: 2px; }
.faq-question__icon::after { width: 2px; height: 14px; transition: opacity 0.3s var(--ease); }
.faq-item[data-open="true"] .faq-question__icon { transform: rotate(180deg); }
.faq-item[data-open="true"] .faq-question__icon::after { opacity: 0; }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.faq-answer__inner { padding-bottom: 1.4rem; color: var(--color-slate); line-height: 1.75; }

/* ============================================================
   OFFER + COUNTDOWN
   ============================================================ */
.offer { text-align: center; background: var(--color-page-deep); border-radius: 16px; padding: var(--space-lg) var(--space-md); }
.countdown { display: flex; justify-content: center; gap: var(--space-sm); margin: var(--space-md) 0; }

.countdown__unit { min-width: 72px; padding: 0.9rem 0.5rem; background: var(--color-white); border: 1px solid var(--color-line); border-radius: 8px; }
.countdown__value { font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--color-ink); display: block; }
.countdown__label { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-slate); }

.offer__expired { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--color-slate); margin: var(--space-md) 0; }
.price-tag { font-family: var(--font-display); font-size: 1.6rem; color: var(--color-gold-deep); margin-bottom: var(--space-sm); }

.bonus-note {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-white);
  border: 1px dashed var(--color-line);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--color-slate);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   FINAL CTA / FOOTER
   ============================================================ */
.final-cta { text-align: center; }
footer { padding: var(--space-lg) 0; text-align: center; color: var(--color-slate); font-size: 0.85rem; border-top: 1px solid var(--color-line); }

/* ============================================================
   REVEAL-ON-SCROLL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal[data-visible="true"] { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  body { font-size: 16.5px; }
  .container { padding: 0 var(--space-sm); }
  .countdown__unit { min-width: 60px; }
}
