/* ============================================================
   ВИИ — София · V3 "IVORY / ATELIER"
   Editorial ivory: paper, ink, oxblood. Hairline rules,
   arched frames, numbered sections, quiet motion.
   ============================================================ */

:root {
  --paper: #f6f1e6;
  --paper-2: #ece4d2;
  --ink: #1c1712;
  --ink-2: #6f6754;
  --wine: #7c2d26;
  --wine-2: #a03d33;
  --wine-l: #d9a08f;
  --dark: #17130e;
  --cream: #f6f1e6;
  --line: rgba(28, 23, 18, 0.16);
  --line-2: rgba(28, 23, 18, 0.5);
  --line-d: rgba(246, 241, 230, 0.22);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Onest", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* paper grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 2000;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: 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='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
::selection { background: var(--wine); color: var(--cream); }

.wrap { width: min(1280px, 100% - 48px); margin-inline: auto; }

/* ---------------- masthead ---------------- */
.mast {
  position: sticky; top: 0; z-index: 500;
  background: rgba(246, 241, 230, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.mast .prog {
  position: absolute; top: 0; left: 0; height: 2px; width: 100%;
  background: var(--wine);
  transform: scaleX(0); transform-origin: left;
}
.mast__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; padding: 20px 0;
  transition: padding 0.4s var(--ease);
}
.mast.is-scrolled .mast__in { padding: 11px 0; }

.brand { display: flex; align-items: center; gap: 14px; }
.brand img { width: 46px; height: 46px; border-radius: 50%; }
.mast.is-scrolled .brand img { width: 38px; height: 38px; }
.brand b { font: 600 15px/1.15 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; display: block; }
.brand small { display: block; font: 500 10px/1.5 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }

.mast nav { display: flex; gap: 4px; }
.mast nav a {
  font: 500 13px/1 var(--sans); letter-spacing: 0.05em;
  padding: 10px 11px; position: relative; white-space: nowrap;
  transition: color 0.25s;
}
.mast nav a::after {
  content: ""; position: absolute; left: 11px; right: calc(100% - 11px); bottom: 4px; height: 1px;
  background: var(--wine);
  transition: right 0.35s var(--ease);
}
.mast nav a:hover, .mast nav a.on { color: var(--wine); }
.mast nav a:hover::after, .mast nav a.on::after { right: 11px; }

.mast .cta {
  font: 600 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--ink); padding: 13px 20px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 10px;
  transition: background 0.3s, color 0.3s;
}
.mast .cta .ar { transition: transform 0.3s var(--ease); }
.mast .cta:hover { background: var(--ink); color: var(--paper); }
.mast .cta:hover .ar { transform: translateX(4px); }

.burger {
  display: none;
  width: 44px; height: 44px; border: 1px solid var(--line-2); background: transparent;
  cursor: pointer; position: relative;
}
.burger span, .burger span::before, .burger span::after {
  content: ""; position: absolute; left: 12px; right: 12px; height: 1.6px; background: var(--ink);
  transition: transform 0.35s var(--ease), background 0.2s;
}
.burger span { top: 50%; margin-top: -0.8px; }
.burger span::before { left: 0; right: 0; top: -7px; }
.burger span::after { left: 0; right: 0; top: 7px; }
body.menu-open .burger span { background: transparent; }
body.menu-open .burger span::before { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- mobile sheet ---------------- */
.sheet {
  position: fixed; inset: 0; z-index: 400;
  background: var(--paper);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.65s var(--ease);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 110px 28px 40px;
}
body.menu-open .sheet { clip-path: inset(0); }
.sheet ul { display: flex; flex-direction: column; }
.sheet li a {
  display: flex; align-items: baseline; gap: 18px;
  font: 600 clamp(1.7rem, 7.5vw, 2.4rem)/1.2 var(--serif);
  padding: 15px 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.2s;
}
body.menu-open .sheet li a { opacity: 1; transform: none; }
.sheet li a i { font: 500 12px var(--mono); font-style: normal; color: var(--wine); }
.sheet li a:hover { color: var(--wine); font-style: italic; }
.sheet__foot { display: flex; flex-wrap: wrap; gap: 10px 28px; font: 500 11.5px/1.8 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.sheet__foot a { color: var(--ink); }
body.menu-open { overflow: hidden; }

/* ---------------- type ---------------- */
.kicker {
  display: inline-flex; align-items: center; gap: 14px;
  font: 500 11.5px/1 var(--mono); letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--wine);
}
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--wine); }

.h1 {
  font: 600 clamp(3.4rem, 8.6vw, 7.6rem)/0.98 var(--serif);
  letter-spacing: -0.015em; margin-top: 22px;
}
.h1 em { font-style: italic; font-weight: 500; color: var(--wine); }

.lead { font: 400 clamp(16px, 1.25vw, 18.5px)/1.75 var(--sans); color: var(--ink-2); max-width: 60ch; }

.dropcap::first-letter {
  font: 600 4.6em/0.78 var(--serif);
  float: left; padding: 0.08em 0.14em 0 0; color: var(--wine);
}

/* line-mask reveal */
.lm { display: block; overflow: hidden; }
.lm > span {
  display: block; transform: translateY(112%);
  animation: lmup 1s var(--ease) forwards; animation-delay: var(--d, 0s);
}
@keyframes lmup { to { transform: none; } }

/* scroll reveal */
.rv { opacity: 0; transform: translateY(28px); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); transition-delay: var(--d, 0s); }
.in .rv, .rv.in { opacity: 1; transform: none; }

/* hairline draw */
.draw { height: 1px; background: var(--line-2); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease) 0.15s; }
.in .draw, .draw.in { transform: scaleX(1); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px; border: 1px solid var(--ink);
  font: 600 12.5px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.btn .ar { transition: transform 0.3s var(--ease); font-family: var(--sans); }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:hover .ar { transform: translateX(5px); }
.btn--wine { background: var(--wine); border-color: var(--wine); color: var(--cream); }
.btn--wine:hover { background: var(--ink); border-color: var(--ink); }
.btn--ghost-d { border-color: rgba(246, 241, 230, 0.45); color: var(--cream); }
.btn--ghost-d:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn--sm { padding: 12px 20px; font-size: 11.5px; }

.link {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 13px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--wine);
}
.link .ar { transition: transform 0.3s var(--ease); }
.link:hover .ar { transform: translateX(5px); }

/* ---------------- section scaffolding ---------------- */
.sec { padding: 96px 0; }
.sec--alt { background: var(--paper-2); }
.sec--dark { background: var(--dark); color: var(--cream); }
.sec--dark .lead { color: rgba(246, 241, 230, 0.62); }

.shead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 24px; margin-bottom: 52px;
}
.sec--dark .shead { border-color: var(--line-d); }
.shead h2 { font: 600 clamp(2.1rem, 4.2vw, 3.4rem)/1.05 var(--serif); }
.shead h2 em { font-style: italic; font-weight: 500; color: var(--wine); }
.sec--dark .shead h2 em { color: var(--wine-l); }
.shead .no { font: 500 12.5px/1 var(--mono); letter-spacing: 0.22em; color: var(--wine); white-space: nowrap; }
.sec--dark .shead .no { color: var(--wine-l); }

/* ---------------- page hero (sub-pages) ---------------- */
.pagehero { padding: 88px 0 64px; border-bottom: 1px solid var(--line); }
.pagehero .crumbs { font: 500 11px/1 var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-2); }
.pagehero .crumbs a:hover { color: var(--wine); }
.pagehero .crumbs .sep { margin: 0 10px; color: var(--line-2); }

/* ---------------- stats ---------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 38px 28px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { font: 600 clamp(2.9rem, 4.8vw, 4.4rem)/1 var(--serif); display: block; font-variant-numeric: lining-nums; }
.stat b .sfx { font-size: 0.45em; color: var(--wine); font-weight: 500; margin-left: 4px; }
.stat span { display: block; margin-top: 10px; font: 500 11px/1.6 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }

/* ---------------- index rows (editorial lists) ---------------- */
.idx { counter-reset: idx; }
.idx li {
  display: grid; grid-template-columns: 76px 1fr minmax(0, 340px) 40px;
  align-items: center; gap: 20px;
  padding: 27px 8px; border-top: 1px solid var(--line);
  transition: background 0.35s, padding-left 0.35s var(--ease);
}
.idx li:last-child { border-bottom: 1px solid var(--line); }
.idx .n { font: 500 13px/1 var(--mono); color: var(--ink-2); }
.idx .t { font: 600 clamp(1.45rem, 2.6vw, 2.1rem)/1.15 var(--serif); transition: color 0.25s; }
.idx .t em { font-style: italic; font-weight: 500; }
.idx .d { font: 400 14px/1.55 var(--sans); color: var(--ink-2); }
.idx .go { font: 400 18px/1 var(--serif); color: var(--wine); opacity: 0; transform: translateX(-8px); transition: opacity 0.3s, transform 0.3s var(--ease); }
.idx li:hover { background: rgba(28, 23, 18, 0.045); padding-left: 20px; }
.idx li:hover .t { color: var(--wine); }
.idx li:hover .go { opacity: 1; transform: none; }

/* ---------------- facts (hairline list) ---------------- */
.facts li {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px;
  padding: 15px 0; border-top: 1px solid var(--line);
  font: 400 15.5px/1.6 var(--sans);
}
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts .mk { font: 500 12px/1 var(--mono); color: var(--wine); }

/* ---------------- arch frames ---------------- */
.arch {
  overflow: hidden; position: relative;
  border: 1px solid var(--line-2);
  border-radius: 999px 999px 0 0;
  background: var(--paper-2);
}
.arch img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transform: scale(1.03); transition: transform 2.6s var(--ease);
}
.in .arch img, .arch:hover img { transform: scale(1.0); }
.arch:hover img { transform: scale(1.05); transition-duration: 1.1s; }
.arch--full { aspect-ratio: 3/4.1; }

.cap {
  display: flex; justify-content: space-between; gap: 14px;
  padding-top: 12px;
  font: 500 10.5px/1.6 var(--mono); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------------- plates (gallery) ---------------- */
.plates { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; }
.plate { grid-column: span 5; }
.plate--5 { grid-column: span 5; }
.plate--7 { grid-column: span 7; }
.plate--12 { grid-column: span 12; }
.plate--6 { grid-column: span 6; }
.plate .ph {
  overflow: hidden; border: 1px solid var(--line-2); background: var(--paper-2);
  border-radius: 2px 2px 2px 2px;
}
.plate .ph img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  transform: scale(1.03); transition: transform 2.4s var(--ease);
}
.plate--tall .ph img { aspect-ratio: 3/3.8; }
.in .plate .ph img, .plate .ph:hover img { transform: scale(1); }
.plate .ph:hover img { transform: scale(1.05); transition-duration: 1.1s; }

/* ---------------- people ---------------- */
.person {
  display: grid; grid-template-columns: 132px 1fr auto; gap: 30px; align-items: center;
  padding: 32px 8px; border-top: 1px solid var(--line);
  transition: background 0.35s;
}
.person:last-of-type { border-bottom: 1px solid var(--line); }
.person:hover { background: rgba(28, 23, 18, 0.045); }
.person .ph {
  width: 132px; height: 158px; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: 999px 999px 0 0;
  background: var(--paper-2);
}
.person .ph img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.person .ph .mono {
  width: 100%; height: 100%; display: grid; place-items: center;
  font: 600 44px/1 var(--serif); font-style: italic; color: var(--cream);
  background: linear-gradient(160deg, #3a3128, var(--dark));
}
.person h3 { font: 600 1.85rem/1.15 var(--serif); }
.person h3 i { font-style: italic; font-weight: 500; color: var(--wine); }
.person .sub { font: 400 14.5px/1.55 var(--sans); color: var(--ink-2); margin-top: 6px; max-width: 46ch; }
.person .mail { font: 500 12px/1.7 var(--mono); color: var(--wine); word-break: break-all; }
.person .tag { font: 500 10.5px/1.7 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.person a:hover { color: var(--wine); }

/* ---------------- years (history) ---------------- */
.yr {
  display: grid; grid-template-columns: 220px 1fr; gap: 40px;
  padding: 36px 8px; border-top: 1px solid var(--line);
  transition: background 0.35s;
}
.yr:last-of-type { border-bottom: 1px solid var(--line); }
.yr:hover { background: rgba(28, 23, 18, 0.04); }
.yr b { font: 600 clamp(1.9rem, 3vw, 2.7rem)/1 var(--serif); color: var(--wine); font-variant-numeric: lining-nums; }
.yr h3 { font: 600 1.5rem/1.2 var(--serif); margin-bottom: 8px; }
.yr p { font: 400 15.5px/1.7 var(--sans); color: var(--ink-2); max-width: 72ch; }
.yr--now b { font-style: italic; }

/* ---------------- posts (news) ---------------- */
.post {
  display: grid; grid-template-columns: 170px 1fr 240px 44px; gap: 28px; align-items: center;
  padding: 30px 8px; border-top: 1px solid var(--line);
  transition: background 0.35s;
}
.post:last-of-type { border-bottom: 1px solid var(--line); }
.post:hover { background: rgba(28, 23, 18, 0.045); }
.post .date { font: 500 11.5px/1.7 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.post .date .tag { display: block; color: var(--wine); }
.post h3 { font: 600 1.7rem/1.2 var(--serif); transition: color 0.25s; }
.post:hover h3 { color: var(--wine); }
.post p { font: 400 14.5px/1.6 var(--sans); color: var(--ink-2); margin-top: 6px; max-width: 64ch; }
.post .thumb { overflow: hidden; border: 1px solid var(--line); border-radius: 2px; }
.post .thumb img { width: 240px; height: 150px; object-fit: cover; transition: transform 1.2s var(--ease); }
.post:hover .thumb img { transform: scale(1.06); }
.post .go { font: 400 20px/1 var(--serif); color: var(--wine); transition: transform 0.3s var(--ease); }
.post:hover .go { transform: translateX(6px); }

.ghost-note {
  margin-top: 40px; border: 1px dashed var(--line-2); padding: 30px 34px;
  display: flex; gap: 20px; align-items: flex-start;
  font: 400 14.5px/1.7 var(--sans); color: var(--ink-2);
}
.ghost-note b { font: 600 15px var(--sans); color: var(--ink); }
.ghost-note .ico { font: 500 11px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--wine); white-space: nowrap; padding-top: 4px; }

/* ---------------- contact rows ---------------- */
.crow {
  display: grid; grid-template-columns: 190px 1fr; gap: 30px;
  padding: 34px 8px; border-top: 1px solid var(--line);
  transition: background 0.35s;
}
.crow:last-of-type { border-bottom: 1px solid var(--line); }
.crow:hover { background: rgba(28, 23, 18, 0.04); }
.crow .lbl { font: 500 11px/1.8 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--wine); }
.crow .val { font: 600 clamp(1.4rem, 2.4vw, 2rem)/1.25 var(--serif); }
.crow .val a { border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.crow .val a:hover { color: var(--wine); border-color: var(--wine); }
.crow .val small { display: block; font: 400 14.5px/1.6 var(--sans); color: var(--ink-2); margin-top: 8px; }

.mapbox { border: 1px solid var(--line-2); background: var(--paper-2); }
.mapbox iframe { display: block; width: 100%; height: 460px; border: 0; filter: grayscale(0.25) sepia(0.12); }
.mapbox .bar {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 18px 24px; border-top: 1px solid var(--line);
  font: 500 11px/1.7 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2);
}

/* ---------------- hero (home) ---------------- */
.hero { padding: 84px 0 64px; }
.hero__grid { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 60px; align-items: center; }
.hero__acts { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__meta { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: 64px; }
.hero__meta > div { padding: 26px 28px 0 0; margin-right: 28px; border-right: 1px solid var(--line); }
.hero__meta > div:last-child { border-right: 0; margin-right: 0; }
.hero__meta b { font: 600 clamp(2.4rem, 4vw, 3.6rem)/1 var(--serif); font-variant-numeric: lining-nums; }
.hero__meta span { display: block; margin-top: 10px; font: 500 11px/1.6 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }

/* ---------------- CTA band ---------------- */
.band { background: var(--dark); color: var(--cream); position: relative; overflow: hidden; }
.band .band__in {
  display: flex; align-items: center; justify-content: space-between; gap: 36px; flex-wrap: wrap;
}
.band h2 { font: 600 clamp(2.2rem, 4.6vw, 3.8rem)/1.05 var(--serif); }
.band h2 em { font-style: italic; font-weight: 500; color: var(--wine-l); }
.band p { color: rgba(246, 241, 230, 0.6); margin-top: 12px; max-width: 52ch; }
.band__acts { display: flex; gap: 16px; flex-wrap: wrap; }
.band .orn { position: absolute; right: 4%; top: 50%; transform: translateY(-50%); font-size: 120px; color: rgba(246, 241, 230, 0.05); font-family: var(--serif); font-style: italic; pointer-events: none; }

/* ---------------- footer ---------------- */
.foot { background: var(--dark); color: var(--cream); position: relative; overflow: hidden; }
.foot .wm {
  position: absolute; right: -30px; bottom: -90px;
  font: 600 26rem/1 var(--serif); font-style: italic;
  color: rgba(246, 241, 230, 0.035); pointer-events: none; user-select: none;
}
.foot__in { position: relative; padding: 74px 0 0; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 54px; }
.foot .brand b { color: var(--cream); }
.foot .brand small { color: rgba(246, 241, 230, 0.45); }
.foot__about { font: 400 14.5px/1.75 var(--sans); color: rgba(246, 241, 230, 0.55); margin-top: 18px; max-width: 38ch; }
.foot h4 { font: 500 11px/1 var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: rgba(246, 241, 230, 0.45); margin-bottom: 20px; }
.foot ul li { padding: 7px 0; }
.foot ul a { font: 400 15px/1.5 var(--sans); color: rgba(246, 241, 230, 0.78); transition: color 0.2s, padding-left 0.3s var(--ease); }
.foot ul a:hover { color: var(--cream); padding-left: 8px; }
.foot .soc { display: flex; gap: 10px; margin-top: 22px; }
.foot .soc a {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line-d);
  font: 600 13px/1 var(--sans); color: var(--cream);
  transition: background 0.3s, border-color 0.3s;
}
.foot .soc a:hover { background: var(--cream); color: var(--ink); }
.foot__bot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line-d);
  padding: 22px 0;
  font: 500 11px/1.8 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(246, 241, 230, 0.42);
}
.foot__bot a { color: rgba(246, 241, 230, 0.6); }
.foot__bot a:hover { color: var(--cream); }

/* ---------------- misc ---------------- */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 300;
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  font: 400 16px/1 var(--serif); cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.35s, transform 0.35s var(--ease), background 0.3s, color 0.3s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--ink); color: var(--paper); }

.err { min-height: 72vh; display: grid; place-items: center; padding: 80px 0; }
.err .h1 { text-align: left; max-width: 12ch; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.mt-1 { margin-top: 16px; } .mt-2 { margin-top: 28px; } .mt-3 { margin-top: 44px; }

/* ---------------- side index (desktop, home) ---------------- */
.sideidx {
  position: fixed; right: 26px; top: 50%; transform: translateY(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 14px;
}
.sideidx a {
  width: 26px; height: 1px; background: var(--line-2); position: relative;
  transition: background 0.3s;
}
.sideidx a::after {
  content: attr(data-l); position: absolute; right: 36px; top: 50%; transform: translateY(-50%);
  font: 500 10px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2); white-space: nowrap; opacity: 0; transition: opacity 0.3s;
}
.sideidx a:hover::after { opacity: 1; }
.sideidx a.on { background: var(--wine); }
.sideidx a.on::after { opacity: 1; color: var(--wine); }

/* ---------------- responsive ---------------- */
@media (max-width: 1200px) {
  .mast nav a { padding: 10px 8px; font-size: 12.5px; }
  .mast .cta { display: none; }
}
@media (max-width: 1080px) {
  .mast nav { display: none; }
  .burger { display: block; }
  .sideidx { display: none; }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__grid figure { max-width: 430px; }
  .idx li { grid-template-columns: 56px 1fr 34px; }
  .idx .d { display: none; }
  .idx .d-blk { display: block; }
  .grid-2 { grid-template-columns: 1fr; gap: 44px; }
  .plates .plate, .plates .plate--7, .plates .plate--6 { grid-column: span 12; }
  .post { grid-template-columns: 1fr 44px; }
  .post .thumb { grid-column: 1 / -1; }
  .post .thumb img { width: 100%; height: 190px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 40px); }
  .sec { padding: 68px 0; }
  .pagehero { padding: 60px 0 46px; }
  .hero__meta { grid-template-columns: 1fr; }
  .hero__meta > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 0; margin: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 26px 18px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .person { grid-template-columns: 96px 1fr; }
  .person .ph { width: 96px; height: 116px; }
  .person .ph .mono { font-size: 32px; }
  .person .side { grid-column: 1 / -1; }
  .yr { grid-template-columns: 1fr; gap: 10px; }
  .crow { grid-template-columns: 1fr; gap: 10px; }
  .foot__grid { grid-template-columns: 1fr; gap: 34px; }
  .foot .wm { font-size: 13rem; }
  .band .orn { display: none; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .lm > span { transform: none; animation: none; }
  .rv { opacity: 1; transform: none; }
  .draw { transform: none; }
  .arch img, .plate .ph img { transform: none; }
}
