/* =========================================================
   TsaPulga v2 — sistema de diseño
   ========================================================= */

:root {
    /* Superficies */
    --bg: #0a090b;
    --bg-2: #0f0e11;
    --surface: #141317;
    --surface-2: #1b1a1f;
    --surface-3: #232228;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.13);

    /* Texto */
    --text: #f5f3f4;
    --muted: #a7a2a9;
    --subtle: #6f6a73;

    /* Marca */
    --red: #e3193a;
    --red-hover: #f22a4a;
    --red-ink: #ff5c74;
    --red-soft: rgba(227, 25, 58, 0.12);
    --red-line: rgba(227, 25, 58, 0.35);
    --green: #2fd27a;
    --green-soft: rgba(47, 210, 122, 0.12);

    /* Tipografía */
    --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
    --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
    --font-pixel: "Silkscreen", ui-monospace, monospace;
    --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

    /* Medidas */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --container: 1180px;
    --gutter: clamp(16px, 4vw, 32px);
    --header-h: 68px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 20px 50px -20px rgba(0,0,0,0.8);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 64px); }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
main { flex: 1; padding-bottom: clamp(56px, 8vw, 104px); }

/* Fondo: brillo rojo arriba + grilla de píxeles muy sutil */
body::before {
    content: "";
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(227, 25, 58, 0.16), transparent 60%),
        radial-gradient(700px 400px at -10% 10%, rgba(227, 25, 58, 0.07), transparent 60%),
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 32px 32px;
    mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,0.35) 55%, transparent 100%);
}

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, kbd { font-family: var(--font-mono); }
::selection { background: var(--red); color: #fff; }

:focus-visible { outline: 2px solid var(--red-ink); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 300;
    background: var(--red); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-h);
    border-bottom: 1px solid var(--border);
}
/* El desenfoque va en un pseudo-elemento: si estuviera en el header, el menú
   mobile (position: fixed) quedaría atrapado dentro y se vería transparente. */
.site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: rgba(10, 9, 11, 0.72);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 50%; image-rendering: pixelated; }
.brand b { color: var(--red); font-weight: 700; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
    position: relative; padding: 8px 12px; border-radius: 8px;
    font-size: 0.92rem; font-weight: 500; color: var(--muted);
    transition: color .2s var(--ease), background .2s var(--ease);
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: -15px; height: 2px;
    background: var(--red); border-radius: 2px;
}

.header-cta { margin-left: 8px; }

.nav-toggle {
    display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 10px;
    background: transparent; border: 1px solid var(--border-strong); cursor: pointer;
    align-items: center; justify-content: center;
}

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .site-header .header-cta { display: none; }
    .nav {
        position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px var(--gutter) 20px;
        background: var(--bg); border-bottom: 1px solid var(--border);
        box-shadow: 0 30px 60px -20px rgba(0,0,0,0.9);
        transform: translateY(-8px); opacity: 0; visibility: hidden;
        transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
    }
    .nav.abierto { transform: none; opacity: 1; visibility: visible; }
    .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
    .nav a[aria-current="page"] { color: var(--red-ink); }
    .nav a[aria-current="page"]::after { display: none; }
    .nav .btn { margin-top: 16px; }
}
@media (min-width: 901px) { .nav .nav-mobile-only { display: none; } }

/* =========================================================
   Botones, chips, badges
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 20px; border-radius: 10px;
    font-weight: 600; font-size: 0.95rem; white-space: nowrap;
    border: 1px solid transparent; cursor: pointer;
    transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 24px -10px rgba(227,25,58,0.8), inset 0 1px 0 rgba(255,255,255,0.18); }
.btn-primary:hover { background: var(--red-hover); }
.btn-secondary { background: rgba(255,255,255,0.05); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: rgba(255,255,255,0.09); }
.btn-ghost { background: transparent; color: var(--muted); padding: 0 10px; }
.btn-ghost:hover { color: var(--text); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.88rem; border-radius: 9px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-pixel); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--red-ink);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--red); box-shadow: 0 0 12px var(--red); }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    height: 26px; padding: 0 10px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em;
    background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--border);
    white-space: nowrap;
}
.badge-red { background: var(--red-soft); color: var(--red-ink); border-color: var(--red-line); }
.badge-green { background: var(--green-soft); color: var(--green); border-color: rgba(47,210,122,0.3); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot-pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 currentColor; } 50% { box-shadow: 0 0 0 5px transparent; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
    background: transparent; border: 1px solid var(--border-strong); color: var(--muted);
    font-size: 0.88rem; font-weight: 500; transition: all .2s var(--ease);
    display: inline-flex; align-items: center; gap: 8px;
}
.chip:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .chip-count { font-size: 0.75rem; opacity: 0.6; }

/* =========================================================
   Secciones
   ========================================================= */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.section + .section { padding-top: 0; }
main > .section:last-child { padding-bottom: 0; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.section-title em { font-style: normal; color: var(--red); }
.section-lead { color: var(--muted); max-width: 560px; margin-top: 12px; font-size: 1.02rem; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; font-size: 0.95rem; transition: color .2s, gap .2s var(--ease); }
.link-arrow:hover { color: var(--text); gap: 10px; }

/* Encabezado de páginas internas */
.page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(32px, 4vw, 48px); }
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); max-width: 820px; }
.page-hero h1 em { font-style: normal; color: var(--red); }
.page-hero p { color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.15rem); max-width: 620px; margin-top: 18px; }

/* =========================================================
   Cards
   ========================================================= */
.card {
    position: relative;
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    min-width: 0;
}
.card-hover { transition: border-color .25s var(--ease), transform .25s var(--ease); }
.card-hover:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.card h3 { font-size: 1.12rem; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 0.95rem; margin-top: 8px; overflow-wrap: anywhere; }
.card-icon {
    width: 42px; height: 42px; border-radius: 11px; margin-bottom: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--red-soft); color: var(--red-ink); border: 1px solid var(--red-line);
}
.card-icon .icon { width: 20px; height: 20px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }

/* Card destacada con link */
.feature-card { display: flex; flex-direction: column; gap: 4px; }
.feature-card .link-arrow { margin-top: auto; padding-top: 20px; }

/* =========================================================
   Home — hero
   ========================================================= */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); letter-spacing: -0.035em; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero-lead { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 560px; margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .eyebrow { margin-bottom: 22px; }

.stats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; letter-spacing: -0.02em; line-height: 1; }
.stat-label { color: var(--subtle); font-size: 0.85rem; margin-top: 6px; }

.hero-art { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; justify-self: center; }
.hero-art-panel {
    position: absolute; inset: 0; border-radius: 32px; overflow: hidden;
    background:
        radial-gradient(circle at 50% 40%, rgba(255,90,110,0.35), transparent 60%),
        linear-gradient(160deg, #b8132f 0%, #6e0a1b 100%);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 40px 100px -30px rgba(227,25,58,0.55), inset 0 1px 0 rgba(255,255,255,0.2);
}
.hero-art-panel::before {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px) 0 0 / 28px 28px;
    mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%);
}
.hero-art img {
    position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    width: 62%; image-rendering: pixelated;
    filter: drop-shadow(0 24px 30px rgba(0,0,0,0.45));
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -10px); } }

.hero-tag {
    position: absolute; display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 12px;
    background: rgba(12, 11, 14, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-strong); box-shadow: 0 16px 40px -12px rgba(0,0,0,0.8);
    font-size: 0.85rem; font-weight: 500; white-space: nowrap;
}
.hero-tag small { display: block; color: var(--subtle); font-size: 0.72rem; font-weight: 500; }
.hero-tag-1 { top: 9%; left: -6%; }
.hero-tag-2 { bottom: 12%; right: -6%; }
.hero-tag .tag-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--red-soft); color: var(--red-ink); }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-art { max-width: 300px; }
    .hero-tag-1 { left: -2%; }
    .hero-tag-2 { right: -2%; }
}

/* =========================================================
   Home — en vivo
   ========================================================= */
.live-frame {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid var(--border-strong); background: #000;
    box-shadow: 0 40px 90px -40px rgba(0,0,0,0.9);
}
.live-frame #twitch-embed, .live-frame iframe { width: 100%; aspect-ratio: 16 / 9; }
.live-frame.con-chat #twitch-embed { aspect-ratio: auto; height: min(62vw, 620px); }
.live-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 14px 18px; background: var(--surface); border-top: 1px solid var(--border);
}
.live-bar-info { display: flex; align-items: center; gap: 12px; font-size: 0.92rem; color: var(--muted); }
.live-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* =========================================================
   Server
   ========================================================= */
.server-card { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 28px; }
.server-card .server-logo { width: 148px; border-radius: 18px; border: 1px solid var(--border-strong); }
.server-card h3 { font-size: 1.6rem; }
.server-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
@media (max-width: 640px) {
    .server-card { grid-template-columns: 1fr; text-align: left; }
    .server-card .server-logo { width: 112px; }
}

.ip-copy {
    display: flex; align-items: center; gap: 10px; max-width: 520px;
    padding: 6px 6px 6px 16px; border-radius: 12px;
    background: rgba(0,0,0,0.45); border: 1px dashed var(--red-line);
}
.ip-copy code { flex: 1; min-width: 0; font-size: 0.95rem; font-weight: 600; overflow-wrap: anywhere; line-height: 1.35; }
.ip-copy .btn { flex-shrink: 0; }

/* Estado del server en vivo */
.server-live { margin-top: 18px; }
.server-live-titulo { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); margin-bottom: 10px; }
.jugadores { display: flex; flex-wrap: wrap; gap: 8px; }
.jugador {
    display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 4px; border-radius: 999px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.jugador-inicial {
    width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
    background: var(--red-soft); color: var(--red-ink); font-size: 0.75rem; font-weight: 700;
}
.jugador-mas { padding: 0 12px; color: var(--muted); }
.jugadores-vacio { margin: 0; color: var(--subtle); font-size: 0.9rem; }

.server-hero { display: grid; grid-template-columns: 1fr 380px; gap: clamp(28px, 5vw, 64px); align-items: center; }
.server-panel { padding: 28px; }
.server-panel .server-logo { width: 62%; border-radius: 14px; margin: 0 auto 22px; border: 1px solid var(--border-strong); }
.spec-list { display: grid; gap: 0; margin-top: 20px; }
.spec-list div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 0.92rem; }
.spec-list dt { color: var(--subtle); }
.spec-list dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 900px) { .server-hero { grid-template-columns: 1fr; } .server-panel { max-width: 460px; } }

/* Sub-navegación de página (sticky) */
.subnav {
    position: sticky; top: var(--header-h); z-index: 50;
    background: rgba(10, 9, 11, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.subnav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav .container::-webkit-scrollbar { display: none; }
.subnav a {
    padding: 14px 14px; font-size: 0.9rem; font-weight: 500; color: var(--muted); white-space: nowrap;
    border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.subnav a:hover { color: var(--text); }
.subnav a.activo { color: var(--text); border-color: var(--red); }

/* Pasos numerados */
.steps { display: grid; gap: 14px; counter-reset: paso; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 20px; align-items: start; }
.step::before {
    counter-increment: paso; content: counter(paso, decimal-leading-zero);
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    font-family: var(--font-pixel); font-size: 0.95rem; color: var(--red-ink);
    background: var(--red-soft); border: 1px solid var(--red-line);
}
.step h3 { font-size: 1.12rem; margin-top: 2px; }
.step p { color: var(--muted); margin-top: 6px; font-size: 0.96rem; }
.step-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Créditos del modpack */
.creditos {
    display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; margin-top: 28px; padding: 28px;
    border-color: var(--red-line);
    background: radial-gradient(120% 140% at 0% 0%, var(--red-soft), transparent 55%), linear-gradient(180deg, var(--surface-2), var(--surface));
}
.creditos .card-icon { margin-bottom: 0; }
.creditos h3 { font-size: 1.35rem; margin-top: 10px; }
.creditos p { max-width: 75ch; }
.creditos .creditos-extra { font-size: 0.88rem; color: var(--subtle); }
.spec-list dd a { color: var(--text); text-decoration: underline; text-decoration-color: var(--red-line); text-underline-offset: 3px; }
.spec-list dd a:hover { color: var(--red-ink); }
@media (max-width: 640px) { .creditos { grid-template-columns: 1fr; gap: 14px; padding: 22px; } }
.step-option { display: flex; flex-direction: column; gap: 8px; }
.step-option span { font-size: 0.78rem; color: var(--subtle); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

kbd, .cmd {
    display: inline-block; font-size: 0.86em; padding: 1px 7px; border-radius: 6px;
    background: rgba(255,255,255,0.07); border: 1px solid var(--border-strong); color: var(--text);
    white-space: nowrap;
}

/* Lista de reglas */
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 0 32px; }
.rule { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid var(--border); }
.rule-n { font-family: var(--font-pixel); color: var(--red-ink); font-size: 0.85rem; padding-top: 3px; }
.rule h3 { font-size: 1.02rem; }
.rule p { color: var(--muted); font-size: 0.94rem; margin-top: 4px; }

/* =========================================================
   Cine
   ========================================================= */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.search {
    position: relative; flex: 1 1 320px; max-width: 440px;
}
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
.search input {
    width: 100%; height: 46px; padding: 0 16px 0 42px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
    font: inherit; font-size: 0.95rem; transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: var(--subtle); }
.search input:focus { outline: none; border-color: var(--red-line); box-shadow: 0 0 0 4px var(--red-soft); }
.result-count { color: var(--subtle); font-size: 0.9rem; }

.video-card {
    display: flex; flex-direction: column; text-align: left; width: 100%;
    background: none; border: 0; padding: 0; cursor: pointer;
}
.thumb {
    position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
    background: var(--surface-2); border: 1px solid var(--border);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), filter .3s; }
.thumb::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 50%);
}
.thumb-play {
    position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%) scale(0.85);
    width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
    background: var(--red); color: #fff; opacity: 0; transition: opacity .25s, transform .25s var(--ease);
    box-shadow: 0 10px 30px -6px rgba(227,25,58,0.8);
}
.thumb-play .icon { width: 22px; height: 22px; margin-left: 3px; }
.thumb-dur {
    position: absolute; right: 8px; bottom: 8px; z-index: 1;
    padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,0.8);
    font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
}
.video-card:hover .thumb img, .video-card:focus-visible .thumb img { transform: scale(1.04); filter: brightness(0.8); }
.video-card:hover .thumb-play, .video-card:focus-visible .thumb-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.video-card h3 { font-size: 1rem; margin-top: 14px; line-height: 1.3; letter-spacing: -0.005em; }
.video-meta { color: var(--subtle); font-size: 0.85rem; margin-top: 6px; }

.empty-state { padding: 64px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); }

/* Modal de video */
.video-dialog {
    width: min(1100px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0;
    background: transparent; color: var(--text);
}
.video-dialog::backdrop { background: rgba(4, 3, 5, 0.9); backdrop-filter: blur(6px); }
.video-dialog[open] { animation: aparecer .25s var(--ease); }
@keyframes aparecer { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.video-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.video-dialog-head h2 { font-size: 1.1rem; }
.video-dialog-player { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--border-strong); }
.video-dialog-player iframe { width: 100%; height: 100%; border: 0; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center; flex-shrink: 0;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border-strong); cursor: pointer; transition: background .2s;
}
.icon-btn:hover { background: rgba(255,255,255,0.12); }

/* =========================================================
   Comandos
   ========================================================= */
.cmd-group + .cmd-group { margin-top: 56px; }
.cmd-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cmd-group-head h2 { font-size: 1.4rem; }
.cmd-group-head p { color: var(--subtle); font-size: 0.92rem; }
.cmd-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cmd-row {
    display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: 20px; align-items: center;
    padding: 14px 20px; border-top: 1px solid var(--border);
}
.cmd-row:first-child { border-top: 0; }
.cmd-row:hover { background: rgba(255,255,255,0.02); }
.cmd-names { display: flex; flex-wrap: wrap; gap: 6px; }
.cmd-copy {
    display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; cursor: pointer;
    font-family: var(--font-mono); font-size: 0.86rem; font-weight: 600; color: var(--text);
    background: rgba(255,255,255,0.05); border: 1px solid var(--border-strong);
    transition: border-color .2s, background .2s, color .2s; max-width: 100%;
}
.cmd-copy span { overflow: hidden; text-overflow: ellipsis; }
.cmd-copy .icon { width: 13px; height: 13px; opacity: 0.35; transition: opacity .2s; }
.cmd-copy:hover { border-color: var(--red-line); background: var(--red-soft); color: #fff; }
.cmd-copy:hover .icon { opacity: 0.8; }
.cmd-desc { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 680px) {
    .cmd-row { grid-template-columns: 1fr; gap: 8px; padding: 16px; }
}

/* =========================================================
   Novedades
   ========================================================= */
.news-list { display: grid; gap: 14px; }
.news-item { display: grid; grid-template-columns: 120px 1fr; gap: 28px; padding: 26px 28px; }
.news-date { color: var(--subtle); font-size: 0.86rem; font-weight: 500; padding-top: 2px; }
.news-date strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 1.6rem; line-height: 1; letter-spacing: -0.02em; margin-bottom: 4px; }
.news-item h3 { font-size: 1.2rem; margin-top: 12px; }
.news-item p { margin-top: 10px; }
.news-item .link-arrow { margin-top: 16px; color: var(--red-ink); }
.news-item .link-arrow:hover { color: #fff; }
@media (max-width: 640px) {
    .news-item { grid-template-columns: 1fr; gap: 6px; padding: 22px; }
    .news-date strong { display: inline; font-size: 1rem; margin: 0 4px 0 0; }
}

/* Mini novedades (home) */
.news-mini { display: flex; flex-direction: column; gap: 12px; }
.news-mini .news-mini-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.news-mini time { color: var(--subtle); font-size: 0.82rem; }
.news-mini h3 { font-size: 1.05rem; line-height: 1.3; }
.news-mini p { margin-top: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* =========================================================
   Redes
   ========================================================= */
.social-card { display: flex; align-items: center; gap: 18px; padding: 20px; }
.social-logo { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.social-logo svg { width: 26px; height: 26px; }
.social-card h3 { font-size: 1.08rem; }
.social-card p { margin-top: 2px; font-size: 0.9rem; color: var(--subtle); }
.social-card .icon-arrow { margin-left: auto; color: var(--subtle); transition: color .2s, transform .2s var(--ease); }
.social-card:hover .icon-arrow { color: var(--text); transform: translate(2px, -2px); }

.social-row { display: flex; flex-wrap: wrap; gap: 8px; }
.social-icon {
    width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--muted);
    transition: color .2s, background .2s, border-color .2s, transform .2s var(--ease);
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover { color: #fff; background: rgba(255,255,255,0.09); border-color: var(--border-strong); transform: translateY(-2px); }

/* =========================================================
   Sobre mí
   ========================================================= */
.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-img { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.about-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 35%; }
.about-text p { color: var(--muted); font-size: 1.05rem; margin-top: 18px; }
.about-text p:first-of-type { margin-top: 22px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } .about-img { max-width: 380px; } }

/* =========================================================
   CTA final
   ========================================================= */
.cta {
    position: relative; overflow: hidden; border-radius: var(--radius-lg);
    padding: clamp(36px, 6vw, 64px);
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(88,101,242,0.28), transparent 60%),
        radial-gradient(500px 300px at 0% 100%, rgba(227,25,58,0.22), transparent 60%),
        var(--surface);
    border: 1px solid var(--border-strong);
    display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); max-width: 560px; }
.cta p { color: var(--muted); margin-top: 12px; max-width: 520px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 40px; padding: 56px 0 40px; }
.footer-grid p { color: var(--subtle); font-size: 0.92rem; margin-top: 14px; max-width: 320px; }
.footer-grid h4 { font-family: var(--font-body); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--subtle); margin-bottom: 14px; }
.footer-grid ul { display: grid; gap: 10px; }
.footer-grid li a { color: var(--muted); font-size: 0.94rem; transition: color .2s; }
.footer-grid li a:hover { color: var(--text); }
.footer-grid .social-row { margin-top: 22px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 28px; border-top: 1px solid var(--border); color: var(--subtle); font-size: 0.85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* =========================================================
   Toast
   ========================================================= */
.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 400; transform: translate(-50%, 20px);
    display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--bg);
    font-weight: 600; font-size: 0.92rem; box-shadow: 0 20px 50px -10px rgba(0,0,0,0.8);
    opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { color: #12a150; }

/* =========================================================
   Animación de entrada
   ========================================================= */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}

/* 404 */
.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.not-found img { width: 120px; margin: 0 auto 28px; image-rendering: pixelated; }
.not-found h1 { font-size: clamp(3rem, 10vw, 6rem); }
.not-found p { color: var(--muted); margin: 12px auto 28px; max-width: 420px; }
