/*
  Isekai: Demon King
  Static, dependency-free website styles.
*/

:root {
  color-scheme: dark;
  --ink: #070708;
  --ink-soft: #0d0d10;
  --panel: #121216;
  --panel-raised: #18181d;
  --paper: #f1ede3;
  --muted: #a09b91;
  --faint: #68645e;
  --line: rgba(241, 237, 227, 0.12);
  --line-strong: rgba(213, 184, 116, 0.35);
  --gold: #d5b874;
  --gold-bright: #f0d797;
  --gold-dark: #745f32;
  --red: #7d101d;
  --red-bright: #c52a39;
  --display: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --header-height: 86px;
  --content: min(1280px, calc(100vw - 96px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

html[lang="zh-Hans"] {
  --display: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--gold-dark) var(--ink);
  scrollbar-width: thin;
  overflow-x: clip;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(125, 16, 29, 0.08), transparent 26rem),
    var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  color: var(--ink);
  background: var(--gold);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

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

p,
h1,
h2,
h3,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 3.5vw;
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(7, 7, 8, 0.92), rgba(7, 7, 8, 0));
  transition:
    min-height 300ms ease,
    background 300ms ease,
    border-color 300ms ease,
    backdrop-filter 300ms ease;
}

.site-header.is-scrolled,
.site-header.is-compact {
  min-height: 70px;
  border-color: var(--line);
  background: rgba(7, 7, 8, 0.88);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: max-content;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--gold-dark);
  transform: rotate(45deg);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span::before,
.brand-mark span::after {
  position: absolute;
  width: 4px;
  height: 4px;
  border: 1px solid var(--gold);
  content: "";
}

.brand-mark::before {
  top: -3px;
  left: -3px;
}

.brand-mark::after {
  right: -3px;
  bottom: -3px;
}

.brand-mark span {
  display: block;
  width: 11px;
  height: 11px;
  border: 1px solid var(--red-bright);
}

.brand-mark span::before {
  top: -3px;
  right: -3px;
}

.brand-mark span::after {
  bottom: -3px;
  left: -3px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-kicker {
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.66rem;
  letter-spacing: 0.5em;
}

.brand-name {
  margin-top: 5px;
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 2.6vw, 42px);
}

.main-nav a {
  position: relative;
  padding: 28px 0 26px;
  color: #c6c1b7;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.main-nav a::after {
  position: absolute;
  right: 50%;
  bottom: 19px;
  left: 50%;
  height: 1px;
  background: var(--gold);
  content: "";
  transition: right 240ms var(--ease), left 240ms var(--ease);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--gold-bright);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  right: 0;
  left: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.language-button {
  min-width: 27px;
  padding: 5px 2px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: color 180ms ease;
}

.language-button-wide {
  width: max-content;
  min-width: max-content;
}

.language-button:hover,
.language-button.is-active {
  color: var(--gold-bright);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 12px 9px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  margin: 6px 0;
  background: var(--paper);
  transition: transform 240ms ease;
}

.menu-open .menu-toggle span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.menu-open .menu-toggle span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  min-height: max(720px, 100svh);
  padding: calc(var(--header-height) + 70px) max(8vw, 42px) 110px;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  position: absolute;
  z-index: -4;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 7, 8, 0.98) 0%, rgba(7, 7, 8, 0.76) 42%, rgba(7, 7, 8, 0.38) 74%, rgba(7, 7, 8, 0.8) 100%),
    repeating-linear-gradient(90deg, transparent 0, transparent calc(12.5% - 1px), rgba(255, 255, 255, 0.025) 12.5%);
  content: "";
}

.hero::after {
  position: absolute;
  z-index: -3;
  right: 7%;
  bottom: -9%;
  width: min(58vw, 820px);
  aspect-ratio: 0.9;
  background:
    linear-gradient(130deg, transparent 20%, rgba(197, 42, 57, 0.1) 44%, transparent 46%),
    radial-gradient(ellipse at 50% 50%, rgba(213, 184, 116, 0.12), transparent 54%);
  clip-path: polygon(46% 0, 60% 8%, 72% 28%, 93% 43%, 86% 77%, 68% 100%, 28% 100%, 9% 75%, 18% 42%, 34% 25%);
  content: "";
  filter: blur(1px);
}

.hero-atmosphere {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
}

.hero-orbit {
  position: absolute;
  right: 9%;
  top: 50%;
  width: min(54vw, 740px);
  aspect-ratio: 1;
  border: 1px solid rgba(213, 184, 116, 0.15);
  border-radius: 50%;
  transform: translateY(-44%);
}

.hero-orbit::before,
.hero-orbit::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(213, 184, 116, 0.09);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.hero-orbit::before {
  width: 75%;
  height: 75%;
}

.hero-orbit::after {
  width: 45%;
  height: 45%;
}

.orbit-one {
  animation: orbit-pulse 8s ease-in-out infinite alternate;
}

.orbit-two {
  right: 15%;
  width: min(43vw, 590px);
  border-style: dashed;
  transform: translateY(-44%) rotate(28deg);
  opacity: 0.6;
  animation: orbit-rotate 60s linear infinite;
}

.hero-sigil {
  position: absolute;
  right: 27%;
  top: 49%;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(197, 42, 57, 0.35);
  transform: translate(50%, -50%) rotate(45deg);
}

.hero-sigil::before,
.hero-sigil::after {
  position: absolute;
  border: 1px solid rgba(213, 184, 116, 0.22);
  content: "";
  inset: 17px;
}

.hero-sigil::after {
  inset: 47px;
  background: rgba(125, 16, 29, 0.12);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, var(--ink) 100%);
}

.hero-content {
  align-self: center;
  width: min(700px, 67vw);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 32px;
  height: 1px;
  background: var(--gold);
  content: "";
}

.hero-title {
  margin-bottom: 22px;
  font-family: var(--display);
  font-size: clamp(4rem, 8.8vw, 8.6rem);
  letter-spacing: -0.055em;
  line-height: 0.76;
  text-transform: uppercase;
}

.hero-title span {
  display: block;
  color: var(--paper);
  font-size: 0.48em;
  font-weight: 400;
  letter-spacing: 0.55em;
  line-height: 1.25;
}

.hero-title strong {
  display: block;
  margin-top: 8px;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold-bright);
  text-shadow: 0 0 80px rgba(213, 184, 116, 0.1);
}

.hero-tagline {
  margin-bottom: 18px;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-style: italic;
}

.hero-intro {
  max-width: 590px;
  margin-bottom: 34px;
  color: #b9b4aa;
  font-size: 1.02rem;
  line-height: 1.8;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-row.centered {
  justify-content: center;
}

.store-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 184px;
  min-height: 60px;
  padding: 9px 18px;
  border: 1px solid rgba(213, 184, 116, 0.38);
  background: rgba(17, 17, 20, 0.75);
  box-shadow: inset 0 0 24px rgba(213, 184, 116, 0.03);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.store-button:not(.is-disabled) {
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms var(--ease);
}

.store-button:not(.is-disabled):hover {
  border-color: var(--gold);
  background: rgba(213, 184, 116, 0.08);
  transform: translateY(-2px);
}

.store-button.is-disabled {
  cursor: not-allowed;
}

.store-button.is-disabled:hover {
  border-color: rgba(213, 184, 116, 0.55);
}

.store-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--gold-dark);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: var(--display);
  font-weight: 700;
}

.play-icon {
  padding-left: 2px;
  font-size: 0.65rem;
}

.store-icon-image {
  width: 19px;
  height: 19px;
}

.store-button > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-button small {
  margin-bottom: 3px;
  color: var(--gold);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.store-button b {
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

.hero-aside {
  position: absolute;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  display: flex;
  width: 74px;
  align-items: center;
  justify-content: space-between;
  padding: 36px 0;
  border-left: 1px solid var(--line);
  flex-direction: column;
}

.vertical-label {
  color: var(--faint);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  writing-mode: vertical-rl;
}

.hero-counter {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-family: var(--display);
  font-size: 0.58rem;
  transform: rotate(90deg);
}

.hero-counter i {
  width: 35px;
  height: 1px;
  background: var(--gold-dark);
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: max(8vw, 42px);
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--faint);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-cue i {
  position: relative;
  width: 62px;
  height: 1px;
  background: var(--gold-dark);
  overflow: hidden;
}

.scroll-cue i::after {
  position: absolute;
  width: 30px;
  height: 1px;
  background: var(--gold-bright);
  content: "";
  animation: scroll-line 2.4s ease-in-out infinite;
}

/* Shared sections */

.section {
  position: relative;
  width: var(--content);
  margin: 0 auto;
  padding: 140px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(0, 1.45fr);
  gap: 5vw;
  margin-bottom: 80px;
}

.section-heading > div {
  max-width: 800px;
}

.section-index {
  margin-bottom: 22px;
  color: var(--faint);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-index::after {
  display: block;
  width: 64px;
  height: 1px;
  margin-top: 17px;
  background: var(--gold-dark);
  content: "";
}

.section h2,
.final-cta h2 {
  margin-bottom: 24px;
  font-family: var(--display);
  font-size: clamp(2.6rem, 5.4vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.99;
}

.section h3 {
  margin-bottom: 12px;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 400;
}

.section p {
  color: var(--muted);
}

.section .lead {
  color: #d1ccc2;
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.45;
}

/* Heroes */

.heroes-section {
  padding-top: 170px;
}

.heroes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.75fr);
  gap: clamp(60px, 9vw, 140px);
  align-items: center;
}

.hero-blueprint {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 49.85%, var(--line) 50%, transparent 50.15%),
    linear-gradient(transparent 49.85%, var(--line) 50%, transparent 50.15%),
    radial-gradient(circle, rgba(213, 184, 116, 0.07), transparent 50%);
  overflow: hidden;
}

.hero-blueprint::before,
.hero-blueprint::after {
  position: absolute;
  width: 70px;
  height: 70px;
  content: "";
}

.hero-blueprint::before {
  top: 16px;
  left: 16px;
  border-top: 1px solid var(--gold-dark);
  border-left: 1px solid var(--gold-dark);
}

.hero-blueprint::after {
  right: 16px;
  bottom: 16px;
  border-right: 1px solid var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
}

.blueprint-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 250px;
  height: 250px;
  place-items: center;
  border: 1px solid rgba(213, 184, 116, 0.28);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.blueprint-core {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid var(--red-bright);
  color: var(--gold-bright);
  font-family: var(--display);
  font-size: 2.2rem;
  transform: rotate(45deg);
}

.blueprint-core::first-letter {
  transform: rotate(-45deg);
}

.blueprint-rings i {
  position: absolute;
  inset: -38px;
  border: 1px dashed rgba(213, 184, 116, 0.14);
  border-radius: 50%;
}

.blueprint-rings .ring-b {
  inset: -95px;
  border-style: solid;
  opacity: 0.5;
}

.blueprint-rings .ring-c {
  inset: 32px;
  border-color: rgba(197, 42, 57, 0.25);
  border-style: solid;
}

.blueprint-label {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.blueprint-label b {
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.75rem;
}

.label-level {
  top: 16%;
  left: 8%;
}

.label-skill {
  top: 23%;
  right: 8%;
}

.label-lineage {
  bottom: 21%;
  left: 8%;
}

.label-legacy {
  right: 8%;
  bottom: 14%;
}

.heroes-copy > p:not(.lead) {
  margin-bottom: 34px;
}

.potential-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stars {
  padding-top: 2px;
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.potential-note strong,
.potential-note span {
  display: block;
}

.potential-note strong {
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: 1.1rem;
}

.potential-note span {
  color: var(--muted);
  font-size: 0.86rem;
}

/* Death */

.death-section {
  width: 100%;
  padding: 70px max(3vw, 20px);
}

.death-card {
  position: relative;
  display: grid;
  grid-template-columns: 0.35fr minmax(0, 1.1fr) 0.55fr;
  gap: 5vw;
  width: min(1440px, 100%);
  min-height: 500px;
  margin: 0 auto;
  padding: clamp(54px, 7vw, 100px);
  align-items: center;
  border: 1px solid rgba(197, 42, 57, 0.24);
  background:
    linear-gradient(115deg, rgba(125, 16, 29, 0.18), transparent 35%),
    repeating-linear-gradient(135deg, transparent 0, transparent 16px, rgba(255, 255, 255, 0.01) 16px, rgba(255, 255, 255, 0.01) 17px),
    #0d0b0d;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.death-card::before {
  position: absolute;
  top: 0;
  left: 29%;
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, rgba(197, 42, 57, 0.3), transparent);
  content: "";
  transform: skewX(-18deg);
}

.death-number {
  color: transparent;
  font-family: var(--display);
  font-size: clamp(7rem, 15vw, 14rem);
  line-height: 1;
  -webkit-text-stroke: 1px rgba(197, 42, 57, 0.36);
}

.death-copy {
  position: relative;
  z-index: 1;
}

.death-copy h2 {
  color: #f3e8e4;
}

.death-copy .lead {
  max-width: 720px;
}

.death-seal {
  position: relative;
  display: grid;
  width: min(220px, 100%);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(197, 42, 57, 0.45);
  border-radius: 50%;
  color: rgba(197, 42, 57, 0.76);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.35em;
  text-align: center;
}

.death-seal::before,
.death-seal::after {
  position: absolute;
  border: 1px solid rgba(197, 42, 57, 0.23);
  border-radius: 50%;
  content: "";
  inset: 14px;
}

.death-seal::after {
  border-style: dashed;
  inset: 37px;
}

.death-seal i {
  position: absolute;
  width: 75%;
  height: 1px;
  background: rgba(197, 42, 57, 0.45);
  transform: rotate(-45deg);
}

/* Legacy */

.legacy-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(50px, 9vw, 140px);
  align-items: center;
}

.legacy-story > p {
  max-width: 650px;
}

.legacy-steps {
  display: flex;
  align-items: center;
  margin-top: 55px;
}

.legacy-steps span {
  display: flex;
  min-width: 66px;
  align-items: center;
  flex-direction: column;
}

.legacy-steps b {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 8px;
  place-items: center;
  border: 1px solid var(--gold-dark);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.72rem;
}

.legacy-steps small {
  color: var(--faint);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legacy-steps i {
  width: 100%;
  height: 1px;
  margin-top: -19px;
  background: linear-gradient(90deg, var(--gold-dark), rgba(116, 95, 50, 0.16));
}

.legacy-quote {
  position: relative;
  margin-bottom: 0;
  padding: 80px 48px 52px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 50% 5%, rgba(213, 184, 116, 0.08), transparent 50%),
    var(--ink-soft);
  box-shadow: var(--shadow);
}

.legacy-quote::before,
.legacy-quote::after {
  position: absolute;
  width: 30px;
  height: 30px;
  content: "";
}

.legacy-quote::before {
  top: 10px;
  left: 10px;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
}

.legacy-quote::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.quote-mark {
  position: absolute;
  top: 5px;
  left: 43px;
  color: rgba(213, 184, 116, 0.25);
  font-family: Georgia, serif;
  font-size: 6rem;
  line-height: 1;
}

.legacy-quote p {
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(1.65rem, 3vw, 2.75rem);
  font-style: italic;
  line-height: 1.3;
}

.legacy-quote footer {
  color: var(--gold);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

/* Combat */

.combat-section {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 6vw;
  width: 100%;
  max-width: none;
  padding: 150px max(6vw, 36px);
  background:
    linear-gradient(90deg, #0f0f12, rgba(15, 15, 18, 0.6)),
    var(--ink-soft);
}

.combat-intro {
  align-self: center;
  max-width: 590px;
}

.combat-board {
  position: relative;
  min-height: 520px;
  padding: 55px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(213, 184, 116, 0.12) 50%, transparent 50.1%),
    linear-gradient(transparent 49.9%, rgba(213, 184, 116, 0.12) 50%, transparent 50.1%),
    repeating-linear-gradient(90deg, transparent 0, transparent calc(16.666% - 1px), rgba(255, 255, 255, 0.03) 16.666%),
    repeating-linear-gradient(0deg, transparent 0, transparent calc(20% - 1px), rgba(255, 255, 255, 0.03) 20%);
  box-shadow: var(--shadow);
}

.board-grid {
  position: relative;
  height: 350px;
}

.unit,
.enemy {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 65px;
  height: 65px;
  place-items: center;
  border-radius: 50%;
  transform: rotate(45deg);
}

.unit {
  border: 1px solid var(--gold);
  background: rgba(213, 184, 116, 0.08);
  box-shadow: 0 0 25px rgba(213, 184, 116, 0.08);
}

.enemy {
  border: 1px solid var(--red-bright);
  background: rgba(125, 16, 29, 0.18);
  box-shadow: 0 0 25px rgba(197, 42, 57, 0.12);
}

.unit i,
.enemy i {
  font-family: var(--display);
  font-size: 0.72rem;
  font-style: normal;
  transform: rotate(-45deg);
}

.unit-a {
  top: 28px;
  left: 16%;
}

.unit-b {
  top: 145px;
  left: 31%;
}

.unit-c {
  bottom: 10px;
  left: 12%;
}

.enemy-a {
  top: 75px;
  right: 15%;
}

.enemy-b {
  right: 32%;
  bottom: 38px;
}

.path-line {
  position: absolute;
  top: 48%;
  left: 28%;
  width: 46%;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dark), var(--red));
  transform: rotate(-8deg);
}

.path-line::after {
  position: absolute;
  right: 0;
  width: 8px;
  height: 8px;
  border-top: 1px solid var(--red-bright);
  border-right: 1px solid var(--red-bright);
  content: "";
  transform: translateY(-4px) rotate(45deg);
}

.combat-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.combat-stats span {
  display: flex;
  padding: 20px 18px 0;
  align-items: center;
  justify-content: space-between;
  border-right: 1px solid var(--line);
}

.combat-stats span:first-child {
  padding-left: 0;
}

.combat-stats span:last-child {
  border-right: 0;
}

.combat-stats small {
  color: var(--faint);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.combat-stats b {
  color: var(--gold);
  font-family: var(--display);
  font-weight: 400;
}

.mode-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mode-grid article {
  padding: 38px clamp(20px, 3vw, 50px);
  border-right: 1px solid var(--line);
}

.mode-grid article:last-child {
  border-right: 0;
}

.mode-grid article > span {
  display: block;
  margin-bottom: 32px;
  color: var(--gold-dark);
  font-family: var(--display);
  font-size: 0.7rem;
}

.mode-grid p {
  margin-bottom: 0;
  font-size: 0.88rem;
}

/* Sanctuary */

.sanctuary-section .section-heading > div p:last-child {
  max-width: 700px;
}

.sanctuary-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-auto-rows: minmax(220px, auto);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.sanctuary-grid article {
  position: relative;
  padding: 36px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(18, 18, 22, 0.54);
  transition: background 260ms ease, transform 260ms var(--ease);
  overflow: hidden;
}

.sanctuary-grid article:hover {
  z-index: 1;
  background: var(--panel-raised);
  transform: translateY(-4px);
}

.sanctuary-feature {
  grid-row: span 2;
  min-height: 440px;
  background:
    radial-gradient(circle at 50% 42%, rgba(125, 16, 29, 0.2), transparent 38%),
    rgba(18, 18, 22, 0.54) !important;
}

.sanctuary-feature h3 {
  position: absolute;
  bottom: 65px;
  left: 36px;
}

.sanctuary-feature p {
  position: absolute;
  right: 36px;
  bottom: 23px;
  left: 36px;
}

.feature-sigil {
  display: grid;
  width: 150px;
  height: 150px;
  margin: 54px auto 0;
  place-items: center;
  border: 1px solid rgba(213, 184, 116, 0.35);
  color: rgba(213, 184, 116, 0.76);
  font-family: var(--display);
  font-size: 3rem;
  transform: rotate(45deg);
}

.feature-sigil::before {
  position: absolute;
  border: 1px dashed rgba(213, 184, 116, 0.15);
  content: "";
  inset: -24px;
}

.card-number {
  color: var(--gold-dark);
  font-family: var(--display);
  font-size: 0.68rem;
}

.sanctuary-grid h3 {
  margin-top: 38px;
}

.sanctuary-grid p {
  margin-bottom: 0;
  font-size: 0.85rem;
}

/* Dungeon */

.dungeon-section {
  width: 100%;
  max-width: none;
  min-height: 860px;
  padding: 160px max(8vw, 44px);
  background:
    linear-gradient(to bottom, var(--ink) 0, transparent 18%, transparent 82%, var(--ink) 100%),
    radial-gradient(ellipse at 25% 50%, rgba(125, 16, 29, 0.18), transparent 43%),
    #0a090b;
  overflow: hidden;
}

.dungeon-backdrop {
  position: absolute;
  top: 50%;
  right: -4vw;
  color: transparent;
  font-family: var(--display);
  font-size: min(39vw, 620px);
  font-weight: 700;
  line-height: 0.8;
  opacity: 0.28;
  pointer-events: none;
  transform: translateY(-50%);
  -webkit-text-stroke: 1px rgba(197, 42, 57, 0.22);
}

.dungeon-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(500px, 1.2fr);
  gap: 8vw;
  align-items: center;
}

.dungeon-copy {
  max-width: 620px;
}

.loot-warning {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  margin-top: 38px;
  padding: 22px;
  border: 1px solid rgba(197, 42, 57, 0.26);
  background: rgba(125, 16, 29, 0.08);
}

.loot-warning > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--red-bright);
  border-radius: 50%;
  color: var(--red-bright);
  font-family: var(--display);
}

.loot-warning p {
  margin: 0;
  font-size: 0.85rem;
}

.floor-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(9, auto);
  align-items: center;
}

.floor-track div {
  position: relative;
  display: flex;
  min-width: 82px;
  align-items: center;
  flex-direction: column;
}

.floor-track div::before {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid var(--gold-dark);
  border-radius: 50%;
  color: var(--gold-dark);
  content: "◆";
  font-size: 0.5rem;
}

.floor-track b {
  color: var(--paper);
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 400;
}

.floor-track span {
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.floor-track i {
  width: clamp(20px, 4vw, 75px);
  height: 1px;
  margin-top: -50px;
  background: linear-gradient(90deg, var(--gold-dark), rgba(116, 95, 50, 0.18));
}

.floor-track .final-floor::before {
  width: 74px;
  height: 74px;
  margin-bottom: 5px;
  border-color: var(--red-bright);
  color: var(--red-bright);
  box-shadow: 0 0 35px rgba(197, 42, 57, 0.18);
}

.floor-track .final-floor b {
  color: var(--gold-bright);
}

/* Gallery */

.gallery-section {
  padding-bottom: 180px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.gallery-card {
  position: relative;
  min-height: clamp(300px, 35vw, 480px);
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: zoom-in;
  text-align: left;
  overflow: hidden;
}

.gallery-card.gallery-wide {
  grid-column: span 2;
  min-height: clamp(360px, 45vw, 600px);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 450ms ease, transform 700ms var(--ease);
}

.gallery-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 7, 8, 0.92), transparent 46%);
  content: "";
  pointer-events: none;
}

.gallery-card > span {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: 26px;
  left: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gallery-card small {
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.7rem;
}

.gallery-card b {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 400;
}

.gallery-card:hover img {
  filter: brightness(1.1) saturate(1.1);
  transform: scale(1.025);
}

.gallery-dialog {
  width: min(1120px, calc(100vw - 40px));
  max-width: none;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--ink-soft);
  color: var(--paper);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8);
}

.gallery-dialog::backdrop {
  background: rgba(0, 0, 0, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.gallery-dialog img {
  width: 100%;
  max-height: 72vh;
  object-fit: cover;
}

.gallery-dialog > div {
  display: flex;
  padding: 22px 28px 26px;
  align-items: center;
  justify-content: space-between;
}

.gallery-dialog > div span {
  color: var(--gold);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gallery-dialog h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 400;
}

.dialog-close {
  position: absolute;
  z-index: 4;
  top: 14px;
  right: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(7, 7, 8, 0.8);
  color: var(--paper);
  cursor: pointer;
  font-size: 1.5rem;
}

/* Final CTA and footer */

.final-cta {
  position: relative;
  display: grid;
  min-height: 720px;
  padding: 120px 30px;
  place-items: center;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, rgba(125, 16, 29, 0.16), transparent 30%),
    linear-gradient(to bottom, var(--ink), #0e0c0e);
  overflow: hidden;
}

.final-cta-content {
  position: relative;
  z-index: 2;
  max-width: 980px;
  text-align: center;
}

.final-cta .eyebrow {
  justify-content: center;
}

.final-cta h2 {
  font-size: clamp(3rem, 7vw, 7rem);
}

.final-cta-content > p:not(.eyebrow) {
  margin-bottom: 32px;
  color: var(--muted);
}

.cta-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(65vw, 800px);
  aspect-ratio: 1;
  border: 1px solid rgba(213, 184, 116, 0.1);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cta-rings i {
  position: absolute;
  border: 1px solid rgba(213, 184, 116, 0.08);
  border-radius: 50%;
  inset: 10%;
}

.cta-rings i:nth-child(2) {
  border-color: rgba(197, 42, 57, 0.16);
  inset: 27%;
}

.cta-rings i:nth-child(3) {
  border-style: dashed;
  inset: -15%;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 35px;
  padding: 58px 4vw;
  align-items: center;
  border-top: 1px solid var(--line);
  background: #060607;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 17px;
}

.footer-brand .brand-mark {
  width: 28px;
  height: 28px;
}

.footer-brand > div {
  display: flex;
  flex-direction: column;
}

.footer-brand strong {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.footer-brand small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.68rem;
}

.site-footer nav {
  display: flex;
  gap: 28px;
}

.site-footer nav a {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.site-footer nav a:hover,
.site-footer nav a[aria-current="page"] {
  color: var(--gold);
}

.footer-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  color: var(--faint);
  font-size: 0.65rem;
}

.footer-meta a:hover {
  color: var(--gold);
}

/* Legal and support pages */

.legal-page {
  background:
    linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgba(255, 255, 255, 0.017) 10%, transparent calc(10% + 1px)),
    var(--ink);
}

.legal-page .site-header {
  grid-template-columns: 1fr auto 1fr;
}

.legal-main {
  width: var(--content);
  margin: 0 auto;
  padding: 150px 0 130px;
}

.legal-hero {
  position: relative;
  max-width: 970px;
  padding: 80px 0 100px;
}

.legal-hero::after {
  position: absolute;
  right: -20vw;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dark), var(--line), transparent);
  content: "";
}

.legal-hero h1 {
  margin-bottom: 28px;
  font-family: var(--display);
  font-size: clamp(3.8rem, 9vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.legal-summary {
  max-width: 780px;
  margin-bottom: 20px;
  color: #c2bdb3;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.55;
}

.updated {
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-dates {
  display: flex;
  gap: 10px 28px;
  flex-wrap: wrap;
}

.legal-dates .updated {
  margin-bottom: 0;
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  gap: clamp(70px, 11vw, 170px);
  justify-content: center;
  padding-top: 100px;
}

.legal-toc {
  position: sticky;
  top: 105px;
  display: flex;
  height: max-content;
  padding-left: 22px;
  border-left: 1px solid var(--line);
  flex-direction: column;
  max-height: calc(100svh - 130px);
  overflow-y: auto;
}

.legal-toc > span {
  margin-bottom: 20px;
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.legal-toc a {
  margin: 6px 0;
  color: var(--faint);
  font-size: 0.73rem;
  transition: color 180ms ease, transform 180ms ease;
}

.legal-toc a:hover {
  color: var(--paper);
  transform: translateX(4px);
}

.legal-content section {
  position: relative;
  padding: 0 0 68px 68px;
  scroll-margin-top: 100px;
}

.legal-content section + section {
  padding-top: 68px;
  border-top: 1px solid var(--line);
}

.legal-number {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--gold-dark);
  font-family: var(--display);
  font-size: 0.7rem;
}

.legal-content section + section .legal-number {
  top: 68px;
}

.legal-content h2,
.support-start h2,
.faq-section h2,
.support-cta h2 {
  margin-bottom: 22px;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 400;
  line-height: 1.12;
}

.legal-subsection {
  margin: 38px 0;
}

.legal-subsection h3 {
  margin-bottom: 14px;
  color: #d4cfc4;
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 1.35;
}

.legal-ai-note {
  padding: 28px;
  border: 1px solid rgba(213, 184, 116, 0.2);
  background: rgba(213, 184, 116, 0.025);
}

.legal-content p,
.legal-content li {
  color: var(--muted);
}

.legal-content strong {
  color: #cbc6bb;
}

.legal-content ul {
  margin: 26px 0;
  padding: 0;
  list-style: none;
}

.legal-content li {
  position: relative;
  margin: 14px 0;
  padding-left: 24px;
}

.legal-content li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold-dark);
  content: "";
  transform: rotate(45deg);
}

.legal-highlight,
.contact-panel {
  margin: 20px 0 68px;
  padding: 52px 52px 52px 112px !important;
  border: 1px solid var(--line-strong) !important;
  background: rgba(213, 184, 116, 0.035);
}

.legal-highlight .legal-number,
.contact-panel .legal-number {
  top: 55px !important;
  left: 52px;
}

.contact-panel {
  margin-bottom: 0;
  background:
    radial-gradient(circle at 100% 0, rgba(125, 16, 29, 0.12), transparent 45%),
    var(--ink-soft);
}

.text-link {
  display: inline-block;
  border-bottom: 1px solid var(--gold-dark);
  color: var(--gold-bright);
  font-family: var(--display);
  font-size: 1.08rem;
  transition: border-color 180ms ease;
}

.text-link:hover {
  border-color: var(--gold-bright);
}

.provider-links,
.public-links {
  display: flex;
  gap: 9px 20px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.provider-links a,
.public-links a {
  border-bottom: 1px solid var(--gold-dark);
  color: var(--gold-bright);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

/* Support */

.support-hero {
  max-width: 1040px;
}

.primary-link {
  display: inline-flex;
  min-height: 54px;
  margin-top: 16px;
  padding: 0 22px;
  align-items: center;
  gap: 40px;
  justify-content: space-between;
  border: 1px solid var(--gold-dark);
  background: rgba(213, 184, 116, 0.04);
  color: var(--gold-bright);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 220ms ease, border-color 220ms ease;
}

.primary-link:hover {
  border-color: var(--gold);
  background: rgba(213, 184, 116, 0.09);
}

.primary-link i {
  font-size: 1.2rem;
  font-style: normal;
}

.support-start {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 8vw;
  padding: 100px 0;
  border-bottom: 1px solid var(--line);
}

.info-checklist {
  padding: 45px;
  border: 1px solid var(--line);
  background: var(--ink-soft);
}

.info-checklist > p {
  color: #ccc7bd;
}

.info-checklist ul {
  margin: 25px 0 35px;
  padding: 0;
  list-style: none;
  counter-reset: support-items;
}

.info-checklist li {
  position: relative;
  margin: 15px 0;
  padding: 0 0 15px 42px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  counter-increment: support-items;
}

.info-checklist li::before {
  position: absolute;
  top: 2px;
  left: 0;
  color: var(--gold-dark);
  content: "0" counter(support-items);
  font-family: var(--display);
  font-size: 0.7rem;
}

.security-note {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(197, 42, 57, 0.24);
  background: rgba(125, 16, 29, 0.09);
}

.security-note > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--red-bright);
  border-radius: 50%;
  color: var(--red-bright);
}

.security-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.81rem;
}

.security-note strong {
  color: #ddb8b7;
}

.faq-section {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 8vw;
  padding: 120px 0;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: grid;
  grid-template-columns: 42px 1fr 24px;
  gap: 18px;
  padding: 28px 0;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary > span {
  color: var(--gold-dark);
  font-family: var(--display);
  font-size: 0.65rem;
}

.faq-list summary b {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 400;
}

.faq-list summary i {
  position: relative;
  width: 20px;
  height: 20px;
}

.faq-list summary i::before,
.faq-list summary i::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1px;
  background: var(--gold);
  content: "";
  transform: translate(-50%, -50%);
  transition: transform 200ms ease;
}

.faq-list summary i::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-list details[open] summary i::after {
  transform: translate(-50%, -50%) rotate(0);
}

.faq-list details > div {
  padding: 0 42px 30px 60px;
}

.faq-list details p {
  margin: 0;
  color: var(--muted);
}

.support-links {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 8vw;
  padding: 85px 0;
  border-top: 1px solid var(--line);
}

.support-links h2 {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 400;
  line-height: 1.12;
}

.support-links > div:last-child {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.support-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 70px;
  padding: 75px;
  align-items: center;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 0 100%, rgba(125, 16, 29, 0.15), transparent 40%),
    var(--ink-soft);
}

.support-cta p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

/* Reveal animation */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes orbit-pulse {
  from { opacity: 0.5; transform: translateY(-44%) scale(0.97); }
  to { opacity: 1; transform: translateY(-44%) scale(1.03); }
}

@keyframes orbit-rotate {
  from { transform: translateY(-44%) rotate(0deg); }
  to { transform: translateY(-44%) rotate(360deg); }
}

@keyframes scroll-line {
  0% { transform: translateX(-35px); }
  55%, 100% { transform: translateX(70px); }
}

/* Responsive */

@media (max-width: 1120px) {
  :root {
    --content: min(100% - 64px, 1120px);
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    display: flex;
    width: min(440px, 88vw);
    height: 100svh;
    padding: 120px 54px 60px;
    align-items: flex-start;
    justify-content: flex-start;
    background: rgba(9, 9, 11, 0.98);
    box-shadow: -30px 0 80px rgba(0, 0, 0, 0.45);
    flex-direction: column;
    pointer-events: none;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 400ms var(--ease), visibility 400ms;
  }

  .menu-open .main-nav {
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
  }

  .main-nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--display);
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    text-transform: none;
  }

  .main-nav a::after {
    display: none;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .menu-toggle {
    display: block;
  }

  .hero-aside {
    display: none;
  }

  .combat-section {
    grid-template-columns: 1fr;
  }

  .combat-intro {
    max-width: 800px;
  }

  .dungeon-content {
    grid-template-columns: 1fr;
  }

  .floor-track {
    max-width: 800px;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .footer-meta {
    grid-column: 1 / -1;
    align-items: flex-start;
  }

  .support-cta {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 72px;
    --content: calc(100% - 40px);
  }

  .site-header {
    min-height: 72px;
    padding: 0 20px;
  }

  .brand-copy {
    display: none;
  }

  .hero {
    min-height: max(680px, 100svh);
    padding: 130px 25px 100px;
  }

  .hero-content {
    width: 100%;
  }

  .hero-title {
    font-size: clamp(3.6rem, 16vw, 6.2rem);
  }

  .hero-title span {
    letter-spacing: 0.4em;
  }

  .hero::after {
    right: -25%;
    width: 100vw;
    opacity: 0.65;
  }

  .hero-orbit {
    right: -30%;
    width: 90vw;
  }

  .hero-sigil {
    right: 24%;
    opacity: 0.55;
  }

  .scroll-cue {
    bottom: 25px;
    left: 25px;
  }

  .section {
    padding: 100px 0;
  }

  .section-heading,
  .heroes-layout,
  .legacy-grid,
  .support-start,
  .faq-section,
  .support-links {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 25px;
    margin-bottom: 50px;
  }

  .heroes-layout {
    gap: 50px;
  }

  .hero-blueprint {
    min-height: 430px;
  }

  .death-card {
    grid-template-columns: 0.35fr 1fr;
    padding: 50px 34px;
  }

  .death-number {
    align-self: start;
  }

  .death-seal {
    display: none;
  }

  .legacy-grid {
    gap: 60px;
  }

  .legacy-steps {
    overflow-x: auto;
  }

  .combat-section {
    padding: 100px 20px;
  }

  .combat-board {
    min-height: 450px;
    padding: 35px;
  }

  .board-grid {
    height: 310px;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode-grid article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mode-grid article:last-child {
    border-bottom: 0;
  }

  .sanctuary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sanctuary-feature {
    grid-column: span 2;
    grid-row: auto;
  }

  .dungeon-section {
    padding: 120px 25px;
  }

  .floor-track {
    grid-template-columns: 1fr;
    gap: 0;
    justify-items: start;
    padding-left: 40px;
  }

  .floor-track div {
    display: grid;
    grid-template-columns: 80px 1fr;
    min-height: 90px;
    align-items: center;
    justify-items: start;
    flex-direction: initial;
  }

  .floor-track div::before {
    position: absolute;
    left: -40px;
    width: 34px;
    height: 34px;
    margin: 0;
  }

  .floor-track span {
    margin: 0;
    text-align: left;
  }

  .floor-track i {
    width: 1px;
    height: 55px;
    margin: -24px 0 -11px -23px;
    background: linear-gradient(var(--gold-dark), rgba(116, 95, 50, 0.18));
  }

  .floor-track .final-floor::before {
    left: -47px;
    width: 48px;
    height: 48px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card.gallery-wide {
    grid-column: auto;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    flex-wrap: wrap;
  }

  .legal-main {
    padding-top: 110px;
  }

  .legal-hero {
    padding: 60px 0 75px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 60px;
    padding-top: 70px;
  }

  .legal-toc {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-height: none;
    overflow-y: visible;
  }

  .legal-toc > span {
    grid-column: 1 / -1;
  }

  .support-start,
  .faq-section,
  .support-links {
    gap: 50px;
  }

  .support-cta {
    padding: 48px 34px;
  }
}

@media (max-width: 540px) {
  :root {
    --content: calc(100% - 30px);
  }

  .header-actions {
    gap: 8px;
  }

  .language-switcher {
    gap: 3px;
    font-size: 0.58rem;
    letter-spacing: 0.07em;
  }

  .language-button {
    min-width: 23px;
    padding-right: 1px;
    padding-left: 1px;
  }

  .language-button-wide {
    min-width: max-content;
  }

  .hero {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero .eyebrow {
    font-size: 0.58rem;
    letter-spacing: 0.16em;
  }

  .hero-title {
    font-size: clamp(3.15rem, 18vw, 5rem);
  }

  .hero-title span {
    letter-spacing: 0.26em;
  }

  .hero-tagline {
    font-size: 1.2rem;
  }

  .hero-intro {
    font-size: 0.9rem;
  }

  .store-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .store-button {
    min-width: 0;
    min-height: 57px;
    padding: 8px 11px;
  }

  .store-icon {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
  }

  .store-button b {
    font-size: 0.75rem;
  }

  .store-button small {
    font-size: 0.48rem;
  }

  .scroll-cue span {
    display: none;
  }

  .section h2,
  .final-cta h2 {
    font-size: clamp(2.35rem, 13vw, 3.6rem);
  }

  .hero-blueprint {
    min-height: 370px;
  }

  .blueprint-rings {
    width: 170px;
    height: 170px;
  }

  .blueprint-rings .ring-b {
    inset: -63px;
  }

  .blueprint-core {
    width: 70px;
    height: 70px;
  }

  .blueprint-label {
    font-size: 0.45rem;
  }

  .potential-note {
    grid-template-columns: 1fr;
  }

  .death-card {
    display: block;
    padding: 45px 24px;
  }

  .death-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 7rem;
    opacity: 0.6;
  }

  .legacy-quote {
    padding: 70px 28px 40px;
  }

  .combat-board {
    min-height: 390px;
    padding: 22px;
  }

  .board-grid {
    height: 270px;
  }

  .unit,
  .enemy {
    width: 48px;
    height: 48px;
  }

  .combat-stats span {
    padding: 15px 8px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .sanctuary-grid {
    grid-template-columns: 1fr;
  }

  .sanctuary-feature {
    grid-column: auto;
  }

  .sanctuary-grid article {
    min-height: 190px;
    padding: 28px;
  }

  .sanctuary-feature {
    min-height: 390px !important;
  }

  .gallery-card,
  .gallery-card.gallery-wide {
    min-height: 280px;
  }

  .gallery-dialog > div {
    align-items: flex-start;
    gap: 5px;
    flex-direction: column;
  }

  .final-cta {
    min-height: 650px;
    padding-right: 15px;
    padding-left: 15px;
  }

  .footer-brand small {
    max-width: 260px;
  }

  .legal-hero h1 {
    font-size: clamp(3.15rem, 17vw, 5.2rem);
  }

  .legal-toc {
    grid-template-columns: 1fr;
  }

  .legal-toc > span {
    grid-column: auto;
  }

  .legal-content section {
    padding: 0 0 52px 34px;
  }

  .legal-content section + section {
    padding-top: 52px;
  }

  .legal-content section + section .legal-number {
    top: 55px;
  }

  .legal-highlight,
  .contact-panel {
    padding: 82px 25px 35px !important;
  }

  .legal-highlight .legal-number,
  .contact-panel .legal-number {
    top: 35px !important;
    left: 25px;
  }

  .legal-ai-note {
    padding: 20px;
  }

  .provider-links,
  .public-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .info-checklist {
    padding: 28px 20px;
  }

  .faq-list summary {
    grid-template-columns: 28px 1fr 22px;
    gap: 10px;
  }

  .faq-list details > div {
    padding: 0 15px 26px 38px;
  }

  .support-cta {
    padding: 38px 22px;
  }

  .support-cta .primary-link {
    gap: 12px;
    padding: 0 14px;
    font-size: 0.55rem;
    letter-spacing: 0.05em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
