/* Ashland PoC: readable prose first, phone first. UI chrome is a neutral stand-in until MMO Graphics delivers UI art. */
:root {
  --paper: #f6efe0; --ink: #2a2118; --muted: #6d5f4e; --copper: #a3582b; --copper-d: #7d3f1b; --line: #d8c9ad; --card: #fffaf0;
  --focus: #1d5fa8; --error: #8e2a1f; --ok: #2f5f2a;
  font: 17px/1.55 Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #1c1813; --ink: #eee4d2; --muted: #b3a48d; --copper: #e08a52; --copper-d: #f0a070; --line: #3e3427; --card: #251f18; --focus: #7fb2ff; --error: #ff8f80; --ok: #8fd18a; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { padding-bottom: 4.5rem; }
a { color: var(--copper-d); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; } .skip:focus { left: .5rem; background: var(--card); padding: .5rem; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); } .small { font-size: .85rem; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .4rem 0 .8rem; } h2 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
main { max-width: 46rem; margin: 0 auto; padding: 1rem; outline: none; }
main:has(.create-book) { max-width: none; padding: .75rem 1rem 1.5rem; }
body:has(.create-book) { background: #1f1712; }
main:has(.landing) { max-width: none; padding: 0; }
body:has(.landing) { background: #140e0a; color: #eee4d2; padding-bottom: 0; }
button, .exit, select, input { font: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: .5rem; padding: .55rem .9rem; min-height: 44px; }
button.primary { background: var(--copper); border-color: var(--copper-d); color: #fff; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.link { border: 0; background: none; color: var(--copper-d); text-decoration: underline; padding: .2rem; min-height: 0; }
input, select { width: 100%; padding: .55rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--card); color: var(--ink); min-height: 44px; }
input[type=radio], input[type=checkbox] { width: auto; min-height: 0; }
label { display: block; margin: .6rem 0; }
fieldset { border: 1px solid var(--line); border-radius: .5rem; margin: .8rem 0; padding: .5rem .8rem; }
fieldset.inline label { display: inline-flex; gap: .3rem; align-items: center; margin-right: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: .6rem; padding: .8rem 1rem; margin: .6rem 0; }
.cards { list-style: none; padding: 0; display: grid; gap: .5rem; }
.choice { display: block; width: 100%; text-align: left; }
.races label.card { display: block; } .races p { margin: .3rem 0 0; font-size: .95rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; } .row label { flex: 1; }
.split { display: grid; gap: 1rem; } @media (min-width: 40rem) { .split { grid-template-columns: 15rem 1fr; } }
.loading { color: var(--muted); }
/* header + tabs */
.top { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line); padding: .4rem 1rem; }
.top .plate { font-size: 1.05rem; }
.stats { display: grid; grid-template-columns: repeat(2, auto 1fr); gap: 0 .5rem; margin: .2rem 0 0; font-size: .85rem; }
@media (min-width: 40rem) { .stats { grid-template-columns: repeat(4, auto 1fr); } }
.stats dt { color: var(--muted); } .stats dd { margin: 0; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); z-index: 5; padding-bottom: env(safe-area-inset-bottom); }
.tabs > * { flex: 1; text-align: center; border: 0; border-radius: 0; background: none; padding: .7rem .2rem; min-height: 52px; color: var(--ink); text-decoration: none; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
.tabs [aria-current=page] { color: var(--copper-d); font-weight: bold; box-shadow: inset 0 3px 0 var(--copper); }
.toast { position: fixed; left: 50%; bottom: 5rem; transform: translateX(-50%); max-width: 90vw; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: .5rem; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.show { opacity: .95; } .toast.error { background: var(--error); color: #fff; }
/* nameplate + staff scroll (scroll is a nameplate mark, not a body layer) */
.nameplate { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.nameplate .scroll { height: 24px; width: auto; vertical-align: middle; }
.nameplate .title { font-style: italic; color: var(--muted); font-size: .9em; }
/* place */
.place-art { display: block; width: 100%; height: auto; border-radius: .5rem; margin-bottom: .6rem; }
.npc-art { display: block; width: 100%; max-width: 15rem; height: auto; }
.place .district { margin: 0; color: var(--muted); font-size: .9rem; letter-spacing: .02em; }
.prose p { margin: 0 0 .9rem; }
.acts, .exits, .items { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.act, .exit { width: 100%; text-align: left; }
.act.quest { border-color: var(--copper); box-shadow: inset 4px 0 0 var(--copper); }
.cost { color: var(--muted); font-size: .85rem; }
.journal, .marks { border-left: 4px solid var(--copper); padding: .3rem .8rem; margin: 1.2rem 0; background: var(--card); }
.journal h2 { margin: .2rem 0; font-size: 1rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: .6rem; padding: .8rem 1rem; margin: 1rem 0; }
.panel h2 { margin-top: 0; }
.speech { font-style: italic; }
.choices { display: grid; gap: .5rem; margin: .6rem 0; }
.result p { margin: .4rem 0; }
.items li { display: grid; grid-template-columns: 48px 1fr auto; gap: .6rem; align-items: center; }
.items p { margin: .1rem 0 0; }
.ph { color: var(--error); font-family: system-ui, sans-serif; }
/* portrait: Graphics canvas is 512x768; layers are full-canvas and share registration */
.portrait { margin: 0; }
.portrait .frame { position: relative; width: 100%; max-width: 15rem; aspect-ratio: 512 / 768; background: linear-gradient(#e9dcc2, #d7c4a2); border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; }
.portrait.l .frame { max-width: 18rem; }
.portrait .layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait figcaption { font-size: .8rem; margin-top: .3rem; }
.worn { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; }
.worn dd { margin: 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; margin: 0; } .facts dd { margin: 0; }
.log { padding-left: 1.1rem; font-size: .92rem; }
.swatches label.sw { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 2px solid var(--line); margin: .2rem; justify-content: center; }
.swatches label.sw:has(input:checked) { border-color: var(--copper); box-shadow: 0 0 0 2px var(--copper); }
.swatches input { opacity: 0; position: absolute; } .swatches label.sw:focus-within { outline: 3px solid var(--focus); }
.sw.c01 { background: #f3d9c4; } .sw.c02 { background: #e8c3a2; } .sw.c03 { background: #d6a67e; } .sw.c04 { background: #c08a5f; }
.sw.c05 { background: #a06e48; } .sw.c06 { background: #82553a; } .sw.c07 { background: #62402b; } .sw.c08 { background: #45291c; }
/* wiki */
body.wiki { padding-bottom: 1rem; }
.wiki .bar { padding: .6rem 1rem; border-bottom: 1px solid var(--line); background: var(--card); }
.wiki .page, .wiki .wiki-nav { max-width: 46rem; margin: 0 auto; padding: 0 1rem; }
.wiki table { border-collapse: collapse; } .wiki td, .wiki th { border: 1px solid var(--line); padding: .3rem .6rem; text-align: left; }
.wiki .numbers { border: 1px solid var(--copper); border-radius: .5rem; padding: .4rem 1rem; margin: 1rem 0; background: var(--card); }
.wiki-nav ul { columns: 2; padding-left: 1.1rem; }
/* character-create fallback when book chrome is not in the art dir */
.races.people-book { display: grid; gap: .8rem; }
.people-entry { display: grid; grid-template-columns: 8rem 1fr; gap: .8rem 1rem; align-items: start; position: relative; }
.people-entry input { position: absolute; opacity: 0; }
.people-entry .people-portrait { width: 8rem; height: auto; aspect-ratio: 512 / 768; object-fit: contain; display: block; background: linear-gradient(#e9dcc2, #d7c4a2); border-radius: .35rem; }
.people-entry:has(input:checked) { border-color: var(--copper); box-shadow: inset 4px 0 0 var(--copper); }
.people-entry:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.people-copy { min-width: 0; }
.people-copy strong { display: block; font-size: 1.15rem; }
@media (max-width: 28rem) { .people-entry { grid-template-columns: 5.5rem 1fr; } .people-entry .people-portrait { width: 5.5rem; } }
.picker-options { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0; }
.picker-option { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0; padding: .25rem; border: 2px solid var(--line); border-radius: .45rem; min-width: 44px; cursor: pointer; background: var(--card); }
.picker-option:has(input:checked) { border-color: var(--copper); box-shadow: 0 0 0 2px var(--copper); }
.picker-option:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.picker-option input { position: absolute; opacity: 0; inset: 0; margin: 0; min-height: 0; }
.picker-option .portrait { margin: 0; }
.picker-option .portrait .frame { max-width: 5.4rem; }
.picker-option .none { display: flex; align-items: center; justify-content: center; width: 5.4rem; aspect-ratio: 512 / 400; color: var(--muted); font-size: .9rem; }
.picker-option .cap { font-size: .72rem; color: var(--muted); text-align: center; max-width: 5.8rem; line-height: 1.2; margin-top: .15rem; }
.portrait.crop-bust .frame, .portrait.crop-torso .frame { max-width: 5.4rem; }
.portrait.crop-bust .frame { aspect-ratio: 512 / 400; }
.portrait.crop-torso .frame { aspect-ratio: 512 / 420; }
.portrait.crop-bust .layer, .portrait.crop-torso .layer { position: absolute; inset: auto auto auto 0; width: 100%; height: auto; }
.portrait.crop-torso .layer { top: -28%; }

/* character-create book (LAYOUT.md / PICKER.md). Geometry is CSS px on a 1440×1080 stage, then scaled to fit. */
.create-book {
  --book-ink: #3b2a1c;
  --book-title: #2f1f12;
  --book-prose: #5a4330;
  --book-rule: #7a5638;
  --book-copper: #b0683a;
  --book-ribbon: #76201c;
  --picker-tile: #ded0ae;
  --picker-tile-sel: #e6d6b4;
  color: var(--book-ink);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}
.book-wrap { width: 100%; max-width: 1440px; margin: 0 auto; position: relative; overflow: hidden; }
.book-stage {
  position: absolute; top: 0; left: 0;
  width: 1440px; height: 1080px;
  background: var(--book-spread) 0 0 / 1440px 1080px no-repeat;
  transform-origin: top left;
  color: var(--book-ink);
}
.book-stage.single {
  width: 745px; height: auto; min-height: 1080px;
  background: var(--book-single) 0 0 / 745px 1080px repeat-y;
}
.book-stage .page { position: absolute; top: 131px; height: 792px; overflow: hidden; padding: 16px 0; }
.book-stage .page.left { left: 236px; width: 416px; }
.book-stage .page.right { left: 786px; width: 433px; }
.book-stage.single .page { position: relative; top: 90px; left: auto; width: auto; height: auto; margin: 0 220px 160px 56px; padding: 0; overflow: visible; z-index: 1; }
.create-book h1 { font-weight: 700; font-size: 32px; line-height: 1.1; margin: 0 0 14px; color: var(--book-title); letter-spacing: .2px; }
.create-book .intro p { font-size: 16px; line-height: 1.45; margin: 0 0 12px; color: var(--book-ink); }
.create-book .legend {
  font-variant: small-caps; letter-spacing: 2px; font-size: 14px; color: var(--book-rule);
  margin: 14px 0 4px; border-bottom: 1px solid rgba(122, 86, 56, .45); padding-bottom: 3px;
}
.create-book fieldset.people { border: 0; margin: 0; padding: 0; min-width: 0; }
.book-entry {
  position: relative; display: flex; gap: 14px; height: 238px;
  padding: 0 34px 0 0; margin: 0 0 10px;
  box-sizing: content-box; cursor: pointer; color: inherit;
}
.book-entry:last-child { margin-bottom: 0; }
.book-entry::before {
  content: ""; position: absolute; inset: -16px;
  border: 16px solid transparent; border-image: var(--entry-plate) 32 fill / 16px stretch;
  pointer-events: none; z-index: 0;
}
.book-entry:has(input:checked)::before { border-image: var(--entry-plate-sel) 32 fill / 16px stretch; }
.book-entry:has(input:checked)::after {
  content: ""; position: absolute; top: -22px; right: 2px; width: 28px; height: 110px;
  background: var(--ribbon) 0 0 / 28px 110px no-repeat; pointer-events: none; z-index: 3;
}
.book-entry .create-plate, .book-entry .plate { flex: 0 0 130px; width: 130px; height: 238px; background: center / 130px 238px no-repeat; position: relative; z-index: 1; }
.book-entry .txt { flex: 1; min-width: 0; padding-top: 8px; overflow: visible; }
.book-entry .cameo { float: left; width: 120px; height: 150px; margin: -6px 8px 2px -46px; background: center / 120px 150px no-repeat; position: relative; z-index: 2; }
.book-entry .name-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; color: var(--book-title); margin-bottom: 6px; }
.book-entry:has(input:checked) .name-line { color: var(--book-copper); }
.book-entry:hover:not(:has(input:checked)) .name-line { text-decoration: underline; text-decoration-color: var(--book-copper); text-underline-offset: 3px; }
.book-entry input[type=radio] { accent-color: var(--book-copper); width: 15px; height: 15px; margin: 0; position: static; opacity: 1; flex: 0 0 auto; }
.book-entry p { margin: 0; font-size: 15.5px; line-height: 1.42; color: var(--book-prose); }
.book-entry:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.create-plate { position: relative; overflow: hidden; }
.create-plate .frame-back, .create-plate .frame-front { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.create-plate .frame-front { z-index: 2; }
.create-plate .plate-window { position: absolute; overflow: hidden; z-index: 1; }
.create-plate .plate-figure { position: absolute; }
.create-plate .plate-figure .layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.book-footer { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; max-width: 1440px; margin: 1rem auto 0; }
.book-float {
  position: absolute; top: 131px; left: 786px; width: 433px; height: 792px;
  overflow-x: hidden; overflow-y: auto; color: var(--book-ink); z-index: 2;
}
.book-float-inner { width: 433px; box-sizing: border-box; zoom: var(--book-scale, 1); }
.book-face { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.book-face .live-plate { margin: 8px auto 12px; }
.book-face .create-form { display: flex; flex-direction: column; gap: 0; min-height: 0; }
.book-face .picker-scroll { overflow: visible; flex: 1; min-height: 0; }
.book-float .picker-scroll, .book-stage.single .picker-scroll { overflow: visible; }
/* Logged-out homepage: a marketing scroll (nav, East Gate hero, What is Ashland?, three plates, peoples chapter, wiki, footer).
   Everything is scoped to .landing so the create book, auth form, and in-game chrome are unchanged.
   Fonts are vendored OFL faces under public/fonts/ (same origin; CSP unchanged). */
@font-face { font-family: "Ashland Cinzel"; src: url("fonts/cinzel-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Ashland Cinzel"; src: url("fonts/cinzel-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Ashland Cormorant"; src: url("fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Ashland Cormorant"; src: url("fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Ashland Cormorant"; src: url("fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Ashland Cormorant"; src: url("fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
html:has(.landing) { scroll-behavior: smooth; }
.landing {
  --l-ink: #120d09;
  --l-stone: #1b140f;
  --l-stone-2: #241a13;
  --l-iron: #2e2620;
  --l-cream: #f4e8cf;
  --l-cream-2: #e6d6b6;
  --l-body: #d9c9aa;
  --l-amber: #e6a64e;
  --l-gold: #d4a64f;
  --l-gold-hi: #f7e2a6;
  --l-gold-lo: #8f6526;
  --l-nav-h: 4.5rem;
  --l-display: "Ashland Cinzel", "Trajan Pro", Georgia, serif;
  --l-serif: "Ashland Cormorant", "Cormorant Garamond", Garamond, Georgia, serif;
  --l-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .3 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  margin: 0;
  max-width: none;
  color: var(--l-body);
  background: var(--l-ink);
  font-family: var(--l-serif);
  font-size: 1.2rem;
  line-height: 1.6;
  overflow-x: clip;
}
.landing h1, .landing h2, .landing h3 { margin: 0; font-weight: 500; }
.landing a { color: inherit; }
.landing :focus-visible { outline: 2px solid var(--l-gold-hi); outline-offset: 3px; }
.landing-hero, .landing-about, .landing-peoples { scroll-margin-top: 0; }
.landing h2[id] { scroll-margin-top: calc(var(--l-nav-h) + 1.5rem); }

/* gold flourish: hairline, diamond, hairline */
.landing-flourish { display: flex; align-items: center; justify-content: center; gap: .7rem; margin: 1.1rem auto 1.3rem; width: min(22rem, 70%); }
.landing-flourish::before, .landing-flourish::after { content: ""; flex: 1; height: 1px; }
.landing-flourish::before { background: linear-gradient(to right, transparent, var(--l-gold)); }
.landing-flourish::after { background: linear-gradient(to left, transparent, var(--l-gold)); }
.landing-flourish i { width: .5rem; height: .5rem; transform: rotate(45deg); background: linear-gradient(135deg, var(--l-gold-hi), var(--l-gold) 55%, var(--l-gold-lo)); box-shadow: 0 0 10px rgba(230, 166, 78, .55); }

/* ornamental gold CTA: chevron-ended plaque with a bronze rim and an inner gilt face */
.landing-cta {
  --cut: 1.05rem;
  position: relative;
  isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 13.5rem; min-height: 3.6rem;
  padding: 0 calc(var(--cut) + 1.6rem);
  border: 0; border-radius: 0;
  background: linear-gradient(180deg, #fff1c4 0%, #b88a3c 30%, #6b4a1a 70%, #c99a4a 100%);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 50%);
  color: #23170b;
  font-family: var(--l-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45));
  transition: filter .25s ease, transform .25s ease;
}
.landing-cta::before {
  content: "";
  position: absolute; inset: 2px; z-index: -1;
  clip-path: polygon(calc(var(--cut) - 1px) 0, calc(100% - var(--cut) + 1px) 0, 100% 50%, calc(100% - var(--cut) + 1px) 100%, calc(var(--cut) - 1px) 100%, 0 50%);
  background:
    linear-gradient(180deg, rgba(255, 252, 235, .7) 0%, rgba(255, 252, 235, 0) 46%),
    linear-gradient(180deg, #f6dc98 0%, #e2b45e 40%, #c58d38 62%, #e7c071 100%);
}
.landing-cta::after {
  content: "";
  position: absolute; inset: 6px; z-index: -1;
  clip-path: polygon(calc(var(--cut) - 3px) 0, calc(100% - var(--cut) + 3px) 0, 100% 50%, calc(100% - var(--cut) + 3px) 100%, calc(var(--cut) - 3px) 100%, 0 50%);
  box-shadow: inset 0 0 0 1px rgba(110, 72, 22, .55);
  background: transparent;
  border: 1px solid rgba(110, 72, 22, .5);
}
.landing-cta-label { position: relative; text-shadow: 0 1px 0 rgba(255, 240, 200, .55); }
.landing-cta:hover { filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5)) brightness(1.09); transform: translateY(-1px); }
.landing-cta:active { transform: translateY(1px); }
.landing-cta:focus-visible { outline: none; filter: drop-shadow(0 0 6px var(--l-gold-hi)) drop-shadow(0 0 2px #fff); }
.landing-cta.small { --cut: .7rem; min-width: 0; min-height: 2.6rem; padding: 0 calc(var(--cut) + 1rem); font-size: .78rem; letter-spacing: .14em; filter: none; }
.landing-cta.small::after { inset: 4px; }
.landing-cta.small:hover { filter: brightness(1.1); }

/* sticky nav (fixed, overlays the hero) */
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  min-height: var(--l-nav-h);
  padding: .6rem clamp(1rem, 3.2vw, 2.75rem);
  background: linear-gradient(180deg, rgba(20, 14, 10, .92), rgba(24, 17, 12, .86));
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid rgba(212, 166, 79, .55);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 10px 30px rgba(0, 0, 0, .35);
}
.landing-nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(to right, transparent, var(--l-gold-hi) 50%, transparent); opacity: .55;
}
.landing-wordmark {
  justify-self: start;
  font-family: var(--l-display); font-weight: 700;
  font-size: 1.6rem; letter-spacing: .14em; line-height: 1;
  text-decoration: none;
  color: var(--l-cream);
  background: linear-gradient(180deg, #fff6dc 10%, #e9c989 60%, #c2914a 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-jumps { display: flex; gap: clamp(1.4rem, 3vw, 2.8rem); justify-content: center; }
.landing-jumps a {
  position: relative;
  font-family: var(--l-display); font-size: .9rem; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; color: var(--l-cream-2);
  padding: .4rem 0;
  transition: color .2s ease;
}
.landing-jumps a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--l-gold);
  transform: scaleX(0); transition: transform .25s ease;
}
.landing-jumps a:hover { color: var(--l-gold-hi); }
.landing-jumps a:hover::after { transform: scaleX(1); }
.landing-nav-actions { justify-self: end; display: flex; gap: .7rem; }

/* hero */
.landing-hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--l-nav-h) + 3rem) 1.25rem 7rem;
  overflow: hidden;
  background: var(--l-ink);
  text-align: center;
}
.landing-hero-art { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.landing-hero-art::before {
  content: ""; position: absolute; inset: -6%;
  background: url("art/places/place.east_gate.png") 44% 46% / cover no-repeat;
  filter: saturate(1.06) contrast(1.04);
  animation: landing-hero-pan 72s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes landing-hero-pan {
  from { transform: scale(1.02) translate3d(-1.6%, .4%, 0); }
  to { transform: scale(1.1) translate3d(1.8%, -.6%, 0); }
}
.landing-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--l-grain); opacity: .22; mix-blend-mode: overlay;
}
.landing-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 52% 42% at 50% 50%, rgba(14, 9, 6, .62) 0%, rgba(14, 9, 6, .28) 58%, rgba(14, 9, 6, 0) 100%),
    radial-gradient(ellipse 120% 90% at 50% 45%, rgba(14, 9, 6, 0) 52%, rgba(14, 9, 6, .62) 100%),
    linear-gradient(to bottom, rgba(14, 9, 6, .55) 0%, rgba(14, 9, 6, 0) 22%, rgba(14, 9, 6, 0) 64%, rgba(18, 13, 9, .96) 100%);
}
.landing-hero-copy { position: relative; z-index: 2; max-width: 60rem; animation: landing-fade-up 1.4s ease-out both; }
@keyframes landing-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.landing-kicker {
  margin: 0 0 1.1rem;
  font-family: var(--l-display); font-weight: 700; font-size: clamp(.78rem, 1.05vw, .98rem); letter-spacing: .42em; text-transform: uppercase;
  color: #f3bd6a;
  text-shadow: 0 0 2px rgba(14, 9, 6, .9), 0 1px 3px rgba(14, 9, 6, .9), 0 0 18px rgba(14, 9, 6, .85);
}
.landing .landing-logo {
  font-family: var(--l-display); font-weight: 400;
  font-size: clamp(2.9rem, 12.5vw, 9.25rem);
  line-height: .92; letter-spacing: .12em;
  margin: 0 0 0 .12em; /* re-centre the trailing tracking */
  color: var(--l-cream);
  background: linear-gradient(180deg, #fffaf0 0%, #f6e7c3 42%, #ddb26a 74%, #b98540 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .55)) drop-shadow(0 10px 34px rgba(0, 0, 0, .7));
}
.landing-hero .landing-flourish { width: min(26rem, 72%); margin: 1.3rem auto 1.2rem; }
.landing-lead {
  margin: 0 auto 2.3rem; max-width: 44rem;
  font-family: var(--l-serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.35rem, 2vw, 1.85rem); line-height: 1.38;
  color: var(--l-cream);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8), 0 2px 18px rgba(0, 0, 0, .75);
}
.landing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 1.6rem; }
.landing-scroll-cue {
  position: absolute; z-index: 2; left: 50%; bottom: 2.1rem;
  width: 1.15rem; height: 1.15rem; margin-left: -.575rem;
  border-right: 1px solid var(--l-gold); border-bottom: 1px solid var(--l-gold);
  transform: rotate(45deg);
  opacity: .8;
  animation: landing-cue 2.8s ease-in-out infinite;
}
@keyframes landing-cue { 0%, 100% { translate: 0 0; opacity: .45; } 50% { translate: 0 6px; opacity: .95; } }

/* What is Ashland? */
.landing-about {
  position: relative; isolation: isolate;
  min-height: min(56rem, 92vh);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: calc(var(--l-nav-h) + 4rem) 1.5rem clamp(4rem, 9vh, 6.5rem);
  overflow: hidden;
  background: var(--l-ink);
  text-align: center;
}
.landing-about-art { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.landing-about-art::before {
  content: ""; position: absolute; inset: -4%;
  background: url("art/places/place.road_shrine.png") 72% 40% / cover no-repeat;
  filter: saturate(1.04);
  animation: landing-about-pan 90s ease-in-out infinite alternate;
}
@keyframes landing-about-pan { from { transform: scale(1.02) translate3d(.8%, 0, 0); } to { transform: scale(1.07) translate3d(-1.2%, .4%, 0); } }
.landing-about::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--l-grain); opacity: .2; mix-blend-mode: overlay;
}
.landing-about::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(18, 13, 9, 1) 0%, rgba(18, 13, 9, .25) 16%, rgba(18, 13, 9, 0) 30%, rgba(18, 13, 9, .35) 52%, rgba(18, 13, 9, .86) 74%, rgba(27, 20, 15, 1) 100%),
    radial-gradient(ellipse 130% 100% at 50% 40%, rgba(14, 9, 6, 0) 55%, rgba(14, 9, 6, .55) 100%);
}
.landing-about-copy { position: relative; z-index: 2; max-width: 44rem; }
.landing-about h2, .landing-peoples h2 {
  font-family: var(--l-serif); font-weight: 500;
  font-size: clamp(2.8rem, 5.2vw, 4.6rem); line-height: 1.04; letter-spacing: .01em;
  color: var(--l-cream);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .7);
}
.landing-about p {
  margin: 0 auto; max-width: 42rem;
  font-size: clamp(1.2rem, 1.55vw, 1.45rem); font-weight: 500; line-height: 1.6;
  color: var(--l-cream-2);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .8);
}

/* three feature plates */
.landing-features {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 4vw, 3rem) clamp(5rem, 9vw, 7.5rem);
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(230, 166, 78, .08), rgba(230, 166, 78, 0) 70%),
    linear-gradient(180deg, var(--l-stone) 0%, #19120d 100%);
}
.landing-feature-grid {
  list-style: none; margin: 0 auto; padding: 0;
  max-width: 78rem;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem);
}
.landing-feature { text-align: center; min-width: 0; }
.landing-feature-frame {
  position: relative; overflow: hidden;
  aspect-ratio: 8 / 5;
  border: 1px solid var(--l-gold);
  outline: 1px solid rgba(212, 166, 79, .28); outline-offset: 5px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .6);
  background: var(--l-iron);
  margin: 6px 6px 1.6rem;
}
.landing-feature-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 40px rgba(10, 6, 4, .55);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 60%, rgba(14, 9, 6, .35));
}
.landing-feature-art { position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat; transition: transform 1.2s ease; }
.landing-feature-art.art-gate { background-image: url("art/places/place.east_gate.png"); background-position: 34% 50%; }
.landing-feature-art.art-ledger { background-image: url("art/places/place.counting_house.png"); background-position: 22% 50%; }
.landing-feature:hover .landing-feature-art, .landing-feature:hover .landing-feature-peoples img { transform: scale(1.04); }
.landing-feature-peoples {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
  background: #0f0a07;
}
.landing-feature-peoples img { display: block; width: 100%; height: 100%; min-width: 0; object-fit: cover; object-position: 50% 30%; transition: transform 1.2s ease; }
.landing-feature h3 {
  font-family: var(--l-serif); font-weight: 600;
  font-size: clamp(1.6rem, 2.1vw, 2rem); line-height: 1.15;
  color: var(--l-cream);
  margin: 0 0 .5rem;
}
.landing-feature p { margin: 0 auto; max-width: 22rem; font-size: 1.2rem; font-weight: 500; color: var(--l-body); }

/* peoples chapter */
.landing-peoples {
  position: relative; isolation: isolate; overflow: hidden;
  padding: calc(var(--l-nav-h) + 3.5rem) 0 clamp(3.5rem, 6vw, 4.5rem);
  background: var(--l-stone-2);
  text-align: center;
}
.landing-peoples-art { position: absolute; inset: 0; z-index: 0; background: url("art/places/place.hearth_square.png") 50% 45% / cover no-repeat; filter: saturate(.95); }
.landing-peoples::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--l-grain); opacity: .2; mix-blend-mode: overlay;
}
.landing-peoples::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(25, 18, 13, 1) 0%, rgba(20, 14, 10, .55) 18%, rgba(20, 14, 10, .42) 50%, rgba(20, 14, 10, .78) 82%, rgba(18, 13, 9, 1) 100%),
    radial-gradient(ellipse 80% 60% at 50% 55%, rgba(14, 9, 6, .35), rgba(14, 9, 6, 0) 70%);
}
.landing-peoples-copy { position: relative; z-index: 2; padding: 0 1.25rem; }
.landing-peoples .landing-flourish { margin-bottom: 2.6rem; }
.landing-plates {
  position: relative; z-index: 2;
  list-style: none; margin: 0 auto; padding: 0 1.5rem;
  display: flex; justify-content: center; gap: clamp(1rem, 2.2vw, 2.25rem);
}
.landing-plates li { flex: 0 0 auto; width: clamp(9rem, 14.5vw, 13.5rem); }
.landing-plates img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .65));
  transition: transform .45s ease, filter .45s ease;
}
.landing-plates li:hover img { transform: translateY(-8px); filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .7)) brightness(1.05); }
.landing-people-name {
  display: block; margin-top: 1rem;
  font-family: var(--l-display); font-size: .95rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--l-cream);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .9);
}

/* wiki and resources: quiet */
.landing-resources {
  padding: 3.5rem 1.5rem 3.5rem;
  scroll-margin-top: var(--l-nav-h);
  background: linear-gradient(180deg, #120d09, #100b08);
  text-align: center;
}
.landing-resources h2 {
  font-family: var(--l-display); font-weight: 400;
  font-size: .95rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--l-amber);
  margin: 0 0 1.6rem;
}
.landing-wiki {
  display: flex; flex-wrap: wrap; justify-content: center;
  max-width: 62rem; margin: 0 auto;
  border-top: 1px solid rgba(212, 166, 79, .3); border-bottom: 1px solid rgba(212, 166, 79, .3);
}
.landing-wiki a {
  position: relative;
  flex: 1 1 10rem;
  padding: 1.15rem 1.2rem;
  font-family: var(--l-serif); font-size: 1.35rem; font-weight: 500;
  color: var(--l-cream-2); text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}
.landing-wiki a + a::before {
  content: ""; position: absolute; left: 0; top: 50%; width: .36rem; height: .36rem; margin: -.18rem 0 0 -.18rem;
  transform: rotate(45deg); background: var(--l-gold-lo);
}
.landing-wiki a:hover { color: var(--l-gold-hi); background-color: rgba(212, 166, 79, .06); }
.landing-foot {
  padding: 2.2rem 1.5rem 2.6rem;
  background: #0d0906;
  border-top: 1px solid rgba(212, 166, 79, .16);
  text-align: center;
}
.landing-foot .landing-wordmark { display: inline-block; font-size: 1.15rem; opacity: .85; }
.landing-foot p { margin: .7rem 0 0; font-size: 1.05rem; font-style: italic; color: #a8977b; }

/* narrower: nav wraps (wordmark + CTAs, jumps underneath), plates snap-scroll */
@media (max-width: 60rem) {
  .landing { --l-nav-h: 6.4rem; }
  .landing-nav { grid-template-columns: 1fr auto; grid-template-areas: "mark cta" "jumps jumps"; row-gap: .45rem; padding-top: .55rem; padding-bottom: .45rem; }
  .landing-wordmark { grid-area: mark; }
  .landing-nav-actions { grid-area: cta; }
  .landing-jumps { grid-area: jumps; border-top: 1px solid rgba(212, 166, 79, .18); padding-top: .2rem; }
  .landing-feature-grid { grid-template-columns: minmax(0, 34rem); justify-content: center; gap: 3.2rem; }
  .landing-plates {
    justify-content: flex-start;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: .5rem 1.5rem 1.1rem;
    scroll-padding: 0 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: #8a4a24 #1a120c;
  }
  .landing-plates::-webkit-scrollbar { height: 6px; }
  .landing-plates::-webkit-scrollbar-track { background: #1a120c; }
  .landing-plates::-webkit-scrollbar-thumb { background: #8a4a24; border-radius: 3px; }
  .landing-plates li { width: 11.5rem; scroll-snap-align: start; }
  /* the 960×240 paintings are stretched far on tall narrow screens; soften the upscale and lean on the grain */
  .landing-hero-art::before, .landing-about-art::before { filter: saturate(1.04) blur(1.4px); }
  .landing-hero::before, .landing-about::before { opacity: .32; }
  .landing-wiki { flex-direction: column; max-width: 26rem; border-bottom: 0; }
  .landing-wiki a { flex: none; padding: .85rem 1rem; border-bottom: 1px solid rgba(212, 166, 79, .22); }
  .landing-wiki a + a::before { display: none; }
}
@media (max-width: 30rem) {
  .landing { font-size: 1.1rem; }
  .landing-wordmark { font-size: 1.25rem; letter-spacing: .1em; }
  .landing-cta.small { --cut: .55rem; min-height: 2.35rem; padding: 0 calc(var(--cut) + .7rem); font-size: .7rem; letter-spacing: .1em; }
  .landing-nav-actions { gap: .4rem; }
  .landing-jumps { gap: 1.6rem; }
  .landing-jumps a { font-size: .8rem; }
  .landing-kicker { font-size: .7rem; letter-spacing: .2em; }
  .landing-cta { min-width: 11.5rem; }
  .landing-plates li { width: 10rem; }
}
.create-book fieldset.picker, .create-book fieldset.inline, .create-book .create-form > label {
  border: 0; margin: .55rem 0; padding: 0; min-width: 0;
}
.create-book fieldset.picker legend, .create-book fieldset.inline legend, .create-book .create-form > label {
  font-variant: small-caps; letter-spacing: 1.5px; font-size: 14px; color: var(--book-rule);
}
.create-book .create-form > label input[type=text], .create-book .create-form input[name=name] {
  background: #efe3c8; color: var(--book-title); border: 1px solid rgba(122, 86, 56, .45); margin-top: .25rem;
}
.create-book fieldset.inline label { color: var(--book-title); font-variant: normal; letter-spacing: 0; font-size: 16px; }
.create-book fieldset.inline input { accent-color: var(--book-copper); }
.create-book .picker-option { background: var(--picker-tile); border: 2px solid transparent; border-radius: 0; box-shadow: none; padding: 2px; }
.create-book .picker-option:has(input:checked) { background: var(--picker-tile-sel); border-color: var(--book-copper); box-shadow: none; }
.create-book .picker-option .cap { color: var(--book-prose); }
.create-book .picker-option .none { color: var(--book-prose); background: transparent; }
.create-book .picker-thumb { width: 64px; height: 80px; object-fit: contain; display: block; background: transparent; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html:has(.landing) { scroll-behavior: auto; }
  .landing-hero-art::before, .landing-about-art::before, .landing-hero-copy, .landing-scroll-cue { animation: none; }
  .landing-feature:hover .landing-feature-art, .landing-feature:hover .landing-feature-peoples img, .landing-plates li:hover img, .landing-cta:hover { transform: none; }
}
