/* Wardieval: el sitio público. Un solo mundo oscuro, tinta y oro, como la intro del juego. */
@font-face { font-family: "Cinzel"; font-weight: 400 900; font-display: swap; src: url(/fuentes/cinzel.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; font-display: swap; src: url(/fuentes/alegreya-sans.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-weight: 700; font-display: swap; src: url(/fuentes/alegreya-sans-bold.woff2) format("woff2"); }
@font-face { font-family: "Alegreya Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fuentes/alegreya-sans-italic.woff2) format("woff2"); }

:root {
  --bg: #14110c;
  --band: #1c1812;
  --panel: #241e16;
  --line: #4a3c25;
  --fg: #efe6d2;
  --dim: #b3a68b;
  --gold: #d9b260;
  --gold-deep: #8a5a14;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 18px; line-height: 1.6; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

/* El idioma: cada texto va en los dos; se muestra el elegido. Sin JavaScript se ven los dos. */
html[data-lang="es"] body [lang="en"], html[data-lang="en"] body [lang="es"] { display: none !important; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 760px; }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 10; background: rgba(20, 17, 12, 0.92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px); padding-top: env(safe-area-inset-top, 0px); }
.top .wrap { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); margin-right: auto; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand span { font-family: var(--display); font-weight: 900; font-size: 20px; letter-spacing: 0.08em; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; align-items: center; }
.nav a { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dim); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }
.langs { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.langs button { font: 700 13px var(--body); letter-spacing: 0.08em; color: var(--dim); background: none; border: 0;
  padding: 6px 10px; cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--gold); color: var(--bg); }

/* Portada */
.hero { position: relative; background: #000; border-bottom: 1px solid var(--line); }
.hero video, .hero img { width: 100%; aspect-ratio: 16 / 9; max-height: 82vh; object-fit: cover; object-position: top; }
.pitch { background: var(--band); border-bottom: 1px solid var(--line); }
.pitch .wrap { padding-block: 40px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.pitch h1 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(30px, 6vw, 52px); line-height: 1.15;
  letter-spacing: 0.04em; text-wrap: balance; text-shadow: 0 2px 0 #000; }
.pitch p { margin: 0; color: var(--dim); max-width: 60ch; text-wrap: pretty; }
.store { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 28px;
  border: 1px solid var(--gold); border-radius: 8px; color: var(--gold); text-decoration: none; }
.store small { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.store strong { font-family: var(--display); font-size: 20px; letter-spacing: 0.06em; }

/* Bloques */
main section.block { padding-block: 56px; border-bottom: 1px solid var(--line); }
main section.block:last-child { border-bottom: 0; }
h2 { margin: 0 0 20px; font-family: var(--display); font-weight: 700; font-size: clamp(22px, 4vw, 30px);
  letter-spacing: 0.05em; color: var(--gold); text-wrap: balance; }
h3 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: 0.04em; text-wrap: balance; }
p { margin: 0; max-width: 68ch; }
.stack { display: flex; flex-direction: column; gap: 14px; }
ul, ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; max-width: 68ch; }
li::marker { color: var(--gold); }
.frame { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #000; }
.frame video, .frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px; }
.feature { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.feature p { color: var(--dim); font-size: 17px; }

/* Noticias */
.news { display: flex; flex-direction: column; gap: 28px; }
.post { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; }
.post time { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }

/* Páginas de texto */
.page { padding-block: 48px 64px; display: flex; flex-direction: column; gap: 36px; }
.page > header { display: flex; flex-direction: column; gap: 8px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.page h1 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(28px, 6vw, 42px); line-height: 1.2;
  text-wrap: balance; }
.page .lead, .page .date { color: var(--dim); }
.page section { display: flex; flex-direction: column; gap: 12px; }
.page section h2 { margin: 0; font-size: 21px; }
.toc { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px 18px; padding: 0; list-style: none; max-width: none; }
.toc a { font-size: 16px; }
.steps { counter-reset: paso; list-style: none; padding: 0; gap: 14px; }
.steps li { counter-increment: paso; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(paso); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold); font-family: var(--display); font-weight: 700; }

/* Correo con botón de copiar */
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mail code { font: 700 18px var(--body); user-select: all; overflow-wrap: anywhere; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--fg); }
.mail button { font: 15px var(--body); color: var(--gold); background: none; border: 1px solid var(--gold); border-radius: 6px;
  padding: 6px 14px; cursor: pointer; }

/* Pie */
.foot { border-top: 1px solid var(--line); background: var(--band); color: var(--dim); font-size: 15px; }
.foot .wrap { padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap;
  gap: 10px 24px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-right: auto; }
.foot a { color: var(--dim); }
.foot a:hover { color: var(--gold); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.g > div { display: flex; flex-direction: column; gap: 12px; }
.g { scroll-margin-top: 120px; }
