/* ==========================================================================
   Fonts
   ========================================================================== */

@font-face {
  font-family: "Libertinus Serif";
  src: url("assets/fonts/LibertinusSerif-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Libertinus Serif";
  src: url("assets/fonts/LibertinusSerif-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Libertinus Serif";
  src: url("assets/fonts/LibertinusSerif-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fira Mono";
  src: url("assets/fonts/FiraMono-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --bg: #0e0d0c;
  --surface: #181613;
  --surface-hi: #211e1a;
  --ink: #ece5d6;
  --ink-soft: #a8a298;
  --ink-quiet: #6b6760;
  --accent: #e0a85f;
  --accent-deep: #c79140;
  --rule: rgba(236, 229, 214, 0.10);
  --rule-strong: rgba(236, 229, 214, 0.18);

  --serif: "Libertinus Serif", Georgia, "Times New Roman", serif;
  --display: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: "Fira Mono", "SF Mono", Menlo, ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(224, 168, 95, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 10%, rgba(199, 145, 64, 0.05), transparent 70%);
  background-attachment: fixed;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: 62rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
a:hover { color: var(--ink); border-bottom-color: currentColor; }

.star {
  color: var(--accent);
  font-family: var(--display);
  font-weight: 500;
  margin-left: 0.05em;
}

::selection { background: var(--accent); color: var(--bg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 3.5rem;
  align-items: center;
  padding: 1rem 0 3.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.hero-cover {
  display: block;
  border: none;
  line-height: 0;
  border-radius: 2px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(236, 229, 214, 0.06),
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 10px 20px -8px rgba(0, 0, 0, 0.5);
  transition: transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 250ms ease;
}
.hero-cover:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(224, 168, 95, 0.18),
    0 40px 70px -20px rgba(0, 0, 0, 0.8),
    0 14px 26px -8px rgba(0, 0, 0, 0.6);
}
.hero-cover img { display: block; width: 100%; height: auto; }

.hero-text { max-width: 34rem; }

.hero-kicker {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-size: 0.78rem;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.hero-kicker::after {
  content: "";
  display: inline-block;
  width: 2.2rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.hero-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 8.5vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 1rem;
}

.hero-byline {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 1.8rem;
}

.hero-strap {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.28rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 2.2rem;
  text-wrap: balance;
  padding-left: 1.1rem;
  border-left: 2px solid var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
}

.hero-aster {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-quiet);
  text-transform: uppercase;
}
.hero-aster .star {
  font-size: 0.85rem;
  color: var(--accent);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
  min-width: 13rem;
}
.btn:hover {
  background: var(--surface-hi);
  border-color: var(--accent);
  border-bottom-color: var(--accent);
  color: var(--ink);
  transform: translateY(-1px);
}
.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.btn--wide { min-width: 16rem; flex: 1 1 16rem; }

.btn-label {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 0.98rem;
}
.btn-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: inherit;
  opacity: 0.65;
  margin-top: 0.2rem;
}

/* ==========================================================================
   Sections
   ========================================================================== */

section { margin-bottom: 4rem; }

/* Epigraph: big centered pull quote */

.epigraph-block {
  text-align: center;
  padding: 2rem 1rem 1rem;
}
.epigraph-big {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  line-height: 1.45;
  color: var(--ink);
  max-width: 38rem;
  margin: 0 auto;
  text-wrap: balance;
  position: relative;
}
.epigraph-big p + p {
  margin-top: 0.6rem;
  color: var(--accent);
}

/* Opening passage: just prose, no inset panel */

.opening { padding: 0; }
.opening-panel {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 0.5rem;
}
.opening-chap {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 1.8rem;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.opening-chap::before {
  content: "";
  display: inline-block;
  width: 1.8rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}
.opening-body p {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 1.1rem;
}
.opening-body p:last-child { margin-bottom: 0; }
.opening-body p:first-child::first-letter {
  font-size: 2.6em;
  float: left;
  line-height: 1;
  padding: 0.18em 0.12em 0 0;
  color: var(--accent);
  font-weight: 400;
}

/* CTA: repeat download */

.cta {
  padding-top: 1rem;
}
.cta-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 36rem;
  margin: 0 auto;
}

/* ==========================================================================
   Colophon
   ========================================================================== */

.colophon {
  border-top: 1px solid var(--rule);
  padding-top: 1.6rem;
  margin-top: 1rem;
  text-align: center;
}
.col-sign {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-quiet);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 760px) {
  body { font-size: 17px; }
  main { padding: 2rem 1.1rem 2.5rem; }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.6rem;
    padding-bottom: 2.2rem;
    margin-bottom: 2rem;
  }
  .hero-cover {
    max-width: 15rem;
    margin: 0 auto;
  }
  .hero-text { max-width: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { min-width: 0; width: 100%; }

  .opening-panel { padding: 1.4rem 1.3rem 1.6rem; }
  .cta-row { flex-direction: column; }
  .btn--wide { min-width: 0; }
}

@media (max-width: 420px) {
  .hero-title { font-size: 3rem; }
}
