:root {
  color-scheme: dark;
  --bg: #101621;
  --layer: #161e2b;
  --panel: #1d2838;
  --edge: #3b495d;
  --ink: #f5eddf;
  --muted: #bdc8d6;
  --gold: #eed3a0;
  --gold-hover: #f8e2b9;
  --gold-ink: #211908;
  --display: Georgia, 'Times New Roman', serif;
  --body: 'Segoe UI', system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 5.5vw, 88px);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.6 var(--body); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold-hover); outline-offset: 5px; }
::selection { background: var(--gold); color: var(--gold-ink); }

.wrap { width: min(var(--wrap), calc(100% - var(--gutter) * 2)); margin-inline: auto; min-width: 0; }
.skip-link { position: absolute; inset: 12px auto auto 12px; z-index: 10; background: var(--gold); color: var(--gold-ink); padding: 9px 16px; border-radius: 6px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.site-header { position: relative; z-index: 2; border-bottom: 1px solid #b7c9e022; }
.landing .site-header { position: absolute; inset: 0 0 auto; background: linear-gradient(#111823e8, #11182335); }
.header-row, .footer-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.header-row { min-height: 76px; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; min-height: 44px; font: 700 1.38rem/1 var(--display); }
.brand img { border-radius: 8px; }
.header-row nav { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 36px); }
.header-row nav a, .footer-row > a:last-child { display: inline-flex; align-items: center; min-height: 44px; position: relative; color: var(--muted); font-size: .94rem; }
.header-row nav a::after, .footer-row > a:last-child::after { content: ''; position: absolute; bottom: 6px; left: 0; right: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .18s ease; }
.header-row nav a:hover, .header-row nav a[aria-current], .footer-row > a:last-child:hover { color: var(--gold); }
.header-row nav a:hover::after, .header-row nav a[aria-current]::after, .footer-row > a:last-child:hover::after { transform: scaleX(1); }

.hero { min-height: 100svh; position: relative; isolation: isolate; overflow: hidden; background: #101722; }
.hero-art, .hero::after { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.hero-art { left: 30%; overflow: hidden; }
.hero-art img { width: 100%; height: 110%; object-fit: cover; object-position: 56% 27%; }
.hero::after { content: ''; background: linear-gradient(90deg, #101722 6%, #101722fa 24%, #101722e3 38%, #10172252 65%, #1017220a), linear-gradient(0deg, #101722 0%, transparent 46%); }
.hero-layout { position: relative; min-height: inherit; display: grid; align-items: center; padding-block: 125px 108px; }
.hero-copy { max-width: 650px; }
[data-enter] .hero-copy, [data-enter].stats-intro { animation: arrive .65s cubic-bezier(.2,.55,.2,1) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: var(--gold); font-size: .82rem; font-weight: 650; }
.diamond { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; background: var(--gold); transform: rotate(45deg); }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: .98; letter-spacing: -.045em; margin: 0; }
h1 { font-size: clamp(4rem, 9vw, 9rem); }
h2 { font-size: clamp(2.55rem, 5.7vw, 5.5rem); }
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.52vw, 1.32rem); max-width: 440px; margin: 24px 0 30px; }
.hero-platforms { position: absolute; bottom: 30px; left: 0; color: var(--muted); font-size: .9rem; margin: 0; }
.hero-platforms span { margin: 0 6px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 15px; min-height: 50px; padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 650; line-height: 1.25; transition: transform .16s ease, background-color .16s ease, border-color .16s ease; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(1px); }
.button-gold { color: var(--gold-ink); background: var(--gold); }
.button-gold:hover { background: var(--gold-hover); }
.button-quiet { color: var(--ink); border-color: #9fb2cc63; background: #121b2ad9; }
.button-quiet:hover { border-color: var(--gold); background: var(--panel); }

.game-section, .downloads-section { display: grid; align-items: center; min-height: 100svh; padding-block: clamp(58px, 8vw, 102px); }
.game-section { background: var(--layer); }
.downloads-section { background: var(--bg); }
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(24px, 5.5vw, 75px); }
.section-text { margin-bottom: clamp(32px, 4.25vw, 62px); align-items: end; }
.section-text p:not(.eyebrow), .download-layout p:not(.eyebrow,.copy-feedback), .stats-intro > p:not(.eyebrow) { color: var(--muted); }
.section-text p:not(.eyebrow) { margin: 0 0 16px; }
.resources { list-style: none; display: flex; flex-wrap: wrap; gap: 9px 18px; padding: 0; margin: 0; color: var(--muted); font-size: .88rem; }
.resources li { display: inline-flex; align-items: center; gap: 7px; }
.resources li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--resource); }
.strength { --resource: #e98182; }
.agility { --resource: #89ba82; }
.stamina { --resource: #d5a26d; }
.mind { --resource: #83b8f1; }
.resource-heading em { font-style: normal; color: var(--gold); background: linear-gradient(90deg, #eed3a057, #eed3a057) left 93% / 100% 2px no-repeat; }
.game-screen { overflow: hidden; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--panel); box-shadow: 0 24px 48px #060a1250; }
.game-screen img { width: 100%; height: auto; }
.game-section .game-screen { margin-inline: auto; max-width: 1080px; }
.download-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
.download-layout h2 { max-width: 10ch; }
.download-layout > div:first-child > p:not(.eyebrow) { max-width: 34em; margin: 21px 0 23px; }
.download-actions { margin-bottom: 26px; }
.server-address { border-top: 1px solid var(--edge); padding-top: 12px; }
.server-address p { margin: 0 0 4px; font-size: .86rem; }
.address-row { display: flex; align-items: center; gap: 7px 14px; flex-wrap: wrap; }
.address-row code { color: var(--ink); font-size: .88rem; overflow-wrap: anywhere; }
.address-row button { min-height: 44px; border: 0; padding: 3px 4px; background: none; color: var(--gold); }
.address-row button:hover { text-decoration: underline; }
.copy-feedback { color: var(--gold); min-height: 1.4em; }
.site-footer { border-top: 1px solid var(--edge); padding-block: 18px; }

.stats-page { min-height: 100svh; display: flex; flex-direction: column; background: var(--bg); }
.stats-content { flex: 1; padding-block: clamp(46px, 7vw, 98px); }
.stats-intro h1 { font-size: clamp(3rem, 7.6vw, 7.3rem); }
.stats-intro > p:not(.eyebrow) { margin: 18px 0 31px; max-width: 62ch; }
.stats-summary { margin: 0 0 clamp(48px, 7vw, 80px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stats-summary > div { min-width: 0; min-height: 125px; display: flex; flex-direction: column-reverse; justify-content: center; gap: 8px; border-top: 1px solid var(--edge); padding: 10px 15px; background: linear-gradient(180deg, #22304485, #17213166); }
.stats-summary dd { margin: 0; font: 700 clamp(1.7rem, 4.8vw, 3.9rem)/1 var(--display); color: var(--gold); font-variant-numeric: lining-nums tabular-nums; }
.stats-summary dt { font-size: clamp(.77rem, 1.5vw, 1rem); color: var(--muted); line-height: 1.25; }
.player-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.player-heading h2 { font-size: clamp(2.35rem, 4vw, 4rem); }
.player-search { display: grid; gap: 4px; color: var(--muted); font-size: .85rem; }
.player-search input { width: min(100%, 260px); min-height: 44px; border: 1px solid var(--edge); border-radius: 7px; padding: 8px 12px; background: var(--layer); color: var(--ink); }
.data-state { min-height: 95px; display: flex; align-items: center; margin: 0; border-block: 1px solid var(--edge); color: var(--muted); }
.table-frame { width: 100%; overflow: auto; border-block: 1px solid var(--edge); }
.table-frame table { width: 100%; border-collapse: collapse; font-variant-numeric: lining-nums tabular-nums; }
.table-frame th, .table-frame td { text-align: right; padding: 12px clamp(5px, 2vw, 23px); border-bottom: 1px solid #35445a; }
.table-frame thead th { background: var(--layer); color: var(--muted); font-size: .88rem; font-weight: 600; }
.table-frame tbody th { overflow-wrap: anywhere; font-weight: 650; }
.table-frame tbody td:nth-child(3) { color: var(--gold); }
.table-frame tbody tr:last-child > * { border-bottom: 0; }
.table-frame tr > :first-child { text-align: left; padding-left: clamp(8px, 1.4vw, 19px); }
.table-frame tbody tr:hover { background: #24314799; }
.updated { margin: 12px 0 0; color: var(--muted); font-size: .86rem; }

@media (min-width: 821px) {
  .game-section { padding-block: 48px; }
  .game-section .section-text { margin-bottom: 34px; }
  .game-section .game-screen { max-width: min(100%, max(620px, calc(160svh - 570px))); }
}

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .section-text { margin-bottom: 24px; }
  .hero-art { left: 17%; }
  .hero-copy { max-width: 555px; }
  .download-layout h2 { max-width: none; }
}

@media (max-width: 560px) {
  .header-row { min-height: 65px; }
  .header-row nav { gap: 15px; }
  .header-row nav a { font-size: .85rem; }
  .header-row nav .nav-download { display: none; }
  .brand { font-size: 1.15rem; gap: 7px; }
  .brand img { width: 29px; height: 29px; }
  .hero { background: #101722; }
  .hero-art { left: 0; bottom: auto; height: 75%; }
  .hero-art img { height: 115%; object-position: 63% 21%; }
  .hero::after { background: linear-gradient(0deg, #101722 27%, #101722e6 44%, #1017222b 78%, #10172233); }
  .hero-layout { align-items: end; padding-block: 220px 90px; }
  .hero-copy h1 { font-size: clamp(3.45rem, 14vw, 6rem); }
  .lead { margin-block: 16px 21px; }
  .actions { align-items: stretch; }
  .actions > .button { width: 100%; }
  .hero-platforms { bottom: 22px; }
  .player-heading { align-items: stretch; flex-direction: column; }
  .player-search input { width: 100%; }
  .stats-summary > div { padding-inline: 7px; min-height: 84px; }
  .table-frame thead th, .table-frame th, .table-frame td { font-size: .77rem; padding-block: 10px; }
}

@media (max-width: 360px) {
  .header-row { gap: 12px; }
  .header-row nav { gap: 10px; }
  .header-row nav a { white-space: nowrap; }
  .table-frame th, .table-frame td { padding-inline: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0s !important; transition-duration: 0s !important; }
}
