/* ============================================================
   LOVE ON THE CLOUDS — Editorial Sales Experience
   Design system derived from the book cover's own palette:
   open sky, drifting clouds, interlocked gold rings, and a
   green valley below.
   ============================================================ */

:root {
  /* ---- Color: pulled from the cover art, not a stock palette ---- */
  --color-page: #F6FAFD;           /* page background — soft sky white */
  --color-page-deep: #E9F1F8;      /* section shading — cloud shadow */
  --color-ink: #23344A;            /* primary text — deep sky-navy */
  --color-slate: #4C6178;          /* secondary text — dusk blue-grey */
  --color-gold: #D4A94A;           /* accent — the interlocked rings */
  --color-gold-deep: #B07F26;      /* accent — deeper gold, CTAs */
  --color-sage: #6E9574;           /* cool counter-note — the valley */
  --color-line: rgba(35, 52, 74, 0.13); /* hairline dividers */
  --color-white: #FFFFFF;

  /* ---- 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);
}

/* ---- Reset ---- */
* { 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-ink);
}

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 a bird in flight
   A bird glides along the top of the page as the reader
   scrolls, echoing the birds drifting through the cover art.
   ============================================================ */
.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-sage), var(--color-gold));
  width: 0%;
  transition: width 0.1s linear;
}

.sunset-progress__sun {
  position: absolute;
  top: -9px;
  left: 0;
  width: 22px;
  height: 22px;
  transform: translateX(-50%);
  transition: left 0.1s linear;
  will-change: left;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23D4A94A' d='M32 20c-6-10-20-13-30-9 8 2 14 7 17 13-9-2-19 1-25 8 9-1 18 2 23 8-8 1-15 6-19 13 8-4 17-5 25-2-3 7-3 15 0 22 3-8 9-14 16-17 7 3 13 9 16 17 3-7 3-15 0-22 8-3 17-2 25 2-4-7-11-12-19-13 5-6 14-9 23-8-6-7-16-10-25-8 3-6 9-11 17-13-10-4-24-1-30 9-6-10-20-13-30-9 8 2 14 7 17 13z' opacity='0'/%3E%3Cpath fill='%23D4A94A' d='M32 26c-3-6-11-9-18-7 5 1 9 4 11 8-6-1-12 1-16 5 6 0 11 2 14 5-5 1-9 4-11 8 5-2 10-3 15-1-2 4-2 9 0 13 2-4 5-7 9-9 4 2 7 5 9 9 2-4 2-9 0-13 5-2 10-1 15 1-2-4-6-7-11-8 3-3 8-5 14-5-4-4-10-6-16-5 2-4 6-7 11-8-7-2-15 1-18 7z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ============================================================
   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.6rem, 6vw, 4.2rem); }
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.5rem;
  font-style: italic;
  color: var(--color-slate);
  line-height: 1.5;
}

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

blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  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 (email capture)
   ============================================================ */
.gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(246, 250, 253, 0.88);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  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.9rem, 5vw, 2.4rem); 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(176, 127, 38, 0.28);
}

.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(176, 127, 38, 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: 560px; 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(35, 52, 74, 0.3);
}

.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(35, 52, 74, 0.18);
}

.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; } }

/* ============================================================
   STAGES OF LOVE (the poem-journey list, 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; }

/* ============================================================
   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);
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.final-cta { text-align: center; }

/* ============================================================
   FOOTER
   ============================================================ */
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; }
}
