/* Layout: white page (or near-black in dark mode), red bands cut at the angle of the Nerion "N"; that slant repeats in buttons,
   tags and list markers. Real launcher screenshots carry the visuals. */
:root {
  /* Color · tema claro (por defecto). El tema oscuro está en html[data-mode="dark"] */
  --bg: #ffffff;               /* fondo base */
  --surface: #f5f5f6;          /* secciones grises y superficies */
  --surface-hover: #ebebee;    /* hover sobre superficies */
  --card: #ffffff;             /* tarjetas */
  --nav-bg: rgba(255, 255, 255, 0.94);
  --red: #CC252A;
  --red-hover: #e03a3f;
  --red-dark: #a51c21;
  --on-accent: #ffffff;        /* texto sobre rojo o sobre imágenes */
  --ink: #16161a;              /* texto principal */
  --ink-2: #55555e;            /* texto secundario */
  --muted: #8a8a93;            /* texto de menor importancia */
  --text-body: #3a3a42;        /* texto largo (artículos y legales) */
  --line: rgba(22, 22, 26, 0.08);
  --tint: #fff5f5;
  --dot: #d6d6db;
  --active-bg: #16161a;        /* filtro y pestaña activos */
  --active-text: #ffffff;
  --part-bg: #16161a;          /* barra de sección en los textos legales */
  --part-text: #ffffff;
  --part-edge: #16161a;
  /* Superficies de la app (oscuras, como el launcher) */
  --app: #0d0d10;
  --app-surface: #141418;
  --app-line: rgba(255, 255, 255, 0.06);
  --success: #22c55e;
  --code-bg: #16161a;          /* caja de comandos */

  /* Tipografía */
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Manrope", "Segoe UI", system-ui, sans-serif;

  /* Forma */
  --slant: 12px;          /* inclinación de botones y etiquetas */
  --cut: 4vw;             /* corte de las bandas rojas */
  --radius: 12px;
  --shadow: 0 30px 60px -30px rgba(22, 22, 26, 0.35);
  --shadow-menu: 0 30px 50px -30px rgba(22, 22, 26, 0.3);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

/* Tema oscuro (paleta Nerion): se activa con el botón de la cabecera */
html[data-mode="dark"] {
  --code-bg: #24242b;
  --tux-outline: rgba(255, 255, 255, 0.55);
  --bg: #0d0d10;
  --surface: #141418;
  --surface-hover: #1a1a1e;
  --card: #1a1a1e;
  --nav-bg: rgba(13, 13, 16, 0.92);
  --ink: #ffffff;
  --ink-2: #a1a1aa;
  --muted: #71717a;
  --text-body: #c4c4cc;
  --line: rgba(255, 255, 255, 0.08);
  --tint: rgba(204, 37, 42, 0.12);
  --dot: #3a3a42;
  --active-bg: var(--red);
  --active-text: #ffffff;
  --part-bg: #141418;
  --part-text: #ffffff;
  --part-edge: var(--red);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-menu: 0 30px 50px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }

/* Barra de desplazamiento de la página */
html { scrollbar-width: thin; scrollbar-color: var(--red) var(--surface); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--red); border: 3px solid var(--surface); }
::-webkit-scrollbar-thumb:hover { background: var(--red-hover); }
::-webkit-scrollbar-thumb:active { background: var(--red-dark); }
::-webkit-scrollbar-corner { background: var(--surface); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
svg { width: 1em; height: 1em; flex: none; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--red); color: var(--on-accent); padding: 8px 14px; }
.skip:focus { left: 16px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Tipos ---------- */
h1, h2 { font-family: var(--f-display); font-style: italic; font-weight: 800; text-transform: uppercase; letter-spacing: -0.005em; }
h1 { font-size: clamp(52px, 6.6vw, 90px); line-height: .92; }
h1 em { font-style: italic; color: var(--red); }
h2 { font-size: clamp(38px, 4.4vw, 60px); line-height: .95; }
h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 34em; }


/* Etiqueta con barra inclinada */
.tag { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.tag::before { content: ""; width: 7px; height: 16px; background: currentColor; transform: skewX(-18deg); }
.tag-light { color: var(--on-accent); }

/* ---------- Botones (paralelogramo) ---------- */
.btn {
  --s: var(--slant);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px calc(22px + var(--s) / 2);
  font-size: 15px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
  clip-path: polygon(var(--s) 0, 100% 0, calc(100% - var(--s)) 100%, 0 100%);
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: var(--on-accent); }
.btn-red:hover { background: var(--red-hover); }
.btn-line { background: var(--surface); color: var(--ink); }
.btn-line:hover { background: var(--surface-hover); }
.btn-sm { padding: 10px calc(18px + var(--s) / 2); font-size: 14px; }
.btn-lg { padding: 16px calc(28px + var(--s) / 2); font-size: 16px; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; gap: 40px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.brand-n { width: 26px; height: 30px; color: var(--red); }
.nav-links { display: flex; gap: 32px; margin-right: auto; align-self: stretch; }
.nav-links > a, .nav-trigger { display: flex; align-items: center; font-size: 15px; font-weight: 600; color: var(--ink-2); transition: color .2s; }
.nav-links > a:hover, .nav-trigger:hover { color: var(--red); }
.nav-links > a.is-active, .nav-trigger.is-active { color: var(--ink); font-weight: 800; box-shadow: inset 0 -3px 0 var(--red); }

/* Menú desplegable "Plataforma" */
.nav-item { display: flex; }
.nav-trigger { gap: 6px; padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
.nav-trigger .chev { width: 12px; height: 12px; transition: transform .2s; }
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-menu);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility 0s .18s;
}
.has-menu:hover .mega, .has-menu:focus-within .mega, .has-menu.open .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s; }
.has-menu:hover .chev, .has-menu.open .chev { transform: rotate(180deg); }
.has-menu:hover .nav-trigger { color: var(--red); }
.mega-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 36px 44px; }
.mega-main, .mega-col { display: grid; align-content: start; }
.mega-title { margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mega-main a { justify-self: start; padding-block: 4px; font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 40px; line-height: 1.05; text-transform: uppercase; color: var(--ink); transition: color .2s, transform .2s; }
.mega-main a:hover { color: var(--red); transform: translateX(6px); }
.mega-col a { justify-self: start; padding-block: 5px; font-size: 15px; font-weight: 700; color: var(--ink); transition: color .2s; }
.mega-col a:hover { color: var(--red); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.btn-lang { min-width: 56px; letter-spacing: .06em; }
.nav-tools-top { display: contents; }
.nav-tools { display: none; }
.btn-theme { padding-inline: calc(14px + var(--s) / 2); border: 0; font: inherit; cursor: pointer; }
/* el icono ocupa lo mismo que una línea de texto de .btn-sm (14px × 1.65) para igualar la altura */
.btn-theme svg { display: block; width: 18px; height: 18px; margin-block: calc((14px * 1.65 - 18px) / 2); }
.btn-theme .i-sun { display: none; }
html[data-mode="dark"] .btn-theme .i-sun { display: block; }
html[data-mode="dark"] .btn-theme .i-moon { display: none; }
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.burger span { width: 18px; height: 2px; background: var(--ink); transition: transform .2s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(56px, 8vw, 104px) clamp(72px, 9vw, 120px); overflow: hidden; }
.hero-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; min-width: 0; }
.hero-copy .actions { margin-top: 8px; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; font-weight: 600; color: var(--muted); }
.platforms span { display: inline-flex; align-items: center; gap: 7px; }
.platforms svg { width: 16px; height: 16px; }
.hero-art { position: relative; min-width: 0; padding: 0 0 32px 32px; }
.slab { position: absolute; left: 0; bottom: 0; width: 82%; height: 84%; background: var(--red); border-radius: 16px; clip-path: polygon(5% 0, 100% 0, 95% 100%, 0 100%); }
.art-panel { position: relative; border-radius: 16px; overflow: hidden; background: var(--app); box-shadow: var(--shadow); }
.art-panel img { width: 100%; }
/* Portada del inicio: render con fondo transparente sobre la placa roja, sin panel oscuro */
.hero-art-render .slab { left: 6%; bottom: 6%; width: 70%; height: 62%; }
.art-render { position: relative; }
.art-render img { width: 100%; transform: scale(1.15); transform-origin: 60% 55%; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.28)); }

/* ---------- Banda roja con corte inclinado ---------- */
.band {
  position: relative; background: var(--red); color: var(--on-accent);
  padding-block: calc(var(--cut) + clamp(48px, 6vw, 72px));
  clip-path: polygon(0 var(--cut), 100% 0, 100% calc(100% - var(--cut)), 0 100%);
}
.band-end { clip-path: polygon(0 var(--cut), 100% 0, 100% 100%, 0 100%); padding-bottom: clamp(72px, 8vw, 104px); }

.head { display: grid; gap: 14px; justify-items: start; margin-bottom: 48px; max-width: 760px; }
.head-wide { max-width: 860px; }
.head-split { max-width: none; grid-template-columns: 1fr minmax(0, 380px); align-items: end; gap: 24px 48px; }
.head-split > div { display: grid; gap: 14px; justify-items: start; }
.head-note { font-size: 16px; color: rgba(255,255,255,.85); }

/* ---------- Juegos ---------- */
.games { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.game { display: grid; gap: 4px; align-content: start; min-width: 0; }
.game img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; margin-bottom: 8px; box-shadow: 0 16px 30px -18px rgba(0,0,0,.6); transition: transform .25s; }
.game:hover img { transform: translateY(-4px); }
.game b { font-size: 15px; font-weight: 700; line-height: 1.3; }
.game span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: rgba(255,255,255,.78); }
.game svg { width: 13px; height: 13px; }

/* ---------- Secciones ---------- */
.sec { padding-block: clamp(80px, 10vw, 128px); }
.sec-grey { background: var(--surface); }

/* Cómo funciona */
.features { display: grid; gap: clamp(64px, 8vw, 104px); }
.feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.feature-flip { grid-template-columns: 1fr 1.3fr; }
.feature-flip .shot { order: 2; }
.shot { border-radius: var(--radius); overflow: hidden; background: var(--app); box-shadow: var(--shadow), 0 0 0 1px var(--line); min-width: 0; }
.feature-copy { display: grid; gap: 14px; min-width: 0; }
.feature-copy h3 { font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 40px; line-height: 1; text-transform: uppercase; }
.feature-copy p { color: var(--ink-2); }

.points { display: grid; gap: 10px; margin-top: 4px; }
.points li { position: relative; padding-left: 24px; font-weight: 600; font-size: 16px; }
.points li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 6px; height: 12px; background: var(--red); transform: skewX(-18deg); }

/* Creadores */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.split-copy { display: grid; gap: 20px; justify-items: start; min-width: 0; }
.split-copy .actions { margin-top: 8px; }
.dash { display: grid; gap: 10px; padding: 20px; border-radius: 16px; background: var(--app); color: var(--on-accent); box-shadow: var(--shadow); min-width: 0; }
.dash-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 10px; background: var(--app-surface); border: 1px solid var(--app-line); }
.dash-row > div { min-width: 0; }
.dash-row b { display: block; font-size: 15px; }
.dash-row em { display: block; font-style: normal; font-size: 12px; color: #8a8a93; }
.dash-row strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.dash-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: #1a1a1e; color: #a1a1aa; }
.dash-ico svg { width: 20px; height: 20px; }
.dash-ico.red { color: var(--red); }
.dash-live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--success); }
.dash-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.dash .btn { margin-top: 6px; }

/* Nosotros */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.pillar { display: grid; gap: 8px; padding-top: 22px; border-top: 1px solid var(--line); position: relative; }
.pillar::before { content: ""; position: absolute; left: 0; top: -2px; width: 48px; height: 3px; background: var(--red); }
.pillar h3 { font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 30px; text-transform: uppercase; line-height: 1; }
.pillar p { color: var(--ink-2); font-size: 16px; }

/* Descarga */
.download { display: grid; justify-items: center; text-align: center; gap: 14px; }
.download h2 { font-size: clamp(48px, 6vw, 80px); }
.download > p { font-size: 18px; color: rgba(255,255,255,.88); }
.dl-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 820px; margin-top: 22px; }
.dl { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: 10px; background: var(--bg); color: var(--ink); text-align: left; transition: transform .2s, box-shadow .2s; min-width: 0; }
.dl:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -16px rgba(0,0,0,.45); }
.dl svg { width: 30px; height: 30px; }
.dl b { display: block; font-size: 17px; font-weight: 800; }
.dl em { display: block; font-style: normal; font-size: 13px; color: var(--ink-2); }

/* Footer */
.footer { padding-block: 48px calc(32px + env(safe-area-inset-bottom, 0px)); }
.foot-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 32px 56px; padding-bottom: 36px; }
.foot-brand { display: grid; gap: 8px; }
.foot-brand p { font-size: 14px; color: var(--muted); }
.foot-cols { display: grid; grid-template-columns: repeat(4, auto); gap: 24px 48px; }
.foot-cols nav { display: grid; gap: 10px; align-content: start; }
.foot-cols h4 { margin: 0 0 4px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.foot-cols a { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.foot-cols a:hover { color: var(--red); }
.foot-legal { padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- Enlaces de sección ---------- */
.link-more { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--red); white-space: nowrap; }
.link-more::after { content: "→"; transition: transform .2s; }
.link-more:hover::after { transform: translateX(4px); }
.band .link-more { color: var(--on-accent); }
.section-foot { margin-top: 40px; }

/* ---------- Noticias ---------- */
.news { padding-block: 0 clamp(80px, 9vw, 112px); }
.news-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.news-head > div { display: grid; gap: 14px; justify-items: start; }
.news-head-compact { justify-content: flex-end; margin-bottom: 20px; }
.feature-news { display: grid; }
.fn-slide { grid-area: 1 / 1; display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 4vw, 56px); align-items: center; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.fn-slide.is-on { opacity: 1; visibility: visible; }
.fn-copy { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.fn-copy h3 { font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: clamp(32px, 3.6vw, 48px); line-height: 1; text-transform: uppercase; }
.fn-copy p { color: var(--ink-2); }
.byline { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 14px; color: var(--muted); }
.byline span + span::before { content: ""; display: inline-block; width: 1px; height: 12px; background: var(--line); margin-right: 12px; vertical-align: -1px; }
.byline .cat { color: var(--red); font-weight: 800; }
.dots { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.dot { width: 10px; height: 10px; padding: 0; border: 0; background: var(--dot); cursor: pointer; transform: skewX(-18deg); transition: width .25s, background .25s; }
.dot.is-on { width: 28px; background: var(--red); }

.thumb { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: var(--app); box-shadow: var(--shadow); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(13,13,16,.85)); }
a:hover > .thumb img, .thumb:hover img { transform: scale(1.04); }
.thumb-label { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 16px; display: grid; justify-items: start; gap: 4px; color: var(--on-accent); font-family: var(--f-display); font-style: italic; font-weight: 800; text-transform: uppercase; line-height: .95; font-size: clamp(26px, 3vw, 40px); }
.thumb-label small { font-size: .5em; padding: 3px 10px 2px; background: var(--red); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.news-grid-wide { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
.news-card { display: grid; gap: 10px; align-content: start; min-width: 0; }
.news-card .thumb { margin-bottom: 6px; }
.news-card .thumb-label { font-size: 26px; left: 16px; bottom: 12px; }
.news-card h3 { font-size: 20px; transition: color .2s; }
.news-card:hover h3 { color: var(--red); }
.news-card[hidden] { display: none; }

/* ---------- Páginas interiores ---------- */
.page-hero { padding-block: clamp(56px, 7vw, 96px) clamp(40px, 5vw, 64px); }
.page-hero .wrap { display: grid; gap: 18px; justify-items: start; }
.page-hero h1 { font-size: clamp(48px, 6vw, 80px); max-width: 15em; }
.page-hero .actions { margin-top: 6px; }
.page-hero-split .wrap { grid-template-columns: 1fr 1fr; align-items: center; gap: 24px 56px; }
.page-hero-split .wrap > div:first-child { display: grid; gap: 18px; justify-items: start; }
.page-hero-split .dash { width: 100%; max-width: 500px; justify-self: end; }
.sec-tight { padding-top: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip { --s: 8px; border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; padding: 9px 20px; background: var(--surface); color: var(--ink-2); clip-path: polygon(var(--s) 0, 100% 0, calc(100% - var(--s)) 100%, 0 100%); transition: background .2s, color .2s; }
.chip:hover { color: var(--ink); background: var(--surface-hover); }
.chip.is-on { background: var(--active-bg); color: var(--active-text); }

.games-light { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.games-light .game span { color: var(--muted); }
.games-light .game[hidden] { display: none; }
.game-cta { display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; aspect-ratio: 16 / 10; border-radius: 8px; border: 2px dashed rgba(204,37,42,.35); color: var(--red); font-weight: 800; padding: 16px; transition: background .2s; }
.game-cta:hover { background: var(--tint); }
.game-cta span { color: var(--ink-2) !important; font-weight: 500; font-size: 14px; }

.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cards4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.card { display: grid; gap: 10px; align-content: start; padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.sec-grey .card { border-color: transparent; }
.card p { color: var(--ink-2); font-size: 16px; }
.card-ico { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; background: var(--red); color: var(--on-accent); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.card-ico svg { width: 22px; height: 22px; }
.band .card { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: var(--on-accent); }
.band .card p { color: rgba(255,255,255,.85); }
.cards-stack { grid-template-columns: 1fr; gap: 12px; }
.cards-stack .card { padding: 20px 24px; gap: 4px; }

.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step { counter-increment: step; display: grid; gap: 8px; align-content: start; padding-top: 20px; border-top: 3px solid var(--red); }
.step::before { content: counter(step); font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 44px; line-height: 1; color: var(--red); }
.step p { color: var(--ink-2); font-size: 16px; }

.contact { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding: 36px 40px; border-radius: var(--radius); background: var(--surface); }
.contact > div { display: grid; gap: 8px; }
.contact code { font-family: inherit; font-weight: 800; color: var(--red); user-select: all; }

/* ---------- Artículo ---------- */
.article { max-width: 760px; margin-inline: auto; }
.article-head { display: grid; gap: 18px; justify-items: start; padding-block: clamp(48px, 6vw, 80px) 32px; }
.article-head h1 { font-size: clamp(44px, 5.4vw, 72px); }
.back { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.back:hover { color: var(--red); }
.article-cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--app); }
.article-body { display: grid; gap: 20px; padding-block: 40px clamp(64px, 8vw, 96px); font-size: 18px; }
.article-body h2 { font-size: 34px; margin-top: 16px; }
.article-body p, .article-body li { color: var(--text-body); }

/* ---------- Legal ---------- */
.legal-hero { padding-bottom: 40px; }
.legal-date { font-size: 15px; color: var(--muted); }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.legal-tabs a { --s: 8px; padding: 9px 20px; font-size: 14px; font-weight: 700; background: var(--surface); color: var(--ink-2); clip-path: polygon(var(--s) 0, 100% 0, calc(100% - var(--s)) 100%, 0 100%); transition: background .2s, color .2s; }
.legal-tabs a:hover { background: var(--surface-hover); color: var(--ink); }
.legal-tabs a.is-on { background: var(--active-bg); color: var(--active-text); }
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; padding-bottom: clamp(64px, 8vw, 104px); }
.toc { position: sticky; top: 96px; display: grid; gap: 0; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: none; }
.toc::-webkit-scrollbar { display: none; }
.toc-title { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin: 0 0 8px; }
.toc-title:not(:first-child) { margin-top: 14px; }
.toc a { padding: 4px 0 4px 12px; border-left: 2px solid var(--line); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--red); border-left-color: var(--red); }
.legal-body { max-width: 720px; display: grid; gap: 16px; font-size: 16px; line-height: 1.7; color: var(--text-body); }
.legal-body h2 { font-size: clamp(28px, 3vw, 36px); color: var(--ink); margin-top: 32px; scroll-margin-top: 96px; }
.legal-body h3 { font-size: 18px; color: var(--ink); margin-top: 12px; }
.legal-body ul { display: grid; gap: 8px; }
.legal-body li { position: relative; padding-left: 22px; }
.legal-body li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 10px; background: var(--red); transform: skewX(-18deg); }
.legal-body b { color: var(--ink); }
.legal-body a { color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.legal-body code { font-size: 14px; padding: 2px 6px; border-radius: 4px; background: var(--surface); color: var(--ink); }
.legal-intro { font-size: 18px; color: var(--ink-2); }
.legal-note { padding: 16px 20px; border-left: 3px solid var(--red); background: var(--tint); border-radius: 0 8px 8px 0; }
.legal-part { margin-top: 40px; padding: 14px 20px; background: var(--part-bg); border-left: 3px solid var(--part-edge); color: var(--part-text); font-weight: 700; font-size: 15px; }
.surfaces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.surfaces a { display: grid; gap: 4px; padding: 18px; border-radius: 10px; background: var(--surface); text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px; line-height: 1.5; transition: background .2s; }
.surfaces a:hover { background: var(--surface-hover); }
.surfaces b { font-size: 16px; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .games { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .games-light, .cards4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fn-slide, .page-hero-split .wrap { grid-template-columns: 1fr; }
  .page-hero-split .dash { justify-self: start; }
  .legal { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; padding: 18px; border-radius: 10px; background: var(--surface); }
  .fn-slide > a { order: -1; }
  .hero-row, .split { grid-template-columns: 1fr; }
  .hero-art { max-width: 620px; }
  .feature, .feature-flip { grid-template-columns: 1fr; }
  .feature-flip .shot { order: 0; }
  .head-split { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .burger { display: inline-flex; }
  .nav-row { gap: 16px; }
  .nav-actions { margin-left: auto; }
  .nav-tools-top { display: none; }
  .nav-links .nav-tools { display: flex; gap: 8px; padding-top: 14px; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links > a, .nav-trigger { padding: 13px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav-item { flex-direction: column; }
  .nav-trigger { width: 100%; justify-content: space-between; text-align: left; }
  .mega { position: static; display: none; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; transition: none; }
  .has-menu.open .mega { display: block; }
  .has-menu:hover .chev { transform: none; }
  .has-menu.open .chev { transform: rotate(180deg); }
  .mega-row { display: block; padding: 4px 0 8px 16px; }
  .mega-main .mega-title, .mega-col { display: none; }
  .mega-main a { padding: 10px 0; font-family: var(--f-body); font-style: normal; font-weight: 600; font-size: 16px; text-transform: none; color: var(--ink-2); }
  .pillars, .dl-row, .news-grid, .cards3, .foot-row { grid-template-columns: 1fr; }
  .nav-links > a.is-active, .nav-trigger.is-active { box-shadow: none; color: var(--red); }
  .pillars { gap: 28px; }
  .dl-row { max-width: 420px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .games, .games-light { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .cards4, .steps { grid-template-columns: 1fr; }
  .contact { padding: 28px 22px; }
  .surfaces { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; width: 100%; }
  .hero-art { padding: 0 0 18px 18px; }
  .actions .btn-lg { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Descarga para Linux: se elige la distro, no el formato ---------- */
button.dl { border: 0; font: inherit; cursor: pointer; }
.dl.js-linux[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--on-accent), 0 18px 30px -16px rgba(0,0,0,.45); }
.linux-dl { grid-column: 1 / -1; min-width: 0; width: 100%; margin-top: 4px; padding: 26px; border-radius: var(--radius); background: var(--bg); color: var(--ink); text-align: left; box-shadow: 0 30px 50px -30px rgba(0,0,0,.5); }
.linux-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.linux-head h3 { font-family: var(--f-display); font-style: italic; font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; }
.linux-head p { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.linux-close { flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: var(--surface); color: var(--ink-2); font-size: 22px; line-height: 1; cursor: pointer; }
.linux-close:hover { background: var(--surface-hover); color: var(--ink); }
.distros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.distro { display: grid; gap: 8px; justify-items: start; padding: 14px 16px; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.distro:hover { border-color: var(--muted); }
.distro[aria-checked="true"] { border-color: var(--red); background: var(--tint); }
.distro-logos { display: flex; gap: 8px; }
.distro-logos svg { width: 24px; height: 24px; }
.distro b { font-size: 15px; font-weight: 800; line-height: 1.3; }
.distro em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.distro-other { border-style: dashed; }
.distro-other b { font-weight: 700; color: var(--ink-2); }
.linux-result { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; justify-items: start; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.linux-result .btn svg { width: 18px; height: 18px; }
.linux-hint { font-size: 14px; color: var(--ink-2); }
.linux-dl [hidden] { display: none !important; }
.cmds { display: grid; gap: 10px; width: 100%; }
.cmd-tabs { display: inline-flex; justify-self: start; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface); }
.cmd-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.cmd-tabs button svg { width: 16px; height: 16px; }
.cmd-tabs button[aria-selected="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.cmd { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 8px 8px 16px; border-radius: 10px; background: var(--code-bg); color: var(--on-accent); }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 14px; scrollbar-width: thin; padding: 4px 0; }
.cmd code::before { content: "$ "; color: rgba(255,255,255,.45); }
.cmd-copy { display: inline-flex; flex: none; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 7px; background: rgba(255,255,255,.1); color: var(--on-accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.cmd-copy:hover { background: rgba(255,255,255,.18); }
.cmd-copy svg { width: 15px; height: 15px; }
.cmd-copy.done { background: var(--success); }
.linux-note { font-size: 13px; color: var(--ink-2); }
.linux-note code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; padding: 1px 5px; border-radius: 4px; background: var(--surface); }
.linux-result > * { max-width: 100%; }
@media (max-width: 900px) {
  /* En una columna, el selector aparece justo debajo de la tarjeta de Linux */
  .dl-row .linux-dl { order: 1; }
  .dl-row a.dl:last-of-type { order: 2; }
}
@media (max-width: 640px) {
  .linux-dl { padding: 18px; }
  .distros { grid-template-columns: 1fr; }
  .linux-result .btn { width: 100%; justify-content: center; }
  .cmd { align-items: flex-start; }
  .cmd code { white-space: normal; overflow-wrap: anywhere; }
}
