/* Desert Fortress site. Theme = CSS custom properties switched by <html data-side="none|dt|ff">. */
@font-face { font-family: "Barlow"; src: url("../assets/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../assets/fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/barlowcond-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/barlowcond-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0b0c0d; --bg2: #131517; --bg3: #1b1e21;
  --ink: #ece9e2; --mute: #a3a39b; --line: rgba(236, 233, 226, .14);
  --acc: #e0b26a; --acc-ink: #1a1209; --acc2: #9fd88a; --glow: rgba(224, 178, 106, .22);
  --hangar-a: #1c1914;
  --cond: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: 64px;
  color-scheme: dark;
}
html[data-side="dt"] {
  --bg: #100d0a; --bg2: #19140f; --bg3: #241b12;
  --ink: #f2ece2; --mute: #b9a891; --line: rgba(242, 236, 226, .14);
  --acc: #e6a955; --acc-ink: #1d1208; --acc2: #eef4f8; --glow: rgba(230, 169, 85, .28);
  --hangar-a: #2b1f13;
}
html[data-side="ff"] {
  --bg: #07100a; --bg2: #0d1810; --bg3: #142318;
  --ink: #e8f1e3; --mute: #9db29a; --line: rgba(232, 241, 227, .13);
  --acc: #8ad57d; --acc-ink: #07130a; --acc2: #d9f27a; --glow: rgba(138, 213, 125, .25);
  --hangar-a: #10261a;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.6 var(--body);
  overflow-x: hidden; transition: background-color .6s ease, color .6s ease;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--acc); color: var(--acc-ink); padding: 10px 16px; font: 700 1rem var(--cond); text-transform: uppercase; }
.skip:focus { top: 12px; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
@media (min-width: 760px) { .wrap { width: min(1200px, 100% - 64px); } }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--head);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; background: rgba(8, 8, 8, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background-color .3s, border-color .3s; border-bottom: 1px solid transparent;
}
.top.solid { background: color-mix(in srgb, var(--bg) 90%, transparent); border-bottom-color: var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@media (min-width: 760px) { .top { padding: 0 28px; } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; flex-shrink: 0; }
.brand span { font: 700 1.15rem/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.brand-em, .switch svg { width: 30px; height: 30px; flex-shrink: 0; }
.play-em { position: absolute; left: 50%; top: 50%; width: min(560px, 90vw); height: min(560px, 90vw); transform: translate(-50%, -50%); opacity: .07; pointer-events: none; }
.play .wrap { position: relative; }
/* neutral: half of each emblem; a side: only that side's emblem (the switch button shows the other one) */
.u-dt { clip-path: inset(0 50% 0 0); }
.u-ff { clip-path: inset(0 0 0 50%); }
html[data-side="dt"] .u-dt, html[data-side="ff"] .u-ff, html[data-side="dt"] .switch .u-ff, html[data-side="ff"] .switch .u-dt { clip-path: none; }
html[data-side="dt"] :is(.brand-em, .play-em) .u-ff, html[data-side="ff"] :is(.brand-em, .play-em) .u-dt,
html[data-side="dt"] .switch .u-dt, html[data-side="ff"] .switch .u-ff { display: none; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none;
  font: 600 .95rem/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); opacity: .85;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.nav a:hover { opacity: 1; border-bottom-color: var(--acc); }
.nav .nav-play { background: var(--acc); color: var(--acc-ink); opacity: 1; padding: 0 18px; margin-left: 6px; border: 0; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.tools { display: flex; align-items: center; gap: 6px; }
.lang { display: flex; border: 1px solid var(--line); }
.lang button { min-width: 44px; min-height: 44px; background: none; border: 0; font: 700 .9rem var(--cond); letter-spacing: .1em; opacity: .6; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); opacity: 1; }
.switch {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  background: none; border: 1px solid var(--line); font: 600 .9rem/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.switch:hover { border-color: var(--acc); }
.menu { display: none; width: 44px; height: 44px; background: none; border: 1px solid var(--line); position: relative; }
.menu i, .menu i::before, .menu i::after { position: absolute; left: 12px; width: 18px; height: 2px; background: var(--ink); content: ""; }
.menu i { top: 21px; } .menu i::before { left: 0; top: -6px; } .menu i::after { left: 0; top: 6px; }
@media (max-width: 1023px) {
  .menu { display: block; }
  .nav { display: none; position: fixed; top: var(--head); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
         background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { min-height: 52px; border-bottom: 1px solid var(--line); }
  .nav .nav-play { margin: 12px 0 0; justify-content: center; }
}
/* 1024 to 1279: the full nav and the tools share a narrow bar; tighter links, the switch shows only its emblem */
@media (min-width: 1024px) and (max-width: 1279px) {
  .top { gap: 8px; }
  .brand span { letter-spacing: .1em; }
  .nav { gap: 0; }
  .nav a { padding: 0 8px; font-size: .9rem; letter-spacing: .1em; }
  .nav .nav-play { padding: 0 14px; margin-left: 4px; }
  .switch { padding: 0 7px; }
  .switch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 639px) {
  .top { gap: 6px; }
  .brand { gap: 8px; }
  .brand span { font-size: 1.02rem; letter-spacing: .1em; }
  .lang { border: 0; }
  .lang button { border: 1px solid var(--line); }
  .lang button[aria-pressed="true"] { display: none; }
  .switch { width: 44px; padding: 0; justify-content: center; }
  .switch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- opening: Two Banners ---------- */
.banners { position: relative; display: flex; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; background: #000; isolation: isolate; }
.banner { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; overflow: hidden;
  transition: flex-grow .75s cubic-bezier(.2, .8, .2, 1); }
.banners[data-pull="dt"] .b-dt, .banners[data-pull="ff"] .b-ff { flex-grow: 1.8; }
/* each side's flag on its pole in a storm (rendered loops): at rest the camera sits close on the emblem; pulled, it draws
   back to the whole flag and the sky, and the storm loop (sand / lightning) fades in over the calm one at the same moment */
.b-bg { position: absolute; inset: 0; transform: scale(1.15); transform-origin: var(--em-x, 52%) var(--em-y, 30%);
  transition: transform 1.3s cubic-bezier(.2, .8, .2, 1), filter .6s; }
.b-dt .b-bg { background: #2a1f17; --em-x: 52%; --em-y: 32%; }
.b-ff .b-bg { background: #070b10; --em-x: 50%; --em-y: 30%; }
.b-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
/* the Forest Fortress flag flies from the right, so the two banners wave towards each other */
.b-ff .b-v { transform: scaleX(-1); }
.b-storm { opacity: 0; transition: opacity .9s ease; }
.b-storm.on { opacity: 1; }
/* the words sit on the ground, under the flag */
.b-bg::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .62) 30%, rgba(0, 0, 0, 0) 56%); }
.banners[data-pull="dt"] .b-ff .b-bg, .banners[data-pull="ff"] .b-dt .b-bg { filter: brightness(.55) saturate(.7); }
.banners[data-pull] .banner.pulled .b-bg { transform: scale(1); }
.b-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  width: min(34rem, 100%); padding: 0 24px 84px; transition: opacity .5s; }
.b-dt .b-inner { color: #f3e6cc; }
.b-inner { text-shadow: 0 2px 14px rgba(0, 0, 0, .55); }
.b-ff .b-inner { color: #e6f2dc; }
.b-em { width: clamp(96px, 11vw, 150px); height: clamp(96px, 11vw, 150px); filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .35)); transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.banner.pulled .b-em { transform: scale(1.08) translateY(-4px); }
.b-role { font: 600 .82rem/1.3 var(--cond); letter-spacing: .24em; text-transform: uppercase; opacity: .85; }
.b-name { font: 700 clamp(2.6rem, 5.4vw, 5.2rem)/.88 var(--cond); text-transform: uppercase; letter-spacing: .01em; }
.b-alt { font: 600 1rem/1 var(--cond); letter-spacing: .34em; text-transform: uppercase; opacity: .75; }
.b-motto { font: 400 1.08rem/1.4 var(--body); font-style: italic; opacity: .95; }
.b-motto::before { content: "\201C"; } .b-motto::after { content: "\201D"; }
.b-lore { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .6s cubic-bezier(.2, .8, .2, 1), opacity .5s; }
.b-lore > p { overflow: hidden; min-height: 0; max-width: 30rem; font-size: 1rem; line-height: 1.55; }
.banner.pulled .b-lore { grid-template-rows: 1fr; opacity: 1; }
.b-lore > p { padding-top: 4px; }
.b-choose { margin-top: 8px; min-height: 48px; padding: 0 26px; border: 0; font: 700 1rem/1 var(--cond); letter-spacing: .16em; text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: transform .2s; }
.b-choose:hover { transform: translateY(-2px); }
.b-dt .b-choose { background: #e0a647; color: #170f05; text-shadow: none; }
.b-ff .b-choose { background: #8ad57d; color: #07130a; text-shadow: none; }
.b-dt :focus-visible { outline-color: #f3d9a8; }
.banner.is-chosen .b-choose::after { content: " \2713"; }
.banners[data-pull] .banner:not(.pulled) .b-inner { opacity: .72; }
.rope { position: relative; flex: 0 0 0; z-index: 3; }
.rope::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px;
  background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .85) 30%, rgba(255, 255, 255, .85) 70%, rgba(255, 255, 255, 0)); }
.rope span { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 58px; height: 58px; display: grid; place-items: center;
  background: #0b0c0d; color: #fff; border: 2px solid rgba(255, 255, 255, .85); border-radius: 50%; font: 700 1.15rem/1 var(--cond); letter-spacing: .08em; }
.plate { position: absolute; z-index: 4; top: calc(var(--head) + 14px); left: 50%; transform: translateX(-50%); text-align: center;
  background: #0b0c0d; color: #f2efe8; padding: 12px 34px 14px; clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 100%, 0 100%); pointer-events: none; white-space: nowrap; }
.plate h1 { font: 700 clamp(1.5rem, 2.6vw, 2.2rem)/1 var(--cond); letter-spacing: .2em; text-transform: uppercase; }
.plate p { margin-top: 6px; font: 600 .78rem/1 var(--cond); letter-spacing: .28em; text-transform: uppercase; color: #b9b6ad; }
.hint { position: absolute; z-index: 4; bottom: 18px; left: 50%; transform: translateX(-50%); padding: 10px 16px; background: rgba(11, 12, 13, .82); color: #e9e6df;
  font: 600 .78rem/1 var(--cond); letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; pointer-events: none; }

@media (max-width: 759px) {
  .banners { flex-direction: column; min-height: 640px; }
  .plate { position: relative; top: auto; left: auto; transform: none; flex: 0 0 auto; margin-top: var(--head); clip-path: none; padding: 12px 16px; white-space: normal; }
  .plate h1 { font-size: 1.5rem; }
  .banner { align-items: flex-end; }
  /* short wide panels: the flag at the top, the words under it; no close-up (it would put the emblem under the words) */
  .b-bg, .banners[data-pull] .banner.pulled .b-bg { transform: none; }
  .b-v { object-position: 50% 0%; }
  .b-bg::after { background: linear-gradient(0deg, rgba(0, 0, 0, .9) 0%, rgba(0, 0, 0, .6) 38%, rgba(0, 0, 0, 0) 60%); }
  /* a hover hint means nothing on a touch screen, and it sat on the lower button */
  .hint { display: none; }
  .banner:not(.pulled) .b-role { display: none; }
  .banners[data-pull="dt"] .b-dt, .banners[data-pull="ff"] .b-ff { flex-grow: 2.9; }
  .b-inner { padding: 16px 20px; gap: 6px; }
  .b-em { width: 64px; height: 64px; }
  .b-name { font-size: 2.4rem; }
  .b-role { font-size: .72rem; letter-spacing: .18em; }
  .b-alt { font-size: .85rem; }
  .b-motto { font-size: .95rem; }
  .b-lore > p { font-size: .9rem; line-height: 1.45; }
  .b-choose { margin-top: 4px; }
  .banners[data-pull="dt"] .b-ff :is(.b-role, .b-motto, .b-alt, .b-choose),
  .banners[data-pull="ff"] .b-dt :is(.b-role, .b-motto, .b-alt, .b-choose) { display: none; }
  .banners[data-pull] .banner:not(.pulled) .b-em { width: 48px; height: 48px; flex-shrink: 0; }
  .banners[data-pull] .banner:not(.pulled) .b-name { font-size: 1.8rem; }
  .banners[data-pull] .banner:not(.pulled) .b-inner { flex-direction: row; justify-content: center; gap: 14px; }
  .rope { flex: 0 0 0; }
  .rope::before { top: -1px; bottom: auto; left: 0; right: 0; width: auto; height: 2px; }
  .rope::before { width: 100vw; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .85) 30%, rgba(255, 255, 255, .85) 70%, rgba(255, 255, 255, 0)); }
  .rope span { left: 50vw; top: 0; width: 46px; height: 46px; font-size: 1rem; }
  .hint { bottom: 10px; font-size: .7rem; letter-spacing: .16em; }
}

/* ---------- sections ---------- */
.sec { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.eyebrow { display: flex; align-items: center; gap: 12px; font: 600 .85rem/1 var(--cond); letter-spacing: .3em; text-transform: uppercase; color: var(--acc); }
.eyebrow::before { content: ""; width: 32px; height: 2px; background: currentColor; }
.title { margin: 14px 0 18px; font: 700 clamp(2.5rem, 6.4vw, 5.4rem)/.9 var(--cond); text-transform: uppercase; letter-spacing: .005em; text-wrap: balance; }
.lead { max-width: 40rem; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--mute); }

/* world */
.world { background: linear-gradient(var(--bg), var(--bg2)); }
.chapters { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.chapters li { background: var(--bg); padding: 30px 28px 34px; display: flex; flex-direction: column; gap: 6px; }
.chapters li:nth-child(5) { grid-column: span 2; }
.chapters .ch-last { grid-column: 1 / -1; background: linear-gradient(110deg, color-mix(in srgb, var(--acc) 16%, var(--bg)), var(--bg) 70%); }
.ch-n { font: 700 2.8rem/1 var(--cond); color: var(--acc); }
.ch-t { font: 700 1.55rem/1.05 var(--cond); text-transform: uppercase; letter-spacing: .03em; }
.ch-m { font: 600 .75rem/1 var(--cond); letter-spacing: .26em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
.ch-b p { color: color-mix(in srgb, var(--ink) 86%, transparent); }
.ch-b p + p { margin-top: .8em; }
.ch-last .ch-b p { font: 600 clamp(1.3rem, 2.6vw, 2rem)/1.25 var(--cond); color: var(--ink); max-width: 52rem; }
.ch-last b { color: var(--acc); font-weight: 700; }
@media (max-width: 899px) {
  .chapters { grid-template-columns: 1fr; }
  .chapters li:nth-child(5) { grid-column: auto; }
  .chapters li { padding: 24px 20px 28px; }
}

/* sides */
.sides { background: var(--bg2); }
.side-grid { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.side-card { position: relative; padding: 40px 36px; display: flex; flex-direction: column; gap: 12px; border-top: 4px solid; overflow: hidden; }
.sc-dt { background: linear-gradient(160deg, #3a2814 0%, #1b130b 70%); border-color: #e6a955; color: #f4ead9; }
.sc-ff { background: linear-gradient(160deg, #183222 0%, #0a150d 70%); border-color: #8ad57d; color: #e6f2dc; }
.side-card.is-chosen { box-shadow: 0 0 0 2px var(--acc), 0 30px 80px -30px var(--glow); }
.sc-em { width: 88px; height: 88px; }
.sc-role { font: 600 .8rem/1.3 var(--cond); letter-spacing: .24em; text-transform: uppercase; opacity: .8; }
.sc-name { font: 700 clamp(2.2rem, 4vw, 3.2rem)/.92 var(--cond); text-transform: uppercase; }
.sc-name span { display: block; margin-top: 8px; font-size: .38em; letter-spacing: .3em; opacity: .7; }
.sc-motto { font-style: italic; color: #e6a955; }
.sc-ff .sc-motto { color: #b7e58a; }
.sc-text p { color: rgba(255, 255, 255, .82); }
.sc-text p + p { margin-top: .8em; }
.side-card .btn { margin-top: auto; align-self: flex-start; }
.sc-dt .btn { background: #e6a955; color: #1d1208; }
.sc-ff .btn { background: #8ad57d; color: #07130a; }
.side-card.is-chosen .btn { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
@media (max-width: 899px) { .side-grid { grid-template-columns: 1fr; } .side-card { padding: 30px 20px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border: 0; text-decoration: none;
  background: var(--acc); color: var(--acc-ink); font: 700 1rem/1 var(--cond); letter-spacing: .15em; text-transform: uppercase;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); transition: transform .2s, filter .2s; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--acc); box-shadow: inset 0 0 0 2px var(--acc); clip-path: none; }
.btn.big { min-height: 60px; padding: 0 34px; font-size: 1.15rem; }

/* ---------- hangar ---------- */
.hangar { position: relative; background: radial-gradient(80% 60% at 50% 55%, var(--hangar-a), var(--bg) 75%); transition: background .6s; }
.h-sticky { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: calc(var(--head) + 24px) 0 56px; }
.h-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.h-head .title { font-size: clamp(2rem, 4.2vw, 3.6rem); margin-bottom: 0; }
.tabs { display: flex; gap: 4px; }
.tabs button { min-height: 44px; padding: 0 18px; background: transparent; border: 1px solid var(--line); font: 600 .95rem/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; }
.tabs button:hover { border-color: var(--acc); }
.tabs button[aria-selected="true"] { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.h-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: center; min-height: 0; }
.stage { position: relative; aspect-ratio: 16 / 9; max-height: calc(100svh - 250px); width: 100%; margin-inline: auto; background: #050505; border: 1px solid var(--line);
  overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stage.drag { cursor: grabbing; }
.stage canvas { width: 100%; height: 100%; }
.stage-ui { position: absolute; inset: 0; pointer-events: none; }
.corner { position: absolute; width: 22px; height: 22px; border: 2px solid var(--acc); }
.corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.deg, .scrub-hint { position: absolute; bottom: 18px; font: 600 .8rem/1 var(--cond); letter-spacing: .2em; text-transform: uppercase; color: #e9e6df; text-shadow: 0 1px 3px #000; }
.deg { left: 42px; font-variant-numeric: tabular-nums; }
.scrub-hint { right: 42px; opacity: .85; }
.ph-note { position: absolute; top: 16px; left: 42px; font: 600 .68rem/1.2 var(--cond); letter-spacing: .18em; text-transform: uppercase; color: rgba(233, 230, 223, .6); pointer-events: none; }
.card { background: color-mix(in srgb, var(--bg2) 88%, transparent); border-left: 3px solid var(--acc); padding: 26px 24px; }
.card-role { font: 600 .78rem/1 var(--cond); letter-spacing: .26em; text-transform: uppercase; color: var(--acc); }
.card-name { margin: 8px 0 10px; font: 700 2.8rem/.9 var(--cond); text-transform: uppercase; }
.card-text { color: var(--mute); font-size: .95rem; line-height: 1.5; }
.stats { margin: 18px 0 0; display: grid; gap: 12px; }
.stats div { display: grid; gap: 6px; }
.stats dt { font: 600 .75rem/1 var(--cond); letter-spacing: .22em; text-transform: uppercase; }
.stats dd { margin: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.bar { position: relative; height: 6px; background: var(--line); overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; display: block; height: 100%; width: 0; background: var(--acc); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.stats b { font: 700 1.05rem/1 var(--cond); min-width: 3.4em; text-align: right; font-variant-numeric: tabular-nums; }
.card-foot { margin-top: 12px; font-size: .78rem; color: var(--mute); }
@media (max-width: 899px) {
  .h-sticky { gap: 12px; justify-content: flex-start; padding-top: calc(var(--head) + 14px); }
  .h-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .tabs { width: 100%; }
  .tabs button { flex: 1 1 0; padding: 0 4px; font-size: .88rem; letter-spacing: .08em; }
  .h-body { grid-template-columns: 1fr; gap: 12px; }
  .stage { aspect-ratio: 4 / 3; max-height: 42svh; }
  .card { padding: 16px 16px; }
  .card-name { font-size: 2rem; margin: 6px 0 6px; }
  .card-text { font-size: .88rem; }
  .stats { margin-top: 12px; gap: 8px; }
  .card-foot { display: none; }
  .deg { left: 30px; bottom: 14px; } .scrub-hint { right: 30px; bottom: 14px; font-size: .68rem; letter-spacing: .12em; }
  .ph-note { left: 30px; right: 30px; top: 13px; font-size: .58rem; letter-spacing: .12em; }
  .corner { width: 14px; height: 14px; }
}
@media (max-height: 760px) and (min-width: 900px) { .h-head .eyebrow { display: none; } }

/* ---------- features ---------- */
.features { background: var(--bg); }
.modes { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mode { background: var(--bg2); border: 1px solid var(--line); display: flex; flex-direction: column; }
.mode img, .mode-ab, .pilot img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; filter: saturate(.85) contrast(1.05); }
.mode > div:last-child { padding: 22px 22px 26px; }
.mode h3, .pilot h3 { font: 700 1.7rem/1 var(--cond); text-transform: uppercase; margin-bottom: 10px; }
.mode p, .pilot p { color: var(--mute); }
.mode-ab { display: flex; align-items: center; justify-content: center; gap: 28px; filter: none;
  background: repeating-linear-gradient(135deg, var(--bg3) 0 14px, var(--bg2) 14px 28px); }
.mode-ab span { width: 92px; height: 92px; display: grid; place-items: center; border: 3px solid var(--acc); color: var(--acc); font: 700 3.6rem/1 var(--cond); }
.pilot { margin-top: 20px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; background: var(--bg2); border: 1px solid var(--line); align-items: center; }
.pilot > div { padding: 30px 34px; }
.pilot p { font-size: 1.1rem; }
.sub { margin: 56px 0 18px; font: 700 1.1rem/1 var(--cond); letter-spacing: .26em; text-transform: uppercase; color: var(--acc); }
.classes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.classes li { border-top: 2px solid var(--acc); padding-top: 14px; display: grid; gap: 4px; }
.classes b { font: 700 1.6rem/1 var(--cond); text-transform: uppercase; }
.classes span { color: var(--mute); }
@media (max-width: 899px) {
  .modes, .classes { grid-template-columns: 1fr; }
  .pilot { grid-template-columns: 1fr; }
  .pilot > div { padding: 22px 20px 26px; }
}

/* ---------- play ---------- */
.play { text-align: center; overflow: hidden; background: radial-gradient(70% 70% at 50% 40%, color-mix(in srgb, var(--acc) 14%, var(--bg)), var(--bg) 70%); }
.play .eyebrow { justify-content: center; }
.play .eyebrow::after { content: ""; width: 32px; height: 2px; background: currentColor; }
.play .lead { margin-inline: auto; color: var(--ink); opacity: .85; }
.cta { margin-top: 34px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.ue { margin-top: 26px; font: 600 .85rem/1.3 var(--cond); letter-spacing: .24em; text-transform: uppercase; color: var(--mute); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 36px 0 44px; background: var(--bg); }
.foot .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 28px; flex-wrap: wrap; }
.foot-name { font: 700 1.4rem/1 var(--cond); letter-spacing: .2em; text-transform: uppercase; }
.foot-credits { font-size: .82rem; color: var(--mute); max-width: 46rem; }

/* particles above content, below the header */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  #fx { display: none; }
}
/* hangar renders: the hangar name over the stage (from the manifest), and the credit link */
.env-note { color: rgba(233, 230, 223, .85); }
.foot-credits a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* s67: the Carrier's crew bar and the stat notes */
.bar i.crew, .stat-note .sw.crew { background: color-mix(in srgb, var(--acc) 38%, transparent); }
.stat-note { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .78rem; color: var(--mute); }
.stat-note[hidden] { display: none; }
.stat-note .sw { display: inline-block; width: 12px; height: 6px; margin-right: 6px; vertical-align: middle; background: var(--acc); }
/* s67: a sequence loading: the side's emblem fills from the bottom as its frames arrive (--p 0..1), a turning ring */
.h-load { --p: 0; position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: radial-gradient(60% 75% at 50% 50%, color-mix(in srgb, var(--hangar-a) 80%, transparent), rgba(5, 5, 5, .86)); color: #e9e6df; pointer-events: none; }
.h-load[hidden] { display: none; }
.hl-em { position: relative; width: clamp(64px, 11vw, 112px); aspect-ratio: 1; }
.hl-em svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hl-dim { opacity: .22; filter: grayscale(1); }
.hl-fill { clip-path: inset(calc((1 - var(--p)) * 100%) 0 0 0); transition: clip-path .25s; animation: hl-pulse 1.8s ease-in-out infinite; }
.hl-ring { position: absolute; inset: -16%; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--acc); animation: hl-spin 1.2s linear infinite; }
.hl-bar { position: relative; width: clamp(140px, 28%, 260px); height: 3px; background: var(--line); overflow: hidden; }
.hl-bar i { position: absolute; inset: 0; background: var(--acc); transform-origin: 0 50%; transform: scaleX(var(--p)); transition: transform .25s; }
.hl-txt { font: 600 .74rem/1 var(--cond); letter-spacing: .2em; text-transform: uppercase; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px #000; }
@keyframes hl-spin { to { transform: rotate(360deg); } }
@keyframes hl-pulse { 50% { filter: drop-shadow(0 0 12px var(--glow)) brightness(1.15); } }
/* s67: the Shade's damage: the bar full, a white skull centred on its end (half in, half out), its box on hover, focus or tap */
.bar:has(.skull:not([hidden])) { overflow: visible; }
.skull { position: absolute; right: 0; top: 50%; transform: translate(50%, -50%); z-index: 2; display: grid; place-items: center; width: 34px; height: 34px;
  padding: 0; border: 0; background: none; cursor: help; }
.skull[hidden] { display: none; }
.skull svg { width: 22px; height: 22px; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .9)) drop-shadow(0 0 6px var(--glow)); }
.skull:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; border-radius: 50%; }
.tip { position: absolute; right: -14px; bottom: calc(100% + 18px); z-index: 3; width: min(260px, calc(100vw - 48px)); padding: 12px 14px;
  background: var(--bg3); border: 1px solid var(--acc); color: var(--ink); font: 400 .84rem/1.45 var(--body); text-align: left; box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  display: none; }
.tip::after { content: ""; position: absolute; right: 22px; top: 100%; border: 7px solid transparent; border-top-color: var(--acc); }
.skull:hover + .tip, .skull:focus-visible + .tip, .tip.open { display: block; }

/* ---------- wiki (s69): /wiki/weapons and /wiki/weaponsmith ---------- */
.wk { padding-top: calc(var(--head) + 28px); }
.wk-head .title { font-size: clamp(2.4rem, 5vw, 4.2rem); margin-bottom: 8px; }
.wk-lead { color: var(--mute); max-width: 44rem; }
.wk-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; margin-top: 24px; align-items: start; }
.wk-view { position: relative; aspect-ratio: 16 / 9; max-height: calc(100svh - 200px); width: 100%; overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none;
  background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--hangar-a) 85%, #000), #050505); border: 1px solid var(--line); }
.wk-view.active { border-color: color-mix(in srgb, var(--acc) 60%, transparent); }
.wk-view canvas { width: 100%; height: 100%; }
.wk-hint { position: absolute; left: 16px; right: 150px; bottom: 14px; font: 600 .7rem/1.35 var(--cond); letter-spacing: .1em; text-transform: uppercase; color: rgba(233, 230, 223, .72); pointer-events: none; text-shadow: 0 1px 3px #000; }
.wk-zoom { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: flex; gap: 4px; }
.wk-zoom button { width: 38px; height: 38px; padding: 0; background: rgba(0, 0, 0, .5); border: 1px solid var(--line); color: #e9e6df; font: 700 1.2rem/1 var(--cond); }
.wk-zoom button:hover { border-color: var(--acc); }
.wk-zoom .wk-home::before { content: ""; display: block; width: 12px; height: 12px; margin: auto; border: 2px solid currentColor; border-radius: 50%; }
.wk-load { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #e9e6df; pointer-events: none;
  font: 600 .74rem/1 var(--cond); letter-spacing: .2em; text-transform: uppercase; }
.wk-load[hidden] { display: none; }
.wk-load .hl-ring { position: relative; inset: auto; width: 46px; height: 46px; }
.wk-card-info .card-name { font-size: 2.2rem; }
.wk-bars { gap: 9px; margin-top: 14px; }
.wk-bars dt { font-size: .7rem; letter-spacing: .16em; }
.wk-bars b { font-size: .92rem; min-width: 7.5em; }
.bar i.up, .bar i.dn { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--c) 0 3px, transparent 3px 5px); box-shadow: inset 0 0 0 1px var(--c); }
.bar i.up { --c: #84e07f; }
.bar i.dn { --c: #ff8170; }
.wk-bars b.up, .wk-nums dd.up, .ws-fx .up { color: #84e07f; }
.wk-bars b.dn, .wk-nums dd.dn, .ws-fx .dn { color: #ff8170; }
.wk-nums { margin: 14px 0 0; display: grid; gap: 4px; font-size: .84rem; }
.wk-nums div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 4px; }
.wk-nums dt { color: var(--mute); }
.wk-nums dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.wk-go { margin-top: 16px; }
.wk-go .btn { min-height: 42px; padding: 0 18px; font-size: .95rem; }
.wk-credit { margin-top: 10px; font-size: .78rem; color: var(--mute); overflow-wrap: anywhere; }
.wk-credit a, .ws-txt small a { color: inherit; }
.wk-list { padding: 56px 0 80px; }
.wk-h2 { margin-bottom: 14px; font: 700 2rem/1 var(--cond); text-transform: uppercase; }
.wk-filter { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; }
.wk-filter button { min-height: 40px; padding: 0 16px; background: transparent; border: 1px solid var(--line); font: 600 .9rem/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; }
.wk-filter button:hover { border-color: var(--acc); }
.wk-filter button[aria-pressed="true"] { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.wk-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.wk-gcard { width: 100%; display: grid; gap: 2px; padding: 0 0 10px; text-align: left; background: var(--bg2); border: 1px solid var(--line); }
.wk-gcard img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #1b1e21; }
.wk-gname { padding: 6px 12px 0; font: 700 1.15rem/1.1 var(--cond); letter-spacing: .04em; text-transform: uppercase; }
.wk-gcls { padding: 0 12px; font: 600 .72rem/1 var(--cond); letter-spacing: .2em; text-transform: uppercase; color: var(--acc); }
.wk-gcard:hover { border-color: var(--acc); }
.wk-gcard[aria-pressed="true"] { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); }
/* weaponsmith: slot callouts (a line from the slot to a label in empty space), the slot's list, the stat deltas */
.ws-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ws-lines polyline { fill: none; stroke: var(--acc); stroke-width: 1.5; }
.ws-lines circle { fill: #050505; stroke: var(--acc); stroke-width: 2; }
.ws-slot { position: absolute; left: 0; top: 0; z-index: 1; display: grid; gap: 3px; min-width: 124px; padding: 7px 12px; text-align: left; color: #ece9e2;
  background: rgba(8, 9, 10, .8); border: 1px solid var(--acc); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ws-slot[hidden] { display: none; }
.ws-slot .ws-k { font: 600 .66rem/1 var(--cond); letter-spacing: .22em; text-transform: uppercase; color: var(--acc); }
.ws-slot .ws-v { font: 700 .98rem/1.1 var(--cond); text-transform: uppercase; }
.ws-slot.on { background: color-mix(in srgb, var(--acc) 24%, rgba(8, 9, 10, .86)); }
.ws-slot:hover, .ws-slot[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--acc); }
.ws-panel { position: absolute; top: 0; left: 0; bottom: 0; z-index: 3; width: min(370px, 100%); display: flex; flex-direction: column; cursor: auto;
  background: var(--bg); border-right: 1px solid var(--acc); }
.ws-panel[hidden] { display: none; }
.ws-ph { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.ws-ph h3 { font: 700 1.2rem/1 var(--cond); letter-spacing: .08em; text-transform: uppercase; }
.ws-close { width: 38px; height: 38px; padding: 0; background: none; border: 1px solid var(--line); font-size: 1.4rem; line-height: 1; }
.ws-items { list-style: none; margin: 0; padding: 8px; display: grid; gap: 6px; overflow-y: auto; overscroll-behavior: contain; }
.ws-item { width: 100%; display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; padding: 8px; text-align: left; background: transparent; border: 1px solid var(--line); }
.ws-item:hover { border-color: var(--acc); }
.ws-item[aria-pressed="true"] { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, transparent); }
.ws-pic { display: block; width: 96px; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #15171a; }
.ws-txt { display: grid; gap: 3px; font-size: .8rem; line-height: 1.4; color: var(--mute); }
.ws-txt b { font: 700 1rem/1.1 var(--cond); text-transform: uppercase; color: var(--ink); }
.ws-fx { list-style: none; margin: 2px 0 0; padding: 0; font-size: .78rem; color: var(--ink); }
.ws-txt small { font-size: .68rem; overflow-wrap: anywhere; }
@media (max-width: 899px) {
  .wk { padding-top: calc(var(--head) + 16px); }
  .wk-body { grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
  .wk-view { aspect-ratio: 4 / 3; max-height: 58svh; }
  .wk-hint { left: 10px; right: 136px; bottom: 10px; font-size: .58rem; letter-spacing: .06em; }
  .wk-card-info { padding: 18px 16px; }
  .wk-bars b { min-width: 6.5em; font-size: .86rem; }
  .wk-list { padding: 36px 0 56px; }
  .wk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wk-gname { font-size: .98rem; padding: 6px 8px 0; }
  .wk-gcls { padding: 0 8px; font-size: .62rem; letter-spacing: .14em; }
  .ws-slot { min-width: 0; padding: 5px 8px; }
  .ws-slot .ws-v { font-size: .8rem; }
  .ws-panel { position: fixed; top: auto; right: 0; width: 100%; max-height: 62svh; z-index: 60; border-right: 0; border-top: 1px solid var(--acc); }
}

/* ---------- home: classes (s69) ---------- */
.cls-sec { background: var(--bg); }
.cl-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; margin-top: 8px; }
.cl-side { display: flex; gap: 4px; }
.cl-side button { min-height: 44px; padding: 0 14px; background: transparent; border: 1px solid var(--line); font: 600 .85rem/1 var(--cond); letter-spacing: .12em; text-transform: uppercase; }
.cl-side button:hover { border-color: var(--acc); }
.cl-side button[aria-pressed="true"] { border-color: var(--acc); color: var(--acc); }
.cl-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 18px; align-items: start; }
.cl-view { position: relative; height: min(640px, 72svh); overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none; border: 1px solid var(--line);
  background: radial-gradient(60% 55% at 50% 45%, color-mix(in srgb, var(--hangar-a) 80%, transparent), transparent 75%); }
.cl-view.active { border-color: color-mix(in srgb, var(--acc) 60%, transparent); }
.cl-view canvas { width: 100%; height: 100%; }
.cl-view.loading canvas { opacity: .25; }
.cl-info .card-name { font-size: 2.6rem; }
.cl-h4 { margin: 26px 0 12px; font: 700 .9rem/1 var(--cond); letter-spacing: .24em; text-transform: uppercase; color: var(--acc); }
.cl-skills { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cl-skills li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 12px 14px; background: var(--bg2); border-left: 2px solid var(--acc); }
.cl-skills b { display: block; font: 700 1.1rem/1.1 var(--cond); letter-spacing: .03em; text-transform: uppercase; }
.cl-skills span { display: block; margin-top: 3px; font-size: .9rem; line-height: 1.45; color: var(--mute); }
.cl-ic { width: 44px; height: 44px; padding: 8px; fill: none; stroke: var(--acc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent); }
.cl-note { margin-top: 12px; font-size: .78rem; color: var(--mute); }
.cl-guns { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.cl-guns .wk-gcard { height: 100%; text-decoration: none; }
.cl-more { align-content: center; justify-items: center; text-align: center; min-height: 120px; padding: 16px; border-style: dashed; }
.cl-more-t { font: 700 1.4rem/1.1 var(--cond); text-transform: uppercase; color: var(--acc); }
@media (max-width: 899px) {
  .cl-body { grid-template-columns: 1fr; gap: 18px; }
  .cl-view { height: min(520px, 62svh); }
  .cl-guns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cl-side button { padding: 0 10px; font-size: .74rem; }
}

/* the flags hold still for reduced motion (the posters show; no camera move) */
@media (prefers-reduced-motion: reduce) {
  .b-bg { transition: filter .6s; }
}
