/* =========================================================================
   IGK Emulator — web de venta y documentación
   Tema propio: negro cálido con ámbar y brasa. Oscuro por defecto,
   claro con el botón de la luna (se recuerda en localStorage).
   ========================================================================= */

:root {
    --bg: #0b0c10;
    --bg-2: #0f1116;
    --surface: #14161d;
    --surface-2: #1a1d26;
    --surface-3: #21252f;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .15);
    --text: #eceae6;
    --text-2: #b9bbc2;
    --muted: #8b8f99;
    --gold: #ffb547;
    --ember: #ff6a3d;
    --grad: linear-gradient(135deg, #ffc35a 0%, #ff8a3d 50%, #ff4f3a 100%);
    --grad-soft: linear-gradient(135deg, rgba(255, 195, 90, .16), rgba(255, 79, 58, .10));
    --ok: #3ddc97;
    --bad: #ff7272;
    --info: #7fb0ff;
    --code-bg: #0e1015;
    --code-text: #e6e1d6;
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, .75);
    --ring: 0 0 0 3px rgba(255, 181, 71, .35);
    --radius: 14px;
    --radius-sm: 9px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-head: 'Sora', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    --topbar-h: 64px;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #faf8f4;
    --bg-2: #f3efe8;
    --surface: #ffffff;
    --surface-2: #f6f2ec;
    --surface-3: #ece6dc;
    --line: rgba(30, 22, 10, .10);
    --line-2: rgba(30, 22, 10, .2);
    --text: #18150f;
    --text-2: #45413a;
    --muted: #6f695f;
    --gold: #b86a00;
    --ember: #d2421c;
    --grad-soft: linear-gradient(135deg, rgba(255, 170, 60, .18), rgba(255, 90, 50, .10));
    --ok: #13915c;
    --bad: #c93434;
    --info: #2f68c9;
    --code-bg: #f4f0e8;
    --code-text: #2a241a;
    --shadow: 0 24px 50px -28px rgba(60, 40, 10, .35);
    color-scheme: light;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.65 var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--font-mono); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ic { width: 1.15em; height: 1.15em; flex: none; }

/* ── Botones y pastillas ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .78em 1.3em; border-radius: 999px; border: 1px solid transparent;
    font: 600 .95rem/1 var(--font); cursor: pointer; white-space: nowrap;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #1a0e05; box-shadow: 0 10px 30px -12px rgba(255, 106, 61, .7); }
.btn-primary:hover { box-shadow: 0 14px 36px -10px rgba(255, 106, 61, .85); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-soft { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-sm { padding: .55em 1em; font-size: .875rem; }
.btn-lg { padding: 1em 1.6em; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.pill {
    display: inline-flex; align-items: center; gap: .4em; padding: .3em .75em; border-radius: 999px;
    font: 600 .75rem/1.2 var(--font); letter-spacing: .02em;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
}
.pill-ver { background: var(--grad-soft); border-color: rgba(255, 181, 71, .35); color: var(--gold); }
.pill-ok { color: var(--ok); }
.icon-btn {
    display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
    background: transparent; border: 1px solid var(--line); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { color: var(--gold); border-color: var(--line-2); }

/* ── Barra superior ───────────────────────────────────────────────────────── */
.topbar {
    position: sticky; top: 0; z-index: 50; height: var(--topbar-h);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-in { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; filter: drop-shadow(0 4px 12px rgba(255, 106, 61, .45)); }
.brand-text { font: 600 1.05rem/1 var(--font-head); letter-spacing: -.01em; }
.brand-text b { font-weight: 800; }
.mainnav { display: flex; gap: 4px; margin-left: 8px; }
.mainnav a { color: var(--text-2); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .93rem; }
.mainnav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.mainnav a.on { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--gold); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 96px 0 72px; }
.hero-bg { position: absolute; inset: 0; z-index: -2; background: url('../img/loading_02.webp') center 30% / cover no-repeat; transform: scale(1.04); }
.hero::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 38%, color-mix(in srgb, var(--bg) 35%, transparent) 70%, color-mix(in srgb, var(--bg) 55%, transparent) 100%),
        linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5em; font: 600 .78rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--grad); border-radius: 2px; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 800; margin-bottom: 20px; }
.hero .lead { font-size: 1.15rem; color: var(--text-2); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 26px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }

.shot { position: relative; }
.shot-frame {
    border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2);
    background: var(--surface); box-shadow: var(--shadow), 0 0 0 6px rgba(255, 255, 255, .02);
    transform: perspective(1400px) rotateY(-7deg) rotateX(2deg);
}
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.shot-bar span { margin-left: 8px; font: 500 .75rem/1 var(--font-mono); color: var(--muted); }
.float-card {
    position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px);
    border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); font-size: .85rem;
}
.float-card b { font: 700 1.2rem/1 var(--font-head); }
.float-card .ic { color: var(--gold); width: 22px; height: 22px; }
.fc-1 { left: -26px; bottom: 34px; }
.fc-2 { right: -14px; top: -18px; }

/* ── Cifras ───────────────────────────────────────────────────────────────── */
.stats { border-block: 1px solid var(--line); background: var(--bg-2); }
.stats-grid { display: grid; grid-template-columns: repeat(var(--stats, 6), 1fr); }
.stat { padding: 26px 18px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 800 1.85rem/1.1 var(--font-head); letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .85rem; }

/* ── Secciones ────────────────────────────────────────────────────────────── */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
.section-head p { color: var(--text-2); font-size: 1.08rem; }

.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--line-2); }
.card h3 { font-size: 1.2rem; font-weight: 700; }
.card p { color: var(--text-2); }
.card-icon {
    width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 18px;
    background: var(--grad-soft); border: 1px solid rgba(255, 181, 71, .25); color: var(--gold);
}
.card-icon .ic { width: 22px; height: 22px; }
.checks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: .95rem; }
.checks li::before {
    content: ''; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%;
    background: var(--grad-soft) center / 12px no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffb547' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"), var(--grad-soft);
}

/* Plataformas */
.platform { padding-top: 30px; overflow: hidden; }
.platform-tag { position: absolute; top: 18px; right: 18px; }
.platform h3 { display: flex; align-items: center; gap: 10px; }
.platform .engines { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }

/* Rendimiento */
.perf { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.bars { display: grid; gap: 18px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; font-size: .9rem; }
.bar-track { height: 38px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar-fill { height: 100%; display: flex; align-items: center; justify-content: flex-end; padding-right: 12px; font: 700 .9rem/1 var(--font-head); border-radius: 10px; }
.bar-old { background: var(--surface-3); color: var(--text-2); }
.bar-new { background: var(--grad); color: #1a0e05; }
.feature-list { columns: 2; column-gap: 28px; padding: 0; list-style: none; margin: 0; }
.feature-list li { break-inside: avoid; padding: 7px 0 7px 22px; position: relative; color: var(--text-2); font-size: .95rem; }
.feature-list li::before { content: ''; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--grad); }

/* Qué recibes */
.files { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.art-card {
    position: relative; min-height: 380px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2);
    background: url('../img/hero.webp') center 20% / cover no-repeat; display: flex; align-items: flex-end;
}
.art-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 8, 12, .92) 0%, rgba(8, 8, 12, .35) 55%, transparent 100%); }
.art-card-text { position: relative; padding: 28px; color: #f4efe8; }
.art-card-text h3 { font-size: 1.5rem; margin: 14px 0 8px; }
.art-card-text p { color: rgba(244, 239, 232, .82); margin: 0; max-width: 460px; }

/* Eventos */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    padding: 8px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
    font-size: .9rem; color: var(--text-2);
}
.chip.hot { border-color: rgba(255, 181, 71, .45); color: var(--text); background: var(--grad-soft); }
.event-group + .event-group { margin-top: 28px; }
.event-group h4 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; font-family: var(--font); }
.moba { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; padding: 0; }
.moba-body { padding: 34px; }
.moba-art { background: url('../img/loading_02.webp') 35% center / cover; min-height: 300px; position: relative; }
.moba-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface), transparent 40%); }

/* Versiones y licencias */
.lic { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lic-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.ver {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px;
    font: 600 .85rem/1 var(--font-mono); border: 1px solid var(--line);
}
.ver .ic { width: 14px; height: 14px; }
.ver-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.ver-no { color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); border-color: color-mix(in srgb, var(--bad) 30%, transparent); text-decoration: line-through; text-decoration-thickness: 1px; }
.lic h3 { display: flex; align-items: center; gap: 10px; }

/* Precios */
.currency { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.currency a { padding: 6px 14px; border-radius: 999px; color: var(--text-2); font: 600 .85rem/1 var(--font); }
.currency a:hover { text-decoration: none; color: var(--text); }
.currency a.on { background: var(--surface-3); color: var(--text); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; margin-top: 28px; }
.plan { display: flex; flex-direction: column; padding: 30px; }
.plan.hl { border-color: rgba(255, 181, 71, .55); background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1px solid transparent; box-shadow: 0 30px 70px -40px rgba(255, 106, 61, .6); }
.plan .badge { position: absolute; top: -12px; left: 30px; }
.plan .badge .pill { background: var(--grad); color: #1a0e05; border: 0; }
.plan-name { font: 600 1.05rem/1.2 var(--font-head); color: var(--text-2); }
.price { margin: 14px 0 4px; font: 800 2.6rem/1 var(--font-head); letter-spacing: -.03em; }
.price small { font: 500 .95rem/1 var(--font); color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.plan > .pill { align-self: flex-start; }
.plan .checks { margin: 22px 0 26px; flex: 1; }
.notice {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; font-size: .92rem;
    background: color-mix(in srgb, var(--info) 9%, transparent); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); color: var(--text-2);
}
.notice .ic { color: var(--info); margin-top: 3px; }
.notice.warn { background: color-mix(in srgb, var(--gold) 9%, transparent); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.notice.warn .ic { color: var(--gold); }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 50%; background: var(--grad); color: #1a0e05; font: 800 .95rem/1 var(--font-head); }
.step h4 { font-size: 1rem; }
.step p { color: var(--text-2); font-size: .92rem; margin: 0; }

/* Soporte */
.support {
    position: relative; overflow: hidden; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center;
    padding: 44px; border-radius: 20px; border: 1px solid var(--line-2);
    background: radial-gradient(600px 300px at 90% 10%, rgba(255, 106, 61, .18), transparent 60%), var(--surface);
}
.support h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.chat {
    display: grid; gap: 10px; padding: 18px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); font-size: .9rem;
}
.msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; line-height: 1.45; }
.msg.me { justify-self: end; background: color-mix(in srgb, var(--ok) 18%, var(--surface)); border-bottom-right-radius: 4px; }
.msg.bot { background: var(--surface-2); border-bottom-left-radius: 4px; }
.msg code { font-size: .8rem; background: var(--code-bg); padding: 1px 5px; border-radius: 5px; }

/* Preguntas */
.faq { display: grid; gap: 10px; max-width: 820px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold); font: 400 1.4rem/1 var(--font); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); padding-bottom: 6px; }

/* ── Cabecera de página interna ───────────────────────────────────────────── */
.page-head { padding: 72px 0 40px; border-bottom: 1px solid var(--line); background: radial-gradient(900px 300px at 15% 0%, rgba(255, 140, 60, .12), transparent 70%); }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; }
.page-head p { color: var(--text-2); font-size: 1.1rem; max-width: 740px; }

/* Pestañas de características */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 30px; position: sticky; top: calc(var(--topbar-h) + 10px); z-index: 5; }
.tabs button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); font: 600 .9rem/1 var(--font); cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 -2px 0 var(--gold); }
.tab-panel[hidden] { display: none; }
.tab-panel { scroll-margin-top: calc(var(--topbar-h) + 96px); }
.tab-panel .prose { max-width: none; columns: 2; column-gap: 40px; }
.tab-panel .prose > * { break-inside: avoid; }

/* ── Documentación ────────────────────────────────────────────────────────── */
.docs-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 40px; padding-top: 34px; padding-bottom: 80px; }
.docs-side, .docs-toc { position: sticky; top: calc(var(--topbar-h) + 24px); align-self: start; max-height: calc(100vh - var(--topbar-h) - 48px); overflow-y: auto; scrollbar-width: thin; }
.docs-side { padding-right: 6px; }
.ver-select { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.ver-select select {
    flex: 1; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8f99' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
    border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); padding: 9px 34px 9px 12px; font: 600 .9rem/1 var(--font);
}
.search { position: relative; margin-bottom: 18px; }
.search input {
    width: 100%; padding: 10px 12px 10px 36px; border-radius: 10px; border: 1px solid var(--line-2);
    background: var(--surface); color: var(--text); font: 400 .92rem/1 var(--font);
}
.search input:focus { outline: none; box-shadow: var(--ring); border-color: var(--gold); }
.search > .ic { position: absolute; left: 11px; top: 11px; color: var(--muted); width: 17px; height: 17px; }
.search kbd { position: absolute; right: 9px; top: 8px; font: 500 .72rem/1 var(--font-mono); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); }
.search-results {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; max-height: 380px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); padding: 6px;
}
.search-results a { display: block; padding: 9px 11px; border-radius: 8px; color: var(--text); }
.search-results a:hover, .search-results a.on { background: var(--surface-2); text-decoration: none; }
.search-results a small { display: block; color: var(--muted); font-size: .76rem; }
.search-results mark { background: none; color: var(--gold); font-weight: 600; }
.search-results .empty { padding: 12px; color: var(--muted); font-size: .9rem; }
.side-group { margin-bottom: 20px; }
.side-group h5 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 600 .74rem/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.side-group h5 .ic { width: 14px; height: 14px; color: var(--gold); }
.side-group a { display: block; padding: 6px 10px; margin-left: 6px; border-left: 1px solid var(--line); color: var(--text-2); font-size: .91rem; }
.side-group a:hover { color: var(--text); text-decoration: none; border-left-color: var(--line-2); }
.side-group a.on { color: var(--gold); border-left: 2px solid var(--gold); padding-left: 9px; font-weight: 600; background: linear-gradient(90deg, rgba(255, 181, 71, .08), transparent); }
.docs-toc h5 { margin: 0 0 10px; font: 600 .74rem/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.docs-toc a { display: block; padding: 4px 0 4px 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: .84rem; line-height: 1.4; }
.docs-toc a.l3 { padding-left: 24px; font-size: .8rem; }
.docs-toc a:hover { color: var(--text); text-decoration: none; }
.docs-toc a.on { color: var(--gold); border-left-color: var(--gold); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .84rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.doc-title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 800; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.doc-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 50px; }
.doc-nav a { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); }
.doc-nav a:hover { border-color: var(--gold); text-decoration: none; }
.doc-nav small { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }
.doc-nav .next { text-align: right; grid-column: 2; }
.doc-help { margin-top: 26px; }
.docs-toggle { display: none; }

/* Texto de las guías */
.prose { max-width: 780px; font-size: 1rem; color: var(--text-2); overflow-wrap: anywhere; }
.doc-title, .crumbs { overflow-wrap: anywhere; }
.prose table { overflow-wrap: normal; }
.prose h2, .prose h3, .prose h4 { color: var(--text); position: relative; }
.prose h2 { font-size: 1.6rem; margin: 2.2em 0 .7em; padding-top: .4em; }
.prose h3 { font-size: 1.22rem; margin: 1.9em 0 .6em; }
.prose h4 { font-size: 1.02rem; margin: 1.6em 0 .5em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose .anchor { position: absolute; left: -1.1em; color: var(--muted); opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor { opacity: 1; text-decoration: none; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--gold); }
.prose :not(pre) > code { font-size: .86em; padding: .15em .42em; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); word-break: break-word; }
.prose pre.code {
    position: relative; margin: 0 0 1.3em; padding: 18px 20px; border-radius: 12px; overflow-x: auto;
    background: var(--code-bg); border: 1px solid var(--line); color: var(--code-text); font-size: .84rem; line-height: 1.65;
}
.prose pre.code[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 54px; font: 500 .68rem/1 var(--font-mono); text-transform: uppercase; color: var(--muted); letter-spacing: .08em; }
.copy-btn { position: absolute; top: 6px; right: 8px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: 500 .7rem/1 var(--font); cursor: pointer; }
.copy-btn:hover { color: var(--gold); }
.prose img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); margin: 6px 0; }
.prose blockquote { margin: 0 0 1.2em; padding: 12px 18px; border-left: 3px solid var(--gold); background: var(--grad-soft); border-radius: 0 10px 10px 0; color: var(--text); }
.prose blockquote p:last-child { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.prose th { text-align: left; background: var(--surface-2); color: var(--text); font-weight: 600; white-space: nowrap; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }

/* Índice de la documentación */
.doc-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.doc-cat h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.doc-cat ul { list-style: none; padding: 0; margin: 12px 0 0; }
.doc-cat li a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--text-2); font-size: .94rem; }
.doc-cat li a:hover { color: var(--gold); text-decoration: none; }
.doc-cat li a span { color: var(--muted); font-size: .78rem; }
.docs-hero-search { max-width: 560px; margin-top: 26px; }
.docs-hero-search input { padding: 14px 14px 14px 42px; font-size: 1rem; border-radius: 12px; }
.docs-hero-search > .ic { top: 15px; left: 14px; }
.docs-hero-search kbd { top: 13px; }
.docs-hero-search .search-results { right: 0; }

/* Novedades */
.timeline { position: relative; display: grid; gap: 30px; }
.release { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
.release-side { position: sticky; top: calc(var(--topbar-h) + 24px); align-self: start; }
.release-side .vnum { font: 800 2.4rem/1 var(--font-head); letter-spacing: -.03em; }
.release-side p { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }
.future { opacity: .75; }
.future .vnum { color: var(--muted); }

/* ── Pie ──────────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { font: 600 .78rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-grid a:not(.brand) { display: block; color: var(--text-2); padding: 4px 0; font-size: .93rem; }
.footer-grid a:not(.brand):hover { color: var(--gold); }
.footer-grid p { margin-top: 12px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }

.wa-float {
    position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px 12px 14px; border-radius: 999px; background: #1fae5b; color: #fff; font-weight: 600; font-size: .92rem;
    box-shadow: 0 14px 34px -12px rgba(31, 174, 91, .75);
}
.wa-float:hover { text-decoration: none; transform: translateY(-2px); }
.wa-float svg { width: 22px; height: 22px; }
button.wa-float { border: 0; cursor: pointer; font-family: var(--font); }
.wa-float-box { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: grid; justify-items: end; gap: 10px; }
.wa-float-box .wa-float { position: static; }
.wa-menu {
    display: grid; gap: 6px; padding: 12px; min-width: 230px; border-radius: 14px;
    background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.wa-menu[hidden] { display: none; }
.wa-menu p { margin: 0 4px 4px; }
.wa-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.wa-menu a:hover { background: var(--surface-2); text-decoration: none; }
.wa-menu a svg { width: 26px; height: 26px; color: #1fae5b; flex: none; }
.wa-menu b { display: block; font-size: .95rem; }
.wa-menu small { color: var(--muted); font-size: .8rem; }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Aparecer al hacer scroll (solo si hay JS y el visitante no pidió menos movimiento) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .btn, .shot-frame { transition: none; transform: none; }
}

/* ── Pantallas medianas ───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .docs-layout { grid-template-columns: 240px minmax(0, 1fr); }
    .docs-toc { display: none; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .stat:nth-child(4) { border-left: 0; }
    .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 960px) {
    .mainnav {
        position: fixed; inset: var(--topbar-h) 0 auto 0; flex-direction: column; gap: 2px; margin: 0; padding: 12px 16px 18px;
        background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        transform: translateY(-110%); visibility: hidden; transition: transform .25s ease, visibility .25s;
    }
    .mainnav.open { transform: none; visibility: visible; }
    .mainnav a { padding: 12px; }
    .menu-btn { display: inline-grid; }
    .hero-grid, .perf, .files, .support, .lic, .moba { grid-template-columns: 1fr; }
    .shot { max-width: 640px; }
    .shot-frame { transform: none; }
    .g-3, .g-4, .plans, .doc-cats { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .moba-art { min-height: 200px; order: -1; }
    .moba-art::after { background: linear-gradient(0deg, var(--surface), transparent 50%); }
    .tab-panel .prose { columns: 1; }
    .release { grid-template-columns: 1fr; gap: 14px; }
    .release-side { position: static; }
    .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .docs-side {
        position: fixed; inset: var(--topbar-h) auto 0 0; width: min(320px, 86vw); max-height: none; z-index: 45;
        background: var(--bg); border-right: 1px solid var(--line); padding: 20px 16px; transform: translateX(-105%); transition: transform .25s ease;
    }
    .docs-side.open { transform: none; box-shadow: var(--shadow); }
    .docs-toggle { display: inline-flex; margin-bottom: 18px; }
    .search-results { right: 0; }
}

/* ── Teléfonos ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .section { padding: 68px 0; }
    .hero { padding: 64px 0 48px; }
    .hide-sm { display: none; }
    .g-2, .g-3, .g-4, .plans, .doc-cats, .steps { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat { border-left: 0; border-top: 1px solid var(--line); padding: 20px 6px; }
    .stat:nth-child(-n+2) { border-top: 0; }
    .stat:nth-child(even) { border-left: 1px solid var(--line); padding-left: 16px; }
    .feature-list { columns: 1; }
    .bar-row { grid-template-columns: 1fr; gap: 6px; }
    .fc-1 { left: 8px; bottom: -16px; }
    .fc-2 { right: 8px; top: -16px; }
    .support { padding: 26px; }
    .footer-grid { grid-template-columns: 1fr; }
    .doc-nav { grid-template-columns: 1fr; }
    .doc-nav .next { grid-column: 1; }
    .wa-float span { display: none; }
    .wa-float { padding: 14px; }
    .brand-text { font-size: .98rem; }
    .topbar-in { gap: 12px; }
    .prose .anchor { display: none; }
}
