:root {
  --cream: #f7efe0;
  --parchment: #efe1c6;
  --paper: #fbf6ec;
  --ink: #2e2219;
  --ink-soft: #5c4a3b;
  --cape: #9e2a22;
  --cape-deep: #74190f;
  --gold: #c9922e;
  --gold-soft: #e8c47a;
  --navy: #1f2d4f;
  --line: rgba(46, 34, 25, 0.14);
  --display: "Fraunces", Georgia, serif;
  --body: "Literata", Georgia, serif;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 0.5em; color: var(--ink); }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--cape); }

.eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cape);
  margin-bottom: 0.8em;
}

.button {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  background: var(--cape);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(116, 25, 15, 0.25);
  transition: transform .15s ease, background .15s ease;
}
.button:hover { background: var(--cape-deep); transform: translateY(-1px); }
.button-muted { background: var(--navy); box-shadow: none; cursor: default; }
.button-muted:hover { background: var(--navy); transform: none; }
.textlink { font-family: var(--display); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(247, 239, 224, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--display); font-weight: 900; font-size: 1.35rem; color: var(--cape); text-decoration: none; white-space: nowrap; }
.brand span { font-weight: 500; font-style: italic; color: var(--navy); font-size: 0.95rem; }
.topbar nav { display: flex; gap: clamp(12px, 2.5vw, 28px); }
.topbar nav a { font-family: var(--display); font-weight: 500; font-size: 0.95rem; color: var(--ink); text-decoration: none; }
.topbar nav a:hover { color: var(--cape); }

/* Hero */
.hero { position: relative; min-height: max(min(88vh, 820px), min(calc(100vh - 60px), 45vw)); display: flex; align-items: flex-end; overflow: hidden; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(30, 18, 10, 0.78) 0%, rgba(30, 18, 10, 0.45) 42%, rgba(30, 18, 10, 0) 70%),
              linear-gradient(0deg, rgba(30, 18, 10, 0.5) 0%, rgba(30, 18, 10, 0) 40%);
}
.hero-text { position: relative; z-index: 1; max-width: 600px; padding: 0 clamp(16px, 5vw, 64px) clamp(48px, 9vh, 96px); color: #fff8ec; }
.hero-text .eyebrow { color: var(--gold-soft); }
.hero h1 { color: #fff8ec; font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 900; }
.hero h1 em { font-weight: 500; color: var(--gold-soft); }
.lede { font-size: 1.15rem; max-width: 34em; color: #f3e6d0; }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 10vw, 120px) clamp(16px, 4vw, 40px); }

.meet { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.meet-portrait { max-width: 400px; width: 100%; margin: 0 auto; border-radius: 999px 999px 24px 24px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 20px 50px rgba(46, 34, 25, 0.18); }

.meet-portrait img { width: 100%; height: auto; }
.duties { list-style: none; padding: 0; margin: 0 0 1em; }
.duties li { padding: 0.5em 0 0.5em 2em; border-bottom: 1px dashed var(--line); position: relative; }
.duties li::before { content: "🐾"; position: absolute; left: 0; font-size: 0.9em; top: 0.55em; filter: sepia(1) saturate(2) hue-rotate(-20deg); }
.duties span { font-weight: 600; }
.duties em { color: var(--ink-soft); }
.aside { font-style: italic; color: var(--ink-soft); }

.skill { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; padding-top: 0; }
.skill figure { margin: 0; }
.skill img { border-radius: 18px; box-shadow: 0 20px 50px rgba(46, 34, 25, 0.22); }

/* Decree */
.decree-wrap {
  background: radial-gradient(ellipse at center, #5a1a12 0%, #3a0f0a 100%);
  padding: clamp(64px, 10vw, 120px) 16px;
}
.decree {
  position: relative;
  max-width: 720px; margin: 0 auto;
  background: var(--paper);
  background-image: radial-gradient(ellipse at 20% 10%, rgba(201, 146, 46, 0.12), transparent 60%),
                    radial-gradient(ellipse at 90% 90%, rgba(158, 42, 34, 0.08), transparent 60%);
  padding: clamp(40px, 7vw, 72px) clamp(24px, 7vw, 72px) clamp(56px, 8vw, 80px);
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 0 0 10px var(--paper), inset 0 0 0 11px var(--gold);
  text-align: center;
}
.decree-kicker { font-family: var(--display); font-style: italic; color: var(--ink-soft); }
.decree h2 { color: var(--cape-deep); font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.decree p { text-align: left; }
.decree .decree-kicker, .decree .decree-open { text-align: center; }
.decree-open { font-family: var(--display); font-size: 1.2rem; font-style: italic; margin: 1.2em 0 1.4em; }
.decree-lines { text-align: center !important; font-family: var(--display); font-size: 1.15rem; line-height: 1.8; margin: 1.4em 0; }
.decree strong { color: var(--cape); text-transform: uppercase; letter-spacing: 0.05em; }
.signature { margin-top: 2.2em; text-align: center; }
.signature p { text-align: center !important; margin: 0; }
.signed { font-style: italic; color: var(--ink-soft); }
.sig-name { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 2.8rem; color: var(--navy); line-height: 1.2; }
.sig-titles { font-family: var(--display); font-size: 0.95rem; color: var(--ink-soft); letter-spacing: 0.04em; }
.seal { position: absolute; width: clamp(110px, 18vw, 160px); right: clamp(-20px, -2vw, 0px); bottom: -48px; transform: rotate(-10deg); filter: drop-shadow(0 8px 12px rgba(0,0,0,0.35)); }

/* Book */
.book { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; padding-top: clamp(96px, 12vw, 140px); }
.book-cover img { border-radius: 6px 14px 14px 6px; box-shadow: -2px 0 0 #00000030 inset, 0 30px 60px rgba(46, 34, 25, 0.35); transform: rotate(-2deg); }
.byline { font-family: var(--display); font-style: italic; color: var(--ink-soft); margin-top: -0.3em; }
.book-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 1.8em; }

/* Excerpt */
.excerpt { padding-top: 0; text-align: center; }
.page {
  max-width: 640px; margin: 0 auto; text-align: left;
  background: var(--paper); padding: clamp(32px, 6vw, 64px);
  border-radius: 4px; box-shadow: 0 2px 0 var(--line), 0 18px 40px rgba(46, 34, 25, 0.12);
  font-size: 1.1rem; line-height: 1.8;
}
.page p:first-child { font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: var(--cape-deep); margin-bottom: 0.6em; }
.page .beat { font-family: var(--display); font-style: italic; font-size: 1.35rem; text-align: center; margin: 1.2em 0; color: var(--cape-deep); }

/* Cast */
.cast { text-align: center; }
.cast-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 2em; text-align: left; }
.cat { background: var(--paper); border-radius: 18px; padding: 20px 20px 24px; box-shadow: inset 0 0 0 1px var(--line); }
.cat-art { border-radius: 12px; overflow: hidden; margin-bottom: 18px; box-shadow: 0 0 0 1px var(--line); }
.cat-art img { width: 100%; height: auto; }

.stats { font-family: var(--display); font-style: italic; font-size: 0.9rem; color: var(--cape); margin-bottom: 0.6em; }
.cat p:last-child { margin: 0; font-size: 0.98rem; }

.tall-heading { margin-top: 2.2em; }
.tall-intro { max-width: 36em; margin: 0 auto 2em; color: var(--ink-soft); }
.tall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; max-width: 820px; margin: 0 auto; text-align: left; border-top: 1px solid var(--line); }
.tall div { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.tall div:nth-child(odd) { border-right: 1px solid var(--line); }
.tall dt { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.tall dd { margin: 0; }
.census-note { margin-top: 1.6em; font-style: italic; font-size: 0.9rem; color: var(--ink-soft); }

/* Kingdom */
.kingdom { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; padding-top: 0; }
.places { list-style: none; padding: 0; margin: 1.2em 0 0; }
.places li { padding: 0.7em 0; border-bottom: 1px dashed var(--line); font-size: 0.98rem; color: var(--ink-soft); }
.places strong { display: block; font-family: var(--display); color: var(--ink); font-size: 1.05rem; }
.map { margin: 0; }
.map img { border-radius: 10px; box-shadow: 0 24px 56px rgba(46, 34, 25, 0.3); }

/* Series */
.series { text-align: center; padding-top: 0; }
.shelf { list-style: none; padding: 0; margin: 2em auto; max-width: 720px; text-align: left; }
.shelf li { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 10px; background: var(--paper); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.shelf .num { font-family: var(--display); font-weight: 900; font-size: 1.6rem; color: var(--gold); text-align: center; }
.shelf .title { font-family: var(--display); font-weight: 700; font-size: 1.2rem; }
.shelf .status { font-size: 0.85rem; font-style: italic; color: var(--ink-soft); }
.shelf .current { background: var(--cape); box-shadow: none; }
.shelf .current .num, .shelf .current .title, .shelf .current .status { color: #fff8ec; }
.shelf .later { opacity: 0.6; }
.series-tease { max-width: 34em; margin: 0 auto; font-style: italic; color: var(--ink-soft); }

/* Footer */
.footer { background: var(--ink); color: #e9dcc6; text-align: center; padding: 48px 16px 40px; }
.footer p { margin: 0.3em 0; font-family: var(--display); }
.footer .small { font-family: var(--body); font-size: 0.85rem; opacity: 0.7; }
.footer-seal { width: 64px; margin: 0 auto 16px; }

/* Responsive */
@media (min-width: 1800px) {
  .hero-text { max-width: 760px; padding-left: clamp(64px, 6vw, 140px); }
  .hero h1 { font-size: clamp(4rem, 3vw, 5.2rem); }
  .lede { font-size: 1.3rem; }
}
@media (max-width: 900px) {
  .cast-grid { grid-template-columns: repeat(2, 1fr); }
  .meet, .skill, .book, .kingdom { grid-template-columns: 1fr; }
  .meet-portrait { max-width: 360px; margin: 0 auto; }
  .book-cover { max-width: 380px; margin: 0 auto; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .topbar nav { display: none; }
  .hero { min-height: 92vh; }
  .hero-art { object-position: 58% 0%; height: 66%; -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%); mask-image: linear-gradient(to bottom, #000 60%, transparent 100%); }
  .hero { background: #2a1a10; }
  .hero::after { background: linear-gradient(0deg, rgba(30, 18, 10, 0.88) 0%, rgba(30, 18, 10, 0.5) 50%, rgba(30, 18, 10, 0.1) 80%); }
  .cast-grid { grid-template-columns: 1fr; }
  .tall { grid-template-columns: 1fr; }
  .tall div:nth-child(odd) { border-right: 0; }
  .shelf li { grid-template-columns: 40px 1fr; }
  .shelf .status { grid-column: 2; margin-top: -10px; }
  .seal { right: 50%; transform: translateX(50%) rotate(-10deg); }
}
