/* Books under Fire — style.css
   Dark scheme matching the Instagram campaign posters:
   near-black backgrounds, cream type, gold accent words. */

:root {
  --bg: #0d0c0a;              /* poster black */
  --bg-raised: #17140f;       /* slightly lifted panel */
  --bg-panel: #1f1a14;        /* cards */
  --line: rgba(243, 234, 217, 0.14);
  --cream: #f3ead9;           /* poster body type */
  --cream-muted: rgba(243, 234, 217, 0.72);
  --cream-faint: rgba(243, 234, 217, 0.45);
  --gold: #e8a21f;            /* accent words */
  --gold-deep: #c8871a;
  --gold-faint: rgba(232, 162, 31, 0.32);  /* subdued gold for card borders */
  --ember: #b83a11;           /* from the logo, used sparingly */
  --flag-blue: #0c589e;
  --flag-yellow: #e8a903;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 60ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(3.5rem, 8vw, 7rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cream); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 0.5em;
  color: var(--cream);
  text-wrap: balance;
}
h2 { font-size: clamp(2.4rem, 5.5vw, 4rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.6rem, 2.6vw, 2rem); }

/* Accent words: Cormorant Bold, gold */
.accent, h1 .accent, h2 .accent, h3 .accent {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
}
p .accent { font-size: 1.15em; line-height: 1; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

.wrap { width: min(100% - 2 * var(--gutter), 74rem); margin-inline: auto; }
.prose { max-width: var(--measure); }
.muted { color: var(--cream-muted); }

/* Eyebrow: Montserrat caps, thin rule, like the divider line in the posters */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.25rem;
}
.rule {
  width: 4.5rem;
  height: 1px;
  background: var(--cream);
  opacity: 0.6;
  margin: 1.5rem 0;
}

/* ---------- Header ---------- */

.site-header { position: absolute; inset: 0 0 auto 0; z-index: 10; padding: 1.1rem 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: var(--cream);
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.25rem; letter-spacing: 0.01em;
}
.brand img { width: 48px; height: 48px; flex: none; }
.brand span { white-space: nowrap; }
.brand .accent { font-size: 1em; }
.site-nav { display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); flex-wrap: wrap; }
.site-nav a {
  color: var(--cream); text-decoration: none;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.25rem 0; border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--gold); color: var(--cream); }
.site-header--solid { position: static; background: var(--bg); border-bottom: 1px solid var(--line); }
@media (max-width: 40rem) {
  .brand > span { display: none; }
  .brand img { width: 42px; height: 42px; }
  .site-nav { gap: 0.9rem; }
  .site-nav a { font-size: 0.72rem; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative; min-height: 100svh;
  display: grid; align-items: end;
  isolation: isolate; overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
  filter: saturate(0.85) contrast(1.05);
}
/* Poster treatment: heavy dark vignette, warm at the edges */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(13, 12, 10, 0.97) 0%, rgba(13, 12, 10, 0.78) 40%, rgba(13, 12, 10, 0.35) 70%, rgba(13, 12, 10, 0.6) 100%),
    linear-gradient(to right, rgba(13, 12, 10, 0.6) 0%, rgba(13, 12, 10, 0) 60%);
}
.hero .wrap { padding-block: clamp(6.5rem, 15vh, 10rem) clamp(2.5rem, 6vh, 4rem); }

.hero__lede {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  font-weight: 600; line-height: 1.0; letter-spacing: -0.01em;
  max-width: 18ch; margin: 0 0 1.75rem; color: var(--cream);
}
.hero__lede .cycle {
  display: inline-block; position: relative; text-align: left;
  font-weight: 700; color: var(--gold); vertical-align: baseline;
}
.hero__lede .cycle .word {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  opacity: 0; transform: translateY(0.12em); filter: blur(0);
  transition: opacity 0.55s ease, transform 0.55s ease, filter 0.55s ease;
}
.hero__lede .cycle .word.is-active { position: relative; opacity: 1; transform: translateY(0); }
.hero__lede .cycle .word.is-leaving { opacity: 0; transform: translateY(-0.3em); filter: blur(2px); }
.hero__lede .cycle .word::after { content: "."; color: var(--cream); font-weight: 600; }

.hero__sub {
  max-width: 46ch; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.6;
  color: var(--cream-muted); margin-bottom: 2.25rem;
}
.hero__sub .accent { font-size: 1.25em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero__caption { margin-top: 2.5rem; font-size: 0.72rem; letter-spacing: 0.06em; color: var(--cream-faint); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block; padding: 0.95rem 1.6rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  border: 1px solid transparent; border-radius: 0; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn--primary { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.btn--primary:hover { background: var(--cream); border-color: var(--cream); color: var(--bg); }
.btn--ghost { background: transparent; color: var(--cream); border-color: rgba(243, 234, 217, 0.5); }
.btn--ghost:hover { border-color: var(--cream); color: var(--cream); }

/* ---------- Sections ---------- */

.section { padding-block: var(--section-pad); }
.section--raised { background: var(--bg-raised); }
.section + .section { border-top: 1px solid var(--line); }

/* Why */
.why { display: grid; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
@media (min-width: 60rem) { .why { grid-template-columns: 1.3fr 1fr; } }
.why__logo { max-width: 24rem; margin-inline: auto; }
.why__logo img { width: 100%; }

.timeline { list-style: none; padding: 0; margin: 2rem 0 0; border-left: 1px solid var(--cream-faint); }
.timeline li { position: relative; padding: 0 0 1.2rem 1.5rem; color: var(--cream-muted); }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 0.7em;
  width: 9px; height: 9px; background: var(--bg-raised); border: 1px solid var(--gold); border-radius: 50%;
}
.timeline li:last-child::before { background: var(--gold); }
.timeline .year {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  color: var(--gold); display: block; line-height: 1.2;
}

.fn-ref { font-size: 0.7em; line-height: 0; margin-left: 0.15em; }
.fn-ref a { color: var(--gold); text-decoration: none; }
.fn-ref a:hover, .fn-ref a:focus { text-decoration: underline; }

.footnotes {
  margin: 1.5rem 0 0; padding-left: 1.2rem;
  font-size: 0.8rem; color: var(--cream-faint);
}
.footnotes li { padding-left: 0.2rem; }
.footnotes a { color: var(--cream-muted); }
.fn-back { margin-left: 0.3em; text-decoration: none; }

/* Act */
.acts { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
@media (min-width: 52rem) { .acts { grid-template-columns: repeat(3, 1fr); } }
.act {
  background: var(--bg-panel); border: 1px solid var(--gold-faint);
  padding: 2rem 1.6rem 1.75rem; display: flex; flex-direction: column; gap: 0.75rem;
}
.act h3 { margin-bottom: 0.25rem; }
.act p { flex: 1; color: var(--cream-muted); }
.act .btn { align-self: flex-start; margin-top: 0.75rem; }
.act ul { margin: 0; padding-left: 1.1rem; color: var(--cream-muted); }
.act li { margin-bottom: 0.4rem; }
.share-tag { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3.5vw, 2.4rem); color: var(--gold); }
.share-links { color: var(--cream-muted); }

/* How to buy: numbered because it is an ordered process */
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; counter-reset: step; display: grid; gap: 1.5rem; }
.steps > li {
  counter-increment: step; display: grid; grid-template-columns: 3.5rem 1fr; gap: 1.25rem;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--line);
}
.steps > li:last-child { border-bottom: 0; }
.steps > li::before {
  content: counter(step); font-family: var(--font-display); font-weight: 700;
  font-size: 2.8rem; line-height: 1; color: var(--gold);
}
.steps h3 { margin-bottom: 0.4rem; }
.steps p { color: var(--cream-muted); }

.stores { display: grid; gap: 0.75rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
@media (min-width: 40rem) { .stores { grid-template-columns: repeat(2, 1fr); } }
.stores li { background: var(--bg-panel); border: 1px solid var(--line); padding: 1rem 1.15rem; }
.stores .store-name { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; display: block; color: var(--cream); line-height: 1.2; }
.stores .store-meta { font-size: 0.85rem; color: var(--cream-muted); }

.note { background: var(--bg-panel); border-left: 2px solid var(--gold); padding: 1rem 1.25rem; margin-top: 2rem; }

/* FAQ */
.faq { margin-top: 2rem; max-width: var(--measure); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0;
  font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; line-height: 1.2;
  color: var(--cream); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 0.9rem;
  font-size: 1.8rem; font-weight: 500; color: var(--gold); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 1.4rem; max-width: 58ch; color: var(--cream-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--cream-faint); padding: 2.5rem 0; font-size: 0.82rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--cream-muted); }
.flag {
  display: inline-block; width: 1.1em; height: 0.75em; vertical-align: -0.05em; margin-right: 0.45em;
  background: linear-gradient(to bottom, var(--flag-blue) 50%, var(--flag-yellow) 50%);
}

/* Skip link */
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--gold); color: var(--bg); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 0.5rem; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__lede .cycle .word { transition: none; }
}
.cycle--static .word { position: static !important; opacity: 1 !important; transform: none !important; filter: none !important; display: inline; }
.cycle--static .word::after { content: " · "; }
.cycle--static .word:last-child::after { content: "."; }
