/* =============================================================
   Epic Read-A-Thon 2026 — editorial letter treatment
   Monochrome coral on soft paper, bold Fraunces doing the work.
   Influences: annajona.is, diablaoutdoor.com.

   Re-theme knobs live in :root below. Changing --ink and --paper
   is enough to change the whole mood; changing the Fraunces axes
   on body/headings changes the typographic personality.
   ============================================================= */

:root {
  /* --- monochrome palette --- */
  --paper:      #fbe7e2;   /* soft pink cream, the page */
  --paper-warm: #f4d8d2;   /* a shade darker, for section breaks */
  --ink:        #c84656;   /* the one color, a deep coral */
  --ink-soft:   #d5697a;
  --ink-mute:   rgba(200, 70, 86, 0.55);

  /* --- one font, many weights --- */
  --font: "Fraunces", Georgia, "Times New Roman", serif;

  /* --- Fraunces variation axes (used as font-variation-settings) ---
     SOFT 0–100: roundness. 100 = full Anna-Jona round.
     WONK 0–1:   quirky alternates (curls, flourishes).
     opsz 9–144: optical size. Larger numbers = more display. */
  --axis-display: "opsz" 144, "SOFT" 100, "WONK" 1;
  --axis-body:    "opsz" 14,  "SOFT" 50,  "WONK" 0;

  /* --- rhythm --- */
  --measure: 34rem;       /* readable line length for body prose */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(3.5rem, 9vw, 7rem);
}

/* -------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-variation-settings: var(--axis-body);
  font-weight: 500;
  font-size: clamp(1.125rem, 0.9rem + 0.5vw, 1.3125rem);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}
a.link {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--ink-mute);
}
a.link:hover { text-decoration-color: var(--ink); }

em { font-style: italic; font-weight: 600; }
strong { font-weight: 700; }

.nowrap { white-space: nowrap; }

::selection { background: var(--ink); color: var(--paper); }

.skip {
  position: absolute; left: -9999px; top: auto;
  background: var(--ink); color: var(--paper);
  padding: 0.75rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
  border-radius: 4px;
}

/* -------------------------------------------------------------
   Top bar — deliberately quiet
   ------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 231, 226, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
}
.topbar__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topbar__home {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 700;
  font-variation-settings: "opsz" 24, "SOFT" 80, "WONK" 0;
}
.topbar__home img {
  /* The DISCO mark is an X with letters; its endpoints reach the corners,
     so a circular mask would clip them. Let it be square. */
  object-fit: contain;
}
.topbar__nav { display: flex; gap: 1.25rem; font-weight: 600; font-size: 0.95rem; }
.topbar__nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
@media (max-width: 36rem) {
  .topbar__nav { display: none; }
}

/* -------------------------------------------------------------
   Hero — the declaration
   ------------------------------------------------------------- */
.hero {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3rem, 10vw, 7rem) var(--gutter) clamp(3rem, 8vw, 5rem);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero__inner {
    /* Text on the left (wider column, flush-left block type),
       illustration on the right. */
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2rem, 5vw, 5rem);
  }
}

.hero__illustration {
  margin: 0;
  display: flex;
  justify-content: center;
}
.hero__illustration img {
  display: block;
  width: 100%;
  max-width: 28rem;
  height: auto;
  /* Bleed a touch into the coral paper so the illustration reads as part of the page */
  filter: drop-shadow(0 2px 0 rgba(200, 70, 86, 0.06));
}

.hero__eyebrow {
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 clamp(1.5rem, 4vw, 3rem);
  color: var(--ink-soft);
}

.hero__headline {
  font-weight: 800;
  font-variation-settings: var(--axis-display);
  /* Four <br>-separated lines:
       For 24 hours straight,
       we're going to read
       classic picture books.
       Out loud.
     Bumped up from 3rem to 3.5rem so the headline carries more weight. */
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
}
.hero__headline em {
  font-style: italic;
  font-weight: 800;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

.hero__subhead {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  /* Wider than the letter measure so the subhead has room to break
     without orphaning "Writers Corps." on its own line. */
  max-width: 38rem;
  font-weight: 500;
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* -------------------------------------------------------------
   Section sweeps (the big curved breaks)
   ------------------------------------------------------------- */
.sweep {
  display: block;
  width: 100%;
  height: clamp(3rem, 8vw, 6rem);
  margin: 0;
}
.sweep--paper-to-ink { fill: var(--paper-warm); }
.sweep--inner       { fill: var(--paper); }
.sweep + .letter    { background: var(--paper-warm); }
.sweep--inner + .letter { background: var(--paper); }

/* -------------------------------------------------------------
   The letter blocks — just big prose, one measure wide
   ------------------------------------------------------------- */
.letter {
  padding: var(--section-y) var(--gutter);
}
.letter > * {
  max-width: var(--measure);
  margin-inline: auto;
}
/* Use :where() to keep this rule's specificity flat so class selectors
   like .letter__lead and .letter__salutation win when they set font-size. */
.letter :where(p) { margin-block: 0 1.1em; font-size: 1.0625em; }
.letter :where(p:last-child) { margin-block-end: 0; }

.letter__salutation {
  font-weight: 600;
  font-size: 1.25em;
  margin-block: 0 1.5rem;
}

.letter__lead {
  font-weight: 700;
  font-variation-settings: "opsz" 48, "SOFT" 90, "WONK" 0;
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  margin-block: 0 1.2em;
  letter-spacing: -0.005em;
}

.letter__eyebrow {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-block: 0 1.25rem;
}

.letter__h2 {
  font-weight: 800;
  font-variation-settings: var(--axis-display);
  font-size: clamp(2rem, 1rem + 3.2vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-block: 0 1em;
}

/* Quote attribution that sits tight under a letter__h2 epigraph. */
.letter__h2:has(+ .letter__attribution) {
  margin-block-end: 0.5rem;
}
.letter__attribution {
  margin-block: 0 1.5em;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* In-letter illustration plate — sits centered between paragraphs,
   like an old-school inset illustration in a letterpress book. */
.letter__plate {
  margin-block: clamp(2rem, 4vw, 3rem);
  margin-inline: auto;
  max-width: 30rem;
  width: 100%;
}
.letter__plate img {
  display: block;
  width: 100%;
  height: auto;
}
.letter__h2 em {
  font-style: italic; font-weight: 800;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

/* -------------------------------------------------------------
   Photo spread — rounded frames on warm paper
   ------------------------------------------------------------- */
.spread {
  background: var(--paper-warm);
  /* Pull the spread up well into the letter section's bottom padding so
     Christopher Robin sits about half an inch below the closing line. */
  padding: 0 var(--gutter) clamp(2rem, 6vw, 4rem);
  margin-top: -4.5rem;
}
.spread__figure {
  margin: 0 auto;
  max-width: 62rem;
  width: 100%;
}
.spread__figure--wide { margin-bottom: clamp(1.5rem, 3vw, 2rem); }

.spread__pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  max-width: 62rem;
  margin: 0 auto;
}
@media (min-width: 40rem) {
  .spread__pair { grid-template-columns: 1fr 1fr; }
}
.spread__pair .spread__figure { max-width: none; margin: 0; }

.spread__placeholder {
  aspect-ratio: 16 / 10;
  border-radius: 1.5rem;
  background:
    linear-gradient(135deg, var(--paper) 0%, var(--paper-warm) 100%);
  border: 1px dashed var(--ink-mute);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 1.25rem;
  position: relative;
}
.spread__pair .spread__placeholder { aspect-ratio: 1 / 1; }

/* Illustration treatment — each art piece gets a paper frame so it sits
   on the warm-paper band like a mounted print. */
.spread__art {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--paper);
  border-radius: 1.25rem;
  object-fit: contain;
  aspect-ratio: 4 / 3;
}
.spread__art--wide { aspect-ratio: 16 / 10; max-height: 40rem; }
.spread__pair .spread__art { aspect-ratio: 1 / 1; }

/* Solo image variant — let the Christopher Robin portrait keep its
   natural proportions on the warm-paper band, with a frame that
   matches the surrounding section so the image reads as floating
   on the page rather than mounted on a separate cream card. */
.spread__figure--solo {
  margin: 0 auto;
  max-width: 28rem;
}
.spread__art--solo {
  aspect-ratio: auto;
  max-height: 30rem;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  background: var(--paper-warm);
}

.spread figcaption {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-top: 0.75rem;
  font-style: italic;
}

/* -------------------------------------------------------------
   Tiers — inline display type, not cards
   ------------------------------------------------------------- */
.tiers {
  margin: clamp(2rem, 5vw, 3rem) auto;
  display: grid;
  gap: clamp(1.5rem, 3vw, 2rem);
}

.tier {
  border-top: 1px solid var(--ink-mute);
  padding-top: clamp(1rem, 2vw, 1.5rem);
}
.tier:last-child { border-bottom: 1px solid var(--ink-mute); padding-bottom: clamp(1rem, 2vw, 1.5rem); }

.tier__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.tier__name {
  font-variation-settings: var(--axis-display);
  font-weight: 800;
  font-size: clamp(2rem, 1.2rem + 2.4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
}

.tier__price {
  font-variation-settings: "opsz" 24, "SOFT" 40, "WONK" 0;
  font-weight: 700;
  font-size: clamp(1.25rem, 0.9rem + 0.6vw, 1.625rem);
  margin: 0;
  white-space: nowrap;
}

.tier__body {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  max-width: 38rem;
}

/* -------------------------------------------------------------
   Inline CTAs — pill buttons, the page's one "UI moment"
   ------------------------------------------------------------- */
.inline-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem !important;
}

/* On phones, stack the CTAs and stretch them to equal width so a row
   of buttons reads as a clear pair instead of one wide + one narrow. */
@media (max-width: 32rem) {
  .inline-ctas { flex-direction: column; align-items: stretch; }
  .inline-ctas .btn { width: 100%; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 1rem;
  font-variation-settings: "opsz" 14, "SOFT" 30, "WONK" 0;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.btn:hover {
  background: transparent;
  color: var(--ink);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

/* -------------------------------------------------------------
   FAQ as a description list
   ------------------------------------------------------------- */
.qa {
  margin-block: 0;
  display: grid;
  gap: 1.5rem;
}
.qa dt {
  font-variation-settings: "opsz" 48, "SOFT" 80, "WONK" 0;
  font-weight: 700;
  font-size: clamp(1.25rem, 0.9rem + 0.6vw, 1.625rem);
  margin-bottom: 0.25rem;
}
.qa dd {
  margin-inline: 0;
  margin-block: 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.letter--faq { background: var(--paper-warm); }

/* -------------------------------------------------------------
   Signature / sign-off
   ------------------------------------------------------------- */
.signoff {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter) clamp(4rem, 10vw, 7rem);
  text-align: center;
}
.signoff__line {
  /* Bottom margin gives space before the DISCO mark below. */
  margin: 0 0 2rem;
  font-size: clamp(1.25rem, 0.9rem + 0.7vw, 1.625rem);
  font-style: italic;
  color: var(--ink-soft);
}
.signoff__name {
  margin: 0.5rem 0 0;
  font-variation-settings: var(--axis-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 1rem + 3.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.01em;
}
.signoff__role {
  margin: 0.25rem 0 2rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
  font-style: italic;
}
.signoff__mark img {
  width: 4.5rem; height: 4.5rem;
  margin: 0 auto;
  object-fit: contain;
}

/* -------------------------------------------------------------
   Footer
   ------------------------------------------------------------- */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding: 2.5rem var(--gutter) 2.5rem;
}
.foot__inner {
  max-width: 72rem;
  margin: 0 auto;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.foot a.link { text-decoration-color: rgba(251, 231, 226, 0.5); }
.foot a.link:hover { text-decoration-color: var(--paper); }
.foot__copy {
  margin: 1rem 0 0;
  opacity: 0.7;
  font-size: 0.8125rem;
}

/* -------------------------------------------------------------
   Prefers reduced motion
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
