/* ============================================================
   The Binder's Tales — Jonathan Orozco
   Palette sampled from the Keep the Fire In cover:
   rain-blue night, wet stone, one fire in the dark.
   ============================================================ */

:root {
  /* Night */
  --night-deep:  #070E1A;
  --night:       #0B1526;
  --night-soft:  #101E33;
  --stone:       #182B44;
  --stone-lit:   #23385A;

  /* Rain-light */
  --ice:         #CFE3F5;
  --ice-dim:     #9FBEDC;
  --sky:         #7FA6CC;
  --mute:        #6C86A3;

  /* Fire */
  --fire:        #E8912B;
  --fire-deep:   #C05A17;
  --fire-pale:   #F5BE72;

  /* Roles */
  --bg:      var(--night);
  --panel:   var(--night-soft);
  --card:    var(--stone);
  --head:    var(--ice);
  --body:    #C2D4E6;
  --muted:   var(--mute);

  /* Type */
  --display: "Cormorant Garamond", Georgia, serif;
  --serif:   "EB Garamond", Georgia, "Times New Roman", serif;
  --script:  "Kaushan Script", "Brush Script MT", cursive;
  --sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Motion */
  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --gate:      cubic-bezier(0.65, 0, 0.2, 1);

  /* Space */
  --rule: 1px solid rgba(159, 190, 220, 0.14);
  --radius: 12px;
  --max: 1160px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  --shadow-book: 0 34px 80px rgba(0, 0, 0, 0.7), 0 0 90px rgba(232, 145, 43, 0.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
canvas { display: block; }
a { color: var(--sky); text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--fire); }
::selection { background: var(--fire-deep); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--head);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0.01em;
  margin: 0 0 0.55em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: 0.02em; }
p { margin: 0 0 1.15em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
em { font-style: italic; }

.fire-word { font-family: var(--script); color: var(--fire); font-weight: 400; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sky);
  margin: 0 0 1rem;
  font-weight: 500;
}
.lede { font-size: 1.22rem; color: #D6E4F2; }
.muted { color: var(--muted); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 1.5rem; }
.narrow { max-width: 720px; margin-inline: auto; }
section { padding: clamp(4.5rem, 9vw, 8rem) 0; position: relative; }
.section-alt { background: var(--panel); border-block: var(--rule); }
/* A third surface, so two shaded sections never sit flush against each other
   and read as one block. Faint diagonal rain, at the angle of the cover art. */
.section-rain {
  background-color: #0C1828;
  background-image:
    repeating-linear-gradient(114deg,
      rgba(159,190,220,0.055) 0px, rgba(159,190,220,0.055) 1px,
      transparent 1px, transparent 13px),
    radial-gradient(90% 60% at 50% 0%, rgba(232,145,43,0.05), transparent 70%);
  border-block: var(--rule);
}
.center { text-align: center; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }

/* ---------- Ornament ---------- */
.orn {
  display: flex; align-items: center; justify-content: center; gap: 0.9rem;
  color: var(--fire); font-size: 0.8rem; margin: 1.4rem 0 1.9rem;
}
.orn::before, .orn::after {
  content: ""; height: 1px; width: clamp(50px, 12vw, 130px);
  background: linear-gradient(90deg, transparent, rgba(232,145,43,0.55));
}
.orn::after { background: linear-gradient(90deg, rgba(232,145,43,0.55), transparent); }
.center .orn, .orn { margin-inline: auto; }
/* left-aligned variant: glyph first, one rule trailing off to the right */
.orn.orn-left { justify-content: flex-start; margin-inline: 0; }
.orn.orn-left::before { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 80;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease), backdrop-filter 0.45s var(--ease);
}
.site-header.solid {
  background: rgba(11, 21, 38, 0.86);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(159, 190, 220, 0.13);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand {
  font-family: var(--display); font-size: 1.08rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ice); white-space: nowrap;
}
.brand:hover { color: var(--fire); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); list-style: none; margin: 0; padding: 0; }
.nav-links li { white-space: nowrap; }
.nav-links a {
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--body); padding-block: 0.4rem; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--fire); transition: width 0.35s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--ice); }

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(159,190,220,0.28);
  border-radius: 6px; color: var(--ice); width: 44px; height: 40px; cursor: pointer;
  font-size: 1.1rem; line-height: 1;
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; inset: 76px 0 auto; flex-direction: column; align-items: flex-start;
    gap: 0; background: rgba(11,21,38,0.97); backdrop-filter: blur(16px);
    border-bottom: var(--rule); padding: 0.4rem 1.5rem 1.2rem; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; border-top: var(--rule); }
  .nav-links a { display: block; padding: 0.95rem 0; font-size: 0.8rem; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 1rem 2.1rem; border-radius: 4px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease),
              color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--fire-deep); color: #fff; }
.btn-primary:hover { background: var(--fire); color: #181004; box-shadow: 0 10px 34px rgba(232,145,43,0.32); }
/* light sweep on hover */
.btn-primary::after {
  content: ""; position: absolute; inset: 0 auto 0 -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-18deg); transition: left 0.65s var(--ease-out);
}
.btn-primary:hover::after { left: 115%; }
.btn-secondary { background: transparent; color: var(--ice); border-color: rgba(159,190,220,0.45); }
.btn-secondary:hover { background: var(--stone); border-color: var(--fire); color: var(--ice); }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.center .btn-row { justify-content: center; }

/* ============================================================
   HERO — the gate
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-art {
  position: absolute; inset: -12% -3%;
  background: url("assets/hero.webp?v=2") center 88% / cover no-repeat;
  z-index: -3;
  transform: scale(1.08);
  will-change: transform;
}
.hero-veil {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(46% 40% at 62% 58%, rgba(232,145,43,0.20) 0%, transparent 72%),
    linear-gradient(95deg, rgba(7,14,26,0.93) 0%, rgba(7,14,26,0.80) 26%,
                    rgba(7,14,26,0.34) 52%, rgba(7,14,26,0.16) 74%, rgba(7,14,26,0.42) 100%),
    linear-gradient(180deg, rgba(7,14,26,0.72) 0%, transparent 22%,
                    transparent 66%, rgba(7,14,26,0.80) 88%, var(--night) 100%);
}
#rain { position: absolute; inset: 0; width: 100%; height: 100%;
        z-index: -1; pointer-events: none; }

/* The two gate doors that swing open on load */
.gate {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  perspective: 1700px;
  perspective-origin: 50% 46%;
  transform-style: preserve-3d;
}
/* The door art is tall and narrow; "cover" would blow it up 2.5x and show only
   a band of planks. Instead it is fitted to the full height at its true aspect
   and anchored to the inner edge, with the rest of the leaf carrying a dark
   wood tone that falls off to black at the outer edge. */
.gate__leaf {
  position: absolute; top: -4%; bottom: -4%; width: 55%;
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-mask-image: linear-gradient(180deg,
      transparent 0%, rgba(0,0,0,0.55) 6%, #000 16%,
      #000 82%, rgba(0,0,0,0.5) 94%, transparent 100%);
          mask-image: linear-gradient(180deg,
      transparent 0%, rgba(0,0,0,0.55) 6%, #000 16%,
      #000 82%, rgba(0,0,0,0.5) 94%, transparent 100%);
  filter: drop-shadow(0 0 70px rgba(7,14,26,0.9)) brightness(0.92);
  will-change: transform;
}
.gate__leaf--l { background-image: url("assets/gate-left.webp?v=2"); }
.gate__leaf--r { background-image: url("assets/gate-right.webp?v=2"); }
.gate__leaf--l { left: 0;  background-position: right center; transform-origin: left center; }
.gate__leaf--r { right: 0; background-position: left center;  transform-origin: right center; }

/* Without JS there is no gate at all. With JS it starts shut, so there is no
   flash of the open state between first paint and the script running. */
html:not(.js) .gate { display: none; }
.js .gate__leaf {
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 2.6s var(--gate), filter 2.6s var(--gate);
}
.js .gate--open .gate__leaf--l { transform: rotateY(68deg); }
.js .gate--open .gate__leaf--r { transform: rotateY(-68deg); }
/* faces turn away from the light as they open */
.js .gate--open .gate__leaf { filter: drop-shadow(0 0 46px rgba(7,14,26,0.7)) brightness(0.82); }
/* firelight from the opening catches the inner edge of each door */
.gate__leaf::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 22%;
  opacity: 0; transition: opacity 2.6s var(--gate);
  pointer-events: none;
}
.gate__leaf--l::before { right: 0; background: linear-gradient(270deg, rgba(232,145,43,0.30), transparent); }
.gate__leaf--r::before { left: 0;  background: linear-gradient(90deg,  rgba(232,145,43,0.30), transparent); }
.js .gate--open .gate__leaf::before { opacity: 1; }

/* the seam of warm light between the doors while shut */
.gate__seam {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 10px; margin-left: -5px;
  background: linear-gradient(180deg, transparent 2%, rgba(245,190,114,0.35) 14%, var(--fire-pale) 40%, var(--fire) 66%, rgba(232,145,43,0.3) 88%, transparent 99%);
  filter: blur(6px); opacity: 0;
  transition: opacity 1.1s ease;
}
.js .gate__seam { opacity: 0.42; }
.js .gate__seam { transition: opacity 1.1s ease, width 2.6s var(--gate), filter 2.6s var(--gate); }
.js .gate--open .gate__seam { opacity: 0; width: 90px; margin-left: -45px; filter: blur(40px); }

/* Anything sitting above the gate has to wait for it to open */
.js .scroll-cue { opacity: 0; }
.js .gate--open ~ .scroll-cue { animation: riseIn 1.3s var(--ease-out) 1.5s forwards; }

.hero .wrap { position: relative; z-index: 10; padding-top: 5rem; padding-bottom: 4rem; }
.hero-inner { max-width: 600px; }
.hero .series-line {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.36em;
  text-transform: uppercase; color: var(--sky);
}
.hero h1 {
  margin: 0.5rem 0 0.2rem;
  text-shadow: 0 6px 40px rgba(0,0,0,0.75);
  line-height: 1.02;
}
.hero h1 .fire-word { font-size: 1.12em; line-height: 0.9; display: inline-block; }
.hero-hook {
  font-family: var(--display); font-size: clamp(1.15rem, 2.3vw, 1.65rem);
  color: var(--ice-dim); line-height: 1.5; margin-top: 1.4rem; max-width: 34ch;
}
/* scroll cue */
.scroll-cue {
  position: absolute; left: 50%; bottom: 2rem; translate: -50% 0; z-index: 10;
  font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--mute); text-align: center;
}
.scroll-cue::after {
  content: ""; display: block; width: 1px; height: 44px; margin: 0.7rem auto 0;
  background: linear-gradient(180deg, var(--sky), transparent);
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue { 0%,100% { opacity: 0.25; transform: scaleY(0.5); transform-origin: top; }
                 50% { opacity: 1; transform: scaleY(1); transform-origin: top; } }

/* ---------- Page header (interior) ---------- */
.page-head {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(9rem, 18vh, 13rem) 0 clamp(3.5rem, 7vw, 5rem);
  border-bottom: var(--rule);
}
.page-head__art {
  position: absolute; inset: -25% 0 -8%; z-index: 0;
  background: url("assets/band.webp?v=2") center 40% / cover no-repeat;
  opacity: 0.3; will-change: transform;
}
.page-head::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(7,14,26,0.9) 0%, rgba(7,14,26,0.55) 45%, var(--night) 100%);
}
.page-head .wrap { position: relative; z-index: 2; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid rgba(159,190,220,0.10);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 120%, rgba(232,145,43,0.16), transparent 62%);
  opacity: 0; transition: opacity 0.5s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: rgba(232,145,43,0.42); box-shadow: 0 28px 70px rgba(0,0,0,0.6); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card h3 { color: var(--ice); margin-bottom: 0.5rem; }
.card p { font-size: 1rem; }

.card-book { display: flex; flex-direction: column; gap: 1.2rem; }
.card-book .num {
  font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--sky);
}
.card-book.soon { opacity: 0.62; }
.card-book.soon:hover { transform: none; border-color: rgba(159,190,220,0.10); }
.status {
  display: inline-block; font-family: var(--sans); font-size: 0.6rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  border: 1px solid rgba(159,190,220,0.3); border-radius: 999px;
  padding: 0.35rem 0.85rem; color: var(--muted);
}
.status.lit { color: var(--fire); border-color: rgba(232,145,43,0.5); }

/* ---------- Book detail ---------- */
/* The cover's own colours, bled out behind it. The source image is 64x42px and
   is upscaled by the browser, so the blur is free and the file is 500 bytes. */
.book-hero { position: relative; overflow: hidden; isolation: isolate; }
.book-hero::before {
  content: ""; position: absolute; inset: -14%;
  background: url("assets/cover-blur.webp?v=2") center 40% / cover no-repeat;
  opacity: 0.62;
  z-index: -2;
}
.book-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(40% 55% at 27% 46%, rgba(232,145,43,0.22), transparent 72%),
    linear-gradient(180deg,
      var(--night) 0%, rgba(11,21,38,0.30) 20%,
      rgba(11,21,38,0.26) 74%, var(--night) 100%);
}
.book-hero .wrap { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .book-hero::before { transition: opacity 1.2s var(--ease); }
}

/* Embers drift up around the cover. The canvas is deliberately larger than the
   book so sparks can pass outside its edges; explicit width/height because a
   canvas is a replaced element and will not size from inset alone. */
.cover-flame { position: relative; }
.cover-flame > #embers {
  position: absolute;
  left: -16%; top: -7%;
  width: 132%; height: 116%;
  z-index: 0; pointer-events: none;
}
.cover-flame > .cover-3d { position: relative; z-index: 1; }

.cover-3d { perspective: 1600px; }
.cover-3d img {
  border-radius: 4px; box-shadow: var(--shadow-book); width: 100%;
  transform: rotateY(-12deg) rotateX(2deg);
  transition: transform 0.9s var(--ease-out);
}
.cover-3d:hover img { transform: rotateY(-3deg) rotateX(0deg) scale(1.02); }
@media (max-width: 900px) { .cover-3d { max-width: 320px; margin-inline: auto; } .cover-3d img { transform: none; } }

.meta-list { list-style: none; margin: 2rem 0 0; padding: 1.4rem 0 0; border-top: var(--rule); }
.meta-list li { display: flex; justify-content: space-between; gap: 1.4rem; padding: 0.6rem 0; border-bottom: var(--rule); font-size: 0.97rem; }
.meta-list span:first-child {
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mute); padding-top: 0.3rem;
}
.meta-list span:last-child { color: var(--ice); text-align: right; }

blockquote {
  margin: 2.4rem 0; padding: 0.4rem 0 0.4rem 1.7rem;
  border-left: 2px solid var(--fire-deep);
  font-family: var(--display); font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.45; color: var(--ice);
}
blockquote cite {
  display: block; margin-top: 0.8rem; font-family: var(--sans); font-size: 0.68rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); font-style: normal;
}

/* Author photo */
.author-photo { margin: 0; position: relative; }
.author-photo img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid rgba(159, 190, 220, 0.14);
  box-shadow: var(--shadow);
  filter: saturate(0.72) contrast(1.04) brightness(0.94);
  transition: filter 0.7s var(--ease), transform 0.7s var(--ease-out);
}
.author-photo:hover img { filter: none; transform: translateY(-4px); }
.author-photo figcaption {
  margin-top: 1rem; font-family: var(--sans); font-size: 0.66rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute);
}
@media (max-width: 780px) { .author-photo { max-width: 340px; margin-inline: auto; } }

/* Small inline link buttons, e.g. under the bio */
.chiprow { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.9rem; }
.chip {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.6rem 1.15rem; border-radius: 999px;
  border: 1px solid rgba(159, 190, 220, 0.28); color: var(--body);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease),
              background 0.3s var(--ease), transform 0.3s var(--ease);
}
.chip:hover {
  border-color: var(--fire); color: var(--fire);
  background: rgba(232, 145, 43, 0.08); transform: translateY(-2px);
}
.chip-lit { border-color: rgba(232, 145, 43, 0.55); color: var(--fire); }
.chip-lit:hover { background: rgba(232, 145, 43, 0.14); }

/* Reader praise */
.praise { margin: 0; position: relative; }
.praise blockquote {
  margin: 0; padding: 0 0 0 1.9rem;
  border-left: 2px solid var(--fire-deep);
  font-family: var(--serif); font-size: 1.05rem; line-height: 1.72;
  color: var(--body);
}
.praise blockquote p { margin-bottom: 0.9em; }
.praise .praise-lead {
  font-family: var(--display); font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.36; color: var(--ice); margin-bottom: 0.7em;
}
.praise figcaption {
  margin-top: 1.4rem; padding-left: 1.9rem;
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--fire);
}
/* one-line version for the homepage */
.praise-pull { margin: 2.6rem 0 0; text-align: center; }
.praise-pull blockquote {
  border-left: 0; padding: 0;
  font-family: var(--display); font-size: clamp(1.3rem, 2.7vw, 1.9rem);
  line-height: 1.4; color: var(--ice);
}
.praise-pull figcaption { padding-left: 0; margin-top: 1rem; }

/* Blurb panel — the back cover */
.blurb {
  background: var(--panel); border: 1px solid rgba(159,190,220,0.10);
  border-radius: var(--radius); padding: clamp(1.9rem, 4vw, 3.2rem);
  box-shadow: var(--shadow);
}
.blurb p { font-size: 1.1rem; }
.blurb .drop { font-size: 1.4rem; color: var(--ice); font-family: var(--display); line-height: 1.4; }
.blurb .beat { color: var(--fire); font-family: var(--display); font-size: 1.5rem; }

.blurb-bare { background: none; border: 0; padding: 0; box-shadow: none; }
.blurb-bare .drop { font-size: 1.25rem; }

/* Excerpt */
.excerpt {
  background: var(--panel); border: 1px solid rgba(159,190,220,0.10);
  border-radius: var(--radius); padding: clamp(1.9rem, 4vw, 3.4rem);
}
.excerpt p { font-size: 1.09rem; line-height: 1.82; }
.excerpt p + p { text-indent: 1.5em; margin-bottom: 0.55em; }
.excerpt .brk { text-indent: 0; text-align: center; color: var(--fire); letter-spacing: 0.5em; margin: 1.4rem 0; }
/* Bare excerpt that dissolves at the foot of the column. A mask is used rather
   than a gradient overlay so it fades to nothing on any background. */
.excerpt.excerpt-bare {
  background: none; border: 0; padding: 0; box-shadow: none;
}
.fade-out {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 64%, rgba(0,0,0,0.45) 84%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 64%, rgba(0,0,0,0.45) 84%, transparent 100%);
}
/* Small label above a list, e.g. the comp titles beside the cover */
.mini-head {
  margin: 2.4rem 0 1rem;
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--sky);
}

/* Comps */
.comps { display: grid; gap: 0.8rem; margin-top: 1.6rem; }
.comp {
  display: flex; align-items: baseline; gap: 0.8rem; padding: 0.85rem 1.1rem;
  border: 1px solid rgba(159,190,220,0.12); border-radius: 8px; background: rgba(24,43,68,0.5);
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.comp:hover { border-color: rgba(232,145,43,0.4); transform: translateX(4px); }
.comp b { font-family: var(--display); font-size: 1.08rem; color: var(--ice); font-weight: 600; }
.comp span { font-size: 0.92rem; color: var(--muted); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; margin-top: 1.8rem; }
label {
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mute); display: block; margin-bottom: 0.42rem;
}
input, textarea, select {
  width: 100%; background: rgba(7,14,26,0.6);
  border: 1px solid rgba(159,190,220,0.22); border-radius: 5px;
  color: var(--body); font-family: var(--serif); font-size: 1.02rem; padding: 0.95rem 1.05rem;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--fire); background: rgba(7,14,26,0.85);
  box-shadow: 0 0 0 3px rgba(232,145,43,0.16);
}
textarea { min-height: 165px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-inline { display: grid; grid-template-columns: 1fr auto; gap: 0.7rem; align-items: end; }
/* The signup landing page stacks: a long button was squeezing the email field
   into a sliver beside it. Full width for both, bigger target. */
.form-stack .form-inline { grid-template-columns: 1fr; gap: 1rem; }
.form-stack .btn { width: 100%; padding-block: 1.15rem; }
.form-stack input { font-size: 1.1rem; padding: 1.1rem 1.15rem; }
@media (max-width: 600px) { .form-row, .form-inline { grid-template-columns: 1fr; } }
.form-note { font-family: var(--sans); font-size: 0.76rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; opacity: 0; }

/* The offer panel — the site's main job */
.offer {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--night-soft), var(--stone));
  border: 1px solid rgba(232,145,43,0.26);
  border-radius: var(--radius);
  padding: clamp(2.1rem, 5vw, 3.6rem);
  box-shadow: var(--shadow);
}
.offer::before {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 90%;
  background: radial-gradient(50% 100% at 50% 100%, rgba(232,145,43,0.20), transparent 70%);
  pointer-events: none;
}
.offer > * { position: relative; }
.offer .form { max-width: 520px; }
.offer.center .form { margin-inline: auto; }
.offer-grid { display: grid; grid-template-columns: 150px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 700px) { .offer-grid { grid-template-columns: 1fr; text-align: center; }
                            .offer-grid .form { margin-inline: auto; }
                            .offer-grid .chapbook { max-width: 160px; margin-inline: auto; } }
/* The repeating end-of-page call to action. Deliberately small: it appears on
   five pages, so it has to read as a footer note, not another whole section. */
.offer-slim { padding: clamp(1.7rem, 4vw, 2.4rem) clamp(1.5rem, 4vw, 3rem); }
.offer-slim h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-bottom: 0.2rem; }
.offer-slim .form { margin-top: 1.2rem; }
section:has(> .wrap > .offer-slim) { padding-block: clamp(3rem, 5vw, 4.5rem); }

/* About: photo column stays small so it does not tower over the bio */
.about-grid {
  display: grid; grid-template-columns: 290px 1fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

.chapbook { position: relative; transition: transform 0.6s var(--ease-out); }
.chapbook img { border-radius: 3px; box-shadow: 0 20px 44px rgba(0,0,0,0.6); }
.offer:hover .chapbook { transform: translateY(-6px) rotate(-1.5deg); }

/* ---------- Details / FAQ ---------- */
details { border-bottom: var(--rule); padding: 1.2rem 0; }
details summary {
  cursor: pointer; list-style: none; font-family: var(--display); font-size: 1.15rem;
  color: var(--ice); display: flex; justify-content: space-between; gap: 1.4rem;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--fire); font-size: 1.3rem; line-height: 1; transition: transform 0.3s var(--ease); }
details[open] summary::after { content: "\2013"; }
details p { margin-top: 0.8rem; font-size: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night-deep); border-top: var(--rule); padding: clamp(3.2rem, 6vw, 5rem) 0 2.2rem; text-align: center; }
.footer-mark { font-family: var(--display); font-size: 1.25rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ice); margin-bottom: 1.4rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.7rem; list-style: none; margin: 0 0 1.8rem; padding: 0; }
.footer-links a { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--body); }
.footer-fine { font-family: var(--sans); font-size: 0.72rem; color: var(--mute); }

/* ============================================================
   MOTION
   ============================================================ */
/* scroll reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-d="1"] { transition-delay: 0.10s; }
.js .reveal[data-d="2"] { transition-delay: 0.20s; }
.js .reveal[data-d="3"] { transition-delay: 0.30s; }
.js .reveal[data-d="4"] { transition-delay: 0.40s; }

/* staggered hero lines */
.js .stagger > * { opacity: 0; transform: translateY(20px); }
.js .stagger.go > * { animation: riseIn 1.1s var(--ease-out) forwards; }
.js .stagger.go > *:nth-child(1) { animation-delay: 0.05s; }
.js .stagger.go > *:nth-child(2) { animation-delay: 0.20s; }
.js .stagger.go > *:nth-child(3) { animation-delay: 0.38s; }
.js .stagger.go > *:nth-child(4) { animation-delay: 0.56s; }
.js .stagger.go > *:nth-child(5) { animation-delay: 0.72s; }
@keyframes riseIn { to { opacity: 1; transform: none; } }

/* page transition veil */
/* Starts opaque and clears itself with a CSS animation, so a failed or blocked
   main.js can never strand the visitor on a black screen. JS only re-raises it
   on the way out. */
.veil {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background: var(--night-deep); opacity: 1;
  animation: veilLift 0.65s var(--ease) 0.04s forwards;
}
@keyframes veilLift { to { opacity: 0; } }
.veil.drop {
  animation: none; opacity: 1; pointer-events: all;
  transition: opacity 0.4s var(--ease);
}
html:not(.js) .veil { display: none; }

/* reduced motion — turn all of it off */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .stagger > *, .js .scroll-cue {
    opacity: 1 !important; transform: none !important; animation: none !important; }
  .gate, #rain, .scroll-cue::after { display: none !important; }
  .veil { display: none !important; }
  .hero-art { transform: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
