/* The Ghost of Vessint · TheGhostOfVessint.com */
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Layout: one long night, read top to bottom. The cover, the jacket copy, the question,
   the city, the cast, the author. Dark by design: it lives inside the cover. */
:root {
  --void: #070c16;        /* page ground, sampled from the cover's sky */
  --deep: #0d1526;        /* raised surfaces */
  --nebula: #12203a;      /* glow behind the cover */
  --rule: #1f2c44;        /* hairlines and quiet borders */
  --ink: #e4e9f1;         /* running text */
  --mist: #97a4ba;        /* secondary text */
  --title: #ede7dc;       /* the cover's warm title white */
  --filament: #a2c7ff;    /* network light, links, focus */
  --heart: #e5494f;       /* the red heart: marks and lights */
  --heart-deep: #b3262f;  /* button fill */
  --on-heart: #fff7f6;
  --amber: #f0a945;       /* a Mog's lawful light */
  --sint: #5fa2ff;        /* a Sint's augment light */

  --display: "Cormorant Garamond", "Cormorant", Garamond, "Hoefler Text", "Times New Roman", serif;
  --text: "Literata", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-label: 0.72rem;
  --fs-small: 0.92rem;
  --fs-body: 1.0625rem;
  --fs-h3: clamp(1.7rem, 2.6vw, 2.15rem);
  --fs-h2: clamp(2.3rem, 4.8vw, 3.6rem);
  --fs-display: clamp(2.3rem, 5.4vw, 4rem);

  --bar-h: 3.5rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 1rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--filament); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--title); }
:focus-visible { outline: 2px solid var(--filament); outline-offset: 3px; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }

.eyebrow {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--filament);
}
h2 {
  margin: 0 0 1.75rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: 1.04;
  letter-spacing: -0.005em;
  color: var(--title);
}

.mark { display: block; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 2.9rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.btn:hover { border-color: var(--filament); color: var(--title); }
.btn-primary { background: var(--heart-deep); border-color: var(--heart-deep); color: var(--on-heart); }
.btn-primary:hover { background: var(--heart); border-color: var(--heart); color: var(--on-heart); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: color-mix(in srgb, var(--void) 84%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--bar-h); }
.brand {
  display: flex; align-items: center; gap: 0.7rem; min-width: 0;
  color: var(--title); text-decoration: none;
  font-family: var(--display); font-weight: 500; font-size: 1.05rem;
  letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
}
.brand .mark { width: 20px; height: 25px; color: var(--heart); flex: none; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav a {
  color: var(--mist); text-decoration: none;
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.16em; text-transform: uppercase;
}
.nav a:hover { color: var(--title); }
@media (max-width: 860px) {
  .nav a:not(.nav-key) { display: none; }
  .nav .nav-key { color: var(--title); border: 1px solid var(--rule); padding: 0.45rem 0.8rem; border-radius: 2px; }
}
@media (max-width: 400px) { .brand { font-size: 0.92rem; letter-spacing: 0.12em; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: clip;
  background: radial-gradient(90% 70% at 62% 28%, var(--nebula) 0%, var(--void) 62%);
}
.hero-sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cover {
  position: relative;
  margin: 0 auto;
  max-width: 1180px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.cover img {
  display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 887 / 444;
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
}
.byline-over {
  position: absolute; left: 7.4%; top: 63.5%; margin: 0;
  display: grid; gap: 0.5em;
  font-size: clamp(0.8rem, 1.45vw, 1.1rem);
}
.byline-over .by, .byline-under .by {
  font-family: var(--mono); font-size: 0.68em; letter-spacing: 0.34em; text-transform: uppercase; color: var(--mist);
}
.byline-over .name, .byline-under .name {
  font-family: var(--display); font-weight: 500; font-size: 1.55em; letter-spacing: 0.22em; text-transform: uppercase; color: var(--title); line-height: 1;
}
.byline-under { display: none; margin: 0; gap: 0.45rem; font-size: 1rem; }

.hero-copy { position: relative; max-width: 1180px; margin-inline: auto; }
.hero-copy-inner {
  display: grid; gap: 2rem;
  margin-left: 6%;
  padding-block: clamp(0.5rem, 2vw, 1.5rem) clamp(3.5rem, 8vw, 6rem);
}
.lede {
  margin: 0; max-width: 34ch;
  font-family: var(--display); font-style: italic; font-weight: 400;
  font-size: clamp(1.55rem, 3.1vw, 2.35rem); line-height: 1.22;
}
.lede span { display: block; }
.lede .l1 { color: var(--mist); }
.lede .l2 { color: var(--title); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.facts { display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; margin: 0.5rem 0 0; }
.facts div { display: grid; gap: 0.25rem; }
.facts dt { font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--mist); }
.facts dd { margin: 0; font-size: var(--fs-small); color: var(--ink); }

@media (max-width: 720px) {
  .byline-over { display: none; }
  .byline-under { display: grid; }
  .hero-copy-inner { margin-left: 0; gap: 1.6rem; }
}

/* ---------- the book ---------- */
.book-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 6.5rem);
  align-items: start;
}
.first-line { position: sticky; top: calc(var(--bar-h) + 2.5rem); }
.first-line blockquote {
  margin: 0;
  font-family: var(--display); font-weight: 500; font-size: var(--fs-display); line-height: 1.04;
  color: var(--title); text-wrap: balance;
}
.first-line .cite {
  display: flex; align-items: center; gap: 0.7rem; margin: 1.6rem 0 0;
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist);
}
.first-line .cite .mark { width: 14px; height: 18px; color: var(--heart); }
.jacket p { margin: 0 0 1.15em; max-width: 62ch; }
.jacket p:last-child { margin-bottom: 0; }
.jacket .voice { font-family: var(--display); font-style: italic; font-size: 1.45rem; line-height: 1.35; color: var(--title); }
@media (max-width: 860px) {
  .book-grid { grid-template-columns: minmax(0, 1fr); }
  .first-line { position: static; }
}

/* ---------- the question ---------- */
.question {
  background: linear-gradient(180deg, var(--deep) 0%, var(--void) 100%);
  border-block: 1px solid var(--rule);
}
.question-inner { display: grid; gap: 1.5rem; }
.question h2 { margin: 0; max-width: 19ch; font-style: italic; font-weight: 400; font-size: clamp(2.2rem, 5.6vw, 4.4rem); line-height: 1.02; }
.question p:not(.eyebrow) { margin: 0; max-width: 60ch; font-size: 1.125rem; color: var(--mist); }
.question p strong { font-weight: 500; color: var(--ink); }

/* ---------- Vessint ---------- */
.section-lede { margin: 0; max-width: 54ch; font-size: 1.2rem; line-height: 1.55; color: var(--mist); }

.primer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.75rem clamp(2rem, 4vw, 3.5rem);
  margin: clamp(3rem, 7vw, 5rem) 0 0;
}
.primer > div { display: grid; gap: 0.55rem; align-content: start; min-width: 0; }
.primer .tag {
  display: flex; align-items: center; gap: 0.5rem; margin: 0;
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--filament);
  font-variant-numeric: tabular-nums;
}
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--heart); box-shadow: 0 0 8px var(--heart); }
.primer .dot.sint { background: var(--sint); box-shadow: 0 0 8px var(--sint); }
.primer .dot.mog { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.primer dt { font-family: var(--display); font-weight: 500; font-size: 1.6rem; line-height: 1.1; color: var(--title); }
.primer dd { margin: 0; font-size: var(--fs-small); line-height: 1.6; color: var(--mist); }
@media (max-width: 900px) { .primer { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .primer { grid-template-columns: minmax(0, 1fr); } }

/* ---------- characters ---------- */
.cast { background: var(--deep); border-block: 1px solid var(--rule); }
.cast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(3rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 5.5rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.person { display: grid; gap: 0.8rem; align-content: start; min-width: 0; }
.person .meta { margin: 0; font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mist); }
.person h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: var(--fs-h3); line-height: 1.05; color: var(--title); }
.person p { margin: 0; max-width: 58ch; }
.person blockquote {
  position: relative; margin: 0.4rem 0 0; padding-left: 1.4rem;
  font-family: var(--display); font-style: italic; font-size: 1.3rem; line-height: 1.35; color: var(--mist);
}
.person blockquote::before {
  content: "\201C"; position: absolute; left: 0; top: -0.12em;
  font-size: 2.2rem; line-height: 1; color: var(--heart); font-style: normal;
}
.later { margin: clamp(3rem, 6vw, 4.5rem) 0 0; max-width: 64ch; font-family: var(--display); font-style: italic; font-size: 1.35rem; line-height: 1.4; color: var(--mist); }
@media (max-width: 760px) { .cast-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- author ---------- */
.author-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}
.bio p:not(.eyebrow) { margin: 0 0 1.1em; max-width: 62ch; }
.author-facts { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; margin: 2.25rem 0 0; }
.author-facts div { display: grid; gap: 0.15rem; }
.author-facts dt { font-family: var(--display); font-weight: 500; font-size: 2.4rem; line-height: 1; color: var(--title); font-variant-numeric: lining-nums; }
.author-facts dd { margin: 0; font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mist); }
.elsewhere { display: grid; gap: 2.5rem; }
.elsewhere h3 { margin: 0 0 0.25rem; font-family: var(--mono); font-weight: 400; font-size: var(--fs-label); letter-spacing: 0.2em; text-transform: uppercase; color: var(--filament); }
.work { display: grid; gap: 0.35rem; padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.work:last-child { border-bottom: 0; }
.work h4 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 1.55rem; line-height: 1.1; color: var(--title); }
.work p { margin: 0; font-size: var(--fs-small); color: var(--mist); }
.work .links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
.site-links { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.site-links a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.site-links a span:last-child { font-family: var(--mono); font-size: 0.72rem; color: var(--mist); }
.site-links a:hover { color: var(--title); border-bottom-color: var(--filament); }
@media (max-width: 860px) { .author-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--rule); }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 2.25rem; }
.site-foot p { margin: 0; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist); }
.site-foot .mark { width: 16px; height: 20px; color: var(--heart); }
.site-foot .sig { display: flex; align-items: center; gap: 0.7rem; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
