@font-face { font-family: "Cinzel"; src: url("cinzel.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("cormorant.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("cormorant-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }

:root {
  --bg: #120d17;
  --bg-2: #1b1422;
  --panel: #211829;
  --line: #3a2d45;
  --cream: #ece4d6;
  --muted: #b9ad9f;
  --lav: #bea8cd;
  --lav-deep: #8a6aa3;
  --gold: #e3b26a;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: "Cormorant", Georgia, serif;
  font-size: 1.28rem;
  line-height: 1.6;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lav); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cream); }

h1, h2, h3, .caps {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1.25;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.45rem, 3.2vw, 2rem); }
h3 { font-size: 1.15rem; letter-spacing: .1em; color: var(--lav); }
p { margin: 0 0 1em; }
em, i { font-style: italic; }

.wrap { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2.5rem); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(18, 13, 23, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { font-family: "Cinzel", serif; letter-spacing: .14em; color: var(--cream); text-decoration: none; font-size: 1rem; white-space: nowrap; }
.nav { display: flex; gap: 1.4rem; align-items: center; }
.nav a { font-family: "Cinzel", serif; font-size: .78rem; letter-spacing: .14em; text-decoration: none; color: var(--muted); text-transform: uppercase; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--cream); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--cream); font-family: "Cinzel", serif; font-size: .75rem; letter-spacing: .14em; padding: .45rem .8rem; border-radius: 4px; cursor: pointer; }
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-2); flex-direction: column; align-items: flex-start; padding: 1rem 1.25rem 1.4rem; border-bottom: 1px solid var(--line); gap: 1rem; }
  .nav.open { display: flex; }
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(180deg, rgba(18,13,23,.25) 0%, rgba(18,13,23,.55) 55%, var(--bg) 100%), url("../img/hero.jpg") center top / cover no-repeat;
  padding: 5rem 0 4rem;
}
.hero .wrap { display: grid; grid-template-columns: 300px 1fr; gap: 3.5rem; align-items: center; }
.hero .cover { box-shadow: 0 30px 60px rgba(0,0,0,.6); border-radius: 2px; }
.hero .kicker { font-family: "Cinzel", serif; letter-spacing: .2em; font-size: .8rem; color: var(--lav); text-transform: uppercase; }
.hero .tagline { font-style: italic; font-size: 1.6rem; line-height: 1.35; margin: .4rem 0 1.2rem; }
@media (max-width: 760px) {
  .hero { padding: 3rem 0; }
  .hero .wrap { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .hero .cover { width: 220px; margin-inline: auto; }
  .btn-row { justify-content: center; }
}

/* Page banner */
.banner {
  background: linear-gradient(180deg, rgba(18,13,23,.15), var(--bg) 92%), url("../img/wisteria-band.jpg") center top / cover no-repeat;
  padding: 5.5rem 0 2.5rem;
  text-align: center;
}
.banner .kicker { font-family: "Cinzel", serif; letter-spacing: .2em; font-size: .78rem; color: var(--lav); text-transform: uppercase; margin-bottom: .6rem; }
.banner p.lead { font-style: italic; font-size: 1.4rem; color: var(--muted); max-width: 640px; margin: 0 auto; }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.2rem 0; }
.btn {
  display: inline-block; font-family: "Cinzel", serif; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .85rem 1.3rem; border-radius: 3px; text-decoration: none; border: 1px solid var(--lav); color: var(--cream); background: transparent; cursor: pointer;
}
.btn:hover { background: rgba(190,168,205,.12); color: var(--cream); }
.btn.solid { background: var(--lav); color: #1a1220; border-color: var(--lav); }
.btn.solid:hover { background: var(--cream); border-color: var(--cream); }

/* Sections */
section { padding: 3.5rem 0; }
.divider { display: flex; align-items: center; justify-content: center; gap: .9rem; margin: 1.6rem auto; }
.divider::before, .divider::after { content: ""; width: 90px; height: 1px; background: var(--lav); opacity: .8; }
.divider span { width: 9px; height: 9px; background: var(--lav); transform: rotate(45deg); }
.center { text-align: center; }
.muted { color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1.8rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1.6rem; text-decoration: none; color: var(--cream); display: block; transition: border-color .2s; }
a.card:hover { border-color: var(--lav-deep); color: var(--cream); }
.card h3 { margin-bottom: .4rem; }
.card p { margin: 0; color: var(--muted); font-size: 1.15rem; }

.book-row { display: grid; grid-template-columns: 260px 1fr; gap: 3rem; align-items: start; }
.book-row img { box-shadow: 0 20px 45px rgba(0,0,0,.55); }
@media (max-width: 760px) { .book-row { grid-template-columns: 1fr; } .book-row img { width: 200px; margin-inline: auto; } }

.facts { list-style: none; padding: 0; margin: 1rem 0; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: 1.12rem; }
.facts li span:first-child { font-family: "Cinzel", serif; font-size: .75rem; letter-spacing: .14em; color: var(--lav); text-transform: uppercase; padding-top: .3rem; }

/* Characters */
.character { display: grid; grid-template-columns: 170px 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.character:last-of-type { border-bottom: 0; }
.character .who { font-family: "Cinzel", serif; }
.character .who .name { font-size: 1.5rem; letter-spacing: .1em; display: block; }
.character .who .role { font-size: .72rem; letter-spacing: .16em; color: var(--lav); text-transform: uppercase; }
.character blockquote { margin: 1rem 0 0; padding-left: 1rem; border-left: 2px solid var(--lav-deep); font-style: italic; color: var(--muted); }
@media (max-width: 640px) { .character { grid-template-columns: 1fr; gap: .6rem; } }
.neighbors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 1.2rem; }
@media (max-width: 640px) { .neighbors { grid-template-columns: 1fr; } }
.house { font-family: "Cinzel", serif; font-size: .72rem; letter-spacing: .16em; color: var(--gold); text-transform: uppercase; }

/* Spoiler gate */
.gate { text-align: center; }
.gated[hidden] { display: none; }
ol.questions { padding-left: 1.4rem; }
ol.questions li { margin-bottom: 1.2rem; padding-left: .4rem; }
ol.questions li::marker { font-family: "Cinzel", serif; color: var(--lav); }

.note { border-left: 2px solid var(--lav-deep); padding: .2rem 0 .2rem 1.1rem; color: var(--muted); font-size: 1.15rem; }

/* Forms */
form .field { margin-bottom: 1.1rem; }
label { display: block; font-family: "Cinzel", serif; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--lav); margin-bottom: .4rem; }
input[type=text], input[type=email], textarea, select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); color: var(--cream); border-radius: 4px;
  padding: .75rem .9rem; font-family: "Cormorant", Georgia, serif; font-size: 1.2rem;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--lav-deep); outline-offset: 1px; }
textarea { min-height: 150px; resize: vertical; }
.check { display: flex; gap: .6rem; align-items: center; font-size: 1.12rem; }
.check label { margin: 0; font-family: "Cormorant", serif; font-size: 1.12rem; letter-spacing: 0; text-transform: none; color: var(--cream); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin-top: .8rem; font-style: italic; color: var(--lav); min-height: 1.5em; }
.inline-form { display: flex; gap: .7rem; flex-wrap: wrap; max-width: 560px; margin: 1rem auto 0; }
.inline-form input { flex: 1 1 240px; }

/* Comments */
.comment { border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
.comment .meta { font-family: "Cinzel", serif; font-size: .74rem; letter-spacing: .14em; color: var(--lav); text-transform: uppercase; margin-bottom: .3rem; }
.comment .body { white-space: pre-wrap; }
.comment.spoiler .body { filter: blur(6px); cursor: pointer; user-select: none; transition: filter .2s; }
.comment.spoiler.shown .body { filter: none; user-select: auto; cursor: auto; }
.spoiler-tag { display: inline-block; margin-left: .6rem; padding: .05rem .5rem; border: 1px solid var(--gold); color: var(--gold); border-radius: 3px; font-size: .65rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; margin-top: 2rem; color: var(--muted); font-size: 1.05rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.site-footer a { color: var(--muted); }
.site-footer .caps { font-size: .8rem; letter-spacing: .16em; color: var(--cream); margin-bottom: .3rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--cream); color: var(--bg); padding: .5rem 1rem; z-index: 50; }

/* Character pictures */
.character { grid-template-columns: 200px 1fr; }
.character .portrait { width: 200px; height: 200px; object-fit: cover; border-radius: 4px; margin-bottom: .9rem; box-shadow: 0 14px 30px rgba(0,0,0,.5); }
.neighbor-photo { width: calc(100% + 3.6rem); height: auto; max-width: none; margin: -1.8rem -1.8rem 1.1rem; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px 6px 0 0; }
@media (max-width: 640px) {
  .character .portrait { width: 100%; height: auto; aspect-ratio: 1 / 1; max-width: 360px; }
}

/* Wiki */
.wiki-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: start; }
.wiki-layout .infobox { order: 2; }
@media (max-width: 860px) { .wiki-layout { grid-template-columns: 1fr; } .wiki-layout .infobox { order: -1; } }
.infobox { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1.1rem; font-size: 1.05rem; }
.infobox img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; margin-bottom: .9rem; }
.infobox .ib-title { font-family: "Cinzel", serif; text-align: center; letter-spacing: .1em; font-size: 1.15rem; margin-bottom: .6rem; }
.infobox dl { margin: 0; display: grid; grid-template-columns: 105px 1fr; gap: .45rem .7rem; }
.infobox dt { font-family: "Cinzel", serif; font-size: .66rem; letter-spacing: .14em; color: var(--lav); text-transform: uppercase; padding-top: .25rem; }
.infobox dd { margin: 0; line-height: 1.4; }
.wiki-body h2 { font-size: 1.35rem; margin-top: 2rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.wiki-body ul { padding-left: 1.2rem; }
.wiki-body li { margin-bottom: .4rem; }
.crumbs { font-family: "Cinzel", serif; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.spoiler-zone { margin-top: 2.5rem; }
.spoiler-zone .gatebox { background: var(--panel); border: 1px dashed var(--gold); border-radius: 6px; padding: 1.4rem; text-align: center; }
.spoiler-zone .gatebox h3 { color: var(--gold); }
.spoiler-zone .revealed { border-left: 2px solid var(--gold); padding-left: 1.2rem; }
.spoiler-label { font-family: "Cinzel", serif; font-size: .7rem; letter-spacing: .16em; color: var(--gold); text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.spoiler-label button { background: none; border: 0; color: var(--muted); font-family: inherit; font-size: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; text-decoration: underline; }
.wiki-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.1rem; }
.wiki-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; text-decoration: none; color: var(--cream); }
.wiki-card:hover { border-color: var(--lav-deep); color: var(--cream); }
.wiki-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; }
.wiki-card .wc-body { padding: .8rem 1rem 1rem; }
.wiki-card .wc-name { font-family: "Cinzel", serif; letter-spacing: .08em; }
.wiki-card .wc-sub { color: var(--muted); font-size: 1rem; line-height: 1.35; }
.wiki-card.noimg .wc-body { padding-top: 1.1rem; }
.quote { margin: 1rem 0; padding-left: 1rem; border-left: 2px solid var(--lav-deep); font-style: italic; color: var(--muted); }
.quote cite { display: block; font-style: normal; font-size: .95rem; margin-top: .2rem; }

/* Street map */
.street { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; margin: 1.5rem 0; }
.street .lot { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: .8rem; min-height: 120px; font-size: 1rem; line-height: 1.35; }
.street .lot .num { font-family: "Cinzel", serif; color: var(--gold); font-size: 1.3rem; }
.street .lot.known { border-color: var(--lav-deep); }
.street .lot a { text-decoration: none; }
.street .road { grid-column: 1 / -1; text-align: center; font-family: "Cinzel", serif; letter-spacing: .4em; font-size: .75rem; color: var(--muted); padding: .7rem 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
@media (max-width: 760px) { .street { grid-template-columns: repeat(2, 1fr); } }
.timeline { list-style: none; padding: 0; border-left: 2px solid var(--line); margin-left: .4rem; }
.timeline li { position: relative; padding: 0 0 1.2rem 1.4rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .55rem; width: 12px; height: 12px; background: var(--lav); transform: rotate(45deg); }
.timeline .when { font-family: "Cinzel", serif; font-size: .75rem; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }
@media (max-width: 520px) {
  .wiki-index { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .wiki-card .wc-body { padding: .6rem .7rem .8rem; }
  .wiki-card .wc-name { font-size: .95rem; letter-spacing: .05em; }
  .wiki-card .wc-sub { font-size: .9rem; }
}
.author-photo { border-radius: 6px; box-shadow: 0 14px 30px rgba(0,0,0,.5); }
