/* Milo Danforth site styles.
   Palette from the Milo Danforth Cover Bible: parchment, deep ink, plum, moss and hearth.
   Display: Cinzel (engraved capitals, like the cover lettering). Body: Lora. Labels: Nunito Sans.
   Small text uses deep ink or plum on parchment, or gold/parchment on the dark bands, for
   at least 4.5:1 contrast. No text below 12px; blurbs stay upright. */

:root {
  --parchment: #f5e9d7;
  --parchment-deep: #ead9bf;
  --ink: #302631;        /* deep ink: body text, dark bands */
  --ink-deep: #231b24;
  --plum: #67475c;       /* kickers and links on parchment (~6.5:1) */
  --moss: #4f6a54;       /* "available" status on parchment (darkened moss, ~5.5:1) */
  --hearth: #c77a4a;     /* decorative warmth: rules, glows, borders */
  --gold: #e8b56a;       /* buttons and kickers on the dark bands */
  --muted: #5a4b57;      /* secondary text on parchment (~7:1) */
  --on-dark: #f5e9d7;
  --on-dark-muted: #d9c8b4;
  --line: rgba(48, 38, 49, 0.16);

  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --label: "Nunito Sans", Arial, sans-serif;
  --shell: min(1140px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { margin: 0; background: var(--parchment); color: var(--ink); font: 400 18px/1.7 var(--serif); }
img { display: block; max-width: 100%; }
a { color: inherit; }
.shell { width: var(--shell); margin: 0 auto; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--gold); color: var(--ink-deep); font: 700 14px var(--label); text-decoration: none; }
.skip-link:focus { top: 16px; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(35, 27, 36, 0.95); color: var(--on-dark); border-bottom: 2px solid var(--hearth); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 66px; }
.wordmark { font: 700 19px var(--display); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; white-space: nowrap; color: var(--gold); }
.site-header nav { display: flex; gap: 26px; }
.site-header nav a { font: 700 14px var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-muted); text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--on-dark); border-bottom-color: var(--gold); }

/* ---- shared type ---- */
.kicker { margin: 0 0 10px; font: 700 13px var(--label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--plum); }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: 0.01em; }
h1 { font-size: clamp(44px, 6.5vw, 78px); }
.section-title { font-size: clamp(34px, 4.6vw, 54px); }
.section-title a, .entry h2 a { text-decoration: none; }
.section-title a:hover, .entry h2 a:hover { color: var(--plum); }
p { margin: 0 0 16px; }

.status { margin: 6px 0 22px; padding-top: 12px; border-top: 1px solid currentColor; display: inline-block; font: 700 13px var(--label); letter-spacing: 0.12em; text-transform: uppercase; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions:empty { display: none; }
.button { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 22px; border: 2px solid currentColor; border-radius: 4px; font: 700 14px var(--label); letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; transition: background 0.2s, color 0.2s; }
.button-primary { background: var(--ink); border-color: var(--ink); color: var(--parchment); }
.button-primary:hover { background: var(--plum); border-color: var(--plum); }
.button:not(.button-primary):hover { background: rgba(48, 38, 49, 0.08); }

.text-link { font: 700 14px var(--label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--plum); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: rgba(103, 71, 92, 0.45); }
.text-link:hover { text-decoration-color: var(--plum); }

.cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 18px 36px rgba(35, 27, 36, 0.35); }

/* ---- dark bands (hero, book hero, series hero) ---- */
.hero, .book-hero, .series-hero {
  color: var(--on-dark);
  background:
    radial-gradient(ellipse at 76% 42%, rgba(232, 181, 106, 0.22), transparent 46%),
    linear-gradient(160deg, var(--ink-deep) 0%, var(--ink) 55%, #3f2e3d 100%);
}
.hero .kicker, .book-hero .kicker, .series-hero .kicker { color: var(--gold); }
.hero .button-primary, .book-hero .button-primary { background: var(--gold); border-color: var(--gold); color: var(--ink-deep); }
.hero .button-primary:hover, .book-hero .button-primary:hover { background: #f3c886; border-color: #f3c886; }
.hero .button:not(.button-primary):hover, .book-hero .button:not(.button-primary):hover { background: rgba(245, 233, 215, 0.1); }
.hero .status, .book-hero .status { color: var(--on-dark-muted); }

.hero { padding: clamp(48px, 7vw, 92px) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-hook { font: italic 400 clamp(22px, 2.4vw, 27px)/1.45 var(--serif); margin: 22px 0 14px; color: var(--on-dark); }
.hero-pitch { color: var(--on-dark-muted); max-width: 32em; }
.hero-cover { justify-self: center; width: min(100%, 380px); text-decoration: none; }

/* ---- promise strip ---- */
.promise { background: var(--parchment-deep); border-bottom: 1px solid var(--line); padding: 34px 0; }
.promise-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: center; }
.promise-lede { margin: 0; font: 700 clamp(20px, 2.2vw, 26px)/1.3 var(--display); }
.promise-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.promise-list li { padding-left: 26px; position: relative; color: var(--muted); }
.promise-list li::before { content: ""; position: absolute; left: 4px; top: 0.7em; width: 10px; height: 10px; background: var(--hearth); transform: rotate(45deg); }

/* ---- series rows (homepage) ---- */
.section { padding: clamp(52px, 7vw, 88px) 0; }
.series-row + .series-row { border-top: 1px solid var(--line); }
.series-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: end; margin-bottom: 30px; }
.series-head p:last-child { margin: 0; color: var(--muted); }
.tiles { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(var(--count), minmax(0, 1fr)); gap: 18px; }
.tile a { display: grid; gap: 4px; text-decoration: none; }
.tile .cover { margin-bottom: 8px; transition: transform 0.25s; }
.tile a:hover .cover { transform: translateY(-4px); }
.tile-number { font: 700 12px var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--plum); }
.tile-title { font: 600 17px/1.25 var(--serif); }
.tile-status { font: 700 12px var(--label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tile-status.is-live, .is-live { color: var(--moss); }

/* ---- series page ---- */
.series-hero { padding: clamp(52px, 7vw, 88px) 0; }
.series-lede { font: italic 400 clamp(21px, 2.3vw, 26px)/1.45 var(--serif); margin: 20px 0 16px; max-width: 34em; }
.series-description { color: var(--on-dark-muted); max-width: 40em; margin: 0; }
.entries { display: grid; gap: 34px; }
.entry { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 30px; align-items: center; padding-bottom: 34px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.entry:last-child { border-bottom: 0; padding-bottom: 0; }
.entry-cover { display: block; text-decoration: none; }
.entry h2 { font-size: clamp(28px, 3.4vw, 38px); margin-bottom: 12px; }
.entry-hook { font-style: italic; }
.entry-soon { color: var(--muted); font-style: normal; }
.entry .text-link { display: inline-block; margin-bottom: 16px; }

/* ---- book page ---- */
.book-hero { padding: clamp(48px, 7vw, 88px) 0; }
.book-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.book-cover { width: min(100%, 400px); justify-self: center; }
.book-subtitle { margin: 12px 0 0; font: 700 13px var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-muted); }
.book-hook { font: italic 400 clamp(22px, 2.4vw, 27px)/1.45 var(--serif); margin: 22px 0 14px; }
.book-story { padding: clamp(48px, 7vw, 84px) 0 20px; }
.prose { max-width: 40em; }
.prose p { font-size: 19px; }
.list-title { font-size: 26px; margin: 36px 0 14px; }
.in-this-book { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.in-this-book li { padding-left: 26px; position: relative; }
.in-this-book li::before { content: ""; position: absolute; left: 4px; top: 0.7em; width: 10px; height: 10px; background: var(--hearth); transform: rotate(45deg); }

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 40px 0 clamp(52px, 7vw, 80px); border-top: 1px solid var(--line); margin-top: 40px; }
.step { display: grid; gap: 4px; text-decoration: none; font: 600 20px/1.3 var(--serif); }
.step span { font: 700 12px var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--plum); }
.step:hover { color: var(--plum); }
.step-next { text-align: right; justify-self: end; }

/* ---- footer ---- */
.site-footer { padding: 42px 0 50px; background: var(--ink-deep); color: var(--on-dark-muted); border-top: 2px solid var(--hearth); }
.footer-inner { display: grid; gap: 12px; justify-items: center; text-align: center; }
.footer-mark { margin: 0; font: 700 18px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin: 0; }
.footer-links a { font: 700 13px var(--label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-muted); text-decoration: none; }
.footer-links a:hover { color: var(--on-dark); }
.footer-copy { margin: 0; font: 400 14px var(--label); }
.footer-copy a { color: var(--on-dark); }

/* ---- release scheduling (release.js reveals these at their release time) ---- */
[data-release-show="after"] { display: none !important; }

/* ---- narrow screens ---- */
@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .hero-grid, .book-grid, .promise-inner, .series-head { grid-template-columns: 1fr; }
  .hero-cover { order: -1; width: min(70%, 300px); }
  .book-cover { width: min(70%, 300px); }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 0; min-height: 0; }
  .site-header nav { gap: 20px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .entry { grid-template-columns: 110px minmax(0, 1fr); gap: 18px; }
  .steps { grid-template-columns: 1fr; }
  .step-next { text-align: left; justify-self: start; }
}
