/* The Destiny of Ed */
:root {
  --ink: #0b0d12;
  --ink-2: #131722;
  --ink-3: #1d2331;
  --line: rgba(255, 255, 255, .09);
  --text: #e9e4da;
  --muted: #a39d92;
  --gold: #e7b153;
  --gold-2: #f4d08e;
  --glow: #5cc2ff;
  --paper: #f5f0e6;
  --paper-ink: #22201c;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --book: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
}
a { color: var(--gold-2); }
img { max-width: 100%; display: block; }

/* ------- header / footer ------- */
.site-head {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .8rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(11, 13, 18, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  color: var(--text); text-decoration: none;
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: .02em;
}
.brand .enso { width: 1.7rem; height: 1.7rem; color: var(--glow); filter: drop-shadow(0 0 6px rgba(92, 194, 255, .6)); }
.site-head nav { display: flex; gap: clamp(.8rem, 2.5vw, 1.8rem); flex-wrap: wrap; }
.site-head nav a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase;
}
.site-head nav a:hover { color: var(--text); }

.site-foot {
  margin-top: 5rem; padding: 3rem 1.5rem 3.5rem; text-align: center;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem;
}
.site-foot .enso { width: 2.2rem; height: 2.2rem; color: var(--gold); margin: 0 auto 1rem; opacity: .8; }
.fine { font-size: .8rem; color: #7d786f; }

/* ------- shared ------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 4rem clamp(1.2rem, 4vw, 2.5rem) 0; }
.narrow { max-width: 720px; }
.center { text-align: center; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0 0 .6em; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
.page-title { font-size: clamp(2.6rem, 6vw, 4rem); text-align: center; margin-bottom: 2.5rem; }
.lede { color: var(--muted); font-size: 1.1rem; }
.btn {
  display: inline-block; padding: .85rem 1.6rem; border-radius: 999px;
  background: var(--gold); color: #1a1408; text-decoration: none;
  font-weight: 600; letter-spacing: .03em; border: 1px solid var(--gold);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(231, 177, 83, .25); }
.btn.ghost { background: transparent; color: var(--text); border-color: rgba(255, 255, 255, .25); }
.more { text-decoration: none; font-weight: 500; }

.placeholder {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 60%, rgba(231, 177, 83, .28), transparent 55%),
    radial-gradient(circle at 30% 20%, rgba(92, 194, 255, .18), transparent 50%),
    linear-gradient(160deg, #1b2130, #0b0d12);
}
.placeholder .enso { width: 34%; max-width: 160px; color: var(--glow); opacity: .75; filter: drop-shadow(0 0 14px rgba(92, 194, 255, .7)); }

/* ------- home ------- */
.hero {
  position: relative; min-height: min(92vh, 900px);
  display: grid; align-items: end; overflow: hidden;
}
.hero-art, .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 13, 18, .15) 0%, rgba(11, 13, 18, .35) 45%, var(--ink) 100%);
}
.hero-text {
  position: relative; max-width: 760px;
  padding: 0 clamp(1.2rem, 5vw, 4rem) clamp(3rem, 8vh, 6rem);
}
.eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: .8rem; color: var(--gold-2); margin: 0 0 .8rem; }
.hero h1 { font-size: clamp(3.2rem, 9vw, 6.6rem); margin: 0; text-shadow: 0 4px 40px rgba(0, 0, 0, .6); }
.byline { font-family: var(--serif); font-style: italic; font-size: 1.5rem; margin: .3rem 0 1.4rem; color: var(--gold-2); }
.logline { font-size: 1.12rem; max-width: 640px; color: #ddd7cc; }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }

.countdown {
  display: flex; align-items: center; justify-content: center; gap: clamp(.8rem, 3vw, 2rem);
  padding: 2.5rem 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--ink-2); text-align: center;
}
.countdown div:not(.line) { display: flex; flex-direction: column; }
.countdown .big { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.8rem); color: var(--text); line-height: 1; }
.countdown span:not(.big) { text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; color: var(--muted); margin-top: .4rem; }
.countdown .line { flex: 0 1 140px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

.premise { max-width: 780px; font-size: 1.15rem; color: #d8d2c7; }
.premise h2 { text-align: center; }

.band { position: relative; margin-top: 5rem; min-height: 420px; display: grid; place-items: center; overflow: hidden; }
.band-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0; background: rgba(11, 13, 18, .55); }
.band blockquote {
  position: relative; z-index: 1; margin: 0; padding: 2rem; max-width: 900px; text-align: center;
  font-family: var(--serif); font-style: italic; font-size: clamp(1.9rem, 4.5vw, 3.2rem); line-height: 1.2;
  text-shadow: 0 3px 30px rgba(0, 0, 0, .7);
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; margin: 2rem 0 1.5rem; }
.card {
  position: relative; display: block; border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--text);
  background: var(--ink-2); border: 1px solid var(--line); aspect-ratio: 3 / 4;
}
.card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img { transform: scale(1.04); }
.card-text {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem 1.1rem 1rem;
  background: linear-gradient(180deg, transparent, rgba(11, 13, 18, .92) 45%);
}
.card h3 { font-size: 1.6rem; margin: 0; }
.tag { color: var(--gold-2); font-size: .85rem; letter-spacing: .03em; margin: .2rem 0 0; }

.parts-list { list-style: none; padding: 0; margin: 2rem auto 2.5rem; max-width: 760px; }
.parts-list li { display: grid; grid-template-columns: 8rem 1fr; gap: .2rem 1.2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.parts-list .kick { text-transform: uppercase; letter-spacing: .18em; font-size: .75rem; color: var(--muted); align-self: center; }
.parts-list .pname { font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.parts-list .span { grid-column: 2; color: var(--muted); font-size: .9rem; }

/* ------- characters / world ------- */
.person {
  display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 2rem; align-items: center;
  padding: 2rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 5rem;
}
.person-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.person h2 { font-size: 2.3rem; margin-bottom: .2rem; }
.person p { color: #d8d2c7; font-size: 1.08rem; }
.world .person-img { aspect-ratio: 16 / 10; }
@media (max-width: 700px) { .person { grid-template-columns: 1fr; } }

/* ------- contents ------- */
.toc-part { margin: 2.6rem 0; }
.toc-part h2 { font-size: 2rem; margin-bottom: .1rem; }
.toc-part .kick { display: block; text-transform: uppercase; letter-spacing: .2em; font-family: var(--sans); font-size: .72rem; color: var(--muted); margin-bottom: .3rem; }
.toc-part .span { color: var(--muted); font-size: .9rem; margin: 0 0 .8rem; }
.toc-part ol { list-style: none; padding: 0; margin: 0; }
.toc-part li a {
  display: flex; gap: 1rem; padding: .7rem .2rem; border-bottom: 1px solid var(--line);
  color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 1.35rem;
}
.toc-part li a:hover { color: var(--gold-2); }
.toc-part .n { min-width: 2rem; color: var(--muted); font-family: var(--sans); font-size: .9rem; padding-top: .35rem; }

/* ------- reader ------- */
body.reader { background: var(--paper); color: var(--paper-ink); }
body.reader .site-head { background: rgba(245, 240, 230, .9); border-bottom-color: rgba(0, 0, 0, .08); }
body.reader .brand, body.reader .site-head nav a:hover { color: var(--paper-ink); }
body.reader .site-head nav a { color: #6f685d; }
body.reader .site-foot { border-top-color: rgba(0, 0, 0, .08); color: #6f685d; }
body.reader a { color: #8a5a12; }

.reader-tools { max-width: 680px; margin: 1.2rem auto 0; padding: 0 1.4rem; text-align: right; }
.reader-tools button {
  font: 500 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase;
  background: none; border: 1px solid currentColor; color: inherit; opacity: .6;
  border-radius: 999px; padding: .35rem .9rem; cursor: pointer;
}
.chapter { max-width: 680px; margin: 0 auto; padding: 1rem 1.4rem 0; }
.part-banner { text-align: center; font-family: var(--serif); font-size: 2.2rem; margin: 2rem 0 0; }
.part-banner span { display: block; font-family: var(--sans); font-size: .75rem; letter-spacing: .25em; text-transform: uppercase; opacity: .6; margin-bottom: .3rem; }
.chap-head { text-align: center; margin: 3rem 0 2.8rem; }
.chap-num { font-family: var(--serif); font-size: 4rem; line-height: 1; margin: 0; opacity: .85; }
.chap-head h1 { font-size: clamp(2rem, 5vw, 2.7rem); font-style: italic; margin: .4rem 0 1rem; }
.chap-date { margin: 0; font-size: .9rem; letter-spacing: .04em; opacity: .7; }
.chap-count { margin: .1rem 0 0; font-family: var(--serif); font-style: italic; font-size: 1.05rem; opacity: .7; }

.prose { font-family: var(--book); font-size: 1.14rem; line-height: 1.78; }
.prose p { margin: 0; text-indent: 1.6em; }
.prose p:first-child, .prose .break + p, .prose .stamp + p, .prose .hud + p, .prose blockquote + p { text-indent: 0; }
.prose .break { text-align: center; margin: 1.8rem 0; text-indent: 0; letter-spacing: .3em; opacity: .5; }
.prose .stamp { text-align: center; text-indent: 0; font-size: .85rem; opacity: .7; margin: 1rem 0 .8rem; font-family: var(--sans); }
.prose .stamp.sub { font-style: italic; font-family: var(--serif); font-size: 1rem; margin-top: -.5rem; }
.prose .hud { text-align: center; text-indent: 0; margin: .5rem 0; }
.prose code { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: .9em; letter-spacing: .02em; }
.prose blockquote { margin: .8rem 0 .8rem 1.4rem; padding-left: 1rem; border-left: 2px solid rgba(0, 0, 0, .15); }
.prose blockquote p { text-indent: 0; }

.chap-nav {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center;
  margin: 3.5rem 0 0; padding: 1.4rem 0; border-top: 1px solid rgba(0, 0, 0, .1);
  font-family: var(--sans); font-size: .95rem;
}
.chap-nav a { text-decoration: none; font-weight: 500; }
.chap-nav .next { text-align: right; }
.chap-nav .toc { opacity: .7; }

/* night reading */
html.night body.reader { background: #14161c; color: #ddd6ca; }
html.night body.reader .site-head { background: rgba(20, 22, 28, .9); border-bottom-color: var(--line); }
html.night body.reader .brand, html.night body.reader .site-head nav a:hover { color: #ddd6ca; }
html.night body.reader a { color: var(--gold-2); }
html.night .prose blockquote { border-left-color: var(--line); }
html.night .chap-nav { border-top-color: var(--line); }

@media (max-width: 640px) {
  .site-head { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .prose { font-size: 1.06rem; }
  .parts-list li { grid-template-columns: 1fr; }
  .parts-list .span { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
