/* The Last Lantern — Ken Sevier
   Palette taken from the cover: night blue, lantern gold, parchment. */

:root {
  color-scheme: dark;

  --ink:        #0a0e16;
  --ink-2:      #0f1623;
  --ink-3:      #151e2d;
  --line:       #243044;
  --line-warm:  rgba(227, 168, 79, 0.28);

  --gold:       #e3a84f;
  --gold-soft:  #f3cd8d;
  --gold-dim:   #a8793a;

  --text:       #e9e2d5;
  --text-dim:   #a9b3c4;
  --text-faint: #76829a;

  --maxw: 1120px;
  --gutter: 20px;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --r: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--gold-soft); text-decoration-color: var(--line-warm); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.15em; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow { max-width: 760px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.73rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
  font-weight: 600;
}

.lede { font-size: 1.2rem; color: var(--text); }

.dim { color: var(--text-dim); }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 22, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.22rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand:hover { color: var(--gold-soft); }

.brand svg { flex: none; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 8px 11px;
  border-radius: 6px;
}

.nav a:hover { color: var(--text); background: var(--ink-3); }
.nav a[aria-current="page"] { color: var(--gold); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--r);
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  font-family: var(--sans);
}

.btn:active { transform: translateY(1px); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #2a1a06;
  box-shadow: 0 8px 26px rgba(227, 168, 79, 0.22);
}

.btn-gold:hover { color: #2a1a06; filter: brightness(1.06); }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold-soft); background: rgba(227,168,79,0.05); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(44px, 7vw, 86px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% 0 auto 0;
  height: 760px;
  background: radial-gradient(60% 55% at 50% 40%, rgba(227, 168, 79, 0.16), rgba(227, 168, 79, 0.04) 45%, transparent 72%);
  pointer-events: none;
}

.hero .wrap { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.cover-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-warm);
  box-shadow: var(--shadow), 0 0 70px rgba(227, 168, 79, 0.12);
}

.cover-frame img { width: 100%; }

.hero h1 { margin-bottom: 0.2em; }

.byline {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.4rem;
}

.hook {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.4;
  color: var(--text);
  margin: 0 0 1.6rem;
}

/* ---------- stat strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  margin: 0;
}

.stats div {
  background: var(--ink-2);
  padding: 20px 18px;
}

.stats dt {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  color: var(--gold-soft);
  line-height: 1.1;
}

.stats dd span { font-size: 0.95rem; color: var(--text-dim); font-family: var(--sans); }

/* ---------- sections ---------- */

section { padding: clamp(52px, 7vw, 92px) 0; }

section + section { border-top: 1px solid var(--line); }

.section-alt { background: var(--ink-2); }

.rule {
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  border: 0;
  margin: 0 0 1.6rem;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
}

.card h3 { color: var(--gold-soft); margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }

.card-num {
  font-family: var(--serif);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: block;
  margin-bottom: 10px;
}

/* ---------- pull quote / ledger ---------- */

.ledger {
  background: var(--ink-3);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 24px 28px;
  margin: 2rem 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--gold-soft);
}

.ledger span { display: block; font-family: var(--sans); font-size: 0.82rem; color: var(--text-faint); margin-top: 10px; letter-spacing: 0.05em; }

/* ---------- book list ---------- */

.book {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 26px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}

.book:first-of-type { border-top: 0; }

.book .numeral {
  font-family: var(--serif);
  font-size: 3.4rem;
  color: var(--gold-dim);
  line-height: 0.9;
  text-align: center;
}

.book .numeral small {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 8px;
}

.meta {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta li {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 4px 12px;
}

.meta li.live { color: var(--gold); border-color: var(--line-warm); }

/* ---------- newsletter ---------- */

.signup {
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line-warm);
  border-radius: 14px;
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
}

.signup h2 { margin-bottom: 0.3em; }

.signup form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 1.6rem auto 0;
  flex-wrap: wrap;
}

.signup input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 13px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--sans);
}

.signup input[type="email"]:focus {
  outline: 2px solid var(--gold-dim);
  outline-offset: 1px;
  border-color: var(--gold-dim);
}

.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note {
  font-size: 0.86rem;
  color: var(--text-faint);
  margin: 1rem 0 0;
}

.form-msg { margin: 1rem 0 0; font-size: 0.95rem; min-height: 1.4em; }
.form-msg.ok { color: var(--gold-soft); }
.form-msg.err { color: #f0a0a0; }

/* ---------- faq ---------- */

details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

details summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.22rem;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: "+";
  color: var(--gold);
  font-size: 1.4rem;
  line-height: 1;
  flex: none;
}

details[open] summary::after { content: "\2013"; }

details summary:hover { color: var(--gold-soft); }

details .body { padding-top: 12px; color: var(--text-dim); }
details .body p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--ink-2);
  padding: 48px 0 56px;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 32px;
  margin-bottom: 36px;
}

.foot-grid h4 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.9em;
}

.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { color: var(--text-faint); text-decoration: none; }
.foot-grid a:hover { color: var(--gold-soft); }

.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

/* ---------- page header (inner pages) ---------- */

.page-head {
  padding: clamp(42px, 6vw, 72px) 0 clamp(26px, 4vw, 40px);
  position: relative;
  overflow: hidden;
}

.page-head::before {
  content: "";
  position: absolute;
  inset: -60% 0 auto 0;
  height: 520px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(227, 168, 79, 0.1), transparent 70%);
  pointer-events: none;
}

.page-head .wrap { position: relative; }

/* ---------- prose ---------- */

.prose h2 { margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }

.portrait-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .cover-frame { max-width: 260px; margin-inline: auto; }
  .hero { text-align: center; }
  .hero .btn-row { justify-content: center; }
  .rule { margin-inline: auto; }
  .book { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .book .numeral { text-align: left; font-size: 2.4rem; display: flex; align-items: baseline; gap: 14px; }
  .book .numeral small { margin-top: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav a { padding: 7px 8px; font-size: 0.86rem; }
  .brand { font-size: 1.05rem; }
  .card { padding: 22px; }
}

/* ---------- about layout ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: clamp(32px, 5vw, 60px);
  align-items: start;
}

.side-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
  position: sticky;
  top: 88px;
}

.side-card h3 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1em;
}

.side-card dl { margin: 0; }
.side-card dt {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.side-card dd {
  margin: 2px 0 16px;
  color: var(--text);
  font-size: 0.95rem;
}
.side-card dd:last-child { margin-bottom: 0; }

@media (max-width: 880px) {
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .side-card { position: static; }
}
