/* Eastern Wars — the site wears the game's "Map Table": linen, ink, wax, and the
   painted scenes. Tokens mirror scripts/build_menu_art.py in the game repo. */

@font-face { font-family: "IM Fell English"; src: url("../fonts/IMFellEnglish-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IM Fell English"; font-style: italic; src: url("../fonts/IMFellEnglish-Italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IM Fell English SC"; src: url("../fonts/IMFellEnglishSC-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "EB Garamond"; font-weight: 400 800; src: url("../fonts/EBGaramond.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; src: url("../fonts/AlegreyaSans-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 500; src: url("../fonts/AlegreyaSans-Medium.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 700; src: url("../fonts/AlegreyaSans-Bold.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-style: italic; src: url("../fonts/AlegreyaSans-Italic.woff2") format("woff2"); font-display: swap; }

:root {
  --linen: #e9dfc6;
  --linen-light: #f3eadb;
  --ink: #2b2419;
  --sepia: #4a3a26;
  --sepia-soft: #6b5a3e;
  --rule: #a08c66;
  --wax: #8a2a1c;
  --wax-dark: #5e1a10;
  --wax-light: #c0392b;
  --gilt: #a37d3a;
  --gilt-light: #d8bb73;
  --walnut: #2e1d0e;
  --night: #16110a;
  --cream: #f3e7cf;
  --olive: #4f5a36;

  /* IM Fell has no Cyrillic: Ukrainian pages fall through to EB Garamond. */
  --display: "IM Fell English", "EB Garamond", Georgia, serif;
  --display-sc: "IM Fell English SC", "EB Garamond", Georgia, serif;
  --body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --header-h: 64px;
}
html[lang="uk"] { --display: "EB Garamond", Georgia, serif; --display-sc: "EB Garamond", Georgia, serif; }
html[lang="uk"] .sc { font-variant: small-caps; letter-spacing: 0.06em; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--body);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gilt-light); outline-offset: 3px; }

/* ---------- surfaces ---------- */
.linen {
  background: var(--linen) url("../img/ui/linen_tile.png") repeat;
  color: var(--ink);
}
.dark {
  background: radial-gradient(120% 80% at 50% 0%, #2a1b0d 0%, var(--night) 70%);
  color: var(--cream);
}
.dark .contours {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.08;
  background: url("../img/ui/contours.png") center / 1600px auto repeat;
  filter: invert(1);
}
section { position: relative; }
.section { padding: clamp(72px, 10vw, 140px) 0; }

.kicker {
  font-family: var(--display-sc);
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  font-variant: small-caps;
  color: var(--wax);
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
html[lang="uk"] .kicker { text-transform: none; }
.kicker::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.dark .kicker { color: var(--gilt-light); }
.section-title { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 20px; }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.3rem); max-width: 62ch; color: var(--sepia); }
.dark .lede { color: #d9cbb0; }

/* double ink rule, as on the game's sheets */
.rule { height: 5px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 28px 0; }
.dark .rule { border-color: rgba(216, 187, 115, 0.35); }

/* ---------- buttons: stamps and wax ---------- */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 22px;
  font: 500 1.05rem/1 var(--body); letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--b); border-radius: 2px;
  background: transparent; color: inherit;
  box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px color-mix(in srgb, var(--b) 45%, transparent);
  transition: transform .15s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-wax {
  --b: #3a0e08;
  background: linear-gradient(180deg, var(--wax-light), var(--wax) 55%, var(--wax-dark));
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
  box-shadow: inset 0 0 0 3px transparent, inset 0 0 0 4px rgba(243, 231, 207, .35), 0 6px 18px rgba(94, 26, 16, .35);
}
.btn-ghost { --b: rgba(243, 231, 207, .75); color: var(--cream); }
.btn-ghost:hover { background: rgba(243, 231, 207, .08); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .soon { font-size: .8em; opacity: .75; font-style: italic; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  color: var(--cream);
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s;
}
.site-header.solid {
  background: rgba(22, 17, 10, .88);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(216, 187, 115, .25);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 40px; }
.brand span { font-family: "IM Fell English SC", var(--display-sc); font-size: 1.35rem; letter-spacing: .08em; white-space: nowrap; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 1rem; opacity: .85; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover { opacity: 1; border-color: var(--gilt-light); }
.lang { display: flex; gap: 2px; font-size: .9rem; border: 1px solid rgba(243, 231, 207, .35); border-radius: 2px; }
.lang a { text-decoration: none; padding: 4px 9px; opacity: .7; }
.lang a[aria-current] { background: rgba(243, 231, 207, .14); opacity: 1; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; }
.menu-toggle svg { width: 28px; height: 28px; }
@media (max-width: 920px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 0;
    background: rgba(22, 17, 10, .97);
    padding: 8px var(--gutter) 20px;
    border-bottom: 1px solid rgba(216, 187, 115, .25);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav a { padding: 14px 0; border-bottom: 1px solid rgba(243, 231, 207, .08); font-size: 1.15rem; }
  .site-header.open .nav { opacity: 1; transform: none; pointer-events: auto; }
  .site-header.open { background: rgba(22, 17, 10, .97); }
  .lang { margin-left: 0; }
}

/* ---------- hero ---------- */
.hero {
  min-height: min(100svh, 1080px);
  display: grid; align-items: end;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}
/* real gameplay behind the headline: the poster shows at once, the loop takes over */
.hero-art { position: absolute; inset: 0; z-index: -2; background: var(--night) center / cover no-repeat; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the two lines stand at ~50% and ~77% of the frame: keep both on a tall screen */
@media (max-aspect-ratio: 4/3) { .hero-art, .hero-video { background-position: 64% 50%; object-position: 64% 50%; } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(22, 17, 10, .55) 0%, rgba(22, 17, 10, 0) 22%),
    linear-gradient(90deg, rgba(22, 17, 10, .82) 0%, rgba(22, 17, 10, .45) 45%, rgba(22, 17, 10, 0) 75%),
    linear-gradient(0deg, var(--night) 0%, rgba(22, 17, 10, 0) 40%);
}
@media (max-width: 700px) {
  .hero::after {
    background:
      linear-gradient(180deg, rgba(22, 17, 10, .6) 0%, rgba(22, 17, 10, .25) 30%, rgba(22, 17, 10, .7) 55%, var(--night) 100%);
  }
}
.hero-content { padding: calc(var(--header-h) + 40px) 0 clamp(48px, 9vh, 96px); }
.hero .kicker { color: var(--gilt-light); }
.hero h1 {
  font-family: "IM Fell English SC", var(--display-sc);
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  letter-spacing: .02em;
  line-height: .9;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .55);
  margin-bottom: 22px;
}
.hero .lede { color: #eadfc8; max-width: 40ch; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); font-size: clamp(1.2rem, 2vw, 1.45rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 10px 34px;
  margin-top: clamp(40px, 7vh, 72px);
  padding-top: 20px;
  border-top: 1px solid rgba(216, 187, 115, .3);
  font-size: 1rem; color: #d9cbb0;
}
.hero-facts b { font-family: var(--display); font-weight: 400; font-size: 1.8rem; color: var(--cream); margin-right: 8px; vertical-align: -2px; }

/* ---------- the age ---------- */
.age-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.essay p:first-of-type::first-letter {
  float: left; font-family: var(--display); font-size: 4.6em; line-height: .78;
  padding: 6px 10px 0 0; color: var(--wax);
}
.essay p { font-size: 1.15rem; max-width: 60ch; }
.plate {
  position: relative; margin: 0;
  padding: 10px; background: var(--linen-light);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 #fff8 inset, 0 18px 40px rgba(46, 29, 14, .25);
  transform: rotate(.6deg);
}
.plate img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.plate figcaption { font: italic 1rem/1.4 var(--display); color: var(--sepia-soft); padding: 10px 4px 2px; }
.plate .seal { position: absolute; width: 74px; right: -18px; bottom: -22px; transform: rotate(-12deg); filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); }
@media (max-width: 860px) { .age-grid { grid-template-columns: 1fr; } .plate { transform: none; } }

.powers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.power { padding: 22px 20px 20px; border-left: 1px solid color-mix(in srgb, var(--rule) 55%, transparent); }
.power:first-child { border-left: 0; padding-left: 0; }
.power h3 { font-size: 1.35rem; margin-bottom: 6px; }
.power p { font-size: 1rem; color: var(--sepia); margin: 0; }
@media (max-width: 860px) { .powers { grid-template-columns: 1fr 1fr; } .power:nth-child(3) { border-left: 0; padding-left: 0; } .power:nth-child(n+3) { border-top: 1px solid color-mix(in srgb, var(--rule) 55%, transparent); } }
@media (max-width: 520px) { .powers { grid-template-columns: 1fr; } .power { border-left: 0; padding-left: 0; } .power + .power { border-top: 1px solid color-mix(in srgb, var(--rule) 55%, transparent); } }

/* chronicle */
.chronicle { margin-top: clamp(64px, 8vw, 104px); }
.chronicle-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.legend { display: flex; gap: 18px; font-size: .95rem; color: var(--sepia); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--rule); }
.legend .in-game::before { background: var(--wax); }
.era { margin-top: 36px; }
.era-title { font-family: var(--display-sc); font-size: 1.05rem; letter-spacing: .1em; color: var(--sepia-soft); margin: 0 0 6px; font-variant: small-caps; }
.era ol { list-style: none; margin: 0; padding: 0; }
.era li {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 24px;
  padding: 18px 0; border-top: 1px solid color-mix(in srgb, var(--rule) 60%, transparent);
  position: relative;
}
.era .year { font-family: var(--display); font-size: 2.3rem; line-height: 1; color: var(--sepia); }
.era li.in-game .year { color: var(--wax); }
.era li.in-game .year::after { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--wax); margin-left: 10px; vertical-align: 8px; }
.era h4 { font-size: 1.45rem; margin-bottom: 4px; }
.era li p { margin: 0; color: var(--sepia); max-width: 70ch; }
@media (max-width: 600px) { .era li { grid-template-columns: 1fr; gap: 4px; } .era .year { font-size: 1.9rem; } }

/* ---------- battles ---------- */
.battles-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: 44px; }
@media (max-width: 760px) { .battles-head { grid-template-columns: 1fr; } }
.battle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 22px; }
.battle {
  position: relative; overflow: hidden; margin: 0;
  background: #0e0a06;
  border: 1px solid rgba(216, 187, 115, .28);
  box-shadow: 0 0 0 4px rgba(22, 17, 10, .9), 0 0 0 5px rgba(216, 187, 115, .18);
}
.battle img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 1.2s ease, filter .6s ease; filter: saturate(.9); }
.battle:hover img, .battle:focus-within img { transform: scale(1.06); filter: saturate(1.05); }
.battle figcaption { padding: 16px 18px 18px; }
.battle .date { font: italic 1rem/1 var(--display); color: var(--gilt-light); }
.battle h3 { font-size: 1.75rem; margin: 6px 0 8px; color: var(--cream); }
.battle p { font-size: 1rem; color: #cbbd9f; margin: 0; }
.battle .no { position: absolute; top: 10px; left: 12px; font-family: var(--display); font-size: 1.1rem; color: var(--cream); background: rgba(22, 17, 10, .7); padding: 2px 10px; border: 1px solid rgba(216, 187, 115, .4); }
.battle.siege .no::after { content: " · " attr(data-siege); font-style: italic; }

.pack {
  margin-top: 64px;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center;
  border: 1px solid rgba(216, 187, 115, .3);
  background: linear-gradient(90deg, rgba(14, 10, 6, .9), rgba(46, 29, 14, .6));
}
.pack img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.pack-text { padding: clamp(24px, 4vw, 48px); }
.pack-text h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 12px; }
.pack-text p { color: #d4c6a8; }
.pack-text .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font-size: .95rem; padding: 4px 12px; border: 1px solid rgba(216, 187, 115, .4); color: var(--gilt-light); border-radius: 999px; }
@media (max-width: 820px) { .pack { grid-template-columns: 1fr; } .pack img { min-height: 200px; aspect-ratio: 16 / 9; } }

.coming { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; color: #bfae8c; font-size: 1rem; }
.coming b { font-family: var(--display-sc); font-weight: 400; color: var(--cream); font-size: 1.1rem; letter-spacing: .06em; }

/* ---------- trailers ---------- */
.trailer-stage { display: grid; grid-template-columns: 1fr 300px; gap: 22px; margin-top: 40px; }
.player {
  position: relative; aspect-ratio: 16 / 9; background: #000;
  border: 1px solid rgba(216, 187, 115, .35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.player video, .player img { width: 100%; height: 100%; object-fit: cover; }
.player .placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background: rgba(14, 10, 6, .55); color: var(--cream); font: italic 1.4rem/1.3 var(--display); padding: 20px; }
.playlist { display: flex; flex-direction: column; gap: 14px; }
.playlist button {
  display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center;
  text-align: left; padding: 8px; cursor: pointer;
  background: rgba(243, 231, 207, .04); color: var(--cream);
  border: 1px solid rgba(216, 187, 115, .2);
  font: inherit;
  transition: background-color .2s, border-color .2s;
}
.playlist button:hover { background: rgba(243, 231, 207, .08); }
.playlist button[aria-pressed="true"] { border-color: var(--gilt-light); background: rgba(216, 187, 115, .1); }
.playlist img { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; }
.playlist b { display: block; font: 400 1.25rem/1.1 var(--display); }
.playlist small { color: #bfae8c; font-size: .9rem; }
@media (max-width: 900px) {
  .trailer-stage { grid-template-columns: 1fr; }
  .playlist { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .playlist button { grid-template-columns: 1fr; min-width: 200px; scroll-snap-align: start; }
  .playlist img { width: 100%; }
}

/* ---------- nations ---------- */
.nation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 44px; }
.nation { background: var(--linen-light); border: 1px solid var(--rule); box-shadow: 0 0 0 4px var(--linen-light), 0 0 0 5px var(--rule), 0 20px 40px rgba(46, 29, 14, .16); display: flex; flex-direction: column; }
.nation img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.nation-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.nation .epithet { font: italic 1.05rem/1.2 var(--display); color: var(--wax); }
.nation h3 { font-size: 1.85rem; margin: 6px 0 12px; }
.nation p { font-size: 1.02rem; color: var(--sepia); }
.nation ul { list-style: none; margin: auto 0 0; padding: 14px 0 0; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 6px 8px; }
.nation li { font-size: .92rem; padding: 2px 10px; border: 1px solid color-mix(in srgb, var(--rule) 70%, transparent); background: rgba(255, 255, 255, .25); }
.nation .status { font-size: .92rem; color: var(--sepia-soft); font-style: italic; margin: 0 0 12px; }
@media (max-width: 980px) { .nation-grid { grid-template-columns: 1fr; max-width: 640px; } .nation { flex-direction: row; } .nation img { width: 42%; aspect-ratio: auto; } }
@media (max-width: 600px) { .nation { flex-direction: column; } .nation img { width: 100%; aspect-ratio: 16 / 10; } }

/* regiments */
.regiments { margin-top: clamp(56px, 7vw, 96px); }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); margin: 22px 0 28px; overflow-x: auto; }
.tabs button {
  font: 400 1.2rem/1 var(--display); color: var(--sepia);
  background: none; border: 0; padding: 14px 18px; cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--wax); }
.reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 212px), 1fr)); gap: 16px; }
.reg-grid[hidden] { display: none; }
.reg { background: var(--linen-light); border: 1px solid var(--rule); display: flex; flex-direction: column; }
.reg-media { position: relative; aspect-ratio: 16 / 9; background: var(--olive); overflow: hidden; }
.reg-media video, .reg-media > img:not(.reg-portrait) { width: 100%; height: 100%; object-fit: cover; }
.reg-portrait { position: absolute; left: 10px; bottom: -26px; width: 64px; height: 64px; border: 2px solid var(--linen-light); box-shadow: 0 0 0 1px var(--rule), 0 6px 14px rgba(0,0,0,.3); object-fit: cover; background: var(--walnut); }
.reg-body { padding: 34px 14px 16px; }
.reg-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.reg h4 { font-size: 1.35rem; }
.reg .symbol { width: 46px; height: 32px; flex: none; object-fit: contain; }
.reg .arch { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sepia-soft); margin: 2px 0 6px; }
.reg p { font-size: .98rem; color: var(--sepia); margin: 0; }

/* ---------- features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 48px; background: rgba(216, 187, 115, .2); border: 1px solid rgba(216, 187, 115, .2); }
.feature { background: var(--night); display: flex; flex-direction: column; }
.feature-media { aspect-ratio: 16 / 9; overflow: hidden; background: #0e0a06; }
.feature-media video, .feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-body { padding: 22px 24px 28px; }
.feature h3 { font-size: 1.6rem; margin-bottom: 10px; color: var(--cream); }
.feature p { font-size: 1.02rem; color: #cbbd9f; margin: 0; }
@media (max-width: 980px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .feature-grid { grid-template-columns: 1fr; } }

.promises { display: flex; flex-wrap: wrap; gap: 12px 30px; margin-top: 40px; color: #d9cbb0; font-size: 1.05rem; }
.promises span::before { content: "✦"; color: var(--gilt-light); margin-right: 10px; font-size: .85em; }

/* ---------- the field: screenshot carousel ---------- */
.carousel { margin-top: 40px; outline-offset: 6px; }
.car-viewport { position: relative; border: 1px solid rgba(216, 187, 115, .3); background: #0e0a06; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.car-track { display: flex; margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.car-slide figure { position: relative; margin: 0; }
.car-slide button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.car-slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.car-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none;
  padding: 56px 24px 18px; font: italic 1.4rem/1.25 var(--display); color: var(--cream);
  background: linear-gradient(0deg, rgba(14, 10, 6, .9), rgba(14, 10, 6, 0));
}
.car-prev, .car-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; padding: 0 0 4px;
  font: 2.2rem/1 var(--display); color: var(--cream);
  background: rgba(22, 17, 10, .62); border: 1px solid rgba(216, 187, 115, .5);
  transition: background-color .2s;
}
.car-prev:hover, .car-next:hover { background: rgba(94, 26, 16, .85); }
.car-prev { left: 14px; }
.car-next { right: 14px; }
.car-count { position: absolute; top: 12px; right: 14px; font: 1rem/1 var(--display); color: var(--cream); background: rgba(22, 17, 10, .62); border: 1px solid rgba(216, 187, 115, .35); padding: 5px 10px 4px; }
.car-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 6px; scrollbar-width: thin; scrollbar-color: rgba(216, 187, 115, .35) transparent; }
.car-thumbs button { flex: 0 0 128px; padding: 0; border: 1px solid rgba(216, 187, 115, .2); background: none; cursor: pointer; opacity: .5; transition: opacity .2s, border-color .2s; }
.car-thumbs button:hover { opacity: .85; }
.car-thumbs button[aria-current="true"] { opacity: 1; border-color: var(--gilt-light); }
.car-thumbs img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 700px) {
  .car-prev, .car-next { width: 40px; height: 40px; font-size: 1.8rem; }
  .car-prev { left: 8px; } .car-next { right: 8px; }
  .car-slide figcaption { font-size: 1rem; padding: 36px 14px 10px; }
  .car-thumbs button { flex-basis: 92px; }
}

/* the epoch's paintings */
.art-title { font-size: 1.6rem; margin: 56px 0 16px; }
.art-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.art-strip button { padding: 0; border: 1px solid var(--rule); background: var(--walnut); cursor: zoom-in; overflow: hidden; }
.art-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s ease; }
.art-strip button:hover img { transform: scale(1.05); }
@media (max-width: 760px) { .art-strip { grid-template-columns: repeat(3, 1fr); } }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 7, 4, .94); display: grid; place-items: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img, .lightbox video { max-width: min(100%, 1600px); max-height: 84vh; margin: 0 auto; border: 1px solid rgba(216, 187, 115, .35); }
.lightbox figcaption { color: var(--cream); font: italic 1.15rem/1.3 var(--display); margin-top: 12px; }
.lightbox figcaption:empty { display: none; }
.lightbox-close { position: absolute; top: 14px; right: 18px; background: none; border: 0; color: var(--cream); font-size: 2.4rem; line-height: 1; cursor: pointer; padding: 6px 12px; }

/* ---------- comparison ---------- */
.compare-scroll { overflow-x: auto; margin-top: 36px; border: 1px solid var(--rule); background: var(--linen-light); box-shadow: 0 0 0 4px var(--linen-light), 0 0 0 5px var(--rule); }
.compare { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 1rem; }
.compare th, .compare td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent); }
.compare thead th { font: 400 1.15rem/1.15 var(--display); color: var(--ink); border-bottom: 2px solid var(--rule); }
.compare tbody th { font: 500 .95rem/1.3 var(--body); color: var(--sepia-soft); width: 15%; }
.compare td { color: var(--sepia); }
.compare .us { background: rgba(138, 42, 28, .07); color: var(--ink); }
.compare thead .us { color: var(--wax); }
.compare tbody td.us { font-weight: 500; }
.compare-note { font-size: .9rem; color: var(--sepia-soft); font-style: italic; margin-top: 18px; }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--rule); }
.qa-list { margin-top: 28px; max-width: 860px; border-top: 1px solid var(--rule); }
.qa { border-bottom: 1px solid var(--rule); }
.qa summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font: 400 1.35rem/1.25 var(--display); color: var(--ink); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 1.6rem/1 var(--display); color: var(--wax); transition: transform .2s; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa p { margin: 0 0 20px; color: var(--sepia); max-width: 72ch; }

/* ---------- call to arms + footer ---------- */
.cta { text-align: center; overflow: hidden; isolation: isolate; color: var(--cream); }
.cta-art { position: absolute; inset: 0; z-index: -2; background: center / cover no-repeat; opacity: .5; }
.cta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 50% 50%, rgba(22,17,10,.4), var(--night)); }
.cta img.emblem { width: 96px; margin: 0 auto 22px; }
.cta h2 { font-family: var(--display-sc); font-size: clamp(2.4rem, 6vw, 4.6rem); margin-bottom: 14px; }
.cta .lede { margin: 0 auto 30px; color: #e3d6bb; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.cta .hero-actions { justify-content: center; }

.site-footer { background: #0d0905; color: #a8987a; font-size: .98rem; padding: 40px 0; border-top: 1px solid rgba(216, 187, 115, .2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--cream); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .battle img { transition: none; }
}

/* ---------- simple pages (privacy, 404) ---------- */
.page { min-height: 100svh; padding: calc(var(--header-h) + 48px) 0 80px; }
.page .sheet { max-width: 760px; margin: 0 auto; background: var(--linen-light); border: 1px solid var(--rule); box-shadow: 0 0 0 5px var(--linen-light), 0 0 0 6px var(--rule); padding: clamp(24px, 5vw, 56px); }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 8px; }
.page h2 { font-size: 1.6rem; margin: 32px 0 10px; }
.page p, .page li { color: var(--sepia); }
.page .updated { font-style: italic; color: var(--sepia-soft); }
