/* =========================================================
   Max Unleashed — landing page styles
   Plain CSS. No framework, no build step.
   ========================================================= */

:root {
  --parchment:      #f7f0e1;
  --parchment-2:    #f1e7d2;
  --parchment-3:    #ece0c8;
  --cream:          #fffaf1;
  --ink:            #2c2013;
  --ink-soft:       #5d4a37;
  --ink-faint:      #8a7660;

  --amber:          #d98a2b;
  --amber-deep:     #b06d1c;
  --amber-glow:     #f2c98a;
  --teal:           #2f6f6b;
  --teal-deep:      #21524f;
  --forest:         #26311f;

  --line:           #e2d3b6;
  --shadow-warm:    28px 40px 80px -40px rgba(74, 48, 20, .55);
  --shadow-soft:    0 18px 40px -24px rgba(74, 48, 20, .40);

  --wrap:           1140px;
  --radius:         18px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--parchment);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: var(--teal-deep); text-decoration: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 800; font-size: 1rem;
  padding: 14px 26px; border-radius: 999px;
  cursor: pointer; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-lg { padding: 17px 34px; font-size: 1.08rem; }
.btn-primary {
  background: var(--amber); color: #fff;
  box-shadow: 0 12px 24px -12px rgba(176, 109, 28, .8);
}
.btn-primary:hover { background: var(--amber-deep); transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(176, 109, 28, .9); }
.btn-ghost { background: transparent; color: var(--teal-deep); border-color: var(--teal); }
.btn-ghost:hover { background: var(--teal); color: #fff; transform: translateY(-2px); }

/* ---------- Kickers / eyebrows ---------- */
.eyebrow, .kicker {
  font-family: var(--sans); font-weight: 800;
  text-transform: uppercase; letter-spacing: .16em;
  font-size: .78rem; color: var(--amber-deep);
  margin: 0 0 1rem;
}
.kicker.light { color: var(--amber-glow); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 240, 225, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.site-header.scrolled {
  box-shadow: 0 8px 24px -18px rgba(74, 48, 20, .5);
  border-color: var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-badge { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.28rem; color: var(--ink); }

.nav { display: flex; gap: 28px; }
.nav a {
  font-weight: 700; font-size: .98rem; color: var(--ink-soft);
  position: relative; padding: 4px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--amber); transition: width .2s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }

.header-cta { padding: 10px 20px; font-size: .95rem; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: .25s; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px);
  background:
    radial-gradient(1100px 620px at 78% 12%, rgba(242, 201, 138, .55), transparent 60%),
    radial-gradient(900px 500px at 10% 90%, rgba(47, 111, 107, .12), transparent 55%),
    var(--parchment);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-title {
  font-size: clamp(3.2rem, 8vw, 5.6rem);
  line-height: .98; margin: 0 0 .28em;
  letter-spacing: -.02em;
}
.hero-tagline {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  color: var(--teal-deep); line-height: 1.3; margin: 0 0 1.1rem; max-width: 30ch;
}
.hero-lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 46ch; margin: 0 0 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 1rem; }
.hero-formats { font-weight: 700; color: var(--ink-faint); font-size: .95rem; letter-spacing: .02em; margin: 0; }

.hero-art { position: relative; }
.hero-img {
  width: 100%; border-radius: 20px;
  box-shadow: var(--shadow-warm);
  border: 6px solid #fff;
  transform: rotate(1.4deg);
}
.float { position: absolute; pointer-events: none; filter: drop-shadow(0 10px 14px rgba(74,48,20,.25)); }
.float-leaf { width: 92px; top: -34px; left: -26px; transform: rotate(-18deg); }
.float-berries { width: 104px; bottom: -34px; right: -22px; transform: rotate(12deg); }

/* ============================================================
   GENERIC SECTION
   ============================================================ */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-tint { background: var(--parchment-2); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.lede { font-size: 1.18rem; color: var(--ink-soft); }
.center .lede { margin-left: auto; margin-right: auto; max-width: 62ch; }

/* lineage row */
.lineage {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px;
  margin: 1.8rem 0 0; padding: 0; list-style: none;
}
.lineage span {
  font-family: var(--serif); font-style: italic; font-size: 1rem;
  color: var(--ink); background: var(--cream);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px;
}

/* trio of features */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 56px; }
.feature {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow-soft);
}
.feature h3 { font-size: 1.35rem; color: var(--teal-deep); }
.feature p { margin: 0; color: var(--ink-soft); }

/* ============================================================
   EXCERPT
   ============================================================ */
.excerpt {
  background:
    radial-gradient(700px 400px at 80% 20%, rgba(217,138,43,.18), transparent 60%),
    var(--forest);
  color: #f4ecdc;
  padding: clamp(64px, 10vw, 120px) 0;
}
.passage p {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  line-height: 1.5; margin: 0 0 1rem; color: #f6efe0;
}
.passage { margin: 0; border-left: 3px solid var(--amber); padding-left: clamp(20px, 4vw, 40px); }
.passage-cite { margin: 1.4rem 0 0; padding-left: clamp(20px, 4vw, 43px); color: var(--amber-glow); font-weight: 700; letter-spacing: .02em; }

/* ============================================================
   JOURNEY
   ============================================================ */
.wren-quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.35;
  color: var(--ink); margin: .5rem auto 1.2rem; max-width: 22ch; border: 0;
}
.wren-quote cite { display: block; font-size: 1rem; font-style: normal; color: var(--ink-faint); font-family: var(--sans); font-weight: 700; margin-top: .8rem; }

.beats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 56px; }
.beat {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow-soft); position: relative;
}
.beat-no {
  font-family: var(--serif); font-weight: 600; font-size: 1.6rem;
  color: var(--amber); display: block; margin-bottom: .6rem;
}
.beat h3 { font-size: 1.25rem; }
.beat p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* ============================================================
   CAST
   ============================================================ */
.cast {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 54px;
}
.card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -26px rgba(74,48,20,.5); }
.mono {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: color-mix(in srgb, var(--m) 16%, #fff);
  color: var(--m); border: 2px solid color-mix(in srgb, var(--m) 55%, #fff);
  font-family: var(--serif); font-weight: 600; font-size: 1.5rem;
  margin-bottom: 16px;
}
.cast-avatar {
  width: 72px; height: 72px; object-fit: contain;
  margin-bottom: 12px; display: block;
  filter: drop-shadow(0 6px 10px rgba(74, 48, 20, .28));
}
.card h3 { font-size: 1.3rem; margin-bottom: .15em; }
.card .role { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--amber-deep); margin: 0 0 .7rem; }
.card p:last-child { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.cast .card:nth-child(7) { grid-column: auto; }

/* ============================================================
   MAP CTA (map image as a button)
   ============================================================ */
.map-cta {
  display: block; max-width: 840px; margin: 0 auto; position: relative;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-warm); transition: box-shadow .25s ease, transform .2s ease;
}
.map-cta img { width: 100%; height: auto; display: block; transition: transform .5s ease; }
.map-cta:hover { transform: translateY(-3px); }
.map-cta:hover img { transform: scale(1.045); }
.map-cta:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.map-cta-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; text-align: center;
  padding: clamp(20px, 4vw, 40px);
  background: linear-gradient(to top, rgba(20,26,14,.78), rgba(20,26,14,.14) 46%, transparent 72%);
}
.map-cta-pin {
  width: 16px; height: 16px; border-radius: 50%; margin-bottom: 14px;
  background: radial-gradient(circle at 35% 30%, #f2c98a, var(--amber) 70%);
  box-shadow: 0 0 0 5px rgba(217,138,43,.28), 0 0 0 6px rgba(255,255,255,.4), 0 2px 6px rgba(0,0,0,.5);
  animation: map-pin 2.4s ease-out infinite;
}
@keyframes map-pin {
  0% { box-shadow: 0 0 0 5px rgba(217,138,43,.4), 0 0 0 6px rgba(255,255,255,.4), 0 2px 6px rgba(0,0,0,.5); }
  70% { box-shadow: 0 0 0 20px rgba(217,138,43,0), 0 0 0 6px rgba(255,255,255,.35), 0 2px 6px rgba(0,0,0,.5); }
  100% { box-shadow: 0 0 0 5px rgba(217,138,43,0), 0 0 0 6px rgba(255,255,255,.4), 0 2px 6px rgba(0,0,0,.5); }
}
.map-cta-label {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  color: #fbf5e8; line-height: 1.1; text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.map-cta-sub {
  font-weight: 800; letter-spacing: .01em; color: var(--amber-glow); margin-top: .45rem;
  font-size: 1rem; text-shadow: 0 1px 10px rgba(0,0,0,.55);
}
@media (prefers-reduced-motion: reduce) { .map-cta-pin { animation: none; } .map-cta img { transition: none; } }

/* ============================================================
   BENEATH — tags
   ============================================================ */
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; list-style: none; padding: 0; margin: 2rem 0 0; }
.tags li {
  font-weight: 700; font-size: .95rem; color: var(--teal-deep);
  background: var(--cream); border: 1px solid var(--teal); border-radius: 999px;
  padding: 8px 18px;
}

/* ============================================================
   BOOK / BUY
   ============================================================ */
.book-section {
  background:
    radial-gradient(800px 500px at 15% 30%, rgba(242,201,138,.4), transparent 60%),
    var(--parchment);
}
.book-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.book-art img {
  width: 100%; max-width: 460px; margin: 0 auto;
  filter: drop-shadow(24px 30px 44px rgba(74,48,20,.45));
}
.book-copy h2 { margin-bottom: .5em; }

/* ============================================================
   AUTHOR
   ============================================================ */
.author-inner { display: flex; align-items: center; gap: clamp(24px, 5vw, 56px); }
.author-badge {
  width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; border: 6px solid #fff; box-shadow: var(--shadow-soft);
}
.author-mono {
  width: 150px; height: 150px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--teal) 14%, #fff);
  border: 6px solid #fff; box-shadow: var(--shadow-soft);
  font-family: var(--serif); font-weight: 600; font-size: 3.4rem; color: var(--teal-deep);
}
.author-copy { max-width: 60ch; }
.author-copy p { font-size: 1.12rem; color: var(--ink-soft); margin: 0; }

/* ============================================================
   CLOSING BAND
   ============================================================ */
.closing {
  position: relative;
  background: url("assets/town-dusk.jpg") center 40% / cover no-repeat;
  padding: clamp(90px, 16vw, 200px) 0;
  text-align: center;
}
.closing-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,26,16,.55), rgba(20,26,16,.72));
}
.closing-inner { position: relative; }
.closing-line {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.5rem, 3.8vw, 2.5rem); line-height: 1.4;
  color: #fbf5e8; max-width: 20ch; margin: 0 auto 2rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--forest); color: #d9cdb5; padding: 44px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.2rem; color: #f4ecdc; }
.footer-brand img { border-radius: 50%; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: #d9cdb5; font-weight: 700; font-size: .95rem; }
.footer-nav a:hover { color: #fff; }
.footer-legal { margin: 0; font-size: .88rem; color: #a99c82; width: 100%; text-align: center; border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; }

/* ============================================================
   REVEAL ANIMATION (progressive enhancement)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   EXCERPT CTA (on the dark band)
   ============================================================ */
.excerpt-cta { margin: 1.6rem 0 0; padding-left: clamp(20px, 4vw, 43px); }
.excerpt-cta a {
  color: var(--amber-glow); font-weight: 800; letter-spacing: .01em;
  border-bottom: 2px solid transparent; transition: border-color .2s ease;
}
.excerpt-cta a:hover { border-color: var(--amber-glow); }

/* ============================================================
   LEAF DIVIDER
   ============================================================ */
.divider { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 6px 24px; background: inherit; }
.divider span { height: 1px; width: min(120px, 22vw); background: linear-gradient(90deg, transparent, var(--line)); }
.divider span:last-of-type { background: linear-gradient(90deg, var(--line), transparent); }
.divider img { width: 34px; height: auto; opacity: .85; filter: drop-shadow(0 3px 5px rgba(74,48,20,.2)); }

/* ============================================================
   PRAISE (placeholder / be the first)
   ============================================================ */
.praise-empty {
  margin: 0 auto; max-width: 620px; position: relative;
  background: var(--cream); border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 44px 32px 36px; text-align: center;
}
.praise-mark {
  font-family: var(--serif); font-size: 5rem; line-height: .5; color: var(--amber);
  display: block; height: 40px;
}
.praise-empty > p { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--ink); margin: .2rem 0 .6rem; }
.praise-sub { font-family: var(--sans) !important; font-style: normal !important; font-size: 1.02rem !important; color: var(--ink-soft); max-width: 46ch; margin: 0 auto 1.4rem !important; }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter {
  background:
    radial-gradient(760px 420px at 50% 0%, rgba(217, 138, 43, .16), transparent 62%),
    var(--parchment-3);
  border-top: 1px solid var(--line);
}
.signup { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 1.6rem auto 0; max-width: 520px; }
.signup-input {
  flex: 1 1 260px; min-width: 0; font-family: var(--sans); font-size: 1rem;
  padding: 14px 18px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--cream); color: var(--ink);
}
.signup-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,111,107,.18); }
.signup .btn { flex: 0 0 auto; }
.signup-msg { margin: 1rem 0 0; font-weight: 700; }
.signup-msg.ok { color: var(--teal-deep); }
.signup-msg.err { color: #a4432b; }
.signup-fine { margin: .7rem 0 0; font-size: .85rem; color: var(--ink-faint); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ============================================================
   SAMPLE READING PAGE
   ============================================================ */
.reading { padding: clamp(40px, 7vw, 80px) 0 clamp(56px, 9vw, 96px); background: var(--parchment); }
.reading-wrap { max-width: 680px; }
.reading-title { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .3em; }
.reading-sub { font-size: 1.12rem; color: var(--ink-soft); margin: 0 0 1.4rem; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0 2.2rem; }
.chapter-head {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin: 2.6rem 0 1.2rem; text-align: center;
}
.chapter-head:first-of-type { margin-top: .5rem; }
.chapter-head span {
  display: block; font-family: var(--sans); font-weight: 800; font-size: .8rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--amber-deep); margin-bottom: .5rem;
}
.reading p {
  font-family: var(--serif); font-size: 1.24rem; line-height: 1.82; color: #322618;
  margin: 0 0 1.35rem;
}
.chapter-head + p::first-letter {
  font-size: 3.4em; float: left; line-height: .8; padding: 6px 10px 0 0;
  font-family: var(--serif); color: var(--amber-deep); font-weight: 600;
}
.scene-break { text-align: center; color: var(--amber); font-size: 1.4rem !important; margin: 1.6rem 0 2rem !important; }
.scene-break::first-letter { font-size: inherit !important; float: none !important; padding: 0 !important; color: var(--amber) !important; }
.reading-end { text-align: center; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.reading-end-line { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--ink); margin: 0 0 1.4rem !important; }
.reading-end-line::first-letter { font-size: inherit; float: none; padding: 0; color: inherit; }
.back-link { display: inline-block; margin-top: 1.4rem; font-weight: 700; color: var(--ink-soft); }
.back-link:hover { color: var(--ink); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .trio, .beats, .cast { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 520px; margin: 0 auto; }
  .hero-copy { text-align: center; }
  .hero-tagline, .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .book-inner { grid-template-columns: 1fr; text-align: center; }
  .book-copy .hero-actions { justify-content: center; }
  .author-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 720px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: block; }
  .site-header.menu-open .nav {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--parchment); border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px; box-shadow: var(--shadow-soft);
  }
  .site-header.menu-open .nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .trio, .beats, .cast { grid-template-columns: 1fr; }
  .float-leaf { width: 64px; top: -20px; left: -8px; }
  .float-berries { width: 72px; bottom: -20px; right: -6px; }
  .lineage span { font-size: .9rem; }
}
