/* Echoes from Hell — public site.
   The frames, plates, plaques, buttons, divider and gargoyles are the game's
   own UI pieces (game/assets/ui), drawn with border-image at their native
   pixel slices, as the game's StyleBoxTexture draws them. */

@font-face {
  font-family: "Cinzel";
  src: url("fonts/Cinzel.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0908;
  --bg-raise: #15110f;
  --line: #3b342c;
  --parchment: #e0d1b3;   /* the game's PARCHMENT */
  --bone: #d4c8ae;
  --muted: #a99f8b;
  --gold: #ffd17a;        /* the game's GOLD */
  --gold-dim: #c9a462;
  --ember: #ff7a2e;
  --ember-soft: #f3a46b;
  --blood: #a3241a;
  --ink: #23170b;         /* on parchment */
  --ink-soft: #4a3019;
  --ok: #7fdc93;
  --off: #d0564a;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", "Iowan Old Style", Georgia, serif;
  --gutter: 16px;
  --header: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header) + 8px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 40% at 50% 38%, rgba(120, 32, 12, 0.10), transparent 70%),
    radial-gradient(ellipse 60% 30% at 50% 78%, rgba(120, 32, 12, 0.10), transparent 70%);
  color: var(--bone);
  font: 17px/1.65 var(--serif);
}

img { max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffe3a8; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  left: 12px; top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: #000;
  color: var(--gold);
  font-family: var(--display);
  border: 1px solid var(--gold-dim);
}
.skip:focus { top: 12px; }

/* ---------- the game's pieces as frames ---------- */

.f-window, .f-panel, .f-plate, .f-plaque { position: relative; isolation: isolate; }
.f-window::before, .f-panel::before, .f-plate::before, .f-plaque::before, .f-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-style: solid;
  border-color: transparent;
  pointer-events: none;
}
/* window.png 181x156: leather header (56 px) and its corner clasps kept whole. */
.f-window::before {
  border-width: 56px 30px 16px 30px;
  border-image: url("img/ui/window.webp") 56 30 16 30 fill stretch;
}
/* panel.png 426x303: stone frame with rune bands around a parchment; the
   corners keep the parchment's printed flourishes, the rune column and rivets. */
.f-panel::before {
  border-width: 102px 126px 163px 72px;
  border-image: url("img/ui/panel.webp") 102 126 163 72 fill round stretch;
}
/* panel.webp keeps the sheet's printed rules, flourishes and burnt edges as
   ink over a clear sheet; the plain parchment is laid beneath it whole, so a
   tall panel doesn't streak where the art's 38 px middle row is stretched. */
.f-panel::after {
  inset: 68px 71px 46px 32px;
  z-index: -2;
  border: 0;
  background: #a3937a url("img/ui/parchment.webp") center / cover no-repeat;
  box-shadow: inset 0 0 46px 6px rgba(74, 44, 16, 0.55);
}
/* title_plate.png 300x61 */
.f-plate::before {
  border-width: 16px;
  border-image: url("img/ui/title-plate.webp") 16 fill stretch;
}
/* plaque.png 450x40, pointed ends */
.f-plaque::before {
  border-width: 9px 32px;
  border-image: url("img/ui/plaque.webp") 9 32 fill stretch;
}
/* title_plate's rim as a picture frame, over the picture. */
.f-frame { position: relative; }
.f-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 16px solid transparent;
  border-image: url("img/ui/title-plate.webp") 16 stretch;
  pointer-events: none;
}

/* Buttons: the sheet's dark plate, lit on hover, reddened when pressed. */
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 50px;
  padding: 5px 22px;
  border: 9px solid transparent;
  border-image: url("img/ui/button.webp") 9 fill stretch;
  background: none;
  color: var(--parchment);
  font: 600 15px/1.2 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 0 2px #000, 0 1px 3px #000;
  cursor: pointer;
  transition: color 0.15s, box-shadow 0.2s;
}
.btn:hover {
  border-image-source: url("img/ui/button-lit.webp");
  color: var(--gold);
  box-shadow: 0 0 22px rgba(255, 130, 45, 0.28);
}
.btn:active { border-image-source: url("img/ui/button-pressed.webp"); }
.btn[disabled] { cursor: progress; color: var(--muted); }
.btn-wide { width: 100%; }

/* ---------- header ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  background: linear-gradient(rgba(4, 3, 3, 0.88), rgba(4, 3, 3, 0));
  transition: background-color 0.25s, box-shadow 0.25s;
}
.topbar.scrolled {
  background: rgba(10, 8, 7, 0.95);
  box-shadow: 0 1px 0 rgba(255, 209, 122, 0.14), 0 8px 24px rgba(0, 0, 0, 0.55);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  text-decoration: none;
  font: 600 15px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px #000;
  white-space: nowrap;
}
.brand img { width: 28px; height: 28px; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.topnav a {
  white-space: nowrap;
  color: var(--parchment);
  text-decoration: none;
  font: 500 13px/1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px #000;
  padding: 8px 0;
}
.topnav a:hover { color: var(--gold); }
.topnav .topnav-beta {
  color: var(--gold);
  padding: 7px 12px;
  border: 1px solid rgba(255, 160, 80, 0.45);
  border-radius: 2px;
  background: rgba(120, 30, 10, 0.3);
}
.topnav .topnav-beta:hover { background: rgba(160, 45, 15, 0.45); }
.lang { display: flex; align-items: center; gap: 2px; color: var(--muted); font: 13px/1 var(--display); }
.lang button {
  background: none;
  border: 0;
  padding: 8px 6px;
  color: var(--muted);
  font: 600 13px/1 var(--display);
  letter-spacing: 0.1em;
  cursor: pointer;
}
.lang button:hover { color: var(--parchment); }
.lang button[aria-pressed="true"] { color: var(--gold); text-decoration: underline; text-underline-offset: 5px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  max-width: 1920px;
  margin: 0 auto;
  container-type: inline-size;
}
.hero-stage {
  position: relative;
  aspect-ratio: 1408 / 768;
  overflow: hidden;
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.hero-stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 16%;
  background: linear-gradient(rgba(11, 9, 8, 0), var(--bg));
  pointer-events: none;
}
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* The four blank slots painted on the art's stone panel (the game's
   title.gd BUTTONS, in 1408x768 art pixels: x 125, w 235, y 258/325/394/462). */
.hero-panel {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 54.545cqw;
  pointer-events: none;
}
.slot {
  position: absolute;
  left: 8.878cqw;
  width: 16.69cqw;
  height: 3.76cqw;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  color: var(--parchment);
  font: 600 clamp(11px, 1.17cqw, 22px)/1 var(--display);
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 0 3px #000, 0 0 3px #000, 0 1px 2px #000;
  border-radius: 3px;
}
.slot::before {
  content: "";
  position: absolute;
  inset: 0.43cqw 0.57cqw;
  border-radius: 3px;
  background: radial-gradient(ellipse at center, rgba(255, 140, 50, 0.22), rgba(255, 140, 50, 0.06) 75%);
  opacity: 0;
  transition: opacity 0.15s;
}
.slot:hover, .slot:focus-visible { color: var(--gold); }
.slot:hover::before, .slot:focus-visible::before { opacity: 1; }
.slot:focus-visible { outline-offset: -2px; }
.hero-menu .slot:nth-child(1) { top: 18.324cqw; }
.hero-menu .slot:nth-child(2) { top: 23.082cqw; }
.hero-menu .slot:nth-child(3) { top: 27.983cqw; }
.hero-menu .slot:nth-child(4) { top: 32.813cqw; }

/* Realm status, in the panel's blank band under the slots. */
.realm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--parchment);
  font: 500 13px/1.3 var(--display);
  letter-spacing: 0.05em;
}
.realm-text { display: inline; }
.realm-sub::before { content: " · "; }
.realm-sub:empty { display: none; }
.realm-part { white-space: nowrap; }
.realm-part + .realm-part::before { content: " · "; }
.realm-dot {
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #8a8174;
}
.realm[data-state="online"] .realm-dot { background: var(--ok); box-shadow: 0 0 8px rgba(127, 220, 147, 0.8); }
.realm[data-state="offline"] .realm-dot { background: var(--off); box-shadow: 0 0 6px rgba(208, 86, 74, 0.6); }
.realm[data-state="checking"] .realm-dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.hero-panel .realm {
  position: absolute;
  left: 8.878cqw;
  width: 16.69cqw;
  top: 36.9cqw;
  height: 4cqw;
  align-items: flex-start;
  padding: 0.25cqw 0.6cqw 0;
  line-height: 1.25;
  font-size: clamp(10px, 0.82cqw, 15px);
  text-align: center;
  text-shadow: 0 0 3px #000, 0 1px 2px #000;
}
.hero-panel .realm-text { display: flex; flex-direction: column; align-items: center; gap: 0.15em; }
.hero-panel .realm-main { letter-spacing: 0.1em; }
.hero-panel .realm-sub { color: var(--bone); font-size: 0.92em; }
.hero-panel .realm-sub::before { content: none; }

.hero-foot {
  position: absolute;
  left: 60.7cqw;
  top: calc(54.545cqw - 3.4cqw);
  transform: translateX(-50%);
  width: max-content;
  max-width: 66cqw;
  text-align: center;
  z-index: 2;
}
.hero { padding-bottom: 60px; }
.hook {
  margin: 0 auto;
  padding: 13px 46px;
  color: var(--parchment);
  font: 600 clamp(15px, 1.25cqw, 21px)/1.35 var(--display);
  letter-spacing: 0.04em;
  text-shadow: 0 0 3px #000, 0 1px 3px #000;
}
.kicker {
  margin: 10px 0 0;
  color: var(--ember-soft);
  font: 500 13px/1.4 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px #000;
}

@media (min-width: 1921px) {
  .hero-stage {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  }
}

/* Narrower than the panel can carry: crop the art to the logo and the fire,
   and lay the menu out below it with the game's button plates. */
@media (max-width: 959px) {
  .hero { display: flex; flex-direction: column; padding-bottom: 8px; }
  .hero-stage { aspect-ratio: 1.3; }
  .hero-art { object-position: 100% 50%; }
  .hero-stage::after { height: 22%; }
  .hero-foot {
    position: relative;
    order: 1;
    left: auto; top: auto;
    transform: none;
    width: auto;
    max-width: none;
    margin: -34px var(--gutter) 0;
  }
  .hook { display: inline-block; max-width: 640px; }
  .hero-panel {
    position: static;
    order: 2;
    width: auto;
    height: auto;
    padding: 22px var(--gutter) 0;
    pointer-events: auto;
  }
  .hero-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
  }
  .slot {
    position: static;
    width: auto;
    height: auto;
    min-height: 50px;
    padding: 4px 8px;
    border: 9px solid transparent;
    border-image: url("img/ui/button.webp") 9 fill stretch;
    font-size: 14px;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
  }
  .slot::before { display: none; }
  .slot:hover { border-image-source: url("img/ui/button-lit.webp"); }
  .slot:active { border-image-source: url("img/ui/button-pressed.webp"); }
  .hero-panel .realm {
    position: static;
    width: auto; height: auto;
    margin: 16px auto 0;
    font-size: 13px;
  }
  .hero-panel .realm-text { display: inline; }
  .hero-panel .realm-sub { color: inherit; font-size: inherit; }
  .hero-panel .realm-sub::before { content: " · "; }
}
@media (max-width: 599px) {
  .hero-stage { aspect-ratio: 1 / 1; }
  .hero-art { object-position: 73.5% 50%; }
  .hook { padding: 12px 30px; font-size: 14.5px; text-wrap: balance; }
  .kicker { font-size: 11.5px; letter-spacing: 0.1em; }
}

/* ---------- sections ---------- */

.section {
  max-width: 1232px;
  margin: 0 auto;
  padding: 64px var(--gutter) 24px;
  text-align: center;
}
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 44px;
}
.divider::before, .divider::after {
  content: "";
  flex: 0 1 472px;
  aspect-ratio: 472 / 30;
  background: url("img/ui/divider.webp") center / 100% 100% no-repeat;
}
.divider::after { transform: scaleX(-1); }
.divider span {
  flex: none;
  width: 16px; height: 16px;
  margin: 0 -3px;
  z-index: 1;
  transform: rotate(45deg);
  border: 2px solid #6d5b40;
  background: radial-gradient(circle, #ffb15a 0%, #c2410c 55%, #3a1206 100%);
  box-shadow: 0 0 12px rgba(255, 120, 40, 0.65);
}

.plate {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 18px;
  padding: 15px 52px 13px;
  color: var(--gold);
  font: 700 clamp(21px, 2.3vw, 29px)/1.15 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 0 2px #000, 0 2px 4px #000;
}
.intro {
  max-width: 680px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 18px;
  font-style: italic;
}
.eyebrow {
  margin: 0 0 8px;
  font: 600 12.5px/1.3 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* World */
.world {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-top: 36px;
  text-align: left;
}
.parchment {
  padding: 92px 96px 74px 66px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.7;
}
.parchment .eyebrow { color: var(--ink-soft); }
.parchment p { margin: 0 0 0.9em; }
.parchment p:last-child { margin-bottom: 0; }
.parchment .lead::first-letter {
  float: left;
  margin: 0.06em 0.1em 0 0;
  color: #7c1b0e;
  font: 700 3.3em/0.82 var(--display);
}
/* Trailer: the film in the title plate's rim, its sound button inside. */
.trailer {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  box-shadow: 0 0 46px rgba(255, 100, 30, 0.16), 0 18px 40px rgba(0, 0, 0, 0.6);
}
.trailer-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  cursor: pointer;
}
.trailer-sound {
  position: absolute;
  right: 30px;
  bottom: 28px;
  z-index: 2;
}
@media (max-width: 599px) {
  .trailer-sound { right: 12px; bottom: 10px; min-height: 30px; padding: 0 8px; border-width: 6px; font-size: 10.5px; }
}

.gate { margin: 0; }
.framed { overflow: hidden; background: #000; }
.framed img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gate .framed img { aspect-ratio: 616 / 760; }
.gate figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
  text-align: center;
}

/* Classes */
.class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  text-align: left;
}
.class-card {
  display: flex;
  flex-direction: column;
  padding: 0 26px 24px;
}
.win-head {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 -10px;
}
.win-head img { width: auto; height: 32px; filter: drop-shadow(0 1px 2px #000); }
.win-head h3 {
  margin: 0;
  color: var(--gold);
  font: 700 18px/1.1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 2px #000, 0 2px 3px #000;
}
.epithet {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6em;
  margin: 10px 0 2px;
  color: var(--ember-soft);
  font: 600 12.5px/1.3 var(--display);
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}
.statue {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 50% 62% at 50% 50%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 62% at 50% 50%, #000 55%, transparent 100%);
}
.bio { margin: 4px 0 16px; font-size: 15.5px; line-height: 1.6; }
.kit {
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 209, 122, 0.16);
  font-size: 14.5px;
  line-height: 1.45;
}
.kit div + div { margin-top: 9px; }
.kit dt {
  color: var(--gold-dim);
  font: 600 11px/1.3 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.kit dd { margin: 2px 0 0; color: var(--parchment); }
.pip {
  display: inline-block;
  width: 9px; height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 0.05em;
  background: var(--res);
  box-shadow: 0 0 8px var(--res);
}

/* Regions: the bestiary's cards, a photo of each place from the game. */
.region-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 28px;
  text-align: left;
}
.region .framed img { aspect-ratio: 16 / 9; }
.region .nameplate { font-size: 15.5px; }
.region-epithet {
  margin: -4px 0 10px;
  color: var(--ember-soft);
  font: 600 12px/1.35 var(--display);
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}
.region p { margin: 0 0 10px; padding: 0 4px; font-size: 16px; line-height: 1.62; }
.region .meet { margin: 0; color: var(--muted); font-size: 14.5px; font-style: italic; }
.region .meet span:first-child {
  color: var(--gold-dim);
  font: 600 11.5px/1 var(--display);
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (max-width: 1099px) {
  .region-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  .region-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
}

/* Bestiary */
.beast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  text-align: left;
}
.beast .framed img { aspect-ratio: 5 / 4; }
.tag {
  position: absolute;
  top: 24px; left: 24px;
  z-index: 1;
  padding: 4px 10px 3px;
  background: rgba(8, 6, 5, 0.82);
  border: 1px solid #5d4c37;
  color: var(--parchment);
  font: 600 11px/1.3 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tag-elite { color: var(--gold); border-color: rgba(255, 140, 60, 0.7); box-shadow: 0 0 10px rgba(255, 110, 30, 0.35); }
.nameplate {
  width: fit-content;
  max-width: 100%;
  margin: -24px auto 14px;
  padding: 11px 40px 10px;
  color: var(--gold);
  font: 700 16.5px/1.2 var(--display);
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 2px #000, 0 1px 3px #000;
}
.beast p { margin: 0; padding: 0 4px; font-size: 16px; line-height: 1.62; }

.boss {
  max-width: 880px;
  margin: 64px auto 0;
  padding: 40px 28px 44px;
  background:
    radial-gradient(ellipse 70% 90% at 50% 120%, rgba(200, 50, 15, 0.38), transparent 70%),
    linear-gradient(#130d0b, #0d0907);
  border-top: 1px solid rgba(255, 130, 60, 0.28);
  border-bottom: 1px solid rgba(255, 130, 60, 0.28);
}
.boss .eyebrow { color: var(--ember-soft); }
.boss h3 {
  margin: 0 0 14px;
  color: #ffbf8a;
  font: 700 clamp(24px, 3.4vw, 38px)/1.15 var(--display);
  letter-spacing: 0.06em;
  text-shadow: 0 0 22px rgba(255, 90, 30, 0.55), 0 2px 4px #000;
}
.boss p:last-child { max-width: 680px; margin: 0 auto; font-size: 17px; }

/* News, on the panel's parchment */
.news {
  max-width: 880px;
  margin: 0 auto;
  padding: 90px 96px 70px 64px;
  color: var(--ink);
  text-align: left;
}
.news { display: flex; flex-direction: column; justify-content: center; min-height: 320px; }
.news-list { min-height: 60px; }
.news-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(70, 45, 20, 0.28);
}
.news-item:first-child { padding-top: 0; }
.news-item:last-of-type { border-bottom: 0; padding-bottom: 0; }
.news-item.has-thumb { grid-template-columns: 132px minmax(0, 1fr); }
.news-thumb {
  width: 132px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 3px solid #3b2a18;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.news-date {
  display: block;
  color: var(--ink-soft);
  font: 600 12px/1.4 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.news-body h3 {
  margin: 4px 0 6px;
  color: #3d160a;
  font: 700 21px/1.25 var(--display);
  letter-spacing: 0.03em;
}
.news-body p { margin: 0 0 0.6em; font-size: 17px; line-height: 1.6; }
.news-body p:last-child { margin-bottom: 0; }
.news-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(70, 45, 20, 0.28);
}
.news-turn {
  padding: 6px 12px;
  border: 1px solid rgba(70, 45, 20, 0.45);
  border-radius: 3px;
  background: rgba(60, 30, 12, 0.08);
  color: #3d160a;
  font: 700 13px/1.2 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.news-turn:hover:not(:disabled), .news-turn:focus-visible { background: rgba(60, 30, 12, 0.85); color: #f3dcb6; }
.news-turn:disabled { opacity: 0.35; cursor: default; }
.news-count { color: var(--ink-soft); font: 600 12px/1.4 var(--display); letter-spacing: 0.12em; text-transform: uppercase; }
.news-state {
  margin: 0;
  padding: 18px 0;
  color: var(--ink-soft);
  font-style: italic;
  text-align: center;
}

/* Closed beta */
.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 40px;
  margin: 0 auto 44px;
  padding: 0;
  list-style: none;
}
.steps li { display: flex; align-items: center; gap: 12px; text-align: left; max-width: 340px; }
.step-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  background: radial-gradient(circle at 50% 40%, #3a1a0e, #120a07);
  color: var(--gold);
  font: 700 13px/1 var(--display);
  box-shadow: 0 0 12px rgba(255, 110, 30, 0.25);
}
.beta {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: start;
  text-align: left;
}
.account { padding: 0 34px 32px; }
.account .win-head h3 { font-size: 19px; }
.form { margin-top: 22px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--parchment);
  font: 600 13px/1.3 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.field input {
  display: block;
  width: 100%;
  padding: 11px 12px;
  background: #080707;
  border: 1px solid #73613f;
  border-radius: 3px;
  color: var(--parchment);
  font: 17px/1.3 var(--serif);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: rgba(224, 209, 179, 0.38); }
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 160, 70, 0.25); }
.field input[aria-invalid="true"] { border-color: #e0604e; }
.field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(224, 96, 78, 0.3); }
#f-invite { font-family: var(--display); font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.error { margin: 6px 0 0; color: #ff9a86; font-size: 14.5px; line-height: 1.45; }
.error::before { content: "✕ "; font-size: 0.85em; }
.form-error {
  margin: 0 0 16px;
  padding: 10px 13px;
  background: rgba(150, 30, 20, 0.22);
  border: 1px solid rgba(255, 110, 90, 0.45);
  border-radius: 3px;
  color: #ffc0b3;
  font-size: 15px;
}
.form .btn { margin-top: 6px; }
.done { padding: 30px 0 4px; text-align: center; }
.done:focus { outline: none; }
.done-title {
  margin: 0 0 10px;
  color: var(--gold);
  font: 700 26px/1.2 var(--display);
  letter-spacing: 0.06em;
  text-shadow: 0 0 18px rgba(255, 140, 50, 0.4);
}
.done-text { margin: 0 0 22px; }
.done-text b { color: var(--gold); font-weight: 700; }
.done-note { margin: 16px 0 0; color: var(--muted); font-size: 14.5px; }

.beta-side { display: flex; flex-direction: column; gap: 30px; }
.beta-side h3 {
  margin: 0 0 14px;
  color: var(--gold);
  font: 700 19px/1.2 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}
.download p { margin: 16px 0 0; font-size: 16px; }
.gargoyles {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.garg { flex: none; width: clamp(60px, 7vw, 92px); height: auto; margin-bottom: -6px; }
.btn-big { flex: 0 1 auto; min-height: 72px; padding: 8px 22px; font-size: 16px; letter-spacing: 0.06em; text-wrap: balance; }
.btn-big small {
  color: var(--muted);
  font: 500 11.5px/1.2 var(--display);
  letter-spacing: 0.08em;
  text-transform: none;
}
.note {
  padding: 11px 14px;
  border-left: 3px solid var(--ember);
  background: rgba(255, 255, 255, 0.035);
  color: var(--bone);
  font-size: 15px !important;
  line-height: 1.55;
}
.note b { color: var(--parchment); }
.realm-inline { margin-top: 18px; color: var(--muted); flex-wrap: wrap; text-align: center; }
.community {
  padding: 24px 24px 26px;
  text-align: center;
  border: 1px solid var(--line);
  background: linear-gradient(#15110f, #0e0b0a);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.community p { margin: 0 0 18px; font-size: 16px; }

/* Footer */
.footer {
  margin-top: 72px;
  padding: 0 var(--gutter) 48px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
}
.footer-logo { display: block; width: min(300px, 72%); margin: 0 auto 18px; }
.footer p { margin: 6px auto; max-width: 640px; }
.footer a { color: var(--gold-dim); }
.footer a:hover { color: var(--gold); }

/* ---------- smaller screens ---------- */

@media (max-width: 1099px) {
  .class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .world { grid-template-columns: minmax(0, 1fr); }
  .gate { max-width: 460px; margin: 0 auto; }
  .gate .framed img { aspect-ratio: 4 / 3; object-position: 50% 40%; }
  .beast-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
  .beta { grid-template-columns: minmax(0, 1fr); max-width: 600px; margin: 0 auto; }
  .topnav { gap: 16px; }
}
/* Seven links: tighter before they give way to the hero's menu. */
@media (max-width: 1099px) {
  .topnav { gap: 13px; }
  .topnav a { font-size: 12px; letter-spacing: 0.07em; }
}
@media (max-width: 919px) {
  .topnav a:not(.topnav-beta) { display: none; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 12px; gap: 12px; }
}
@media (max-width: 639px) {
  .class-grid { grid-template-columns: minmax(0, 1fr); max-width: 420px; margin: 0 auto; }
  .section { padding-top: 48px; }
  .divider { margin-bottom: 32px; }
  .plate { padding: 14px 34px 12px; letter-spacing: 0.1em; }
  .intro { font-size: 16.5px; margin-bottom: 28px; }
  /* The panel at 70%: corners still whole, more room for the words. */
  .f-panel::before { border-width: 71px 88px 114px 50px; }
  .f-panel::after { inset: 48px 50px 32px 22px; }
  .parchment { padding: 66px 66px 54px 46px; font-size: 16.5px; }
  .news { padding: 64px 64px 50px 44px; min-height: 240px; }
  .news-item.has-thumb { grid-template-columns: minmax(0, 1fr); }
  .news-thumb { width: 100%; }
  .news-body h3 { font-size: 18px; }
  .news-body p { font-size: 16px; }
  .account { padding: 0 22px 24px; }
  .garg { width: 64px; }
  .btn-big { padding: 6px 14px; font-size: 15px; min-height: 66px; }
  .brand { font-size: 13px; letter-spacing: 0.1em; }
  .steps { display: grid; justify-content: center; gap: 14px; }
  .realm-inline { font-size: 12px; letter-spacing: 0.02em; }
}
@media (max-width: 380px) {
  .brand span { display: none; }
  /* The panel at 55%. */
  .f-panel::before { border-width: 56px 69px 90px 40px; }
  .f-panel::after { inset: 37px 39px 25px 18px; }
  .parchment { padding: 54px 52px 44px 36px; font-size: 16px; }
  .news { padding: 52px 52px 42px 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
