/* Morgan K. Quinn site styles.
   Palette and type follow the Morgan K. Quinn Cover Bible (v1.0): two dominant colours
   (Parallax Ink, Deep Teal), one neutral (Evidence Bone) and one accent (Revelation Copper).
   Titles: condensed uppercase grotesk. Author name: clean, spaced sans. Body: a readable serif.
   No text below 12px; body copy stays upright. */

:root {
  --ink: #071a22;          /* Parallax Ink: page background */
  --ink-raised: #0c2731;   /* a step up from ink for panels */
  --teal: #16414a;         /* Deep Teal: atmosphere, borders, alternate sections */
  --copper: #c8795a;       /* Revelation Copper: the one warm accent */
  --copper-bright: #e0987b;/* copper for small text on dark (higher contrast) */
  --bone: #f3efe8;         /* Evidence Bone: primary text */
  --muted: #b4bec0;        /* secondary text, ~9:1 on ink */
  --line: rgba(243, 239, 232, 0.14);

  --title: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --sans: "Barlow", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --shell: min(1120px, 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(--ink);
  color: var(--bone);
  font: 400 18px/1.7 var(--serif);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
cite { font-style: normal; font-weight: 600; }
.shell { width: var(--shell); margin: 0 auto; }

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

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 26, 34, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.wordmark {
  font: 600 15px var(--sans); letter-spacing: 0.32em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
}
.site-header nav { display: flex; gap: 28px; }
.site-header nav a {
  font: 600 13px var(--sans); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--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(--bone); border-bottom-color: var(--copper); }

/* ---- shared type ---- */
.kicker {
  margin: 0 0 12px;
  font: 600 13px var(--sans); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--copper-bright);
}
h1, h2, h3 { font-family: var(--title); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.95; margin: 0; }
h1 { font-size: clamp(52px, 8vw, 104px); }
.section-title { font-size: clamp(38px, 5vw, 60px); margin-bottom: 28px; }
h3 { font-size: 30px; }
h3 a { text-decoration: none; }
h3 a:hover { color: var(--copper-bright); }
p { margin: 0 0 16px; }

.status {
  display: inline-block; margin: 6px 0 22px;
  font: 600 13px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 12px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 12px 22px;
  border: 1px solid rgba(243, 239, 232, 0.4);
  font: 600 14px var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--bone); transition: background 0.2s, border-color 0.2s;
}
.button:hover { border-color: var(--bone); background: rgba(243, 239, 232, 0.06); }
.button-primary { background: var(--copper); border-color: var(--copper); color: var(--ink); }
.button-primary:hover { background: var(--copper-bright); border-color: var(--copper-bright); }

.text-link {
  font: 600 14px var(--sans); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--copper-bright); text-decoration: underline; text-underline-offset: 5px;
  text-decoration-color: rgba(224, 152, 123, 0.5);
}
.text-link:hover { text-decoration-color: var(--copper-bright); }

/* ---- hero (homepage featured book) ---- */
.hero {
  padding: clamp(48px, 8vw, 96px) 0;
  background:
    radial-gradient(ellipse at 78% 40%, rgba(200, 121, 90, 0.18), transparent 45%),
    linear-gradient(180deg, var(--ink) 0%, #0a222b 100%);
  border-bottom: 1px solid var(--line);
}
.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-size: clamp(20px, 2.2vw, 24px); line-height: 1.5; margin: 26px 0 14px; max-width: 30em; }
.hero-lines { display: grid; gap: 2px; color: var(--muted); margin-bottom: 22px; }
.hero-cover { justify-self: center; width: min(100%, 380px); text-decoration: none; }

.cover {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(243, 239, 232, 0.08);
}
.cover-placeholder {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: 9% 9% 7%;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(200, 121, 90, 0.35), transparent 50%),
    linear-gradient(160deg, var(--teal), var(--ink) 75%);
  text-align: left;
}
.cover-placeholder-series { font: 600 12px var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--copper-bright); }
.cover-placeholder-title { font: 700 clamp(30px, 4vw, 44px)/0.92 var(--title); text-transform: uppercase; color: var(--bone); }
.cover-placeholder-author { margin-top: auto; padding-top: 18px; text-align: center; font: 600 12px var(--sans); letter-spacing: 0.3em; text-transform: uppercase; color: var(--bone); }

/* ---- sections ---- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--ink-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.book-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 28px; }
.book-card {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 26px; align-items: start;
  padding: 24px; background: rgba(22, 65, 74, 0.28); border: 1px solid var(--line);
}
.book-card-cover { display: block; text-decoration: none; }
.book-card .cover { box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45); }
.book-card .cover-placeholder { padding: 10% 9% 8%; gap: 8px; }
.book-card .cover-placeholder-title { font-size: 24px; }
.book-card .cover-placeholder-series, .book-card .cover-placeholder-author { font-size: 12px; letter-spacing: 0.12em; }
.book-card h3 { margin-bottom: 12px; }
.book-card p:not(.kicker) { font-size: 17px; color: var(--bone); }

/* ---- writing ---- */
.post-list { list-style: none; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--line); }
.post a { display: grid; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.post a:hover .post-title { color: var(--copper-bright); }
.post-meta { font: 600 13px var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.post-title { font: 700 28px/1.05 var(--title); text-transform: uppercase; transition: color 0.2s; }
.post-blurb { display: grid; color: var(--muted); }

/* ---- about ---- */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.portrait { width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(0.9); border: 1px solid var(--line); }
.about-copy p { max-width: 36em; }
.about-links { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 24px; }

/* ---- newsletter ---- */
.newsletter { background: linear-gradient(135deg, var(--teal), var(--ink) 80%); border-top: 1px solid var(--line); }
.newsletter-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.newsletter-form { background: var(--bone); color: var(--ink); padding: 8px; min-height: 120px; }

/* ---- inner pages ---- */
.page-hero, .series-hero {
  padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px);
  background: radial-gradient(ellipse at 80% 30%, rgba(200, 121, 90, 0.14), transparent 45%), var(--ink);
  border-bottom: 1px solid var(--line);
}
.page-lede, .series-lede { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.5; margin: 22px 0 26px; max-width: 34em; }
.series-description { max-width: 40em; color: var(--muted); margin-bottom: 32px; }
.series-books { padding: clamp(48px, 7vw, 80px) 0; }

.book-hero {
  padding: clamp(48px, 7vw, 88px) 0;
  background: radial-gradient(ellipse at 22% 40%, rgba(200, 121, 90, 0.16), transparent 45%), linear-gradient(180deg, var(--ink), #0a222b);
  border-bottom: 1px solid var(--line);
}
.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-hook { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.5; margin: 24px 0 14px; max-width: 30em; }
.book-story { padding: clamp(48px, 7vw, 88px) 0; }
.prose { max-width: 40em; }
.prose p { font-size: 19px; }
.genre { margin-top: 28px; font: 600 13px var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.more-books { padding: 0 0 clamp(56px, 8vw, 96px); }

/* ---- footer ---- */
.site-footer { padding: 44px 0 52px; border-top: 1px solid var(--line); background: #051318; }
.footer-inner { display: grid; gap: 14px; justify-items: center; text-align: center; }
.footer-mark { margin: 0; font: 600 14px var(--sans); letter-spacing: 0.34em; text-transform: uppercase; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin: 0; }
.footer-links a { font: 600 13px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--bone); }
.footer-copy { margin: 0; font: 400 14px var(--sans); color: var(--muted); }
.footer-copy a { color: var(--bone); }

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

/* ---- narrow screens ---- */
@media (max-width: 820px) {
  .hero-grid, .book-grid, .about-grid, .newsletter-grid { grid-template-columns: 1fr; }
  .hero-cover { order: -1; width: min(70%, 300px); }
  .book-cover { width: min(70%, 300px); }
  .portrait { max-width: 320px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 0; min-height: 0; }
  .site-header nav { gap: 18px; flex-wrap: wrap; }
  .wordmark { font-size: 14px; }
  .book-card { grid-template-columns: 104px minmax(0, 1fr); gap: 18px; padding: 18px; }
  .book-card .cover-placeholder-title { font-size: 18px; }
  h3 { font-size: 26px; }
  .post-title { font-size: 24px; }
}
