/* Marchling: the game's kit (src/components/kit.tsx) rebuilt for the web.
   Dark wood-and-leather ground, parchment cards, slate plates with gold
   corners, iron tabs, square corners everywhere. */

@font-face { font-family: 'MedievalSharp'; src: url('../fonts/MedievalSharp_400Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url('../fonts/Alegreya_400Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url('../fonts/Alegreya_400Regular_Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url('../fonts/Alegreya_700Bold.ttf') format('truetype'); font-weight: 700 900; font-style: normal; font-display: swap; }

:root {
  --ground: #1c130c;
  --wood: #3f2b1f;
  --wood-deep: #2b1d15;
  --parchment: #f1e3c4;
  --paper: #eee1c6;
  --ink: #3b2716;
  --ink-muted: #7a5e45;
  --text: #f3e3c3;
  --text-muted: #bfa582;
  --gold: #e3a82b;
  --gold-deep: #b07a12;
  --gold-bright: #f2c14e;
  --blood: #a8322a;
  --blood-bright: #c8483c;
  --steel: #5b6b7a;
  --slate: #4a525c;
  --good: #3c8d4f;
  --rested: #7c5cc4;
  --inlay: #2c1f15;
  --line: rgba(227, 168, 43, 0.45);
  --common: #8c8273;
  --uncommon: #3c8d4f;
  --rare: #2f6fc0;
  --elite: #8e44c9;
  --legendary: #d9711e;
  --display: 'MedievalSharp', 'Palatino Linotype', Georgia, serif;
  --body: 'Alegreya', Georgia, 'Times New Roman', serif;
  --wrap: 1180px;
  --gutter: 20px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground) url('../img/backdrop.png') repeat;
  color: var(--text);
  font: 18px/1.6 var(--body);
  overflow-x: hidden;
}
body::before {
  /* The screen's darker edges (the kit's Screen). */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(8, 5, 3, 0.55) 100%);
  z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }
img { max-width: 100%; height: auto; display: block; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--gold-bright); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.1; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

/* ------------------------------------------------------------ the kit */

/* A ruled header: small capitals between lines and diamonds. */
.rule { display: flex; align-items: center; gap: 12px; color: var(--gold); font-family: var(--display); font-size: 15px; letter-spacing: 0.22em; text-transform: uppercase; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7); }
.rule::before, .rule::after { content: ''; flex: 1; height: 2px; border-top: 1px solid var(--line); border-bottom: 1px solid rgba(0, 0, 0, 0.5); }
.rule span { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.rule span::before, .rule span::after { content: ''; width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--line); background: rgba(8, 5, 3, 0.6); }
.rule.on-paper { color: var(--gold-deep); text-shadow: none; }
.rule.on-paper::before, .rule.on-paper::after { border-top-color: rgba(176, 122, 18, 0.55); border-bottom-color: rgba(255, 250, 235, 0.6); }
.rule.on-paper span::before, .rule.on-paper span::after { border-color: rgba(176, 122, 18, 0.55); background: rgba(176, 122, 18, 0.15); }

/* Slate with gold corners (the kit's 'special' panel and Plaque). */
.plate {
  --c: rgba(227, 168, 43, 0.85);
  position: relative;
  border: 2px solid #0b0806;
  border-radius: 2px;
  background:
    linear-gradient(var(--c) 0 0) 5px 5px / 16px 2px no-repeat,
    linear-gradient(var(--c) 0 0) 5px 5px / 2px 16px no-repeat,
    linear-gradient(var(--c) 0 0) calc(100% - 5px) 5px / 16px 2px no-repeat,
    linear-gradient(var(--c) 0 0) calc(100% - 5px) 5px / 2px 16px no-repeat,
    linear-gradient(var(--c) 0 0) 5px calc(100% - 5px) / 16px 2px no-repeat,
    linear-gradient(var(--c) 0 0) 5px calc(100% - 5px) / 2px 16px no-repeat,
    linear-gradient(var(--c) 0 0) calc(100% - 5px) calc(100% - 5px) / 16px 2px no-repeat,
    linear-gradient(var(--c) 0 0) calc(100% - 5px) calc(100% - 5px) / 2px 16px no-repeat,
    linear-gradient(180deg, #4d5560 0%, #3b4149 100%);
  box-shadow: inset 0 0 0 1px rgba(227, 168, 43, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 26px rgba(0, 0, 0, 0.45);
}

/* Parchment (the kit's paper panel). */
.paper {
  position: relative;
  color: var(--ink);
  border: 2px solid #24170e;
  border-radius: 2px;
  background-color: var(--paper);
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .27 0 0 0 0 .1 0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .36 0 0 0 0 .14 0 0 0 .55 -.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 1px rgba(255, 248, 228, 0.6), inset 0 0 48px rgba(128, 82, 28, 0.38), 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* The dark leather inlay, lit from the top left. */
.inlay {
  border-radius: 2px;
  border: 1.5px solid;
  border-color: #120b07 rgba(227, 190, 120, 0.35) rgba(227, 190, 120, 0.35) #120b07;
  background: var(--inlay);
}

/* Buttons: a red plate for the big moment, iron for the rest. */
.btn {
  --face: linear-gradient(180deg, #c04c3f 0%, #9a3329 55%, #852a22 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 26px 13px;
  font: 20px/1 var(--display);
  color: #fff8e7;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
  background: var(--face);
  border: 2px solid #0b0705;
  border-radius: 2px;
  box-shadow: inset 0 2px 0 rgba(255, 214, 170, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(227, 168, 43, 0.55), 0 5px 0 #0b0705, 0 12px 24px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease, box-shadow 0.08s ease;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 214, 170, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(227, 168, 43, 0.55), 0 2px 0 #0b0705, 0 6px 14px rgba(0, 0, 0, 0.4); }
.btn-iron { --face: linear-gradient(180deg, #2f241a 0%, #20170f 100%); color: #e8c77a; box-shadow: inset 0 2px 0 rgba(227, 168, 43, 0.22), inset 0 -3px 0 rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(227, 168, 43, 0.35), 0 5px 0 #0b0705, 0 12px 24px rgba(0, 0, 0, 0.45); }
.btn-small { min-height: 40px; padding: 7px 16px 9px; font-size: 16px; }

/* A square tag. */
.tag { display: inline-block; padding: 1px 8px 2px; border: 1.5px solid currentColor; border-radius: 2px; font: 700 12px/1.5 var(--body); letter-spacing: 0.04em; }
.tag.filled { color: #fff8e7; }

/* Iron tabs: the open one a parchment plate with a gold edge. */
.tabs { display: flex; gap: 2px; padding: 2px; background: #18110b; border: 1.5px solid #090604; border-radius: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 1 0 auto;
  min-height: 38px;
  padding: 0 12px;
  font: 15px/1 var(--display);
  letter-spacing: 0.02em;
  color: #c9a867;
  background: #22180f;
  border: 0;
  border-top: 2px solid rgba(227, 168, 43, 0.12);
  border-bottom: 1px solid #0e0906;
  border-radius: 1px;
  cursor: pointer;
  white-space: nowrap;
}
.tabs button:hover { color: var(--gold-bright); }
.tabs button[aria-selected='true'] { color: var(--ink); background: #e8d4a8; border-top-color: var(--gold); border-bottom-color: #b9965e; }

/* Section heads. */
.section { padding: 92px 0; position: relative; }
.head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.head .rule { max-width: 520px; margin: 0 auto 18px; }
.head h2 { font-size: clamp(36px, 5.4vw, 58px); color: var(--parchment); text-shadow: 0 3px 0 #0b0705, 0 0 34px rgba(227, 168, 43, 0.12); }
.head p { margin-top: 16px; font-size: 20px; font-style: italic; color: var(--text-muted); }

/* ------------------------------------------------------------ top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(20, 13, 8, 0.97), rgba(20, 13, 8, 0.9));
  border-bottom: 1px solid rgba(227, 168, 43, 0.35);
  box-shadow: 0 1px 0 #000, 0 8px 22px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
}
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--parchment); font: 26px/1 var(--display); text-shadow: 0 2px 0 #000; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text-muted); text-decoration: none; font: 16px/1 var(--display); letter-spacing: 0.04em; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--gold-bright); border-bottom-color: var(--line); }
.menu { display: none; margin-left: auto; width: 44px; height: 40px; background: #22180f; border: 1.5px solid #090604; border-top: 2px solid rgba(227, 168, 43, 0.3); border-radius: 2px; cursor: pointer; padding: 0 11px; }
.menu span { display: block; height: 2px; background: var(--gold); margin: 5px 0; }

/* ------------------------------------------------------------ hero */

.hero { position: relative; overflow: hidden; padding: 70px 0 40px; min-height: calc(100vh - 64px); display: flex; flex-direction: column; justify-content: center; }
.hero-map {
  position: absolute;
  inset: -12% -6%;
  background: url('../img/map-bg.jpg') center 40% / cover no-repeat;
  opacity: 0.4;
  filter: saturate(0.7) sepia(0.25);
  animation: drift 60s ease-in-out infinite alternate;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(20, 13, 8, 0.97) 0%, rgba(20, 13, 8, 0.82) 42%, rgba(20, 13, 8, 0.5) 100%),
    linear-gradient(180deg, rgba(20, 13, 8, 0.2) 0%, transparent 40%, var(--ground) 100%);
}
@keyframes drift { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.12) translate(-3%, -4%); } }
.embers { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.embers i { position: absolute; bottom: -10px; width: 3px; height: 3px; background: #ffb066; box-shadow: 0 0 6px 1px rgba(255, 140, 60, 0.7); animation: rise linear infinite; opacity: 0; }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 0.9; } 100% { transform: translate(var(--dx, 30px), -95vh); opacity: 0; } }
.hero-inner { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 52px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 15px/1 var(--display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before, .eyebrow::after { content: ''; width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--gold); }
.hero h1 {
  margin: 18px 0 8px -4px;
  padding-bottom: 0.08em;
  font-size: clamp(60px, 8vw, 116px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--parchment);
  background: linear-gradient(180deg, #fff3d6 0%, #f1e3c4 45%, #d9b46a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 5px 0 #0b0705) drop-shadow(0 0 30px rgba(227, 168, 43, 0.18));
}
.tagline { font: italic 28px/1.3 var(--body); color: #e8d4a8; }
.lede { margin-top: 20px; max-width: 540px; color: var(--text-muted); font-size: 19px; }
.cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }
.promises { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 30px 0 0; padding: 0; list-style: none; font: 700 14px/1.4 var(--body); letter-spacing: 0.06em; text-transform: uppercase; color: #cdb48a; }
.promises li { display: flex; align-items: center; gap: 8px; }
.promises li::before { content: ''; width: 6px; height: 6px; transform: rotate(45deg); background: var(--gold-deep); }

/* A battle window: the fight screen's gold-rimmed stage. */
.stage { margin: 0; position: relative; }
.stage .window { position: relative; border: 2px solid #090604; box-shadow: 0 0 0 2px var(--gold-deep), 0 0 0 4px #090604, 0 22px 50px rgba(0, 0, 0, 0.6); background: #0e0a07; }
.stage .window img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; }
.stage .window::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.45); pointer-events: none; }
.stage figcaption { margin-top: 18px; }
.encounter { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.encounter .face { width: 48px; height: 48px; flex: none; display: grid; place-items: center; }
.encounter .face img { width: 34px; height: 34px; }
.encounter .who { flex: 1; min-width: 0; }
.encounter .label { font: 13px/1.2 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.encounter .name { font: 22px/1.2 var(--display); color: var(--parchment); }
.encounter .name small { font: 700 13px var(--body); letter-spacing: 0.06em; color: var(--gold-bright); text-transform: uppercase; margin-left: 6px; }
.odds { text-align: right; flex: none; }
.odds b { display: block; font: 20px/1.2 var(--display); color: #ff9f66; }
.odds span { font-style: italic; font-size: 15px; color: var(--text-muted); }

.tally { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 64px; }
.tally div { padding: 12px 8px 10px; text-align: center; }
.tally b { display: block; font: 700 30px/1.1 var(--body); color: var(--gold-bright); }
.tally span { font: 700 12px/1.3 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: #cdb48a; }

/* ------------------------------------------------------------ the daily march */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; }
.steps::before {
  /* The footpath that joins them, dashed like the map's trails. */
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 92px;
  border-top: 3px dashed rgba(227, 168, 43, 0.35);
}
.step { padding: 14px 14px 22px; display: flex; flex-direction: column; }
.step .art { position: relative; height: 150px; margin-bottom: 18px; display: grid; place-items: center; }
.step .art img.scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.step .num {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translate(-50%, 50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 19px/1 var(--display);
  color: #fff3d6;
  background: radial-gradient(circle at 35% 30%, #c4483a, #7d231c 70%);
  border: 2px solid #2a0f0b;
  box-shadow: 0 0 0 2px rgba(227, 168, 43, 0.6), 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.step h3 { margin-top: 12px; font-size: 25px; text-align: center; }
.step p { margin-top: 10px; font-size: 16.5px; line-height: 1.55; }
.haul-art { background: radial-gradient(circle at 50% 60%, #4a3015 0%, #20150d 70%); }
.haul-art .chest { width: 84px; height: 84px; filter: drop-shadow(0 0 18px rgba(242, 193, 78, 0.55)); animation: bob 3.2s ease-in-out infinite; }
.haul-art .loot { position: absolute; width: 38px; height: 38px; }
.haul-art .l1 { left: 16%; top: 22%; transform: rotate(-14deg); }
.haul-art .l2 { right: 15%; top: 18%; transform: rotate(12deg); }
.haul-art .l3 { right: 22%; bottom: 14%; }
.haul-art .l4 { left: 22%; bottom: 12%; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ------------------------------------------------------------ the marches */

.marches { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.map-frame { position: relative; border: 2px solid #090604; box-shadow: 0 0 0 2px var(--gold-deep), 0 0 0 4px #090604, 0 22px 50px rgba(0, 0, 0, 0.6); background: #16120e; }
.map-frame > img { width: 100%; height: auto; }
.map-frame::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 70px rgba(10, 6, 3, 0.65); }
.pin {
  position: absolute;
  z-index: 2;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.pin::before {
  content: '';
  position: absolute;
  inset: 7px;
  transform: rotate(45deg);
  background: var(--pin, var(--blood-bright));
  border: 2px solid #0b0705;
  box-shadow: 0 0 0 1px rgba(255, 240, 200, 0.5), 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease;
}
.pin:hover::before, .pin[aria-pressed='true']::before { transform: rotate(45deg) scale(1.45); }
.pin[aria-pressed='true']::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid var(--gold-bright);
  transform: rotate(45deg);
  animation: ping 1.6s ease-out infinite;
}
@keyframes ping { from { opacity: 1; transform: rotate(45deg) scale(0.6); } to { opacity: 0; transform: rotate(45deg) scale(1.3); } }
.pin.town { --pin: var(--gold); }
.pin.camp { --pin: #4fae66; }
.pin.skirmish { --pin: #8fa6bd; }
.pin.dim { opacity: 0.18; pointer-events: none; }
.pin .tip {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -6px);
  padding: 3px 8px 4px;
  white-space: nowrap;
  font: 14px/1.2 var(--display);
  color: var(--parchment);
  background: rgba(14, 9, 6, 0.92);
  border: 1px solid rgba(227, 168, 43, 0.5);
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.pin.town .tip, .pin:hover .tip, .pin[aria-pressed='true'] .tip { opacity: 1; }
.pin.town.dim .tip { opacity: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 15px; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; transform: rotate(45deg); border: 1.5px solid #0b0705; background: var(--blood-bright); }
.legend .town i { background: var(--gold); }
.legend .camp i { background: #4fae66; }
.legend .skirmish i { background: #8fa6bd; }

.atlas { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 90px; }
.district-line { min-height: 1.6em; font-style: italic; color: var(--text-muted); font-size: 16px; text-align: center; }
.place { padding: 24px 26px 26px; }
.place .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink-muted); }
.place h3 { margin: 12px 0 4px; font-size: 32px; color: var(--ink); }
.place .levels { font: 700 13px/1.4 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.place .desc { margin-top: 14px; font-style: italic; font-size: 18px; line-height: 1.55; }
.place .holds { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(176, 122, 18, 0.4); display: grid; gap: 8px; font-size: 16px; }
.place .holds div { display: flex; gap: 10px; align-items: baseline; }
.place .holds dt { flex: none; width: 76px; font: 700 12px/1.6 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-deep); }
.place .holds dd { margin: 0; }
.place .named { color: #7a3fb8; font-weight: 700; }
.atlas .stage .window img { aspect-ratio: 12 / 7; }
.town-note { padding: 14px 18px 16px; font-size: 15.5px; line-height: 1.5; color: var(--text); }
.town-note b { display: block; margin-bottom: 4px; font: 13px/1.3 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.danger { display: inline-flex; gap: 3px; margin-left: auto; }
.danger i { width: 18px; height: 18px; background: url('../img/icons/skull.png') center / contain no-repeat; image-rendering: pixelated; opacity: 0.2; }
.danger i.on { opacity: 1; }

/* ------------------------------------------------------------ battle */

.battle { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.chronicle { padding: 20px 22px 18px; }
.chronicle .rule { margin-bottom: 10px; }
.chronicle ol { list-style: none; margin: 0; padding: 0; min-height: 300px; }
.chronicle li { padding: 4px 0; font-size: 17.5px; line-height: 1.45; font-style: italic; color: #5e4630; opacity: 0; transform: translateY(6px); transition: opacity 0.35s ease, transform 0.35s ease; }
.chronicle li.shown { opacity: 1; transform: none; }
.chronicle li.you { font-style: normal; font-weight: 700; color: var(--ink); }
.chronicle li.blood { font-style: normal; font-weight: 700; color: var(--blood); }
.chronicle li.gold { font-style: normal; font-weight: 700; color: var(--gold-deep); }
.choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.choices span { padding: 10px 4px 11px; text-align: center; font: 16px/1.1 var(--display); color: #e8c77a; background: linear-gradient(180deg, #2f241a, #20170f); border: 1.5px solid #090604; border-top: 2px solid rgba(227, 168, 43, 0.3); border-radius: 2px; }
.choices span:first-child { color: #fff8e7; background: linear-gradient(180deg, #b8463a, #8a2c23); border-top-color: rgba(255, 214, 170, 0.5); }
.choices-note { margin-top: 10px; font-size: 15px; font-style: italic; color: var(--text-muted); }

.arms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 56px; }
.arm { display: flex; gap: 14px; padding: 16px 16px 18px; }
.arm .slot { width: 56px; height: 56px; flex: none; display: grid; place-items: center; }
.arm .slot img { width: 40px; height: 40px; }
.arm h4 { font: 14px/1.2 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.arm p { margin-top: 5px; font-size: 15.5px; line-height: 1.45; color: var(--text); }

.oddsbar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 56px; }
.oddsbar div { padding: 14px 10px 12px; text-align: center; }
.oddsbar b { display: block; font: 19px/1.2 var(--display); }
.oddsbar span { display: block; margin-top: 4px; font-size: 14.5px; font-style: italic; color: var(--text-muted); line-height: 1.35; }
.oddsbar .o1 b { color: #8fdb9c; } .oddsbar .o2 b { color: #d6d38a; } .oddsbar .o3 b { color: var(--gold-bright); } .oddsbar .o4 b { color: #ff9f66; } .oddsbar .o5 b { color: #ff7a6a; }
.oddsbar div { border-top: 3px solid; } .oddsbar .o1 { border-top-color: #3c8d4f; } .oddsbar .o2 { border-top-color: #9a9a3c; } .oddsbar .o3 { border-top-color: var(--gold-deep); } .oddsbar .o4 { border-top-color: #c8622b; } .oddsbar .o5 { border-top-color: var(--blood); }

.lessons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 22px; }
.lesson { padding: 22px 22px 24px; }
.lesson h3 { font-size: 23px; color: var(--ink); }
.lesson p { margin-top: 8px; font-size: 16.5px; line-height: 1.55; }
.lesson .quote { margin-top: 12px; padding-left: 12px; border-left: 3px solid rgba(176, 122, 18, 0.5); font-style: italic; color: var(--ink-muted); font-size: 15.5px; }

/* ------------------------------------------------------------ the trial */

.trial { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.trial h3 { font-size: clamp(30px, 4vw, 44px); color: var(--parchment); text-shadow: 0 3px 0 #0b0705; }
.trial h3 small { display: block; margin-top: 6px; font: italic 20px var(--body); color: var(--text-muted); text-shadow: none; }
.trial p { margin-top: 18px; color: var(--text); }
.trial-card { margin-top: 26px; padding: 18px 20px 20px; }
.trial-card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.trial-card .row b { font: 18px var(--display); color: var(--parchment); }
.trial-card .row span { font-size: 15px; color: var(--text-muted); }
.bar { position: relative; height: 22px; margin-top: 12px; padding: 4px; background: #120b07; border: 1.5px solid; border-color: #090604 rgba(227, 190, 120, 0.35) rgba(227, 190, 120, 0.35) #090604; border-radius: 2px; }
.bar i { display: block; height: 100%; width: var(--v, 0%); background: linear-gradient(180deg, #f2c14e 0 35%, #e3a82b 35% 100%); transition: width 1.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bar.blood i { background: linear-gradient(180deg, #e0705f 0 35%, #c8483c 35% 100%); }
.blows { display: flex; gap: 6px; margin-top: 12px; }
.blows i { width: 26px; height: 26px; background: url('../img/icons/swords.png') center / 20px no-repeat, #20170f; image-rendering: pixelated; border: 1.5px solid #090604; border-radius: 2px; opacity: 0.25; transition: opacity 0.3s ease; }
.blows i.on { opacity: 1; border-color: var(--gold-deep); }

/* ------------------------------------------------------------ gear */

.rarities { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.item { padding: 18px 12px 16px; text-align: center; }
.item .slot { width: 84px; height: 84px; margin: 0 auto; display: grid; place-items: center; border: 2px solid var(--r); box-shadow: inset 0 0 18px color-mix(in srgb, var(--r) 35%, transparent), 0 0 0 1px #090604; background: #241a12; border-radius: 2px; }
.item .slot img { width: 60px; height: 60px; }
.item h4 { margin-top: 12px; font-size: 18px; color: var(--parchment); }
.item .r { font: 700 12px/1.6 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--r); }
.item.legendary .slot { animation: glow 2.6s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: inset 0 0 22px rgba(217, 113, 30, 0.55), 0 0 0 1px #090604, 0 0 26px rgba(217, 113, 30, 0.45); } }
.item.common { --r: var(--common); } .item.uncommon { --r: #4fae66; } .item.rare { --r: #4a8ee0; } .item.elite { --r: #a866e0; } .item.legendary { --r: #e8892e; }

.gear-more { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 22px; margin-top: 22px; }
.gift { padding: 24px; display: flex; gap: 18px; align-items: flex-start; }
.gift .slot { width: 74px; height: 74px; flex: none; display: grid; place-items: center; }
.gift .slot img { width: 56px; height: 56px; }
.gift h3 { font-size: 24px; color: var(--ink); }
.gift .legend-name { font: 700 13px/1.4 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: #b8601a; margin-top: 2px; }
.gift p { margin-top: 8px; font-size: 16.5px; }
.minirow { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.minirow span { width: 46px; height: 46px; display: grid; place-items: center; }
.minirow img { width: 32px; height: 32px; }
.card-dark { padding: 22px 22px 24px; }
.card-dark h3 { font-size: 22px; color: var(--parchment); }
.card-dark p { margin-top: 8px; font-size: 16.5px; color: var(--text); }

/* ------------------------------------------------------------ screenshots */

.gallery { position: relative; }
.reel { display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px var(--gutter) 30px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: thin; scrollbar-color: var(--gold-deep) #18110b; }
.reel::-webkit-scrollbar { height: 8px; }
.reel::-webkit-scrollbar-track { background: #18110b; }
.reel::-webkit-scrollbar-thumb { background: var(--gold-deep); }
.shot { flex: none; width: 250px; scroll-snap-align: center; margin: 0; }
.phone { position: relative; padding: 10px; border-radius: 30px; background: linear-gradient(160deg, #2a2420, #0d0a08 60%); box-shadow: 0 0 0 1.5px #000, inset 0 0 0 1.5px rgba(227, 168, 43, 0.3), 0 24px 40px rgba(0, 0, 0, 0.6); }
.phone .screen { border-radius: 21px; overflow: hidden; aspect-ratio: 540 / 1057; background: #120c08; }
.phone .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot figcaption { margin-top: 14px; text-align: center; }
.shot figcaption b { display: block; font: 15px/1.3 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.shot figcaption span { display: block; margin-top: 4px; font-size: 15px; font-style: italic; color: var(--text-muted); line-height: 1.4; }
.reel-nav { display: flex; justify-content: center; gap: 10px; margin-top: 8px; }
.reel-nav button { width: 48px; height: 42px; display: grid; place-items: center; background: linear-gradient(180deg, #2f241a, #20170f); border: 1.5px solid #090604; border-top: 2px solid rgba(227, 168, 43, 0.3); border-radius: 2px; cursor: pointer; }
.reel-nav button::before { content: ''; width: 10px; height: 10px; border: solid var(--gold); border-width: 0 0 2.5px 2.5px; transform: translateX(2px) rotate(45deg); }
.reel-nav button.next::before { transform: translateX(-2px) rotate(-135deg); }

/* ------------------------------------------------------------ company */

.company { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.fellow { display: flex; gap: 18px; padding: 22px 24px 24px; }
.fellow .slot { width: 60px; height: 60px; flex: none; display: grid; place-items: center; }
.fellow .slot img { width: 42px; height: 42px; }
.fellow h3 { font: 15px/1.3 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.fellow h4 { margin-top: 4px; font-size: 24px; color: var(--parchment); }
.fellow p { margin-top: 8px; font-size: 16.5px; color: var(--text); }
.leagues { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.leagues span { padding: 3px 9px 4px; font: 13px/1.3 var(--display); letter-spacing: 0.06em; color: #fff8e7; border: 1.5px solid #090604; border-radius: 2px; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); }
.crier { margin-top: 44px; overflow: hidden; border-block: 1px solid rgba(227, 168, 43, 0.35); background: rgba(10, 7, 4, 0.55); }
.crier .track { display: flex; width: max-content; animation: crier 70s linear infinite; }
.crier p { display: flex; align-items: center; gap: 14px; padding: 13px 0; padding-right: 14px; white-space: nowrap; font: italic 17px var(--body); color: var(--gold-bright); }
.crier p::after { content: ''; width: 6px; height: 6px; transform: rotate(45deg); background: var(--gold-deep); margin-left: 14px; }
.crier:hover .track { animation-play-state: paused; }
@keyframes crier { to { transform: translateX(-50%); } }
.crier-note { margin-top: 10px; text-align: center; font-size: 14px; font-style: italic; color: var(--text-muted); }

/* ------------------------------------------------------------ the charter */

.charter { max-width: 860px; margin: 0 auto; padding: 56px 64px 130px; }
.charter::before, .charter::after {
  /* Rolled ends of the scroll. */
  content: '';
  position: absolute;
  left: -14px;
  right: -14px;
  height: 22px;
  border-radius: 11px;
  background: linear-gradient(180deg, #d9c294, #b39461 45%, #8a6a3c);
  border: 2px solid #24170e;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.45);
}
.charter::before { top: -14px; }
.charter::after { bottom: -14px; }
.charter h2 { text-align: center; font-size: clamp(32px, 4.6vw, 48px); color: var(--ink); }
.charter .sub { text-align: center; margin-top: 8px; font-style: italic; font-size: 19px; color: var(--ink-muted); }
.oaths { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 4px; }
.oaths li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; padding: 14px 0; border-bottom: 1px solid rgba(176, 122, 18, 0.28); }
.oaths li:last-child { border-bottom: 0; }
.oaths .slot { width: 52px; height: 52px; display: grid; place-items: center; }
.oaths .slot img { width: 36px; height: 36px; }
.oaths b { display: block; font: 21px/1.25 var(--display); font-weight: 400; color: var(--ink); }
.oaths span { display: block; margin-top: 4px; font-size: 16.5px; line-height: 1.5; color: #5e4630; }
.seal {
  position: absolute;
  right: 50%;
  bottom: 26px;
  margin-right: -46px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 40px/1 var(--display);
  color: #f6c8b8;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
  background: radial-gradient(circle at 38% 32%, #c4453a, #8c221b 55%, #5e1510 100%);
  box-shadow: 0 0 0 5px rgba(140, 34, 27, 0.55), 0 0 0 8px rgba(110, 24, 18, 0.25), 0 8px 14px rgba(0, 0, 0, 0.45);
  transform: rotate(-12deg);
  z-index: 2;
}

/* ------------------------------------------------------------ muster */

.muster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.muster-copy h2 { font-size: clamp(40px, 5.6vw, 64px); color: var(--parchment); text-shadow: 0 4px 0 #0b0705; }
.muster-copy .rule { justify-content: flex-start; max-width: 360px; margin-bottom: 18px; }
.muster-copy .rule::before { display: none; }
.muster-copy p { margin-top: 18px; color: var(--text); }
.muster-copy ul { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.muster-copy li { display: flex; gap: 12px; align-items: center; color: var(--text-muted); }
.muster-copy li img { width: 30px; height: 30px; }
.frame-wood { padding: 16px; border-radius: 3px; background: linear-gradient(135deg, #5a3e28, #3a2618 40%, #4a3220 70%, #2e1e13); border: 2px solid #120b06; box-shadow: inset 0 2px 0 rgba(255, 220, 170, 0.18), inset 0 -3px 0 rgba(0, 0, 0, 0.35), 0 26px 50px rgba(0, 0, 0, 0.6); }
.roll { padding: 30px 30px 32px; }
.roll h3 { text-align: center; font-size: 34px; color: var(--ink); }
.roll .sub { text-align: center; margin: 4px 0 22px; font-style: italic; color: var(--ink-muted); }
.field { display: grid; gap: 6px; margin-top: 16px; }
.field label, .field legend { font: 700 12px/1.4 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); padding: 0; }
.field input[type='text'], .field input[type='email'] {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: 18px var(--body);
  color: var(--ink);
  background: rgba(59, 39, 22, 0.08);
  border: 1.5px solid;
  border-color: rgba(59, 39, 22, 0.5) rgba(255, 250, 235, 0.85) rgba(255, 250, 235, 0.85) rgba(59, 39, 22, 0.5);
  border-radius: 2px;
}
.field input::placeholder { color: #a08766; font-style: italic; }
.field input:focus { outline: 2px solid var(--gold-deep); outline-offset: 1px; background: rgba(255, 250, 235, 0.5); }
fieldset.field { border: 0; margin: 16px 0 0; padding: 0; min-width: 0; }
.plates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plates label { position: relative; text-transform: none; letter-spacing: normal; }
.plates input { position: absolute; opacity: 0; }
.plates span { display: block; padding: 11px 8px 12px; text-align: center; font: 17px/1.1 var(--display); color: #d9bf8a; background: #22180f; border: 1.5px solid #090604; border-top: 2px solid rgba(227, 168, 43, 0.15); border-radius: 2px; cursor: pointer; }
.plates input:checked + span { color: var(--ink); background: var(--gold); border-top-color: #ffd98a; }
.plates input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-size: 16px; line-height: 1.45; cursor: pointer; }
.check input { appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border: 1.5px solid; border-color: rgba(59, 39, 22, 0.6) rgba(255, 250, 235, 0.9) rgba(255, 250, 235, 0.9) rgba(59, 39, 22, 0.6); background: rgba(59, 39, 22, 0.1); border-radius: 2px; display: grid; place-items: center; cursor: pointer; }
.check input:checked::before { content: ''; width: 6px; height: 11px; border: solid var(--blood); border-width: 0 3px 3px 0; transform: translateY(-1px) rotate(45deg); }
.roll .btn { width: 100%; margin-top: 24px; }
.fine { margin-top: 14px; text-align: center; font-size: 14px; font-style: italic; color: var(--ink-muted); }
.signed { display: none; text-align: center; padding: 18px 0 6px; }
.signed .seal { position: relative; right: auto; bottom: auto; margin: 0 auto 22px; }
.signed h3 { font-size: 30px; }
.signed p { margin-top: 12px; font-size: 17px; }
.roll.done form { display: none; }
.roll.done .signed { display: block; animation: rise-in 0.5s ease; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------ footer */

.footer { padding: 60px 0 46px; border-top: 1px solid rgba(227, 168, 43, 0.3); background: rgba(10, 7, 4, 0.6); }
.footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1.5fr; gap: 40px; }
.footer .brand { font-size: 30px; }
.footer p, .footer li { font-size: 15px; color: var(--text-muted); line-height: 1.6; }
.footer p { margin-top: 12px; }
.footer h4 { font: 14px/1.3 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--gold-bright); }
.footer .base { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(227, 168, 43, 0.15); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 14px; color: #8c7556; }

/* ------------------------------------------------------------ reveal on scroll */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ------------------------------------------------------------ smaller screens */

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { text-align: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .cta, .promises { justify-content: center; }
  .eyebrow { justify-content: center; }
  .hero-stage { max-width: 680px; margin: 0 auto; width: 100%; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .marches, .battle, .trial, .muster { grid-template-columns: 1fr; }
  .atlas { position: static; }
  .arms { grid-template-columns: repeat(2, 1fr); }
  .lessons { grid-template-columns: 1fr; }
  .gear-more { grid-template-columns: 1fr; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .footer .cols > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; background: rgba(20, 13, 8, 0.98); border-bottom: 1px solid rgba(227, 168, 43, 0.35); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; font-size: 19px; border-bottom: 1px solid rgba(227, 168, 43, 0.12); }
  .menu { display: block; }
  .topbar .btn { display: none; }
  .rarities { grid-template-columns: repeat(3, 1fr); }
  .company { grid-template-columns: 1fr; }
  .oddsbar { grid-template-columns: 1fr; }
  .oddsbar div { display: flex; align-items: baseline; gap: 14px; text-align: left; border-top: 0; border-left: 3px solid; }
  .oddsbar .o1 { border-left-color: #3c8d4f; } .oddsbar .o2 { border-left-color: #9a9a3c; } .oddsbar .o3 { border-left-color: var(--gold-deep); } .oddsbar .o4 { border-left-color: #c8622b; } .oddsbar .o5 { border-left-color: var(--blood); }
  .oddsbar b { flex: none; width: 110px; }
  .oddsbar span { margin-top: 0; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .section { padding: 76px 0; }
  .head { margin-bottom: 38px; }
  .head p { font-size: 18px; }
  .hero { padding-top: 44px; min-height: 0; }
  .tagline { font-size: 23px; }
  .lede { font-size: 17.5px; }
  .cta .btn { flex: 1 1 100%; }
  .promises { font-size: 12.5px; gap: 6px 16px; }
  .tally { grid-template-columns: repeat(2, 1fr); margin-top: 44px; }
  .encounter { flex-wrap: wrap; padding: 12px 14px; }
  .encounter .name { font-size: 19px; }
  .odds { text-align: left; width: 100%; padding-left: 62px; }
  .steps { grid-template-columns: 1fr; }
  .arms { grid-template-columns: 1fr; }
  .choices { grid-template-columns: repeat(2, 1fr); }
  .rarities { grid-template-columns: repeat(2, 1fr); }
  .rarities .item:last-child { grid-column: 1 / -1; }
  .place { padding: 20px 18px 22px; }
  .place h3 { font-size: 27px; }
  .charter { padding: 42px 22px 120px; }
  .charter::before, .charter::after { left: -8px; right: -8px; }
  .oaths li { grid-template-columns: 44px 1fr; gap: 14px; }
  .oaths .slot { width: 44px; height: 44px; }
  .oaths .slot img { width: 30px; height: 30px; }
  .oaths b { font-size: 19px; }
  .seal { margin-right: -40px; bottom: 20px; width: 80px; height: 80px; }
  .roll { padding: 24px 18px 26px; }
  .frame-wood { padding: 10px; }
  .footer .cols { grid-template-columns: 1fr; }
  .shot { width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .chronicle li { opacity: 1; transform: none; }
}
