:root {
  color-scheme: dark;
  --background: #141515;
  --surface: #1c1e1c;
  --ink: #f5ecdf;
  --muted: #c9bfb1;
  --accent: #f1bd78;
  --line: #373632;
  --heading: Georgia, 'Times New Roman', serif;
  font-family: system-ui, sans-serif;
  background: var(--background);
  color: var(--ink);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, video:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
h1, h2, h3, p { margin: 0; }
p { color: var(--muted); line-height: 1.65; }
code { color: var(--accent); font-size: .94em; }
.text-link { color: var(--accent); text-underline-offset: .2em; }
.wrap { width: min(100% - 6rem, 1220px); margin-inline: auto; }
.skip { position: fixed; z-index: 10; top: 1rem; left: 1rem; padding: .75rem; background: var(--background); translate: 0 -300%; }
.skip:focus { translate: 0; }

.header { background: #161817; border-bottom: 1px solid #ffffff17; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.header-inner { min-height: 4.6rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font: bold 1.4rem/1 var(--heading); text-decoration: none; }
.brand img { object-fit: contain; }
.header nav { display: flex; gap: clamp(1rem, 3vw, 2.6rem); }
.header nav a, .footer a:not(.brand) { text-decoration: none; color: var(--muted); font-size: .94rem; }
.header nav a:hover, .header nav a[aria-current='page'], .footer a:hover { color: var(--accent); }
.header nav a[aria-current='page'] { text-decoration: underline; text-underline-offset: .4em; }
.button { min-height: 3.2rem; display: inline-flex; align-items: center; justify-content: center; gap: .65rem; padding: .7rem 1.3rem; text-decoration: none; text-align: center; font-weight: 660; line-height: 1.25; border: 1px solid var(--accent); border-radius: .22rem; color: #20160f; background: var(--accent); }
.button:hover { background: #ffcf91; border-color: #ffcf91; }
.button-small { min-height: 2.55rem; font-size: .9rem; padding: .5rem .95rem; }
.button-outline { color: var(--ink); background: #1717176b; border-color: #e8d5b888; }
.button-outline:hover { color: #20160f; }
.play { width: 0; height: 0; border-block: .34rem solid transparent; border-left: .49rem solid currentColor; }

.hero { min-height: min(43rem, 78svh); display: flex; align-items: center; isolation: isolate; position: relative; background: #1f2529 url('assets/world.jpg') center 50% / cover no-repeat; }
.hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #101315e8 0%, #101315cc 29%, #10131533 68%, #10131508 100%), linear-gradient(0deg, #141515 0%, transparent 37%); }
.hero-inner { padding-block: 5rem 6.5rem; }
.eyebrow { display: block; color: var(--accent); font-size: .86rem; font-weight: 680; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--heading); font-weight: 600; }
.hero h1 { font-size: clamp(4.3rem, 10.8vw, 9.25rem); line-height: .97; letter-spacing: -.07em; margin: .8rem 0 1.2rem; }
.hero p { max-width: 31rem; font-size: clamp(1.08rem, 1.7vw, 1.3rem); color: #f5eade; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.9rem; }

.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); scroll-margin-top: 1rem; }
.section h2 { font-size: clamp(2.35rem, 5.5vw, 4.5rem); line-height: 1.03; letter-spacing: -.045em; }
.section .eyebrow + h2 { margin-top: .65rem; }
.section h2 + p { margin-top: 1rem; }
.world-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1rem; margin-top: 1.65rem; }
.world-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: .35rem; overflow: hidden; }
.world-card img { width: 100%; aspect-ratio: 1.55; object-fit: cover; }
.world-card > div { padding: 1.25rem 1.25rem 1.55rem; }
.world-card .text-link { display: inline-block; margin-top: .8rem; }
.world-card h3, .steps h3 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); line-height: 1.12; margin-bottom: .45rem; }
.trailer-section { border-block: 1px solid var(--line); background: #1d1a18; }
.trailer-layout { display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: clamp(1.5rem, 6vw, 5.25rem); }
.trailer-layout video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid #6a5440; border-radius: .35rem; background: #0b0b0b; }
.join { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(1.5rem, 7vw, 6rem); }
.join-intro .button { margin-top: 1.4rem; }
.steps { list-style: none; counter-reset: steps; padding: 0; margin: 0; }
.steps li { counter-increment: steps; display: grid; grid-template-columns: 2.8rem 1fr; gap: 1rem; padding: 1rem 0 1.25rem; border-top: 1px solid var(--line); }
.steps li::before { content: counter(steps); display: grid; place-items: center; width: 2.55rem; height: 2.55rem; border: 1px solid #81674d; border-radius: 50%; color: var(--accent); }
.steps a { color: var(--accent); text-underline-offset: .2em; }
.faq { border-top: 1px solid var(--line); background: var(--surface); }
.faq-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(1.75rem, 6vw, 5.25rem); }
.questions { border-top: 1px solid var(--line); }
.questions details { border-bottom: 1px solid var(--line); }
.questions summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding-block: 1.15rem; font-weight: 620; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: '+'; color: var(--accent); font-weight: 400; font-size: 1.35rem; line-height: 1; }
.questions details[open] summary::after { content: '−'; }
.questions p { padding-bottom: 1.2rem; }
.footer { border-top: 1px solid var(--line); padding-block: 1.65rem; }
.footer p { font-size: .94rem; }

.portal-page { min-height: 100svh; display: flex; flex-direction: column; background: linear-gradient(110deg, #141515 12%, #141515e8 52%, #141515b8), url('assets/world.jpg') center top / cover fixed; }
.portal-page .footer { margin-top: auto; background: var(--background); }
.portal-layout { flex: 1; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(1.75rem, 7vw, 6.5rem); padding-block: clamp(3rem, 10vw, 8rem); }
.portal-intro h1 { font-size: clamp(2.9rem, 7vw, 6.4rem); line-height: .99; letter-spacing: -.06em; margin-bottom: 1rem; }
.portal-intro p { font-size: clamp(1.05rem, 1.7vw, 1.25rem); max-width: 31rem; }
.portal-card { min-width: 0; padding: clamp(1.35rem, 4vw, 2.55rem); border: 1px solid #6a5440; border-radius: .35rem; background: #1d1d1bea; }
.portal-card h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.12; }
.portal-card h2 + p { margin-top: .75rem; }
.portal-card .button { margin-top: 1rem; }
.portal-card button { cursor: pointer; }
.portal-card button:disabled { cursor: wait; opacity: .65; }
.portal-card input { display: block; width: 100%; min-height: 3.1rem; margin: .38rem 0 1rem; padding: .55rem .75rem; border: 1px solid #746957; border-radius: .22rem; background: #141515; color: var(--ink); font: inherit; }
.portal-card label { display: block; }
.portal-card form { margin-top: 1.15rem; }
.portal-card form .button { width: 100%; margin-top: .2rem; }
.portal-aux { display: inline-block; margin-top: 1.1rem; color: var(--accent); text-underline-offset: .2em; }
.profile-fields { margin: 1rem 0 .4rem; }
.profile-fields > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1.25rem; padding-block: .65rem; border-bottom: 1px solid var(--line); }
.profile-fields dt { color: var(--muted); }
.profile-fields dd { margin: 0; }
#account-state:empty { display: none; }

.guide-hero { padding-block: clamp(3rem, 8vw, 6.5rem); background: linear-gradient(90deg, #141515f5 15%, #141515a6 72%, #14151570), url('assets/trade.jpg') center / cover; border-bottom: 1px solid var(--line); }
.guide-hero h1 { font-size: clamp(2.65rem, 7vw, 6rem); line-height: 1; letter-spacing: -.05em; }
.guide-hero p { margin-top: 1rem; max-width: 39rem; color: var(--ink); font-size: 1.12rem; }
.guide-nav { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.6rem; }
.guide-nav a { padding: .5rem .85rem; border: 1px solid #9a8063; border-radius: .22rem; background: #171817eb; text-decoration: none; }
.guide-nav a:hover { color: var(--accent); border-color: var(--accent); }
.guide-content { padding-block: clamp(1.65rem, 5vw, 4rem); }
.guide-section { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1rem, 5vw, 4rem); padding-block: clamp(1.6rem, 4vw, 3rem); scroll-margin-top: .75rem; }
.guide-section + .guide-section { border-top: 1px solid var(--line); }
.guide-section h2 { font-size: clamp(1.95rem, 4vw, 3.2rem); line-height: 1.06; margin-bottom: .65rem; }
.guide-commands { margin: 0; }
.guide-commands > div { display: grid; grid-template-columns: minmax(9.25rem, .45fr) 1fr; gap: .4rem .8rem; border-bottom: 1px solid var(--line); padding-block: .62rem; }
.guide-commands > div:first-child { padding-top: .12rem; }
.guide-commands dd { margin: 0; color: var(--muted); line-height: 1.45; }
.guide-instructions { padding-left: 1.3rem; margin: 0; color: var(--muted); line-height: 1.6; }
.guide-instructions li + li { margin-top: .5rem; }
.guide-instructions kbd { color: var(--accent); border: 1px solid #746957; border-radius: .2rem; padding: 0 .28rem; }

.donate-hero { background: linear-gradient(90deg, #141515f5 15%, #141515ad 72%, #14151578), url('assets/world.jpg') center / cover; border-bottom: 1px solid var(--line); }
.ranks > p { max-width: 55rem; }
.rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.rank-card { display: flex; flex-direction: column; padding: clamp(1.2rem, 3.2vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--rank-color); border-radius: .35rem; }
.rank-vip { --rank-color: #9cce9d; }
.rank-silver { --rank-color: #d3d9d9; }
.rank-gold { --rank-color: #f1bd78; }
.rank-diamond { --rank-color: #8ed3dc; }
.rank-card h3 { color: var(--rank-color); font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .4rem; }
.rank-card > p { flex: 1; }
.rank-kit { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.rank-kit h4 { margin: 0 0 .5rem; font-size: 1.1rem; }
.kit-command { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; }
.rank-kit ul, .starter-items { padding-left: 1.25rem; margin: .65rem 0 0; color: var(--muted); line-height: 1.6; }
.rank-kit li + li, .starter-items li + li { margin-top: .25rem; }
.starter-section { border-top: 1px solid var(--line); background: var(--surface); }
.starter-section .guide-section { padding-block: 0; align-items: center; }
.starter-items { margin: 0; }

@media (max-width: 850px) {
  .wrap { width: calc(100% - 3rem); }
  .header-inner { flex-wrap: wrap; gap: .65rem 1.1rem; padding-block: .65rem; }
  .header nav { order: 1; width: 100%; }
  .hero { min-height: 34rem; }
  .world-grid { grid-template-columns: 1fr 1fr; }
  .world-main { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .world-main img { height: 100%; }
  .trailer-layout { grid-template-columns: 1fr; }
  .portal-layout { grid-template-columns: 1fr; }
  .guide-section { grid-template-columns: 1fr; }
}

@media (max-width: 590px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { min-height: 4rem; gap: .65rem; }
  .header nav { gap: .5rem 1.25rem; flex-wrap: wrap; }
  .header nav a:not(.portal-link) { display: none; }
  .hero { min-height: 33rem; background-position: 67% center; }
  .hero::before { background: linear-gradient(0deg, #141515 0%, #101315c9 33%, #10131526 100%), linear-gradient(90deg, #10131580, transparent); }
  .hero-inner { padding-block: 9.5rem 3.5rem; }
  .world-grid, .world-main, .join, .faq-layout { grid-template-columns: 1fr; }
  .world-main img { height: auto; }
  .world-card img { aspect-ratio: 1.8; }
  .footer-inner { justify-content: flex-start; flex-wrap: wrap; }
  .footer p { order: 1; width: 100%; }
  .guide-commands > div { grid-template-columns: 1fr; }
  .rank-grid { grid-template-columns: 1fr; }
}

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