/* Palette: near-black ground, brass (seed hue ~105) as the one brand colour,
   and the game's own vida/maná/console colours used only where the game uses them. */
:root {
  --bg: oklch(0.145 0.008 100);
  --bg-deep: oklch(0.11 0.006 100);
  --surface: oklch(0.19 0.012 100);
  --surface-2: oklch(0.235 0.014 100);
  --line: oklch(0.34 0.02 100);
  --ink: oklch(0.94 0.014 100);
  --ink-muted: oklch(0.78 0.018 100);
  --brass: oklch(0.83 0.125 98);
  --brass-hover: oklch(0.89 0.12 98);
  --brass-deep: oklch(0.62 0.1 92);
  --on-brass: oklch(0.16 0.02 95);
  --vida: oklch(0.6 0.19 27);
  --error: oklch(0.76 0.14 30);
  --c-green: oklch(0.84 0.2 142);
  --c-yellow: oklch(0.88 0.16 95);
  --c-cyan: oklch(0.82 0.11 200);
  --c-blue: oklch(0.72 0.14 245);

  --font-display: "Grenze Gotisch", "Alegreya Sans", serif;
  --font-body: "Alegreya Sans", system-ui, sans-serif;
  --font-console: Tahoma, Verdana, "Segoe UI", sans-serif;

  --step--1: 0.9375rem;
  --step-0: 1.125rem;
  --step-1: 1.375rem;
  --step-2: clamp(1.6rem, 1.3rem + 1vw, 2rem);
  --step-3: clamp(2.5rem, 1.9rem + 2.6vw, 4rem);
  --step-4: clamp(3.25rem, 2rem + 5.4vw, 6rem);

  --gutter: clamp(1rem, 0.5rem + 3vw, 3.5rem);
  --max: 72rem;
  /* Side padding that keeps content in a centred --max column on wide screens. */
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2));
  /* Header logo grows with the viewport: ~97px at 1440, ~118px at 1920, capped at 140px (2560+).
     Inner pages use a smaller solid header. Phones: see the 40rem and 26rem rules. */
  --logo-h: clamp(4.25rem, 2rem + 3.2vw, 7rem);
  --logo-solid-h: var(--logo-h);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --z-header: 10;
  --z-skip: 20;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
.shot img, .beta-bg { image-rendering: pixelated; }
.hero-media img { image-rendering: auto; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: var(--z-skip);
  background: var(--brass); color: var(--on-brass); padding: 0.6rem 1rem; font-weight: 700;
}
.skip:focus { top: 0.75rem; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.7rem 1.4rem;
  background: var(--brass); color: var(--on-brass);
  font: 700 var(--step-0)/1.1 var(--font-body);
  text-decoration: none; border: 0; border-radius: 4px; cursor: pointer;
  box-shadow: inset 0 -3px 0 var(--brass-deep);
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:hover { background: var(--brass-hover); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--brass-deep); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
/* Discord not open yet: visible so people see where it will be, clearly inert. */
.btn-soon, .btn-soon:hover {
  background: oklch(0.14 0.01 100 / 0.7); color: var(--ink); box-shadow: inset 0 0 0 1px var(--brass-deep);
  cursor: default; gap: 0.6rem; transform: none;
}
.soon-tag {
  display: inline-block; font: 700 0.6875rem/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.45rem 0.25rem; border-radius: 3px; vertical-align: 0.15em;
  color: var(--on-brass); background: var(--brass-deep);
}
.btn-small { min-height: 2.5rem; padding: 0.45rem 1rem; font-size: var(--step--1); }
.btn-block { width: 100%; }
.text-link {
  color: var(--brass); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 0.2em; font-weight: 500;
}
.text-link:hover { color: var(--brass-hover); text-decoration-thickness: 2px; }
.muted { color: var(--ink-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto; z-index: var(--z-header);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem var(--edge);
}
.wordmark {
  display: block; color: var(--ink); text-decoration: none; line-height: 0;
}
/* The lockup's star emblem eats ~25% of its height, so the banner itself needs a tall box to read. */
.logo { display: block; height: var(--logo-h); width: auto; filter: drop-shadow(0 2px 3px #000); }
.site-header--solid .logo { height: var(--logo-solid-h); }
.logo-footer { height: 4.5rem; margin-bottom: 0.75rem; filter: none; }
.site-header ul { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); list-style: none; margin: 0; padding: 0; }
.site-header nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 500; text-shadow: 0 1px 2px #000;
  padding: 0.5rem 0.1rem;
}
.site-header nav a:not(.btn):hover { color: var(--brass); }
@media (max-width: 52rem) { .nav-optional { display: none; } }
@media (max-width: 40rem) { :root { --logo-h: 4.25rem; --logo-solid-h: 4.25rem; } }
@media (max-width: 26rem) {
  :root { --logo-h: 3.75rem; --logo-solid-h: 3.75rem; }
  .site-header ul { gap: 0.75rem; }
  .site-header .btn-small { padding-inline: 0.7rem; }
}
.site-header--solid {
  position: sticky; top: 0; background: oklch(0.11 0.006 100 / 0.94);
  border-bottom: 1px solid oklch(0.22 0.012 100); padding-block: 0.7rem;
  backdrop-filter: blur(6px);
}
.site-header--solid .wordmark, .site-header--solid nav a:not(.btn) { text-shadow: none; }
.site-header nav a[aria-current="page"] { color: var(--brass); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(100svh, 62rem);
  display: grid; align-content: end;
  padding: 7rem var(--edge) 2rem;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; margin: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 40%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, oklch(0.11 0.006 100 / 0.92) 0%, oklch(0.11 0.006 100 / 0.7) 34%, oklch(0.11 0.006 100 / 0) 62%),
    linear-gradient(0deg, var(--bg) 0%, oklch(0.145 0.008 100 / 0.6) 22%, oklch(0.145 0.008 100 / 0) 48%),
    linear-gradient(180deg, oklch(0.11 0.006 100 / 0.75) 0%, oklch(0.11 0.006 100 / 0) 18%);
}
.hero-media figcaption {
  position: absolute; right: var(--edge); top: calc(var(--logo-h) + 1.75rem);
  font-size: 0.8125rem; color: var(--ink-muted); text-shadow: 0 1px 2px #000;
  max-width: 18rem; text-align: right;
}
.hero-copy { max-width: 36rem; padding-bottom: 1.5rem; }
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--step-4); line-height: 1; letter-spacing: -0.005em;
  text-shadow: 0 3px 0 #000;
}
.lede { margin-top: 1.25rem; font-size: var(--step-1); line-height: 1.5; max-width: 32rem; text-shadow: 0 1px 3px #000; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; }
.hero-actions .text-link { text-shadow: 0 1px 2px #000; }
.status { margin-top: 1.5rem; display: flex; align-items: center; gap: 0.6rem; font-size: var(--step--1); color: var(--ink-muted); }
.status-dot { width: 0.6rem; height: 0.6rem; background: var(--c-green); box-shadow: 0 0 0 3px oklch(0.84 0.2 142 / 0.2); }

/* The game's console: Tahoma with a hard 1px black shadow, exactly how AO printed it. */
.console {
  font-family: var(--font-console); font-size: 0.9375rem; line-height: 1.45;
  text-shadow: 1px 1px 0 #000;
  background: oklch(0.1 0.01 60 / 0.82);
  border: 1px solid oklch(0.38 0.04 70);
  padding: 0.7rem 0.9rem; border-radius: 2px;
}
.console p + p { margin-top: 0.15rem; }
.c-green { color: var(--c-green); }
.c-yellow { color: var(--c-yellow); }
.c-cyan { color: var(--c-cyan); }
.hero-console { max-width: 40rem; }

@media (max-width: 40rem), (max-width: 64rem) and (orientation: portrait) {
  .hero { min-height: 0; padding-top: 0; padding-inline: 0; align-content: start; }
  .hero-media { position: relative; inset: auto; aspect-ratio: 4 / 3; }
  .hero-media img { object-position: 50% 42%; }
  .hero-media::after {
    background:
      linear-gradient(0deg, var(--bg) 0%, oklch(0.145 0.008 100 / 0) 35%),
      linear-gradient(180deg, oklch(0.11 0.006 100 / 0.8) 0%, oklch(0.11 0.006 100 / 0) 25%);
  }
  .hero-media figcaption { display: none; }
  .hero-copy, .hero-console { margin-inline: var(--gutter); }
  .hero-copy { margin-top: -3.5rem; position: relative; }
  .hero-console { font-size: 0.8125rem; }
}
@media (max-width: 40rem) {
  .hero-media { aspect-ratio: 1 / 1; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 3rem + 6vw, 8.5rem) var(--edge); }
.section > * { max-width: var(--max); margin-inline: auto; }
.section h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--step-3); line-height: 1; letter-spacing: 0;
}
.section-lede { margin-top: 1rem; font-size: var(--step-1); line-height: 1.5; color: var(--ink-muted); max-width: 38rem; }

.shot { margin: 0; }
.shot img { width: 100%; border: 1px solid var(--line); border-radius: 3px; background: #000; }
.shot figcaption { margin-top: 0.6rem; font-size: var(--step--1); color: var(--ink-muted); }

/* El juego */
.game-grid {
  display: grid; gap: clamp(2.5rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start;
}
.points { margin-top: 2.75rem; display: grid; gap: 2rem; }
.point h3 { font-size: var(--step-1); font-weight: 700; color: var(--brass); line-height: 1.3; }
.point p { margin-top: 0.35rem; max-width: 34rem; }
.shot-ui { position: sticky; top: 2rem; }
@media (max-width: 60rem) {
  .game-grid { grid-template-columns: 1fr; }
  .shot-ui { position: static; }
}

/* Temporada */
.season { background: var(--bg-deep); border-block: 1px solid oklch(0.22 0.012 100); }
.season-head { display: grid; gap: 0; }
.rates-wrap {
  margin-top: 3rem;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 2rem 4rem; align-items: center;
}
.rates { margin: 0; display: grid; gap: 1.25rem; }
.rate { display: grid; grid-template-columns: 9.5rem 1fr; align-items: center; gap: 1rem; }
.rate dt { font-weight: 700; font-size: var(--step-1); }
.rate dd { margin: 0; display: flex; align-items: center; gap: 1rem; }
.rate-x { font-family: var(--font-display); font-weight: 700; font-size: 3rem; line-height: 0.9; min-width: 3.4ch; color: var(--rate-color); }
.bar { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 1.5rem; padding: 3px; background: #000; border: 1px solid var(--line); border-radius: 2px; }
.bar i { background: var(--rate-color); }
.rate-rec .bar i:nth-child(n + 3),
.rate-oro .bar i:nth-child(n + 2) { background: oklch(0.24 0.01 100); }
.rate-exp { --rate-color: var(--c-yellow); }
.rate-rec { --rate-color: var(--c-green); }
.rate-oro { --rate-color: var(--brass); }
.rates-note { color: var(--ink-muted); max-width: 30rem; }
@media (max-width: 52rem) {
  .rates-wrap { grid-template-columns: 1fr; }
  .rate { grid-template-columns: 7.5rem 1fr; gap: 0.75rem; }
  .rate dt { font-size: 1.125rem; }
  .rate-x { font-size: 2.25rem; }
}

/* Beta */
.beta { position: relative; isolation: isolate; overflow: hidden; }
.beta-bg {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; max-width: none;
  object-fit: cover; opacity: 0.55;
}
.beta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, var(--bg) 0%, oklch(0.145 0.008 100 / 0.85) 45%, oklch(0.145 0.008 100 / 0.55) 100%),
              linear-gradient(0deg, var(--bg) 0%, oklch(0.145 0.008 100 / 0) 30%, oklch(0.145 0.008 100 / 0) 70%, var(--bg) 100%);
}
.beta-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 28rem);
  gap: 2.5rem clamp(2rem, 6vw, 6rem); align-items: start;
}
.beta-text p { margin-top: 1rem; max-width: 30rem; }
@media (max-width: 52rem) {
  .beta-inner { grid-template-columns: 1fr; }
  .beta-bg { opacity: 0.3; }
  .beta::before { background: linear-gradient(180deg, var(--bg) 0%, oklch(0.145 0.008 100 / 0.8) 25%, oklch(0.145 0.008 100 / 0.8) 75%, var(--bg) 100%); }
}

.beta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.soon-note { margin-top: 0.9rem !important; font-size: var(--step--1); }
.promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.promises li {
  background: oklch(0.19 0.012 100 / 0.88); border: 1px solid var(--line); border-left: 3px solid var(--brass);
  border-radius: 4px; padding: 1.1rem 1.25rem;
}
.promises h3 { font-size: var(--step-0); font-weight: 700; color: var(--brass); }
.promises p { margin-top: 0.3rem; color: var(--ink-muted); font-size: 1.0625rem; }

/* Un solo servidor: highlighted point right after the hero */
.one-server { padding: clamp(2.5rem, 2rem + 2vw, 3.5rem) var(--edge) 0; }
.one-server-inner {
  max-width: var(--max); margin-inline: auto;
  display: grid; gap: 0.5rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem) clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: 6px;
}
.eyebrow { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass); }
.one-server h2 { font-size: var(--step-2); font-weight: 700; line-height: 1.25; }
.one-server p:not(.eyebrow) { margin-top: 0.6rem; color: var(--ink-muted); max-width: 48rem; }

/* Qué fue Argentum */
.origin-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 1.5rem clamp(2rem, 6vw, 6rem); align-items: start; }
.origin-text { max-width: 40rem; }
.origin-text .section-lede { margin-top: 0; color: var(--ink); }
.origin-text p + p { margin-top: 1rem; }
.origin-text p:not(.section-lede) { color: var(--ink-muted); }
@media (max-width: 52rem) { .origin-grid { grid-template-columns: 1fr; } }
.origin { padding-bottom: 0; }

/* Wiki band on the landing */
.wiki-band-inner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: start; }
.wiki-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.wiki-links li { border-bottom: 1px solid var(--line); }
.wiki-links a, .wiki-links .is-soon { display: grid; gap: 0.15rem; padding: 0.9rem 0.25rem; text-decoration: none; }
.wiki-links strong { font-size: var(--step-1); font-weight: 700; }
.wiki-links span:not(.soon-tag) { color: var(--ink-muted); font-size: 1.0625rem; }
.wiki-links a strong { color: var(--brass); }
.wiki-links a strong::after { content: " →"; }
.wiki-links a:hover strong { color: var(--brass-hover); }
.wiki-links .is-soon strong { color: var(--ink-muted); }
@media (max-width: 52rem) { .wiki-band-inner { grid-template-columns: 1fr; } }

/* FAQ */
.faq-list { margin-top: 2.5rem; max-width: 50rem; margin-inline: 0; border-top: 1px solid var(--line); }
.faq > .faq-list { margin-inline: auto; margin-left: max(0px, calc((100% - var(--max)) / 2)); }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; padding: 1.25rem 2.5rem 1.25rem 0; position: relative;
  font-size: var(--step-1); font-weight: 700; line-height: 1.35;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 50%; translate: 0 -50%;
  font-family: var(--font-display); font-size: 2rem; color: var(--brass);
  transition: rotate 200ms var(--ease-out);
}
details[open] summary::after { rotate: 45deg; }
summary:hover { color: var(--brass); }
details p { padding: 0 0 1.5rem; max-width: 44rem; color: var(--ink-muted); }

/* Footer */
.site-footer {
  background: var(--bg-deep); border-top: 1px solid oklch(0.22 0.012 100);
  padding: 3.5rem var(--gutter) 2.5rem; font-size: var(--step--1); color: var(--ink-muted);
}
.site-footer > * { max-width: var(--max); margin-inline: auto; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.footer-top p + p { margin-top: 0.35rem; }
.footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }
.credits { margin-top: 2rem; }
.credits-title { font-size: 1rem; font-weight: 700; color: var(--ink); }
.credits ul { margin: 0.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; }
.fine { margin-top: 2rem; font-size: 0.875rem; }

/* ---------- Motion: enhances an already-visible page ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lede, .hero-actions, .hero .status {
    animation: rise 900ms var(--ease-out) both;
  }
  .hero .lede { animation-delay: 120ms; }
  .hero-actions { animation-delay: 220ms; }
  .hero .status { animation-delay: 320ms; }
  /* Console lines arrive one by one, the way the server prints them after login. */
  .hero-console p { animation: line-in 380ms steps(1, end) both; }
  .hero-console p:nth-child(1) { animation-delay: 700ms; }
  .hero-console p:nth-child(2) { animation-delay: 1300ms; }
  .hero-console p:nth-child(3) { animation-delay: 1900ms; }

  /* Rate bars fill segment by segment once the section is on screen (JS adds .armed then .in). */
  .js .rates.armed .bar i { transform: scaleX(0); transform-origin: left; }
  .js .rates.in .bar i { transform: scaleX(1); transition: transform 260ms var(--ease-out); }
  .js .rates.in .bar i:nth-child(2) { transition-delay: 140ms; }
  .js .rates.in .bar i:nth-child(3) { transition-delay: 280ms; }
  .js .rates.in .bar i:nth-child(4) { transition-delay: 420ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes line-in { from { opacity: 0; } to { opacity: 1; } }
