/* Escape from Turtle Island — cover palette: black, signal red, slate blue-grey */
:root {
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --surface: #181818;
  --text: #eceae7;
  --text-muted: #8f8c88;
  --accent: #d42832;
  --accent-dim: #9e1e26;
  --accent-glow: rgba(212, 40, 50, 0.28);
  --slate: #6b7f8f;
  --slate-dim: #4a5a66;
  --border: #2a2a2a;
  --font-display: "DM Serif Display", "Georgia", serif;
  --font-title: "Bebas Neue", "Impact", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --max-read: 42rem;
  --max-wide: 72rem;
  --space: clamp(1rem, 3vw, 2rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.15em;
}

a:hover {
  color: #f07078;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Top bar — thin accent like a stamp */
.site-topline {
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent) 20%,
    var(--accent) 80%,
    transparent
  );
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  padding: var(--space) clamp(1.25rem, 5vw, 3rem);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.logo {
  font-family: var(--font-body);
  font-size: clamp(0.78rem, 1.5vw, 0.9rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text);
  text-decoration: none;
  max-width: 14rem;
  line-height: 1.35;
}

.logo:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--slate);
}

.site-nav a.active {
  color: var(--accent);
}

main {
  padding: clamp(2rem, 6vw, 4rem) clamp(1.25rem, 5vw, 3rem);
  max-width: var(--max-wide);
  margin: 0 auto;
}

footer.site-footer {
  margin-top: auto;
  padding: 2rem clamp(1.25rem, 5vw, 3rem);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-inner a {
  color: var(--text-muted);
}

.footer-inner a:hover {
  color: var(--accent);
}

/* Author line — Contact page */
.author-line {
  margin: 0 0 1.75rem;
  max-width: var(--max-read);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-muted);
  font-weight: 400;
}

/* Home hero */
.hero {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  }
}

.hero-copy {
  position: relative;
}

/* Red triangle echo — cover spotlight */
.hero-copy::before {
  content: "";
  position: absolute;
  width: min(42vw, 200px);
  height: min(48vw, 230px);
  left: -4%;
  top: -8%;
  background: linear-gradient(
    165deg,
    rgba(212, 40, 50, 0.35) 0%,
    rgba(107, 127, 143, 0.08) 45%,
    transparent 70%
  );
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.book-title {
  font-family: var(--font-title);
  font-size: clamp(2.85rem, 10vw, 4.85rem);
  font-weight: 400;
  line-height: 0.92;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-wrap: balance;
  color: var(--text);
  text-shadow: 0 0 40px rgba(212, 40, 50, 0.12);
}

.book-title__line {
  display: block;
}

.book-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 2vw, 0.82rem);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: 1.75;
  color: var(--slate);
  margin: 0 0 1.5rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--accent);
}

.book-tagline strong {
  color: var(--text);
  font-weight: 500;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.hero-lede {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.hero-blurb {
  max-width: 36rem;
}

.hero-blurb .hero-lede {
  margin-bottom: 1rem;
}

.hero-blurb .hero-lede:last-child {
  margin-bottom: 1.75rem;
}

.hero-pull {
  font-style: italic;
  color: var(--text);
}

.hero-lede--closing {
  color: var(--text);
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--accent-glow);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  box-shadow: 0 0 24px var(--accent-glow);
  color: #fff;
}

.hero-cover {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.75rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(212, 40, 50, 0.1);
  overflow: hidden;
}

.hero-cover::before {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid var(--accent);
  opacity: 0.25;
  pointer-events: none;
}

/* Front cover: show full art (no spread crop) */
.hero-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(85vh, 720px);
  object-fit: contain;
  object-position: center center;
  background: var(--bg);
}

.cover-placeholder {
  min-height: 280px;
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
  border: 1px dashed var(--border);
}

/* Sections */
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--slate);
  margin: 0 0 1.5rem;
}

.page-eyebrow--accent {
  color: var(--accent);
}

.prose {
  max-width: var(--max-read);
  color: var(--text-muted);
}

.prose p {
  margin: 0 0 1.25em;
}

.prose strong {
  color: var(--text);
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

/* Read hub cards */
.read-grid {
  display: grid;
  gap: 1.25rem;
  max-width: var(--max-read);
  margin-top: 2rem;
}

@media (min-width: 600px) {
  .read-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.read-card {
  display: block;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.read-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow);
}

.read-card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.read-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.read-card .read-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-top: 1rem;
}

/* Chapter layout */
.chapter-body {
  max-width: var(--max-read);
  margin-top: 2rem;
}

.chapter-body p {
  margin: 0 0 1.15em;
  color: var(--text-muted);
  text-indent: 0;
}

.chapter-body p.first-para::first-letter {
  font-family: var(--font-display);
  font-size: 3.2rem;
  float: left;
  line-height: 0.85;
  margin: 0.08em 0.12em 0 0;
  color: var(--accent);
}

.pull-quote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}

/* Subscribe / contact panels */
.panel {
  max-width: var(--max-read);
  margin-top: 2rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.panel-muted {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.newsletter-embed {
  margin-top: 1rem;
}

.newsletter-embed--solo {
  margin-top: 1.5rem;
}

.contact-minimal {
  margin-top: 0.5rem;
  max-width: var(--max-read);
}

.contact-minimal p {
  margin: 0 0 1rem;
}

.contact-label {
  display: inline-block;
  min-width: 5.5rem;
  margin-right: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.embed-slot {
  min-height: 120px;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed var(--border);
  background: var(--bg);
}

.embed-slot p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  max-width: var(--max-read);
}

.contact-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.contact-list strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

/* Flex column page shell */
.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-shell main {
  flex: 1;
}

/* Buy strip */
.buy-strip {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  max-width: var(--max-read);
}

.buy-strip p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.buy-strip-label {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 400;
}
