@font-face { font-family: 'Thmanyah Sans'; src: url('assets/fonts/thmanyahsans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Thmanyah Sans'; src: url('assets/fonts/thmanyahsans-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Display'; src: url('assets/fonts/thmanyahserifdisplay-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Thmanyah Serif Display'; src: url('assets/fonts/thmanyahserifdisplay-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

/*
  HoldBlox — the page runs like one day in the desert:
  it opens in the key art's afternoon sky (dark ink on sand-gold), spends the middle
  under the game's own HUD brown, and closes on the sunset over a fallen castle.
  Gold means "act" or "selected". Green is Saladin's side, red is Richard's.
*/
:root {
  --sky-hi: #dac7a5;     /* top of the key-art sky */
  --sky: #c8b294;        /* where the painting begins */
  --ink: #22160c;        /* umber ink for type on the sky */
  --night: #1c1712;      /* the game's HUD brown */
  --night-2: #231c15;
  --night-3: #15110d;
  --stone: #e6d8bd;      /* limestone: type on night */
  --dust: #b3a184;       /* secondary type on night */
  --gold: #d9a441;       /* coin gold */
  --gold-hi: #f0cf85;
  --green: #3e7a4b;      /* Saladin's cloak */
  --green-text: #a6d09a;
  --red: #a4302b;        /* Richard's surcoat */
  --red-text: #eca290;
  --line: rgba(230, 216, 189, 0.14);

  --font-display: 'Thmanyah Serif Display', 'Times New Roman', serif;
  --font-text: 'Thmanyah Sans', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;

  /* Perfect fourth from 17px */
  --t-0: 1.0625rem;
  --t-1: 1.25rem;
  --t-2: clamp(1.4rem, 1.2rem + .8vw, 1.9rem);
  --t-3: clamp(2rem, 1.35rem + 2.3vw, 3.2rem);
  --t-4: clamp(2.6rem, 1rem + 5.1vw, 5.6rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --section: clamp(80px, 10vw, 136px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  /* One merlon and one crenel */
  --merlons: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22'%3E%3Cpath d='M0 9h10V0h24v9h10v13H0z'/%3E%3C/svg%3E");
  --crenels: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10'%3E%3Cpath d='M0 0h10v10H0z'/%3E%3C/svg%3E");
  /* Running-bond ashlar: two courses per tile, joints staggered */
  --ashlar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='28'%3E%3Cpath d='M0 13.5h48M0 27.5h48M23.5 0v14M47.5 14v14' fill='none' stroke='%2322160c' stroke-opacity='.2'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--stone);
  font-family: var(--font-text);
  font-size: var(--t-0);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; font-weight: 700; }
p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 40; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 6px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Section heads: a title and one line of context, nothing above them */
.head { max-width: 42rem; margin-bottom: clamp(32px, 4.5vw, 56px); }
.head h2 { font-size: var(--t-3); font-weight: 900; }
.head p { margin-top: 12px; color: var(--dust); font-size: 1.125rem; max-width: 50ch; }

/* ------------------------------------------------------------ Store badges */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-width: 188px; height: 56px; padding: 0 18px;
  direction: ltr; text-decoration: none;
  background: #000; color: #fff;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 12px;
  transition: border-color .2s ease, transform .25s var(--ease);
}
a.store:hover { border-color: var(--gold-hi); transform: translateY(-2px); }
a.store:active { transform: none; }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; font-size: 1.2rem; font-weight: 700; line-height: 1.1; }
.store small { font-size: .72rem; font-weight: 400; opacity: .85; }
html[dir="rtl"] .store small { direction: rtl; text-align: left; }

/* ------------------------------------------------------------ Top bar */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  color: var(--ink);
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease, padding .3s ease;
}
.bar.solid, .bar.open { background: rgba(21, 17, 13, .94); color: var(--stone); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); padding-block: 10px; padding-top: max(10px, env(safe-area-inset-top)); }
.bar:not(.solid):not(.open) :focus-visible { outline-color: var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; white-space: nowrap; }
.brand img { border-radius: 10px; }
.nav { display: flex; gap: 28px; margin-inline-start: auto; }
.nav a { position: relative; text-decoration: none; font-weight: 700; font-size: 1rem; opacity: .75; padding-block: 6px; transition: opacity .2s; }
.nav a:hover, .nav a.active { opacity: 1; }
.nav a.active::after { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: currentColor; }
.bar.solid .nav a.active { color: var(--gold-hi); }
.nav-cta { display: none; }
.bar-end { display: flex; align-items: center; gap: 10px; }
.lang {
  font-size: .9rem; font-weight: 700; min-width: 44px; height: 40px; padding: 0 12px;
  background: transparent; border: 1px solid; border-color: color-mix(in srgb, currentColor 35%, transparent); border-radius: 999px;
  cursor: pointer; transition: border-color .2s;
}
.lang:hover { border-color: currentColor; }
.btn-mini {
  display: inline-flex; align-items: center; height: 40px; padding: 0 20px;
  text-decoration: none; font-weight: 700; font-size: .95rem; border-radius: 999px;
  background: var(--ink); color: var(--sky-hi);
  transition: background-color .3s, color .3s, transform .25s var(--ease);
}
.bar.solid .btn-mini { background: var(--gold); color: var(--ink); }
.btn-mini:hover { transform: translateY(-1px); }
.menu-btn { display: none; width: 44px; height: 40px; border: 1px solid; border-color: color-mix(in srgb, currentColor 35%, transparent); border-radius: 999px; background: transparent; cursor: pointer; position: relative; }
.menu-btn span { position: absolute; inset-inline: 13px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s var(--ease), top .25s var(--ease); }
.menu-btn span:first-child { top: 15px; }
.menu-btn span:last-child { top: 22px; }
.bar.open .menu-btn span:first-child { top: 18.5px; transform: rotate(45deg); }
.bar.open .menu-btn span:last-child { top: 18.5px; transform: rotate(-45deg); }

/* ------------------------------------------------------------ Hero: a poster */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(640px, 100svh);
  display: grid; grid-template-rows: auto 1fr;
  background: linear-gradient(var(--sky-hi), var(--sky) 180px);
  text-align: center;
}
/* The painting always begins just under the title, however many lines it takes, and fades up into the sky */
.hero-sky { grid-area: 1 / 1; position: relative; z-index: 1; }
.hero-picture { grid-area: 2 / 1; position: relative; z-index: -1; margin-top: -96px; }
.hero-ground { grid-area: 2 / 1; align-self: end; position: relative; z-index: 1; }
.hero-picture::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 56%;
  background: linear-gradient(to top, var(--night) 0%, rgba(28, 23, 18, .9) 24%, rgba(28, 23, 18, .5) 55%, rgba(28, 23, 18, 0));
}
.hero-art {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 24%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 24%);
}
.hero-sky { padding-top: calc(104px + env(safe-area-inset-top)); }
.hero h1 { font-size: var(--t-4); font-weight: 900; line-height: 1.12; color: var(--ink); letter-spacing: -.01em; text-wrap: balance; }
.hero h1 span { display: inline-block; }
.hero-ground { padding-bottom: clamp(40px, 7vh, 72px); }
.lede { margin-inline: auto; max-width: 46ch; font-size: var(--t-1); line-height: 1.7; color: var(--stone); text-shadow: 0 1px 14px rgba(0, 0, 0, .6); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px 28px; margin-top: 28px; }
.watch { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; text-align: start; }
.watch-icon {
  display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 50%;
  background: rgba(21, 17, 13, .5); color: var(--gold-hi); box-shadow: inset 0 0 0 2px var(--gold);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .25s, color .25s;
}
.watch-icon svg { width: 22px; height: 22px; }
.watch:hover .watch-icon { background: var(--gold); color: var(--ink); }
.watch-text { display: flex; flex-direction: column; line-height: 1.3; }
.watch-text b { font-size: 1.1rem; }
.watch-text small { color: var(--dust); font-size: .9rem; }

/* The one orchestrated moment: the painting settles and the title arrives phrase by phrase */
@media (prefers-reduced-motion: no-preference) {
  .hero-art { animation: settle 2.6s var(--ease) both; }
  .hero h1 span { animation: rise .9s var(--ease) both; }
  .hero h1 span:nth-child(2) { animation-delay: .14s; }
  .hero h1 span:nth-child(3) { animation-delay: .28s; }
  .hero-ground { animation: rise .9s var(--ease) .5s both; }
}
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ Trailer */
.trailer { padding-block: clamp(56px, 8vw, 104px) var(--section); }
.player {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 40px 100px -30px rgba(0, 0, 0, .85);
}
.player video { width: 100%; height: 100%; object-fit: cover; }
.player:not(.playing) video { transform: scale(1.11); } /* the poster carries letterbox bars */
.player-start {
  /* The whole frame is the button; its visible part sits in the corner so the poster's own title stays clear */
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; gap: 16px;
  padding: clamp(16px, 3vw, 32px); border: 0; cursor: pointer; text-align: start;
  background: linear-gradient(to top, rgba(12, 9, 7, .78), rgba(12, 9, 7, 0) 42%);
}
.player-disc {
  --size: clamp(60px, 6.5vw, 84px);
  display: grid; place-items: center; flex: none; width: var(--size); height: var(--size); border-radius: 50%;
  background: var(--gold); color: var(--ink); box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  transition: transform .35s var(--ease), background-color .25s;
}
.player-disc svg { width: 42%; height: 42%; margin-inline-start: 6%; }
html[dir="rtl"] .player-disc svg { margin-inline-start: 0; margin-inline-end: 6%; }
.player-start:hover .player-disc { transform: scale(1.06); background: var(--gold-hi); }
.player-label { display: flex; flex-direction: column; line-height: 1.3; text-shadow: 0 2px 12px rgba(0, 0, 0, .9); }
.player-label b { font-size: var(--t-1); }
.player-label small { color: var(--dust); font-size: .95rem; }
.player.playing .player-start { display: none; }

/* ------------------------------------------------------------ How you play: the list drives one screen */
.how { background: var(--night-2); padding-block: var(--section); }
.stages { display: grid; grid-template-columns: minmax(280px, 5fr) 7fr; gap: clamp(28px, 4.5vw, 72px); align-items: center; }
.stage-list { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.stage {
  position: relative; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0 16px;
  width: 100%; padding: 20px 0 22px; text-align: start; cursor: pointer;
  background: none; border: 0; border-top: 1px solid var(--line);
}
.stage-num { font-family: var(--font-display); font-weight: 900; font-size: 2.1rem; line-height: 1.1; color: var(--dust); transition: color .3s; }
.stage-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: var(--t-2); line-height: 1.3; color: var(--dust); transition: color .3s; }
.stage:hover .stage-title { color: #d3c4a6; }
.stage[aria-selected="true"] .stage-title { color: var(--stone); }
.stage[aria-selected="true"] .stage-num { color: var(--gold); }
.stage-body { display: block; margin-top: 4px; color: var(--dust); max-width: 40ch; line-height: 1.65; }
.stage-meter { position: absolute; inset-inline: 0; top: -1px; height: 2px; overflow: hidden; }
.stage-meter i { display: block; height: 100%; background: var(--gold); transform: scaleX(0); }
html[dir="rtl"] .stage-meter i { transform-origin: right center; }
html[dir="ltr"] .stage-meter i { transform-origin: left center; }
.stage-screen {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.stage-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.stage-screen video.is-active { opacity: 1; }
.screen-toggle {
  position: absolute; inset-block-end: 12px; inset-inline-end: 12px; z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: rgba(21, 17, 13, .7); color: var(--stone); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.screen-toggle:hover { background: rgba(21, 17, 13, .9); }
.screen-toggle svg { width: 18px; height: 18px; }
.screen-toggle .if-playing, .screen-toggle.is-playing .if-paused { display: none; }
.screen-toggle.is-playing .if-playing { display: block; }

/* ------------------------------------------------------------ Sides: each lord over the army he leads */
.sides { padding-top: var(--section); }
.factions { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: clamp(700px, 96vh, 900px); overflow: hidden; background: var(--gold); }
.faction { position: relative; overflow: hidden; }
.faction-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.faction::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.faction-a::after { background: linear-gradient(to top, rgba(10, 22, 13, .97) 0%, rgba(10, 22, 13, .82) 30%, rgba(10, 22, 13, 0) 62%); }
.faction-b::after { background: linear-gradient(to top, rgba(36, 11, 8, .97) 0%, rgba(36, 11, 8, .82) 30%, rgba(36, 11, 8, 0) 62%); }
/* The diagonal seam: the gold behind shows through a 3px gap */
html[dir="rtl"] .faction-a { clip-path: polygon(0 0, 100% 0, 100% 100%, 12% 100%); margin-inline-end: -6%; }
html[dir="rtl"] .faction-b { clip-path: polygon(0 0, calc(88% - 3px) 0, calc(100% - 3px) 100%, 0 100%); }
html[dir="ltr"] .faction-a { clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); margin-inline-end: -6%; }
html[dir="ltr"] .faction-b { clip-path: polygon(calc(12% + 3px) 0, 100% 0, 100% 100%, 3px 100%); }
.faction-copy { position: absolute; z-index: 1; bottom: clamp(36px, 6vh, 64px); max-width: 34rem; }
.faction-a .faction-copy { inset-inline-start: var(--gutter); inset-inline-end: 16%; }
.faction-b .faction-copy { inset-inline-start: 16%; inset-inline-end: var(--gutter); }
.faction h3 { font-size: var(--t-3); font-weight: 900; }
.faction-a h3 { color: var(--green-text); }
.faction-b h3 { color: var(--red-text); }
.faction p { margin-top: 8px; max-width: 40ch; }
.roster { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 10px; margin-top: 24px; max-width: 520px; }
.roster img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #4a4a4a; }
.faction-a .roster img { box-shadow: 0 0 0 1.5px rgba(166, 208, 154, .45); }
.faction-b .roster img { box-shadow: 0 0 0 1.5px rgba(236, 162, 144, .45); }
.roster span { display: block; margin-top: 6px; font-size: .8rem; line-height: 1.3; text-align: center; color: var(--dust); }
.versus {
  position: absolute; z-index: 3; inset-inline-start: 50%; top: 50%; transform: translate(50%, -50%);
  display: grid; place-items: center; width: 80px; height: 80px;
  font-family: var(--font-display); font-weight: 900; font-size: 1.3rem;
  background: var(--night); color: var(--gold); border: 2px solid var(--gold); border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(21, 17, 13, .55);
}
html[dir="ltr"] .versus { transform: translate(-50%, -50%); }

/* ------------------------------------------------------------ Rivals: tower height is difficulty */
.rivals {
  --base: 24px; --rise: 42px; --name-h: 56px; --merlon: 20px;
  position: relative; padding-block: var(--section);
  background: radial-gradient(70% 55% at 50% 72%, rgba(217, 164, 65, .10), rgba(217, 164, 65, 0) 70%), var(--night-3);
}
.skyline { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(4px, 1.4vw, 20px); align-items: end; }
/* The ground the towers stand on, running into the gutters */
.skyline::after { content: ''; position: absolute; inset-inline: calc(var(--gutter) * -1); bottom: var(--name-h); height: 2px; background: rgba(230, 216, 189, .22); }
.tower {
  display: flex; flex-direction: column; align-items: center; min-width: 0;
  padding: 0; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tower img {
  width: min(84%, 88px); aspect-ratio: 1; object-fit: cover; border-radius: 8px; margin-bottom: 10px; background: #4a4a4a;
  box-shadow: 0 0 0 2px var(--night-3), 0 0 0 3px rgba(230, 216, 189, .25);
  filter: saturate(.5) brightness(.78);
  transition: filter .25s ease, transform .35s var(--ease), box-shadow .25s ease;
}
.tower-wall {
  position: relative; display: block; width: min(100%, 112px);
  height: calc(var(--base) + var(--d) * var(--rise));
  background:
    linear-gradient(90deg, rgba(34, 22, 12, .22), rgba(34, 22, 12, 0) 26%, rgba(34, 22, 12, 0) 68%, rgba(34, 22, 12, .3)),
    var(--ashlar) center top / 48px 28px,
    linear-gradient(#d6c4a1, #b29d79);
  -webkit-mask: var(--crenels) center top / var(--merlon) calc(var(--merlon) / 2) repeat-x, linear-gradient(#000 0 0) 0 calc(var(--merlon) / 2) / 100% 100% no-repeat;
          mask: var(--crenels) center top / var(--merlon) calc(var(--merlon) / 2) repeat-x, linear-gradient(#000 0 0) 0 calc(var(--merlon) / 2) / 100% 100% no-repeat;
  -webkit-mask-repeat: round no-repeat, no-repeat;
          mask-repeat: round no-repeat, no-repeat;
  filter: brightness(.72);
  transition: filter .25s ease;
}
.pennant {
  position: absolute; top: calc(var(--merlon) / 2 + 8px); left: 50%; transform: translateX(-50%);
  width: clamp(10px, 30%, 30px); height: clamp(18px, 40%, 64px);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}
.tower[data-side="a"] .pennant { background: var(--green); }
.tower[data-side="b"] .pennant { background: var(--red); }
.tower-name {
  display: block; width: 100%; height: var(--name-h); padding-top: 12px;
  font-size: .9rem; font-weight: 700; line-height: 1.3; text-align: center; color: var(--dust);
  transition: color .25s;
}
.tower:hover img { filter: saturate(.85) brightness(.95); }
.tower:hover .tower-wall { filter: brightness(.86); }
.tower[aria-selected="true"] img { filter: none; transform: translateY(-6px); box-shadow: 0 0 0 2px var(--night-3), 0 0 0 4px var(--gold); }
.tower[aria-selected="true"] .tower-wall { filter: none; }
.tower[aria-selected="true"] .tower-name { color: var(--stone); }
.tower:focus-visible { outline: none; }
.tower:focus-visible img { outline: 2px solid var(--gold-hi); outline-offset: 6px; }

.lord-card { --side: var(--red); display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 3vw, 32px); align-items: center; margin-top: clamp(28px, 4vw, 44px); max-width: 780px; }
.lord-card[data-side="a"] { --side: var(--green); }
.lord-face { width: clamp(92px, 12vw, 136px); aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #4a4a4a; box-shadow: 0 0 0 2px var(--night-3), 0 0 0 4px var(--side); }
.lord-card h3 { font-size: var(--t-3); font-weight: 900; }
.lord-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: 6px; color: var(--dust); font-size: .95rem; }
.lord-side { display: inline-flex; align-items: center; gap: 8px; }
.lord-side::before { content: ''; width: 10px; height: 15px; background: var(--side); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.lord-level { display: inline-flex; align-items: center; gap: 10px; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 9px; height: 12px; background: rgba(230, 216, 189, .2); }
.pips i.on { background: var(--gold); }
.lord-desc { margin-top: 10px; max-width: 52ch; font-size: 1.125rem; }
@media (prefers-reduced-motion: no-preference) {
  .lord-card.swap .lord-face, .lord-card.swap .lord-text { animation: swap .4s var(--ease) both; }
}
@keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ Modes: the main menu's three doors */
.modes { padding-block: var(--section); }
.modes-grid { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.modes .head { position: sticky; top: 112px; margin-bottom: 0; }
.mode-list { border-top: 1px solid var(--line); }
.mode { display: grid; grid-template-columns: clamp(150px, 22vw, 260px) 1fr; gap: clamp(16px, 2.6vw, 32px); align-items: center; padding-block: clamp(18px, 2.4vw, 28px); border-bottom: 1px solid var(--line); }
.mode img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.mode h3 { font-size: var(--t-2); font-weight: 900; }
.mode p { margin-top: 6px; color: var(--dust); max-width: 42ch; }

/* ------------------------------------------------------------ Download: sunset over the fallen castle */
.download { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding-block: clamp(104px, 14vw, 184px); background: var(--night-3); }
.download-picture img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.download::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, var(--night) 0%, rgba(28, 23, 18, .55) 28%, rgba(21, 17, 13, .5) 60%, rgba(21, 17, 13, .72) 100%);
}
.download-inner { display: flex; flex-direction: column; align-items: center; }
.download-icon { border-radius: 24px; box-shadow: 0 0 0 1px rgba(240, 207, 133, .4), 0 24px 60px rgba(0, 0, 0, .6); }
.download h2 { margin-top: 24px; font-size: clamp(2.4rem, 1.2rem + 4vw, 4.4rem); font-weight: 900; text-shadow: 0 2px 24px rgba(0, 0, 0, .5); }
.download p { margin-top: 12px; max-width: 44ch; font-size: var(--t-1); text-shadow: 0 1px 14px rgba(0, 0, 0, .6); }
.download .stores { justify-content: center; margin-top: 30px; }

/* ------------------------------------------------------------ Footer: the page ends at the wall */
.foot { position: relative; background: var(--night-3); color: var(--dust); padding-top: clamp(56px, 7vw, 88px); }
.battlement {
  position: absolute; inset-inline: 0; top: 1px; height: 22px; transform: translateY(-100%);
  background: var(--night-3);
  -webkit-mask: var(--merlons) repeat-x left bottom / 44px 22px;
          mask: var(--merlons) repeat-x left bottom / 44px 22px;
  pointer-events: none;
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.foot-brand .brand { color: var(--stone); }
.foot-brand p { margin-top: 14px; max-width: 34ch; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.foot-col h3 { font-family: var(--font-text); font-size: 1rem; font-weight: 700; color: var(--stone); margin-bottom: 4px; }
.foot a { text-decoration: none; }
.foot-col a:hover, .foot-base a:hover { color: var(--gold-hi); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(48px, 6vw, 72px); padding-block: 24px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: .95rem; }

.dock { display: none; }

/* ------------------------------------------------------------ Tablet */
@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 0 0 auto 0; z-index: -1;
    flex-direction: column; gap: 0; margin: 0;
    padding: calc(72px + env(safe-area-inset-top)) var(--gutter) 28px;
    background: var(--night-3); color: var(--stone); box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
    transform: translateY(-102%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s;
  }
  .bar.open .nav { transform: none; visibility: visible; transition: transform .35s var(--ease); }
  .nav a { font-family: var(--font-display); font-size: 1.5rem; padding: 12px 0; border-bottom: 1px solid var(--line); opacity: 1; }
  .nav a.active::after { display: none; }
  .nav .nav-cta { display: block; margin-top: 20px; border: 0; text-align: center; background: var(--gold); color: var(--ink); border-radius: 999px; font-family: var(--font-text); font-size: 1.1rem; }
  .bar-end { margin-inline-start: auto; }

  .stages { grid-template-columns: 1fr; }
  .stage-screen { order: -1; }

  .faction-copy { max-width: none; }
  .roster { gap: 10px 8px; }

  .modes-grid { grid-template-columns: 1fr; }
  .modes .head { position: static; margin-bottom: 8px; }

  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------ Phone */
@media (max-width: 700px) {
  .brand span { display: none; }
  .btn-mini { display: none; }

  /* The poster becomes a column: title in the sky, the whole painting, then the ground */
  .hero { grid-template-rows: auto auto auto; min-height: 0; background: linear-gradient(var(--sky-hi), var(--sky) 60%); }
  .hero-sky { padding-top: calc(80px + env(safe-area-inset-top)); }
  .hero h1 { font-size: clamp(2.4rem, 1.2rem + 6vw, 3.2rem); }
  .hero h1 span { display: block; }
  html[lang="en"] .hero h1 { font-size: clamp(1.9rem, .6rem + 7vw, 2.8rem); }
  .hero-picture { display: block; z-index: 0; margin-top: -20px; aspect-ratio: 4 / 3; }
  .hero-picture::after { height: 42%; background: linear-gradient(to top, var(--night), rgba(28, 23, 18, 0)); }
  .hero-art { object-position: 50% 60%; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%); }
  .hero-ground { grid-area: 3 / 1; background: var(--night); padding-top: 4px; padding-bottom: 40px; }
  .lede { font-size: 1.05rem; text-shadow: none; }
  .hero-actions { flex-direction: column; margin-top: 24px; gap: 18px; }
  .stores { justify-content: center; width: 100%; }
  .hero .stores, .download .stores { flex-wrap: nowrap; max-width: 400px; margin-inline: auto; gap: 10px; }
  .hero .store, .download .store { flex: 1 1 0; min-width: 0; padding: 0 12px; gap: 9px; justify-content: center; }
  .hero .store span, .download .store span { font-size: 1.02rem; }
  .hero .store svg, .download .store svg { width: 22px; height: 22px; }

  /* A small frame: keep only the disc in the corner; the label stays for screen readers */
  .player-start { padding: 14px; }
  .player-disc { --size: 54px; }
  .player-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  .stage { padding: 16px 0 18px; }
  .stage-num { font-size: 1.8rem; }

  /* Factions stack; each portrait fades into its own colour and the copy sits below */
  .factions { grid-template-columns: 1fr; height: auto; background: none; }
  html[dir] .faction-a, html[dir] .faction-b { clip-path: none; margin: 0; }
  .faction-a { background: rgb(10, 22, 13); }
  .faction-b { background: rgb(36, 11, 8); }
  .faction-art { position: relative; height: auto; aspect-ratio: 5 / 4; object-position: 50% 14%; }
  .faction::after { inset: 0 0 auto 0; aspect-ratio: 5 / 4; }
  .faction-a::after { background: linear-gradient(to top, rgb(10, 22, 13) 0%, rgba(10, 22, 13, 0) 45%); }
  .faction-b::after { background: linear-gradient(to top, rgb(36, 11, 8) 0%, rgba(36, 11, 8, 0) 45%); }
  html[dir] .faction-copy { position: relative; inset: auto; margin-top: -56px; padding: 0 var(--gutter) 44px; }
  .roster { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; max-width: none; }
  .roster span { font-size: .85rem; }
  .faction-b { border-top: 3px solid var(--gold); }
  html[dir] .versus { top: 50%; width: 60px; height: 60px; font-size: 1.05rem; box-shadow: 0 0 0 6px rgba(21, 17, 13, .6); }

  .rivals { --base: 10px; --rise: 22px; --name-h: 0px; --merlon: 10px; }
  .skyline { gap: 5px; }
  .tower img { width: 100%; border-radius: 6px; margin-bottom: 8px; }
  .tower-wall { width: 100%; background-size: auto, 24px 14px, auto; }
  .tower-name { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tower[aria-selected="true"] img { transform: translateY(-4px); }
  .lord-card { align-items: start; }
  .lord-face { width: 84px; }
  .lord-card h3 { font-size: 1.9rem; }
  .lord-desc { font-size: 1.05rem; }

  .mode { grid-template-columns: 116px 1fr; align-items: start; }
  .mode img { aspect-ratio: 1; }
  .mode h3 { font-size: 1.35rem; }
  .mode p { font-size: 1rem; }

  .foot-base { flex-direction: column; gap: 8px; padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

  .dock {
    display: flex; align-items: center; gap: 12px;
    position: fixed; z-index: 30; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 10px; padding-inline-start: 12px; border-radius: 18px;
    background: rgba(21, 17, 13, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 0 0 1px rgba(217, 164, 65, .35), 0 20px 40px rgba(0, 0, 0, .6);
    transform: translateY(140%); transition: transform .35s var(--ease);
  }
  .dock.show { transform: none; }
  .dock img { border-radius: 11px; }
  .dock-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
  .dock-text b { font-family: var(--font-display); }
  .dock-text small { color: var(--dust); font-size: .82rem; }
  .dock-cta { flex: none; text-decoration: none; font-weight: 700; background: var(--gold); color: var(--ink); padding: 10px 22px; border-radius: 12px; }
}

@media (max-width: 359px) {
  .hero .stores, .download .stores { flex-direction: column; }
}
