/* Savage Pilgrim — pre-order page.
   Same fabric as the narratives site: Fraunces, grain, ink and sindoor.
   Static. No scroll theatre. The cover is the picture; the words sell it. */

:root {
  --ink: #131015;
  --paper: #ece4d6;
  --paper-dim: #a99d88;
  --vermillion: #d4491a;
  --measure: 34rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 380;
  background: var(--ink);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Paper grain — same as the home page */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

main.book {
  position: relative;
  z-index: 1;
  padding: 0 1.25rem 4rem;
  max-width: 64rem;
  margin: 0 auto;
}

/* Offer — cover first, then the words, then the button */
.offer {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  padding: 3rem 0 3.5rem;
  text-align: center;
}

.cover {
  width: min(78vw, 22rem);
  flex: none;
  /* A warm lamp behind the book */
  position: relative;
}

.cover::before {
  content: "";
  position: absolute;
  inset: -18% -30%;
  background: radial-gradient(ellipse 55% 55% at 50% 50%, rgba(212, 73, 26, 0.28), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 22px 50px -18px rgba(0, 0, 0, 0.85),
    0 8px 18px -8px rgba(0, 0, 0, 0.7);
}

.offer-copy {
  max-width: 26rem;
}

.label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--vermillion);
  margin-bottom: 1.1rem;
}

h1 {
  font-size: clamp(2.8rem, 12vw, 4.6rem);
  line-height: 0.98;
  font-weight: 640;
  letter-spacing: -0.03em;
}

h1 em {
  font-style: italic;
  font-weight: 340;
  color: var(--vermillion);
}

.tagline {
  margin-top: 1.1rem;
  font-size: clamp(1.2rem, 4.8vw, 1.5rem);
  line-height: 1.3;
  font-weight: 320;
  opacity: 0.85;
}

/* Price — one number leans forward, the old one steps back */
.price {
  margin-top: 2.2rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  line-height: 1;
}

.price s {
  font-size: 1.25rem;
  font-weight: 340;
  opacity: 0.5;
  text-decoration-thickness: 1px;
}

.price .now {
  font-size: clamp(2.2rem, 9vw, 3rem);
  font-weight: 560;
  letter-spacing: -0.02em;
}

.price .off {
  flex-basis: 100%;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--vermillion);
  margin-top: 0.2rem;
}

.terms {
  margin-top: 1.3rem;
  font-size: 1rem;
  line-height: 1.5;
  color: rgba(236, 228, 214, 0.72);
}

/* The pre-release benefit — the one line that says why now */
.terms .signed {
  font-style: italic;
  color: var(--vermillion);
}

/* The button — the only loud object on the page */
.buy {
  display: inline-block;
  margin-top: 2rem;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 560;
  background: var(--vermillion);
  color: var(--paper);
  text-decoration: none;
  padding: 1rem 2.8rem;
  border-radius: 2px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.buy:hover { background: #b93c12; }
.buy:active { transform: translateY(1px); }
.buy:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

.secure {
  margin-top: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.55;
}

/* Pull quotes — the flap lines, set as the big quiet truths */
.pull {
  padding: 5rem 0;
  text-align: center;
}

.pull p {
  max-width: 20ch;
  margin: 0 auto;
  font-size: clamp(1.75rem, 7.2vw, 2.9rem);
  line-height: 1.18;
  font-weight: 310;
  letter-spacing: -0.015em;
  font-style: italic;
}

/* Blurb — the back cover, at reading size */
.blurb {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1rem 0;
}

.blurb p {
  font-size: clamp(1.1rem, 4.2vw, 1.3rem);
  line-height: 1.55;
}

.blurb p + p,
.blurb figure + p { margin-top: 1.4em; }

/* The author, as on the back cover: a round portrait the words wrap around */
.blurb .author {
  --size: clamp(5.5rem, 24vw, 8rem);
  float: left;
  width: var(--size);
  height: var(--size);
  margin: 0.35em 1.4rem 0.6rem 0;
  shape-outside: circle(50%);
}

.blurb .author img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(1);
}

.blurb .lede {
  font-size: clamp(1.35rem, 5.4vw, 1.7rem);
  line-height: 1.4;
  font-weight: 480;
}

.blurb .close { clear: both; }

.blurb .close em {
  font-style: italic;
  color: var(--vermillion);
}

/* Second ask — for the reader who read first */
.again {
  padding: 2rem 0 3rem;
  text-align: center;
}

.again .price { margin-top: 0; }

/* Bookend */
footer {
  position: relative;
  z-index: 1;
  padding: 4rem 1.25rem 5rem;
  border-top: 1px solid rgba(236, 228, 214, 0.12);
  text-align: center;
}

footer .inner { max-width: 32rem; margin: 0 auto; }

.bio {
  font-size: 0.95rem;
  line-height: 1.65;
  opacity: 0.6;
}

.bio a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--vermillion);
  white-space: nowrap;
}

.bio a:hover { color: var(--vermillion); }

/* Wider screens — the book sits beside the words */
@media (min-width: 780px) {
  .offer {
    flex-direction: row;
    justify-content: center;
    gap: clamp(3rem, 7vw, 6rem);
    text-align: left;
    padding: 4rem 0;
  }

  .cover { width: clamp(18rem, 32vw, 24rem); }

  .offer-copy { max-width: 24rem; }

  .offer .price { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .buy { transition: none; }
}
