/* Layout concept: HUD-style one-pager. Photo hero with left-aligned copy, chamfered corners that echo the logo's bevel,
   a block-grid texture behind the modes, and a single brass accent reserved for actions and labels. Dark by design. */
:root {
  --bg: #0d0f10;
  --bg-rgb: 13, 15, 16;
  --bg-2: #131618;
  --panel: #191d20;
  --panel-2: #20262a;
  --line: #2a3236;
  --fg: #ece9e2;
  --muted: #98a2a7;
  --brass: #e8a53c;
  --brass-hi: #f4bb5a;
  --brass-ink: #150f04;
  --grid: rgba(255, 255, 255, 0.035);
  --f-display: 'Chakra Petch', 'Arial Narrow', 'Segoe UI', sans-serif;
  --f-body: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'Share Tech Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* Language switching: both languages live in the markup, one is hidden. */
:root:not([data-lang]) [data-l="en"],
:root[data-lang="es"] [data-l="en"],
:root[data-lang="en"] [data-l="es"] { display: none; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 10;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Buttons ---------- */
.btn {
  --cut: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border: 0;
  font: 700 0.9375rem/1 var(--f-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--fg); }
.btn-primary { background: var(--brass); color: var(--brass-ink); }
.btn-primary:hover { background: var(--brass-hi); }
.btn-ghost { background: var(--panel-2); color: var(--fg); }
.btn-ghost:hover { background: #2b3338; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-sm { padding: 11px 18px; font-size: 0.8125rem; }
.btn-discord { padding: 10px 14px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: rgba(var(--bg-rgb), 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; height: 64px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font: 700 1.125rem/1 var(--f-display);
  letter-spacing: 0.16em;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; }
.links { display: flex; gap: 26px; margin-left: 36px; }
.links a {
  font: 600 0.8125rem/1 var(--f-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 0;
  transition: color 0.15s;
}
.links a:hover { color: var(--fg); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { display: inline-flex; border: 1px solid var(--line); }
.lang button {
  min-width: 42px;
  padding: 10px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 700 0.75rem/1 var(--f-display);
  letter-spacing: 0.12em;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--brass); color: var(--brass-ink); }
.menu-btn {
  display: none;
  width: 42px; height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  padding: 0;
}
.menu-btn svg { width: 20px; height: 20px; margin: auto; }

@media (max-width: 899px) {
  .menu-btn { display: flex; }
  .links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    margin: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .links.open { display: flex; }
  .links a { padding: 14px 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }
  .links a:first-child { border-top: 0; }
}

/* ---------- Hero ---------- */
.hero-bg, .cta-bg {
  background-image: url("../assets/img/bg.webp");
  background-repeat: no-repeat;
  background-size: cover;
}
.hero { position: relative; overflow: hidden; }
.hero-bg { background-image: url("../assets/img/hero-poster.webp"); position: absolute; inset: 0; background-position: 72% center; animation: settle 1.8s ease-out both; }
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 72% center;
  opacity: 0; transition: opacity 0.8s ease;
}
.hero-video.on { opacity: 1; }
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb), 0.96) 0%, rgba(var(--bg-rgb), 0.84) 38%, rgba(var(--bg-rgb), 0.2) 72%, rgba(var(--bg-rgb), 0.05) 100%),
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.5) 0%, rgba(var(--bg-rgb), 0) 22%, rgba(var(--bg-rgb), 0) 62%, var(--bg) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-top: clamp(56px, 9vw, 112px); }
.hero-copy { max-width: 720px; }
.tag {
  display: inline-flex; align-items: center; gap: 12px;
  font: 400 0.8125rem/1.3 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}
.tag::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--brass); }
.hero h1 { margin: 22px 0 0; width: min(520px, 100%); }
.hero h1 img { width: 100%; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.55)); }
.tagline {
  margin: 26px 0 0;
  font: 600 clamp(1.25rem, 2.6vw, 1.75rem)/1.2 var(--f-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-wrap: balance;
}
.lead { margin: 14px 0 0; max-width: 52ch; color: #c4cacd; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: clamp(40px, 6vw, 64px);
  background: var(--line);
  border-top: 1px solid var(--line);
}
.stat {
  padding: 18px 20px;
  background: rgba(var(--bg-rgb), 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.stat b { display: block; font: 700 1.625rem/1 var(--f-display); letter-spacing: 0.02em; }
.stat span {
  display: block; margin-top: 8px;
  font: 400 0.75rem/1.3 var(--f-body);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}

.rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: var(--d, 0s); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(1.05); } to { transform: scale(1); } }

@media (max-width: 759px) {
  .hero-bg { background-position: 80% center; }
  .hero-video { object-position: 80% center; }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(var(--bg-rgb), 0.72) 0%, rgba(var(--bg-rgb), 0.84) 55%, var(--bg) 100%);
  }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Language loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: rgba(var(--bg-rgb), 0.55);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}
.loader.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.3s ease, visibility 0s; }
.loader-box { display: grid; justify-items: center; gap: 20px; }
.spinner { position: relative; width: 88px; height: 88px; display: grid; place-items: center; }
.spinner::before {
  content: ""; position: absolute; inset: 0;
  border: 3px solid var(--line); border-top-color: var(--brass); border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.spinner img { width: 44px; height: 44px; }
.loader-label { font: 400 0.8125rem/1 var(--f-mono); letter-spacing: 0.2em; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(72px, 10vw, 120px); scroll-margin-top: 64px; }
.sec-alt { background: var(--bg-2); }
.sec-grid {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
}
h2 {
  margin: 16px 0 0;
  font: 700 clamp(2rem, 4.4vw, 3.25rem)/1.05 var(--f-display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
h3 { margin: 0; font: 700 1.1875rem/1.15 var(--f-display); letter-spacing: 0.03em; text-transform: uppercase; }
.sec p { margin: 0; }
.sec-head { max-width: 720px; }
.sec-head p { margin-top: 16px; color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.about-text { display: grid; gap: 18px; margin-top: 24px; max-width: 60ch; color: #c4cacd; }
.callout { position: relative; padding: 32px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.callout::before, .callout::after { content: ""; position: absolute; width: 18px; height: 18px; border: 3px solid var(--brass); }
.callout::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.callout::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.callout .tag { font-size: 0.75rem; }
.callout blockquote { margin: 18px 0 0; font: 600 clamp(1.25rem, 2.2vw, 1.5rem)/1.35 var(--f-display); text-wrap: pretty; }
.callout .sign { margin-top: 20px; color: var(--brass); font: 700 0.9375rem/1.4 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: clamp(48px, 7vw, 72px); }
.pillar { padding-top: 24px; border-top: 1px solid var(--line); min-width: 0; }
.pillar svg { width: 38px; height: 38px; margin-bottom: 18px; }
.pillar p { margin-top: 10px; color: var(--muted); }

/* Modes */
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.mode {
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0;
  padding: 22px 22px 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.mode:hover { border-color: var(--brass); }
.mode .ico { width: 48px; height: 48px; color: var(--brass); }
.mode h3 { margin-top: 8px; }
.mode p { color: var(--muted); font-size: 0.96875rem; }

/* Features */
.feat { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 40px; margin: 48px 0 0; padding: 0; list-style: none; }
.feat li {
  display: flex; align-items: flex-start; gap: 14px;
  min-width: 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.feat li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 0.55em; background: var(--brass); }

/* Play */
.play { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.steps { list-style: none; counter-reset: step; margin: 36px 0 0; padding: 0; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 56px minmax(0, 1fr);
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.steps li::before { content: counter(step); font: 400 2.25rem/1 var(--f-mono); color: var(--brass); }
.steps p { margin-top: 8px; color: var(--muted); max-width: 52ch; }
.steps .actions { margin-top: 18px; }
.spec-title { font: 400 0.8125rem/1.3 var(--f-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
.spec { display: grid; margin: 18px 0 0; }
.spec div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.spec dt { color: var(--muted); white-space: nowrap; }
.spec dd { margin: 0; font: 400 1rem/1.4 var(--f-mono); text-align: right; min-width: 0; }
.spec-note { margin-top: 20px; color: var(--muted); font-size: 0.9375rem; }

/* Closing call */
.cta { position: relative; overflow: hidden; padding-block: clamp(88px, 12vw, 160px); }
.cta-bg { position: absolute; inset: 0; background-position: 84% 58%; transform: scale(1.3); transform-origin: 84% 58%; }
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(var(--bg-rgb), 0.96) 0%, rgba(var(--bg-rgb), 0.82) 48%, rgba(var(--bg-rgb), 0.3) 100%);
}
.cta .wrap { position: relative; z-index: 2; }
.cta h2 { max-width: 14ch; font-size: clamp(2.25rem, 6vw, 4.25rem); }
.cta .actions { margin-top: 34px; }

/* Footer */
.foot { background: var(--bg-2); border-top: 1px solid var(--line); padding-block: 40px; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-links a { font: 600 0.8125rem/1 var(--f-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 6px 0; }
.foot-links a:hover { color: var(--fg); }
.legal { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.5; }

@media (max-width: 999px) {
  .modes { grid-template-columns: repeat(2, 1fr); }
  .feat { grid-template-columns: repeat(2, 1fr); }
  .about, .play { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639px) {
  .modes, .feat, .pillars { grid-template-columns: minmax(0, 1fr); }
  .steps li { grid-template-columns: 44px minmax(0, 1fr); }
  .callout { padding: 24px; }
  .btn { flex: 1 1 100%; }
  .nav .btn { flex: none; }
  .nav .btn-discord { width: 42px; height: 38px; padding: 0; }
  .nav .btn-discord .lbl { display: none; }
}
/* ---------- Back to top ---------- */
.to-top {
  position: fixed; z-index: 30;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: 52px; height: 52px;
  display: grid; place-items: center;
  padding: 0; border: 0;
  background: var(--brass); color: var(--brass-ink);
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s, visibility 0s linear 0.25s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s; }
.to-top:hover { background: var(--brass-hi); }
.to-top:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--fg); }
.to-top svg { width: 24px; height: 24px; }

@media (prefers-reduced-motion: reduce) {
  .to-top { transition: none; transform: none; }
  html { scroll-behavior: auto; }
  .rise, .hero-bg, .spinner::before { animation: none; }
  .hero-video { display: none; }
  .btn, .mode { transition: none; }
}
