/* ==========================================================================
   INKED XTACEY — v2 · candle, forest, manuscript
   Warm night, old serif, blackletter titles, arched niches for the work.
   ========================================================================== */

/* Fonts — self-hosted in assets/fonts (SIL OFL 1.1, see OFL.txt).
   Only the faces in use. latin-ext files load only if such characters appear. */
@font-face { font-family: "IM Fell English SC"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/im-fell-english-sc-400.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/im-fell-english-400.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/im-fell-english-400-italic.woff2") format("woff2"); }
@font-face { font-family: "UnifrakturMaguntia"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/unifrakturmaguntia-400-letters.woff2") format("woff2");
  unicode-range: U+20, U+26-27, U+2C-2E, U+41-5A, U+61-7A; }
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/alegreya-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/alegreya-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Hanken Grotesk is variable: one file covers 400 and 500. */
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("../fonts/hanken-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --night: #0b0908;
  --umber: #14100d;
  --bark: #231b15;
  --text: #e4d9c5;
  --text-dim: #b3a58f;
  --ash: #7d7062;
  --ash-dim: #4d443a;
  --gold: #c79a5b;
  --gold-line: rgba(199, 154, 91, 0.32);
  --gold-faint: rgba(199, 154, 91, 0.14);
  --blood: #8e1d18;
  --rule: rgba(228, 217, 197, 0.1);
  --panel: #0e0c0b;
  --niche-top: #1b1511;
  --niche-bot: #100c0a;
  --niche-shade: rgba(0,0,0,0.75);
  --vignette: rgba(0,0,0,0.55);
  --glass: rgba(11,9,8,0.92);
  --veil: rgba(11,9,8,0.97);
  --glow: rgba(199,154,91,0.08);
  color-scheme: dark;

  /* Type: wordmark & titles · signature (rare) · lore · reading · supporting */
  --f-title: "IM Fell English SC", "IM FELL English SC", Garamond, "Times New Roman", serif;
  --f-black: "UnifrakturMaguntia", "Old English Text MT", serif;
  --f-display: "IM Fell English", "IM FELL English", Garamond, "Times New Roman", serif;
  --f-text: "Alegreya", Georgia, "Times New Roman", serif;
  --f-caps: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(20px, 4.5vw, 72px);
  --max: 1440px;
  --ease: cubic-bezier(0.22, 0.7, 0.12, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--f-text);
  font-size: 18px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "liga", "dlig", "onum";
}
/* Slow warm vignette over everything */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, var(--vignette) 100%);
  transform: translateZ(0);
}
::selection { background: var(--blood); color: var(--text); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 5px; }

/* ---------- Primitives ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); position: relative; z-index: 2; }
.center { text-align: center; }

.caps {
  font-family: var(--f-caps);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ash);
  font-weight: 500;
}
.caps--gold { color: var(--gold); }
.caps--text { color: var(--text-dim); }
.black { font-family: var(--f-title); font-weight: 400; letter-spacing: 0.01em; line-height: 0.95; margin: 0; }
.serif { font-family: var(--f-display); font-weight: 400; }
.dot { color: var(--blood); }

.lede {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.32;
  color: var(--text);
  margin: 0;
}
.prose { color: var(--text-dim); max-width: 33em; }
.prose p { margin: 0 0 1em; }

.tbc { color: var(--ash); border-bottom: 1px dashed var(--ash-dim); }

/* Ornament: hairline · cross · hairline */
.orn {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  color: var(--gold); font-family: var(--f-display); font-size: 16px; line-height: 1;
  margin: 0 auto;
}
.orn::before, .orn::after { content: ""; height: 1px; width: clamp(40px, 8vw, 120px); background: linear-gradient(90deg, transparent, var(--gold-line)); }
.orn::after { background: linear-gradient(90deg, var(--gold-line), transparent); }

.link {
  font-family: var(--f-caps); text-transform: uppercase;
  letter-spacing: 0.2em; font-size: 11px; color: var(--text);
  display: inline-flex; gap: 12px; align-items: center;
  padding-bottom: 5px; border-bottom: 1px solid var(--gold-line);
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease), letter-spacing 0.7s var(--ease);
}
.link:hover { color: var(--gold); border-color: var(--gold); letter-spacing: 0.24em; }

/* ---------- Forest backdrop ---------- */
/* overflow-x: clip keeps the breathing scale from widening the page, without
   creating a scroll container or clipping vertically. */
.forest { position: relative; isolation: isolate; overflow-x: clip; }
.forest::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("../img/forest.webp") center bottom / cover no-repeat;
  opacity: 0.9;
  will-change: transform;
  animation-play-state: paused;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 70%, transparent 100%);
  animation: breathe 14s ease-in-out infinite alternate;
}
.forest--soft::before { opacity: 0.45; }
.forest.is-live::before, .no-js .forest::before { animation-play-state: running; }
@media (max-width: 900px) { .forest::before { background-image: url("../img/forest-960.webp"); } }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.025) translateY(-4px); } }

/* ---------- Header ---------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 30; }
.site-header .wrap {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 104px;
}
.site-header nav { display: flex; gap: clamp(22px, 3.2vw, 48px); }
.header-right { display: flex; justify-content: flex-end; align-items: center; gap: clamp(22px, 3.2vw, 48px); }
.site-header nav a {
  font-family: var(--f-caps); text-transform: uppercase;
  letter-spacing: 0.24em; font-size: 11px; color: var(--text-dim);
  position: relative; padding: 6px 0; transition: color 0.5s var(--ease);
}
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }
.site-header nav a[aria-current="page"]::after {
  content: "✠"; position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%);
  font-size: 9px; color: var(--blood); letter-spacing: 0;
}
.brand { font-family: var(--f-title); font-size: 27px; letter-spacing: 0.02em; line-height: 1; color: var(--text); text-align: center; }
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .site-header .wrap { grid-template-columns: 1fr auto; height: 84px; }
  .brand { text-align: left; }
  .site-header nav { display: none; }
  .nav-toggle {
    display: block; justify-self: end; background: none; border: 0; cursor: pointer; padding: 8px 0;
    font-family: var(--f-caps); text-transform: uppercase; letter-spacing: 0.24em; font-size: 11px; color: var(--text);
  }
  .mobile-nav {
    position: fixed; inset: 0; z-index: 25; background: var(--veil);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    opacity: 0; pointer-events: none; transition: opacity 0.6s var(--ease);
  }
  .mobile-nav a { font-family: var(--f-title); font-size: 42px; color: var(--text-dim); }
  .mobile-nav a[aria-current="page"] { color: var(--text); }
  body.nav-open .mobile-nav { opacity: 1; pointer-events: auto; }
}
@media (min-width: 821px) { .mobile-nav { display: none; } }

/* ---------- Hero (home) ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 140px var(--gutter) 90px;
}
.hero > * { position: relative; z-index: 2; }
.hero__kicker { margin-bottom: 18px; }
.hero__mark { font-size: clamp(64px, 15.5vw, 236px); color: var(--text); text-shadow: 0 0 60px var(--glow); }
.hero .lede { max-width: 21em; margin: 34px auto 40px; color: var(--text-dim); }
.hero__actions { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: 40px; }

.status { display: inline-flex; align-items: center; gap: 12px; }
.status__pip { width: 7px; height: 7px; border-radius: 50%; background: var(--ash-dim); }
.status--open .status__pip { background: #e2a457; box-shadow: 0 0 10px 2px rgba(226,164,87,0.55); animation: wick 3.2s ease-in-out infinite; }
@keyframes wick { 0%,100% { opacity: 1; } 40% { opacity: 0.7; } 55% { opacity: 0.95; } 70% { opacity: 0.8; } }

/* ---------- Page head (inner pages) ---------- */
.page-head {
  text-align: center;
  padding: clamp(170px, 20vw, 260px) var(--gutter) clamp(80px, 9vw, 130px);
}
.page-head > * { position: relative; z-index: 2; }
.page-head .black { font-size: clamp(64px, 12vw, 176px); }
.page-head .lede { max-width: 22em; margin: 28px auto 0; color: var(--text-dim); }
.page-head .caps { display: block; margin-bottom: 22px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 10vw, 150px); }
.section--tight { padding-block: clamp(48px, 6vw, 90px); }
.chapter-head { text-align: center; margin-bottom: clamp(48px, 6vw, 84px); }
.chapter-head .caps { display: block; margin-bottom: 14px; }
.chapter-head .black { font-size: clamp(56px, 7vw, 104px); }
.chapter-head .lede { font-size: clamp(19px, 1.7vw, 24px); color: var(--text-dim); max-width: 26em; margin: 22px auto 26px; }

/* ---------- Niches: the image presentation ---------- */
.plate { margin: 0; text-align: center; }
.niche {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 600px 600px 3px 3px;
  background:
    radial-gradient(ellipse 70% 45% at 50% 30%, rgba(199,154,91,0.10), transparent 70%),
    linear-gradient(180deg, var(--niche-top) 0%, var(--niche-bot) 100%);
  box-shadow: inset 0 0 80px var(--niche-shade), 0 30px 60px -30px rgba(0,0,0,0.9);
}
.niche--tall { aspect-ratio: 3 / 4.4; }
.niche--wide { aspect-ratio: 1 / 1; }
.niche::before {   /* inner gilded arch */
  content: ""; position: absolute; inset: 12px; z-index: 2; pointer-events: none;
  border: 1px solid var(--gold-line);
  border-radius: 600px 600px 2px 2px;
  transition: border-color 0.8s var(--ease), inset 0.8s var(--ease);
}
.plate:hover .niche::before { border-color: rgba(199,154,91,0.6); inset: 9px; }
.niche img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: sepia(0.12) contrast(1.05) brightness(0.92);
  transition: transform 2s var(--ease), filter 1s var(--ease);
}
.plate:hover .niche img { transform: scale(1.03); filter: sepia(0) contrast(1.05) brightness(1); }

/* Placeholder content — remove data-label once an image is in */
.niche[data-label]::after {
  content: "✠\A\A" attr(data-label);
  white-space: pre; text-align: center; line-height: 1.7;
  position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%);
  font-family: var(--f-caps); text-transform: uppercase;
  letter-spacing: 0.24em; font-size: 10px; color: var(--ash);
}

.plate figcaption { padding-top: 22px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.plate figcaption .t { font-family: var(--f-display); font-style: italic; font-size: 22px; color: var(--text); line-height: 1.2; }
.plate figcaption .caps { font-size: 13px; }

/* Triptych: two side panels flank a taller centre */
.triptych {
  display: grid; grid-template-columns: 1fr 1.32fr 1fr;
  gap: clamp(20px, 3.4vw, 56px);
  align-items: end;
  max-width: 1180px; margin: 0 auto;
}
/* Arcade: a row of equal arches */
.arcade {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3.4vw, 56px);
  max-width: 1180px; margin: clamp(64px, 8vw, 110px) auto 0;
  align-items: end;
}
.arcade--four { grid-template-columns: repeat(4, 1fr); }

/* ---------- Statement with drop cap ---------- */
.statement { max-width: 860px; margin: 0 auto; text-align: center; }
.statement p { font-family: var(--f-display); font-size: clamp(30px, 3.6vw, 52px); line-height: 1.18; margin: 0; font-weight: 400; }
.statement p em { color: var(--text-dim); }
.statement .orn { margin-top: 44px; }

/* ---------- Chapter index ---------- */
.chapters { list-style: none; margin: 0 auto; padding: 0; max-width: 980px; }
.chapters li + li { border-top: 1px solid var(--rule); }
.chapters a {
  display: grid; grid-template-columns: 90px 1fr auto; align-items: baseline; gap: 24px;
  padding: 30px 8px;
  transition: background 0.8s var(--ease), padding 0.8s var(--ease);
}
.chapters a:hover { background: linear-gradient(90deg, transparent, rgba(199,154,91,0.05), transparent); padding-inline: 22px; }
.chapters .num { font-family: var(--f-display); font-size: 22px; color: var(--gold); font-style: italic; }
.chapters .t { font-family: var(--f-title); font-size: clamp(34px, 4vw, 58px); line-height: 1; color: var(--text); }
.chapters .caps { text-align: right; }

/* ---------- Work: filters + collections ---------- */
.filters {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-block: 1px solid var(--rule);
}
.filters .wrap { display: flex; justify-content: center; gap: clamp(18px, 4vw, 54px); overflow-x: auto; scrollbar-width: none; }
.filters .wrap::-webkit-scrollbar { display: none; }
.filter {
  background: none; border: 0; cursor: pointer; padding: 22px 0; position: relative; white-space: nowrap;
  font-family: var(--f-caps); text-transform: uppercase; letter-spacing: 0.24em; font-size: 11px;
  color: var(--ash); transition: color 0.5s var(--ease);
}
.filter .n { font-family: var(--f-display); font-style: italic; letter-spacing: 0; margin-right: 8px; color: var(--ash-dim); }
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { color: var(--text); }
.filter[aria-pressed="true"] .n { color: var(--gold); }
.filter[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 20%; right: 20%; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blood), transparent);
}

.collection { padding-block: clamp(96px, 11vw, 170px) 0; }
.collection[hidden] { display: none; }
.collection + .collection { border-top: 0; }

/* ---------- Tattoo ---------- */
.tenets { list-style: none; margin: 0 auto; padding: 0; max-width: 980px; }
.tenet { text-align: center; padding: clamp(40px, 5vw, 64px) 0; }
.tenet + .tenet { border-top: 1px solid var(--rule); }
.tenet .num { font-family: var(--f-display); font-style: italic; color: var(--gold); font-size: 22px; display: block; margin-bottom: 10px; }
.tenet h3 { margin: 0 0 14px; font-family: var(--f-title); font-weight: 400; font-size: clamp(34px, 3.8vw, 54px); line-height: 1.08; }
.tenet p { margin: 0 auto; max-width: 30em; color: var(--text-dim); }

.terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px); max-width: 1180px; margin: 0 auto; }
.terms h4 { margin: 0 0 18px; text-align: center; }
.terms ul { list-style: none; margin: 0; padding: 0; color: var(--text-dim); text-align: center; }
.terms li { padding: 13px 0; border-top: 1px solid var(--rule); }
.terms li:last-child { border-bottom: 1px solid var(--rule); }

/* ---------- Forms ---------- */
.form-wrap { max-width: 780px; margin: 0 auto; }
.form-wrap .chapter-head { margin-bottom: 56px; }
.field { position: relative; padding: 22px 0 6px; border-bottom: 1px solid var(--rule); }
.field label {
  display: block; margin-bottom: 4px;
  font-family: var(--f-caps); text-transform: uppercase; letter-spacing: 0.22em; font-size: 10px; color: var(--ash);
}
.field input, .field textarea, .field select {
  width: 100%; background: transparent; border: 0; border-radius: 0; outline: none; padding: 6px 0 12px;
  font-family: var(--f-text); font-size: 21px; color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.35; }
.field select { cursor: pointer; }
.field select option { background: var(--umber); color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: var(--ash-dim); font-style: italic; font-family: var(--f-display); }
.field::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: -1px; height: 1px;
  background: var(--gold); transition: left 0.8s var(--ease), right 0.8s var(--ease);
}
.field:focus-within::after { left: 0; right: 0; }
.field-row { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }

.check { display: flex; gap: 14px; align-items: flex-start; padding: 26px 0 0; color: var(--text-dim); font-size: 17px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 15px; height: 15px; margin: 5px 0 0; border: 1px solid var(--gold-line); flex: none; cursor: pointer; transform: rotate(45deg); }
.check input:checked { background: var(--blood); border-color: var(--blood); }

.form__foot { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-top: 48px; text-align: center; }
.btn {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background: transparent; color: var(--text);
  border: 1px solid var(--gold-line);
  padding: 18px 48px;
  font-family: var(--f-caps); text-transform: uppercase; letter-spacing: 0.28em; font-size: 12px;
  transition: background 0.6s var(--ease), border-color 0.6s var(--ease), color 0.6s;
}
.btn:hover { background: var(--blood); border-color: var(--blood); }
.form__privacy { margin: 28px 0 0; font-family: var(--f-caps); font-size: 12px; letter-spacing: 0.04em; line-height: 1.7; color: var(--ash); }
.form__privacy a, .doc a, .legal a { color: inherit; text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: 3px; }
.form__privacy a:hover, .doc a:hover, .legal a:hover { color: var(--text); text-decoration-color: var(--gold); }

/* Legal pages (imprint, privacy): plain reading, no atmosphere. */
.doc { max-width: 40em; margin: 0 auto; font-family: var(--f-text); font-size: 19px; line-height: 1.65; color: var(--text-dim); }
.doc h2 { font-family: var(--f-title); font-weight: 400; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; color: var(--text); margin: 2.2em 0 0.5em; }
.doc p { margin: 0 0 1em; }
.doc a { color: var(--text); }
.doc code { font-family: var(--f-caps); font-size: 0.8em; color: var(--text); }
.doc__note, .doc__small { font-family: var(--f-caps); font-size: 13px; letter-spacing: 0.03em; line-height: 1.7; color: var(--ash); }
/* Honeypot: off-screen, never shown to people or screen readers. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form__msg { min-height: 1.4em; margin: 0; font-style: italic; color: var(--text-dim); }
.form__msg[data-state="error"]::before { content: "✠ "; color: var(--blood); font-style: normal; }

/* ---------- About ---------- */
.portrait { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 7vw, 120px); align-items: center; max-width: 1180px; margin: 0 auto; }
.portrait .lede { margin-bottom: 36px; }
.facts { margin: 0 auto; max-width: 780px; }
.facts div { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 18px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.facts div:last-child { border-bottom: 1px solid var(--rule); }
.facts dt { margin: 0; }
.facts dd { margin: 0; color: var(--text); font-family: var(--f-text); font-size: 20px; }

/* ---------- Contact ---------- */
.direct { display: flex; justify-content: center; gap: clamp(32px, 7vw, 110px); text-align: center; flex-wrap: wrap; }
.direct .serif { font-size: 26px; font-style: italic; display: block; margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(110px, 13vw, 200px) var(--gutter) 40px; text-align: center; }
.site-footer > * { position: relative; z-index: 2; }
.site-footer .black { font-size: clamp(54px, 8vw, 120px); color: var(--text); opacity: 0.85; }
.site-footer .orn { margin: 34px auto 30px; }
.site-footer nav { display: flex; justify-content: center; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap; }
.site-footer nav a:hover { color: var(--text); }
.site-footer .legal { margin-top: 36px; }

/* ---------- Candle layer ---------- */
.candle-layer { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 1000; will-change: transform; contain: strict; }
.candle-glow {
  z-index: 999; opacity: 0; will-change: transform, opacity; transform-origin: 50% 50%;
  background: radial-gradient(circle closest-side, rgba(255,176,96,0.24) 0%, rgba(230,128,52,0.10) 28%, rgba(150,70,30,0.025) 65%, rgba(0,0,0,0) 100%);
}
html.candle-on, html.candle-on * { cursor: none !important; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 1.6s var(--ease), transform 1.6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .forest::before { animation: none; }
  * { animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  body { font-size: 18px; }
  .filters { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--veil); }
  .triptych { grid-template-columns: 1fr 1fr; }
  .triptych .plate:nth-child(2) { grid-column: 1 / -1; grid-row: 1; max-width: 520px; width: 100%; justify-self: center; }
  .arcade, .arcade--four { grid-template-columns: 1fr 1fr; }
  .terms { grid-template-columns: 1fr; max-width: 520px; }
  .portrait { grid-template-columns: 1fr; }
  .portrait .plate { max-width: 460px; margin: 0 auto; width: 100%; }
  .portrait > div { text-align: center; }
  .portrait .prose { margin: 0 auto; }
}
@media (max-width: 560px) {
  .triptych, .arcade, .arcade--four { grid-template-columns: 1fr; max-width: 400px; }
  .triptych .plate:nth-child(2) { grid-column: auto; grid-row: auto; }
  .chapters a { grid-template-columns: 50px 1fr; }
  .chapters .caps { display: none; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .filters .wrap { justify-content: flex-start; }
}

/* ---------- Candle turns the name red ----------
   A red copy of the word sits over it, revealed only inside the candle's
   circle of light. candle.js feeds --cx / --cy / --cr / --lit. */
[data-candle-red] { position: relative; }
[data-candle-red]::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  color: #b8141c;
  text-shadow: 0 0 28px rgba(184, 20, 28, 0.35);
  pointer-events: none;
  opacity: var(--lit, 0);
  -webkit-mask-image: radial-gradient(circle var(--cr, 0px) at var(--cx, -9999px) var(--cy, -9999px), #000 0%, rgba(0,0,0,0.75) 40%, transparent 100%);
          mask-image: radial-gradient(circle var(--cr, 0px) at var(--cx, -9999px) var(--cy, -9999px), #000 0%, rgba(0,0,0,0.75) 40%, transparent 100%);
}


/* ==========================================================================
   LIGHT THEME — ash, iron and bone. Cold daylight in a stone room.
   ========================================================================== */
[data-theme="light"] {
  --night: #c8c4bc;
  --umber: #bcb7ae;
  --bark: #a8a299;
  --text: #15120f;
  --text-dim: #3b3530;
  --ash: #655d55;
  --ash-dim: #8b8379;
  --gold: #5f4d35;
  --gold-line: rgba(52, 42, 28, 0.34);
  --gold-faint: rgba(52, 42, 28, 0.14);
  --blood: #7a1212;
  --rule: rgba(21, 18, 15, 0.14);
  --panel: #d3cfc7;
  --niche-top: #b3ada3;
  --niche-bot: #c9c5bd;
  --niche-shade: rgba(38, 32, 25, 0.38);
  --vignette: rgba(30, 26, 21, 0.32);
  --glass: rgba(200, 196, 188, 0.92);
  --veil: rgba(200, 196, 188, 0.97);
  --glow: transparent;
  color-scheme: light;
}
[data-theme="light"] .forest::before { mix-blend-mode: multiply; opacity: 0.42; filter: grayscale(0.7) contrast(0.9); }
[data-theme="light"] .forest--soft::before { opacity: 0.24; }
[data-theme="light"] .niche { box-shadow: inset 0 0 70px var(--niche-shade), 0 30px 50px -34px rgba(30,25,20,0.55); }
[data-theme="light"] .niche { background: radial-gradient(ellipse 70% 45% at 50% 30%, rgba(255,255,255,0.18), transparent 70%), linear-gradient(180deg, var(--niche-top) 0%, var(--niche-bot) 100%); }
[data-theme="light"] .status--open .status__pip { background: var(--blood); box-shadow: 0 0 8px 1px rgba(122,18,18,0.35); }
[data-theme="light"] ::selection { color: #efe9dd; }
html { transition: background-color 0.8s var(--ease); }
body { transition: background-color 0.8s var(--ease), color 0.8s var(--ease); }

/* ---------- Theme toggle: a small eclipse ---------- */
.theme-toggle {
  appearance: none; -webkit-appearance: none; background: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 0;
  font-family: var(--f-caps); text-transform: uppercase;
  letter-spacing: 0.24em; font-size: 11px; color: var(--text-dim);
  transition: color 0.5s var(--ease);
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle .eclipse {
  position: relative; width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid var(--gold); overflow: hidden; flex: none;
}
.theme-toggle .eclipse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--gold);
  transform: translateX(45%);
  transition: transform 0.9s var(--ease);
}
[data-theme="light"] .theme-toggle .eclipse::after { transform: translateX(-45%); }
.theme-toggle { padding-left: clamp(18px, 2.4vw, 32px); border-left: 1px solid var(--rule); }
.theme-toggle .tlabel { display: inline; min-width: 3.2em; text-align: left; }
@media (max-width: 820px) {
  .header-right { gap: 20px; }
  .theme-toggle { border-left: 0; padding-left: 0; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ==========================================================================
   DROPDOWNS — custom listbox. The native <select> stays in the DOM for the
   form's value; this is what people see and use.
   ========================================================================== */
.xsel { position: relative; }
.xsel > select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; bottom: 0; left: 0; }
.xsel__btn {
  appearance: none; -webkit-appearance: none; background: none; border: 0; cursor: pointer;
  width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding: 6px 0 12px; text-align: left;
  font-family: var(--f-text); font-size: 21px; color: var(--text); line-height: 1.3;
}
.xsel__btn:focus-visible { outline: none; }
.xsel__btn .v { display: flex; align-items: baseline; gap: 18px; min-width: 0; }
.xsel__btn .v.is-empty { color: var(--ash-dim); font-style: italic; }
.xsel__btn .d { font-family: var(--f-caps); text-transform: uppercase; letter-spacing: 0.2em; font-size: 10px; color: var(--ash); white-space: nowrap; }
.xsel__caret {
  width: 8px; height: 8px; flex: none; margin-right: 4px; align-self: center;
  border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.6s var(--ease);
}
.xsel.is-open .xsel__caret { transform: translateY(2px) rotate(225deg); }

.xsel__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 1px); z-index: 60;
  margin: 0; padding: 10px 0; list-style: none;
  background: var(--panel);
  border: 1px solid var(--gold-line); border-top-color: var(--blood);
  box-shadow: 0 40px 70px -24px rgba(0,0,0,0.75);
  max-height: 340px; overflow-y: auto; scrollbar-width: thin;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
}
[data-theme="light"] .xsel__list { box-shadow: 0 34px 60px -26px rgba(30,25,20,0.45); }
.xsel.is-open .xsel__list { opacity: 1; transform: none; pointer-events: auto; }
.xsel__opt {
  position: relative; cursor: pointer;
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding: 13px 26px 13px 54px;
  font-family: var(--f-text); font-size: 19px; line-height: 1.3; color: var(--text-dim);
  transition: color 0.35s var(--ease), background 0.35s var(--ease), padding 0.5s var(--ease);
}
.xsel__opt + .xsel__opt { border-top: 1px solid var(--rule); }
.xsel__opt .d { font-family: var(--f-caps); text-transform: uppercase; letter-spacing: 0.2em; font-size: 10px; color: var(--ash); white-space: nowrap; }
.xsel__opt::before {
  content: "✠"; position: absolute; left: 24px; top: 50%; transform: translateY(-50%) scale(0.6);
  font-size: 12px; color: var(--blood); opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
}
.xsel__opt.is-active { color: var(--text); background: linear-gradient(90deg, var(--gold-faint), transparent 75%); padding-left: 58px; }
.xsel__opt.is-active::before { opacity: 0.45; transform: translateY(-50%) scale(0.85); }
.xsel__opt[aria-selected="true"] { color: var(--text); }
.xsel__opt[aria-selected="true"]::before { opacity: 1; transform: translateY(-50%) scale(1); }
@media (max-width: 560px) {
  .xsel__btn { font-size: 21px; }
  .xsel__btn .v { flex-direction: column; gap: 0; }
  .xsel__opt { font-size: 19px; padding-left: 46px; flex-direction: column; gap: 2px; }
  .xsel__opt.is-active { padding-left: 50px; }
  .xsel__opt::before { left: 18px; }
}

/* ---------- Conditions: a paper contract ----------
   Aged sheet drawn in CSS: warm stock, darkened edges, faint foxing,
   fine grain, a double ruled border, red-ink rubrics and a wax seal. */
.contract { max-width: 860px; margin: clamp(96px, 10vw, 150px) auto 0; }
.contract__sheet {
  position: relative; isolation: isolate;
  padding: clamp(56px, 7vw, 96px) clamp(30px, 7.5vw, 104px) clamp(56px, 7vw, 88px);
  color: #241b14;
  background:
    radial-gradient(ellipse 60% 45% at 22% 14%, rgba(255, 249, 232, 0.42), transparent 70%),
    radial-gradient(circle at 81% 19%, rgba(128, 92, 52, 0.12) 0 1.6%, transparent 4.5%),
    radial-gradient(circle at 12% 77%, rgba(128, 92, 52, 0.10) 0 1.2%, transparent 3.8%),
    radial-gradient(circle at 63% 91%, rgba(128, 92, 52, 0.08) 0 2%, transparent 5%),
    radial-gradient(ellipse 140% 120% at 50% 45%, transparent 52%, rgba(96, 68, 36, 0.38) 100%),
    linear-gradient(176deg, #dcd2bd 0%, #d3c7ad 55%, #c9bb9d 100%);
  box-shadow: 0 60px 100px -50px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(60, 44, 24, 0.3);
}
.contract__sheet::before {          /* double ruled border */
  content: ""; position: absolute; inset: clamp(12px, 1.8vw, 20px); pointer-events: none;
  border: 3px double rgba(58, 40, 22, 0.5);
}
.contract__sheet::after {           /* paper grain */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.26 0 0 0 0 0.15 0 0 0 1 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
}
.contract__kicker {
  margin: 0; text-align: center;
  font-family: var(--f-caps); text-transform: uppercase;
  letter-spacing: 0.3em; font-size: 10px; color: #7c1a14;
}
.contract__title {
  margin: 10px 0 0; text-align: center;
  font-family: var(--f-title); font-weight: 400; font-size: clamp(48px, 5.6vw, 76px); line-height: 1; color: #1b130e;
}
.contract__sub {
  margin: 16px auto 0; max-width: 26em; text-align: center;
  font-family: var(--f-display); font-style: italic; font-size: 20px; line-height: 1.4; color: #4a3b2c;
}
.contract__rule {
  display: flex; align-items: center; gap: 16px; justify-content: center;
  margin: 34px 0 10px; color: #7c1a14; font-size: 13px;
}
.contract__rule::before, .contract__rule::after { content: ""; flex: 1; height: 1px; background: rgba(58, 40, 22, 0.4); }

.articles { list-style: none; margin: 0; padding: 0; }
.articles li { padding: 24px 0 22px; border-bottom: 1px solid rgba(58, 40, 22, 0.18); }
.articles h4 {
  margin: 0 0 8px;
  font-family: var(--f-caps); text-transform: uppercase; font-weight: 500;
  letter-spacing: 0.16em; font-size: 12px; color: #7c1a14;
}
.articles h4 .art { font-family: var(--f-display); font-style: italic; font-variant: normal; text-transform: none; letter-spacing: 0.02em; font-size: 18px; margin-right: 6px; }
.articles p {
  margin: 0; font-family: var(--f-text); font-size: 18px; line-height: 1.62; color: #2b2119;
  text-align: justify; -webkit-hyphens: auto; hyphens: auto;
}
.articles li:first-child p::first-letter {
  float: left; font-family: var(--f-black); color: #7c1a14;
  font-size: 3.6em; line-height: 0.82; padding: 6px 10px 0 0;
}
.contract__close {
  margin: 40px 0 0; text-align: center;
  font-family: var(--f-display); font-style: italic; font-size: 20px; color: #3a2d21;
}
.contract__sign {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: clamp(20px, 4vw, 48px); align-items: end;
  margin-top: 54px;
}
.sig { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.sig__line { display: block; height: 1px; background: rgba(36, 26, 17, 0.6); margin-top: 42px; }
.sig__who { font-family: var(--f-caps); text-transform: uppercase; letter-spacing: 0.24em; font-size: 10px; color: #5a4836; }
.seal {
  position: relative; width: 78px; height: 78px; display: grid; place-items: center;
  border-radius: 48% 52% 50% 50% / 53% 47% 53% 47%;
  background: radial-gradient(circle at 34% 30%, #a8261d 0%, #7e130f 48%, #560a08 100%);
  box-shadow: inset 0 2px 3px rgba(255, 200, 180, 0.18), inset 0 -4px 8px rgba(0, 0, 0, 0.35), 0 5px 12px -2px rgba(40, 10, 5, 0.55);
  transform: rotate(-8deg);
}
.seal::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.28); box-shadow: 0 1px 0 rgba(255, 190, 170, 0.12); }
.seal span { font-size: 26px; color: rgba(40, 4, 2, 0.55); text-shadow: 0 1px 0 rgba(255, 180, 160, 0.22); }
@media (max-width: 640px) {
  .contract__sign { grid-template-columns: 1fr; justify-items: center; }
  .contract__sign .sig { width: 80%; }
  .contract__sign .seal { order: 3; margin-top: 12px; }
  .articles p { text-align: left; font-size: 18px; }
}
[data-theme="light"] .contract__sheet { box-shadow: 0 50px 80px -46px rgba(30, 24, 18, 0.55), 0 0 0 1px rgba(60, 44, 24, 0.28); }

/* ---------- Rendering hints ----------
   Off-screen chapters and footers skip layout and paint until near view. */
.collection { content-visibility: auto; contain-intrinsic-size: auto 1500px; }
.site-footer { content-visibility: auto; contain-intrinsic-size: auto 520px; }

/* ---------- Type roles: details ---------- */
.articles h4 { font-family: var(--f-title); text-transform: none; font-size: 20px; letter-spacing: 0.04em; }
.articles h4 .art { font-size: 19px; }
.xsel__btn .v.is-empty { font-family: var(--f-display); }

/* ---------- The name ----------
   "Xtacey" and "Inked Xtacey" are always set in Unifraktur Maguntia. */
.name { font-family: var(--f-black) !important; font-weight: 400 !important; font-style: normal !important;
        text-transform: none !important; letter-spacing: 0 !important; font-variant: normal !important; }
.brand.name { font-size: 31px; }
.hero__mark.name { font-size: clamp(88px, 17vw, 260px); line-height: 0.95; margin: 0; }
.hero__kicker.name { font-size: 30px; color: var(--gold); margin-bottom: 4px; }
.site-footer__mark.name { font-size: clamp(54px, 8vw, 120px); line-height: 0.95; margin: 0; color: var(--text); opacity: 0.85; }
.legal .name { font-size: 15px; color: var(--text-dim); }
.contract__kicker.name { font-size: 22px; }
.sig__who.name { font-size: 18px; color: #3d2f22; }
.lede .name { font-size: 1.08em; }
.facts dd.name { font-size: 26px; }
.plate figcaption .t.name { font-size: 26px; }

/* ---------- Waiting frames ----------
   Until a photograph is placed, each arch is a pane of dark glass with the
   night just behind it: trees barely there, a cold faint reflection.
   Still, cold, quiet. */
.niche[data-label] {
  background:
    /* cold reflection across the glass */
    linear-gradient(118deg, transparent 30%, rgba(190,200,215,0.045) 41%, rgba(190,200,215,0.012) 47%, transparent 56%),
    /* glazing bar: one hairline */
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(160,170,185,0.10) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    /* depth: the pane darkens toward its edges */
    radial-gradient(ellipse 85% 75% at 50% 45%, transparent 35%, rgba(2,3,4,0.78) 100%),
    /* the forest, scarcely visible */
    linear-gradient(rgba(7,8,11,0.72), rgba(7,8,11,0.72)),
    url("../img/forest-960.webp") center bottom / cover no-repeat,
    radial-gradient(ellipse 80% 45% at 50% 78%, rgba(120,132,150,0.16), transparent 70%),
    linear-gradient(180deg, #07090c 0%, #0c0e12 60%, #08090b 100%);
  box-shadow: inset 0 0 0 1px rgba(160,170,185,0.06), 0 30px 60px -34px rgba(0,0,0,0.9);
}
.niche[data-label]::before { border-color: rgba(176,186,200,0.12); }
.plate:hover .niche[data-label]::before { border-color: rgba(176,186,200,0.24); }

/* the label is gone until you look closely */
.niche[data-label]::after {
  content: attr(data-label);
  top: auto; bottom: 8%; transform: translateX(-50%);
  font-size: 9px; letter-spacing: 0.3em;
  color: rgba(176,186,200,0.4);
  opacity: 0; transition: opacity 0.9s var(--ease);
}
.plate:hover .niche[data-label]::after { opacity: 1; }

/* captions under an empty pane stay faint, and wake on hover */
.plate:has(.niche[data-label]) figcaption { opacity: 0.38; transition: opacity 0.9s var(--ease); padding-top: 16px; gap: 2px; }
.plate:has(.niche[data-label]):hover figcaption { opacity: 1; }
.plate:has(.niche[data-label]) figcaption .caps { font-size: 9px; letter-spacing: 0.28em; color: var(--ash); }
.plate:has(.niche[data-label]) figcaption .t { font-size: 16px; color: var(--text-dim); }
.plate:has(.niche[data-label]) figcaption .caps:last-child { display: none; }

[data-theme="light"] .niche[data-label] { box-shadow: inset 0 0 0 1px rgba(20,22,26,0.2), 0 26px 50px -34px rgba(20,18,15,0.6); }
[data-theme="light"] .niche[data-label]::before { border-color: rgba(176,186,200,0.16); }
