/* Cinzel and Inter, hosted here instead of at Google. Two files per family:
   the browser fetches the latin-ext one only if a page needs a character
   that is not in the basic latin range. */
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(assets/fonts/cinzel-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(assets/fonts/cinzel-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(assets/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(assets/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #070d18;
  --night-2: #0a1322;

  --plate: #16202f;
  --plate-lit: #1d2a3c;
  --plate-deep: #0e1725;
  --rim: #7c8796;
  --rim-dark: #39465a;

  --gold: #e0a52a;
  --gold-lit: #f7dc96;
  --gold-dim: rgba(224, 165, 42, 0.22);

  --gem: #3fbdf5;
  --gem-deep: #0c69cf;

  --royal: #23509f;
  --crimson: #ab2630;

  --text: #e9eff7;
  --muted: #98abc2;
  --muted-dim: #6d7f96;

  --line: rgba(146, 164, 190, 0.16);
  --lift: 0 20px 46px rgba(0, 0, 0, 0.55);

  --display: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --cut: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-lit); }
a:hover { color: var(--gold); }

.wrap { width: min(1140px, 92vw); margin-inline: auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
}
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); letter-spacing: 0.005em; }
h3 { font-size: 1.15rem; letter-spacing: 0.02em; }

h1, h2, .lede { text-wrap: balance; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.lede { color: var(--muted); font-size: 1.08rem; max-width: 62ch; }

.skip-link {
  position: absolute; left: -9999px; z-index: 60;
  background: var(--gold); color: #33240a;
  padding: 0.6rem 1rem; font-weight: 600;
}
.skip-link:focus { left: 0; top: 0; }

:focus-visible { outline: 2px solid var(--gem); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

.gem {
  display: inline-block;
  width: 0.62em; height: 0.62em;
  flex: none;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #bfeaff 0%, var(--gem) 42%, var(--gem-deep) 100%);
  border: 1px solid rgba(6, 22, 40, 0.75);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(63, 189, 245, 0.45);
}

.rail {
  display: flex; align-items: center; justify-content: center;
  gap: 0.9rem;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(0.72rem, 1.6vw, 0.82rem);
  letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold-lit);
}
.rail .gem { font-size: 1.5rem; }

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.7rem;
  min-height: 56px;
  padding: 0.9rem 2.1rem;
  font-family: var(--display);
  font-size: 0.95rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  clip-path: polygon(
    var(--cut) 0, calc(100% - var(--cut)) 0, 100% 50%,
    calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 50%);
  transition: transform 0.14s ease, filter 0.14s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: translateY(0); }

.btn-slate {
  background: linear-gradient(180deg, var(--rim-dark) 0 3px, var(--plate-lit) 3px, var(--plate-deep) calc(100% - 3px), var(--rim-dark) calc(100% - 3px));
  color: var(--muted);
}
.btn-slate:hover { color: var(--gold-lit); }

.badge-play { display: inline-block; line-height: 0; transition: transform 0.14s ease; }
.badge-play img { height: 56px; width: auto; }
.badge-play:hover { transform: translateY(-2px); }

.cta-row {
  display: flex; gap: 1rem; flex-wrap: wrap;
  align-items: center; justify-content: center;
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(180deg, rgba(7, 13, 24, 0.94), rgba(7, 13, 24, 0.86));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(224, 165, 42, 0.13);
}
.topbar .wrap {
  display: flex; align-items: center; gap: 1.6rem; min-height: 66px;
}

.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 700;
  font-size: 1rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-lit); text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--gold); }
.brand .gem { font-size: 1.1rem; }

.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 1.5rem; }
.topbar nav a {
  color: var(--muted); text-decoration: none;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
}
.topbar nav a:hover { color: var(--gold-lit); border-bottom-color: var(--gold-dim); }
.topbar .badge-play img { height: 38px; }

/* The EN/DE link in the top bar. The second selector outweighs the plain
   nav link rule above, which would otherwise take the border and padding. */
.lang-btn, .topbar nav a.lang-btn {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--gold-dim);
  background: rgba(224, 165, 42, 0.07);
  color: var(--gold-lit);
  font-family: var(--body);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.lang-btn:hover, .topbar nav a.lang-btn:hover { color: var(--gold); border-color: var(--gold); }

@media (max-width: 1040px) { .topbar .badge-play { display: none; } }
/* Heroes and Campaign used to drop out of the bar here, which hid two of
   the five sections from every phone. The row wraps instead. */
@media (max-width: 860px) {
  .topbar nav { flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem 1.3rem; }
}
@media (max-width: 620px) {
  .topbar .wrap { flex-wrap: wrap; gap: 0.6rem 1rem; padding-block: 0.6rem; }
  .topbar nav { margin-left: auto; gap: 0.3rem 1.1rem; }
  .topbar nav a { font-size: 0.74rem; }
  .brand { font-size: 0.9rem; letter-spacing: 0.14em; }
}

.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: -2% -2% auto -2%; height: 104%;
  background: url("assets/arena.webp") center 34% / cover no-repeat;
  opacity: 0.8;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 70% at 50% 18%, transparent 0%, rgba(7, 13, 24, 0.55) 62%, var(--night) 100%),
    linear-gradient(180deg, rgba(7, 13, 24, 0.5) 0%, rgba(7, 13, 24, 0.2) 34%, var(--night) 96%);
}
.hero .wrap {
  position: relative; z-index: 1; text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
}
.hero .mark {
  width: min(400px, 70vw); margin: 0 auto clamp(1.2rem, 3vw, 2rem);
  filter: drop-shadow(0 16px 34px rgba(0, 0, 0, 0.7));
}
.hero h1 {
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  margin: 0 auto 1.1rem;
  max-width: 16ch;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.8);
}
.hero .pitch {
  font-size: clamp(1.02rem, 1.9vw, 1.22rem);
  color: #d3dfee;
  max-width: 54ch; margin: 0 auto clamp(1.8rem, 4vw, 2.4rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

.promises {
  display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center;
  margin-top: clamp(1.8rem, 4vw, 2.6rem);
  padding: 0; list-style: none;
}
.promises li {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 0.76rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(10, 19, 34, 0.7);
  padding: 0.45rem 1rem;
}
.promises .gem { font-size: 0.8rem; }

section { position: relative; padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
section[id] { scroll-margin-top: 78px; }
/* Anchors on the text pages (#english, #delete) land below the sticky bar. */
.doc [id] { scroll-margin-top: 78px; }

section + section::before {
  content: "";
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(1140px, 92vw); height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim) 22%, var(--gold-dim) 78%, transparent);
}

.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); text-align: center; }
.section-head .rail { margin-bottom: 1.1rem; }
.section-head h2 { margin-bottom: 0.9rem; }
.section-head .lede { margin-inline: auto; }

.grid { display: grid; gap: 1.2rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--plate-lit) 0%, var(--plate) 40%, var(--plate-deep) 100%);
  border: 1px solid var(--rim-dark);
  border-top-color: var(--rim);
  padding: 1.5rem 1.4rem;
  box-shadow: var(--lift);
  clip-path: polygon(
    16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px),
    calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);
}
.card::after {
  content: "";
  position: absolute; inset: 7px;
  border: 1px solid var(--gold-dim);
  clip-path: polygon(
    11px 0, calc(100% - 11px) 0, 100% 11px, 100% calc(100% - 11px),
    calc(100% - 11px) 100%, 11px 100%, 0 calc(100% - 11px), 0 11px);
  pointer-events: none;
}
.card h3 { margin-bottom: 0.45rem; }
.card p { color: var(--muted); font-size: 0.95rem; }

.loop { display: grid; gap: clamp(2rem, 4vw, 3.2rem); align-items: center; }
@media (min-width: 900px) { .loop { grid-template-columns: 1fr 0.86fr; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.steps li {
  display: grid; grid-template-columns: auto 1fr; gap: 0 1.2rem;
  align-items: start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.steps .n {
  grid-row: span 2;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 1.15rem; font-weight: 700;
  color: var(--gold-lit);
  background: linear-gradient(180deg, var(--plate-lit), var(--plate-deep));
  border: 1px solid var(--rim-dark);
  box-shadow: inset 0 0 0 1px rgba(224, 165, 42, 0.16);
  transform: rotate(45deg);
}
.steps .n span { transform: rotate(-45deg); }
.steps h3 { margin-bottom: 0.25rem; }
.steps p { color: var(--muted); font-size: 0.95rem; }

.draft {
  background: linear-gradient(180deg, rgba(15, 26, 44, 0.9), rgba(7, 13, 24, 0.95)),
    url("assets/arena.webp") center 62% / cover;
  border: 1px solid var(--rim-dark);
  padding: 1.4rem 1.2rem 1.6rem;
  box-shadow: var(--lift);
  clip-path: polygon(
    18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px),
    calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}
.draft-head {
  text-align: center;
  font-family: var(--display); font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-lit); font-size: 0.8rem;
  margin-bottom: 1.1rem;
}
.draft-head b {
  display: block; color: var(--text);
  font-size: 1.5rem; letter-spacing: 0.1em; margin-top: 0.2rem;
}
.draft-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.draft-card {
  background: linear-gradient(180deg, var(--plate-lit), var(--plate-deep));
  border: 1px solid var(--rim-dark);
  padding: 0.9rem 0.7rem 1rem;
  text-align: center;
}
.draft-card.taken { border-color: var(--gem); box-shadow: 0 0 0 1px var(--gem), 0 0 24px rgba(63, 189, 245, 0.3); }
.draft-card img { width: 104px; margin: 0 auto 0.3rem; }
.draft-card h4 {
  margin: 0 0 0.5rem; font-family: var(--display);
  font-size: 0.86rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.draft-stat {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted-dim); margin-bottom: 0.3rem;
}
.draft-stat .bar { flex: 1; height: 6px; background: rgba(146, 164, 190, 0.16); }
.draft-stat .bar i { display: block; height: 100%; background: var(--gem); }
.draft-stat.melee .bar i { background: var(--royal); }
.draft-foot {
  margin: 1rem 0 0; text-align: center;
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted-dim);
}

@media (min-width: 880px) {
  #units .grid-3 { grid-template-columns: repeat(3, 1fr); }
  /* Seven units: the last one alone in its row sits in the middle. */
  #units .grid-3 > .unit:last-child:nth-child(3n + 1) { grid-column: 2; }
}

.unit { text-align: center; }
.unit img { width: 142px; margin: 0 auto 0.6rem; }
.tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.2rem 0.7rem; margin-bottom: 0.6rem;
  border: 1px solid transparent;
}
.tag-melee { background: rgba(35, 80, 159, 0.22); color: #8cb8f0; border-color: rgba(35, 80, 159, 0.6); }
.tag-ranged { background: rgba(91, 162, 77, 0.18); color: #92d183; border-color: rgba(91, 162, 77, 0.5); }

#heroes .grid-3 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.hero-card { display: flex; flex-direction: column; gap: 1rem; }
.hero-head { display: flex; gap: 1rem; align-items: center; }
/* The portrait brings its own gold frame, so no border goes round it. */
.hero-head img { width: 76px; flex: none; }
.hero-head h3 { margin: 0; }
.hero-head p { margin: 0.1rem 0 0; color: var(--muted-dim); font-size: 0.86rem; }
.hero-card dl {
  margin: 0; font-size: 0.9rem;
  display: grid; grid-template-columns: auto 1fr;
  column-gap: 1rem; row-gap: 0.5rem; align-items: baseline;
}
.hero-card dt {
  color: var(--gold); font-size: 0.66rem;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.hero-card dd { margin: 0; color: var(--muted); }
.hero-card .ability { color: var(--text); font-weight: 600; }

.split { display: grid; gap: clamp(2rem, 4vw, 3.2rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 0.8fr 1.2fr; } }
.split .map {
  border: 1px solid var(--rim-dark);
  box-shadow: var(--lift), inset 0 0 0 1px rgba(224, 165, 42, 0.18);
  clip-path: polygon(
    20px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px),
    calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px), 0 20px);
}

.territories {
  list-style: none; margin: 1.6rem 0 0; padding: 0;
  display: grid; gap: 0.5rem;
}
.territories li {
  display: grid; grid-template-columns: 46px 1fr; gap: 0 1rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.territories li:last-child { border-bottom: 0; }
.territories img { width: 46px; grid-row: span 2; }
.territories b { color: var(--text); font-weight: 600; font-size: 0.97rem; }
.territories span { color: var(--muted); font-size: 0.89rem; }

.spire {
  display: grid; gap: 1.4rem; align-items: center;
  margin-top: clamp(2.2rem, 4vw, 3rem);
  padding: clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(90deg, rgba(10, 19, 34, 0.95) 0%, rgba(10, 19, 34, 0.86) 48%, rgba(10, 19, 34, 0.3) 100%),
    url("assets/sky-spire.webp") center 26% / cover;
  border: 1px solid var(--rim-dark);
  box-shadow: var(--lift);
  clip-path: polygon(
    20px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px),
    calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px), 0 20px);
}
.spire h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.spire p { color: var(--muted); max-width: 52ch; }
@media (min-width: 760px) { .spire { max-width: 70%; } }

#arena { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 50%, var(--night) 100%); }

.ladder {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.ladder .card { text-align: center; padding-block: 1.7rem 1.5rem; }
.ladder .big {
  display: block;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1;
  color: var(--gold-lit);
  margin-bottom: 0.5rem;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
}
.ladder h3 {
  font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin: 0;
}

.arena-notes {
  list-style: none; margin: clamp(2rem, 4vw, 2.8rem) 0 0; padding: 0;
  display: grid; gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
@media (min-width: 880px) { .arena-notes { grid-template-columns: repeat(2, 1fr); } }
.arena-notes li {
  display: grid; grid-template-columns: auto 1fr; gap: 0 0.8rem;
  align-items: start;
  padding: 0.9rem 1.1rem;
  background: rgba(13, 23, 39, 0.75);
  border: 1px solid var(--line);
}
.arena-notes .gem { margin-top: 0.42rem; }
.arena-notes b { display: block; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.arena-notes span { color: var(--muted); font-size: 0.89rem; }

#get { padding-block: clamp(2.5rem, 5vw, 3.5rem); }

footer {
  border-top: 1px solid var(--line);
  padding: 2.6rem 0 3.6rem;
  color: var(--muted-dim); font-size: 0.9rem;
}
footer .wrap { display: flex; gap: 1.4rem; flex-wrap: wrap; align-items: center; }
footer nav { margin-left: auto; display: flex; gap: 1.4rem; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--gold-lit); }

.doc { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.doc .wrap { width: min(760px, 92vw); }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 0.5rem; }
.doc h2 {
  font-size: 1.45rem; margin-top: 2.8rem;
  padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.doc h3 { font-size: 1.05rem; margin-top: 2rem; color: var(--gold-lit); }
.doc p, .doc li { color: #c6d4e6; }
.doc ul { padding-left: 1.2rem; }
.doc .updated { color: var(--muted-dim); font-size: 0.88rem; }
.doc address { font-style: normal; color: #c6d4e6; }
.lang-switch { display: flex; gap: 0.6rem; margin: 1.6rem 0 0; }
/* Read by screen readers, drawn nowhere. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.todo {
  background: rgba(171, 38, 48, 0.18);
  border: 1px dashed var(--crimson);
  padding: 0.1em 0.45em;
  color: #ffb4ad;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.trailer {
  position: relative;
  width: min(360px, 78vw);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  background: var(--plate-deep);
  border: 1px solid var(--rim-dark);
  border-top-color: var(--rim);
  border-radius: 18px;
  box-shadow: var(--lift);
  overflow: hidden;
}
.trailer video, .trailer-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer video { display: block; background: var(--plate-deep); }
.trailer video:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.trailer-play { display: block; padding: 0; margin: 0; background: none; cursor: pointer; color: var(--text); }
.trailer-play[hidden] { display: none; }
.trailer-play::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 86%, rgba(7, 13, 24, 0.6) 100%);
}
.trailer-play:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.trailer { container-type: inline-size; }
.trailer-cta {
  position: absolute; left: 50%; bottom: 2.6%; z-index: 1;
  transform: translateX(-50%);
  display: inline-flex; align-items: center;
  gap: 8px; gap: 2.2cqw;
  padding: 4px 14px 4px 4px; padding: 1.1cqw 4cqw 1.1cqw 1.1cqw;
  border-radius: 999px;
  background: rgba(7, 13, 24, 0.74);
  border: 1px solid rgba(224, 165, 42, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.trailer-play:hover .trailer-cta { transform: translateX(-50%) translateY(-2px); border-color: var(--gold); }
.trailer-ring {
  position: relative; flex: none;
  width: 34px; height: 34px; width: 11cqw; height: 11cqw;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(224, 165, 42, 0.28);
}
.trailer-ring::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  margin: -7px 0 0 -4px; margin: -2.2cqw 0 0 -1.3cqw;
  border-style: solid;
  border-width: 7px 0 7px 12px; border-width: 2.2cqw 0 2.2cqw 3.8cqw;
  border-color: transparent transparent transparent var(--night);
}
.trailer-label {
  font-family: var(--display); font-weight: 700;
  font-size: 0.78rem; font-size: clamp(0.72rem, 4.1cqw, 1rem);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-lit);
}

/* The invite page, /i/: a friend's code and the way to Play. */
.invite { text-align: center; }
.invite .mark { width: min(200px, 48vw); margin: 0 auto 1.4rem; }
.invite h1 { margin-bottom: 0.9rem; }
.invite .code-box {
  display: inline-block;
  margin: 0.6rem 0 1.4rem;
  padding: 0.9rem 1.6rem 1rem;
  background: var(--plate);
  border: 1px solid var(--gold-dim);
  box-shadow: var(--lift);
}
.invite .code-label {
  margin-bottom: 0.3rem;
  color: var(--muted); font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.invite .code {
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.1rem, 9vw, 2.9rem); letter-spacing: 0.16em;
  color: var(--gold-lit);
}
.invite .badge-play img { height: 64px; margin-inline: auto; }
.invite .note { color: var(--muted); font-size: 0.92rem; margin-top: 1.2rem; }
/* The code box sets its own display; without a good code it stays out. */
.invite [hidden] { display: none; }

.reveal { opacity: 0; transform: translateY(18px); }
.reveal.shown {
  opacity: 1; transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .badge-play, .trailer-cta { transition: none; }
  .btn:hover, .badge-play:hover { transform: none; }
  .trailer-play:hover .trailer-cta { transform: translateX(-50%); }
  .reveal, .reveal.shown { opacity: 1; transform: none; transition: none; }
}
