/* ==========================================================================
   EXCEL-ENTE · Sistema de diseño
   Tema oscuro de marca: navy + amarillo del logo (acento principal).
   Verde Excel = estados "gratis"/éxito. Azul Python = etiqueta de apps.
   Radios: tarjetas 18px · botones 12px · inputs 10px · pills 999px.
   ========================================================================== */

:root {
    --bg: #0a1020;
    --bg-soft: #0e1628;
    --surface: #121c31;
    --surface-2: #17233c;
    --surface-3: #1e2c49;
    --line: rgba(148, 163, 184, 0.14);
    --line-strong: rgba(148, 163, 184, 0.28);

    --text: #eef2f8;
    --text-muted: #a9b6ca;
    --text-dim: #8190a8;

    --accent: #fbbf24;
    --accent-hover: #fcd34d;
    --accent-ink: #1a1304;
    --accent-soft: rgba(251, 191, 36, 0.12);
    --excel: #34d399;
    --excel-soft: rgba(52, 211, 153, 0.12);
    --python: #60a5fa;
    --python-soft: rgba(96, 165, 250, 0.12);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);
    --heart: #fb7185;

    --radius-card: 18px;
    --radius-btn: 12px;
    --radius-input: 10px;

    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -24px rgba(2, 6, 23, 0.9);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, monospace;

    --container: 1180px;
    --gutter: 20px;
    --nav-h: 68px;

    color-scheme: dark;
}

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

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

body {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1100px 520px at 85% -120px, rgba(251, 191, 36, 0.08), transparent 70%),
        radial-gradient(900px 480px at -10% 10%, rgba(52, 211, 153, 0.05), transparent 70%),
        var(--bg);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 .6em;
    font-weight: 700;
}

p { margin: 0 0 1em; }

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

::selection { background: var(--accent); color: var(--accent-ink); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 820px; }

.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: 200; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--radius-btn); font-weight: 600; }
.skip-link:focus { top: 12px; color: var(--accent-ink); }

.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 46px;
    padding: .7rem 1.25rem;
    border-radius: var(--radius-btn);
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-size: .98rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
    text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn i { font-size: 1.15em; }

.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px -14px rgba(251, 191, 36, .8); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); }

.btn-ghost { background: rgba(255, 255, 255, 0.03); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); border-color: rgba(148, 163, 184, .45); }

.btn-google { background: #f8fafc; color: #1f2937; border-color: #e2e8f0; width: 100%; }
.btn-google:hover { background: #fff; color: #111827; }
.btn-google img { width: 20px; height: 20px; }

.btn-danger-link { background: none; border: 0; color: var(--text-dim); font-size: .85rem; padding: 0; min-height: 0; cursor: pointer; }
.btn-danger-link:hover { color: var(--danger); }

.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: .45rem .9rem; font-size: .9rem; }
.btn-lg { min-height: 54px; padding: .85rem 1.6rem; font-size: 1.05rem; }

.link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }
.link-arrow i { transition: transform .25s var(--ease); }
.link-arrow:hover i { transform: translateX(3px); }

/* ---------- Navegación ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-h);
    background: rgba(10, 16, 32, 0.78);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--line);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-brand img { height: 46px; width: auto; }
.nav-links { display: none; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: .95rem; padding: .5rem .8rem; border-radius: 10px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav-actions { display: none; align-items: center; gap: .5rem; }

.nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(255, 255, 255, .04); border: 1px solid var(--line-strong); color: var(--text);
    font-size: 1.35rem; cursor: pointer;
}

.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .55rem; padding: .3rem .6rem .3rem .3rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text); font-weight: 500; font-size: .93rem; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu[open] > summary { background: rgba(255, 255, 255, .05); }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 14px; padding: .4rem; box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .8); }
.user-menu-panel a { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 10px; color: var(--text-muted); font-size: .93rem; }
.user-menu-panel a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.user-menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; }

.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-family: var(--font-display); font-size: .95rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.8rem; }

.mobile-menu {
    position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49;
    background: var(--bg);
    padding: 1.25rem var(--gutter) 2rem;
    display: flex; flex-direction: column; gap: .25rem;
    overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { display: flex; align-items: center; gap: .75rem; color: var(--text); font-size: 1.1rem; font-weight: 500; padding: .9rem .5rem; border-bottom: 1px solid var(--line); }
.mobile-menu a:not(.btn) i { color: var(--accent); font-size: 1.25rem; }
.mobile-menu .btn { margin-top: .75rem; }

@media (min-width: 960px) {
    .nav-links, .nav-actions { display: flex; }
    .nav-toggle, .mobile-menu { display: none !important; }
}

/* ---------- Toasts (mensajes) ---------- */
.toasts { position: fixed; z-index: 100; top: calc(var(--nav-h) + 12px); right: 12px; left: 12px; display: flex; flex-direction: column; gap: .6rem; pointer-events: none; align-items: center; }
.toast {
    pointer-events: auto;
    width: 100%; max-width: 440px;
    display: flex; align-items: flex-start; gap: .75rem;
    background: var(--surface-3); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent);
    border-radius: 14px; padding: .85rem 1rem; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .9);
    font-size: .95rem; color: var(--text);
    animation: toast-in .45s var(--ease) both;
}
.toast i.toast-icon { font-size: 1.3rem; color: var(--accent); margin-top: 1px; }
.toast-success { border-left-color: var(--excel); } .toast-success i.toast-icon { color: var(--excel); }
.toast-error { border-left-color: var(--danger); } .toast-error i.toast-icon { color: var(--danger); }
.toast-info { border-left-color: var(--python); } .toast-info i.toast-icon { color: var(--python); }
.toast p { margin: 0; flex: 1; }
.toast button { background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 1.1rem; padding: 0; line-height: 1; }
.toast button:hover { color: var(--text); }
.toast.is-leaving { animation: toast-out .3s var(--ease) forwards; }
@media (min-width: 640px) { .toasts { left: auto; align-items: flex-end; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* ---------- Secciones ---------- */
.section { padding-block: 72px; }
.section-tight { padding-block: 48px; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); margin-bottom: .45rem; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; margin: 0; }
.section-foot { display: flex; justify-content: center; margin-top: 36px; }

.eyebrow { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(251, 191, 36, .25); padding: .3rem .75rem; border-radius: 999px; margin-bottom: 1.1rem; }

/* ---------- Hero ---------- */
.hero { padding-block: 40px 24px; }
.hero-grid { display: grid; gap: 28px; align-items: center; justify-items: center; text-align: center; }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.3rem); font-weight: 800; letter-spacing: -0.03em; max-width: 19ch; margin-inline: auto; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { color: var(--text-muted); font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); max-width: 46ch; margin: 0 auto 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.hero-art { position: relative; width: min(100%, 360px); aspect-ratio: 1; }
.hero-art::before { content: ""; position: absolute; inset: 10% 8% 6%; border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(251, 191, 36, .35), rgba(52, 211, 153, .12) 55%, transparent 72%); filter: blur(8px); }
.hero-art img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .45)); }

@media (min-width: 900px) {
    .hero { padding-block: 56px 32px; }
    .hero-grid { grid-template-columns: 1.1fr .9fr; text-align: left; justify-items: start; gap: 48px; }
    .hero h1 { margin-inline: 0; }
    .hero-sub { margin-inline: 0; }
    .hero-actions { justify-content: flex-start; }
    .hero-art { width: min(100%, 460px); justify-self: center; }
}

/* ---------- Métricas ---------- */
.stats {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line); border-radius: var(--radius-card);
    background: rgba(18, 28, 49, .6); overflow: hidden;
}
.stat { padding: 20px 16px; text-align: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat:nth-child(2n) { border-right: 0; }
.stat:nth-last-child(-n+2) { border-bottom: 0; }
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 700; color: var(--text); line-height: 1.1; }
.stat span { color: var(--text-muted); font-size: .9rem; }
.stat strong.is-free { color: var(--excel); }
@media (min-width: 760px) {
    .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .stat, .stat:nth-child(2n) { border-right: 1px solid var(--line); border-bottom: 0; }
    .stat:last-child { border-right: 0; }
}

/* ---------- Grid de recursos ---------- */
.grid-cards { --cols: 1; --gap: 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.grid-cards > * { flex: 0 1 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; }
.grid-cards > .empty { flex-basis: 100%; }
@media (min-width: 620px) { .grid-cards { --cols: 2; } }
@media (min-width: 1000px) { .grid-cards { --cols: 3; } }

.card {
    position: relative;
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: rgba(251, 191, 36, .35); box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 28px 50px -28px rgba(0, 0, 0, .95); }

.media {
    position: relative; overflow: hidden; aspect-ratio: 4 / 3;
    background: var(--surface-2);
    isolation: isolate;
}
.media::before {
    content: ""; position: absolute; inset: -20px; z-index: -1;
    background: var(--img) center / cover no-repeat;
    filter: blur(22px) saturate(1.3) brightness(.55);
}
.media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .5s var(--ease); }
.card:hover .media img { transform: scale(1.03); }
.media-empty { display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 2.6rem; }

.card-body { display: flex; flex-direction: column; gap: .5rem; padding: 18px 20px 20px; flex: 1; }
.card-title { font-size: 1.12rem; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: var(--text); }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-text { color: var(--text-muted); font-size: .93rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line); }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 600; padding: .22rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--text-muted); border: 1px solid var(--line); }
.tag-free { color: var(--excel); background: var(--excel-soft); border-color: rgba(52, 211, 153, .25); }
.tag-planilla { color: var(--accent); background: var(--accent-soft); border-color: rgba(251, 191, 36, .25); }
.tag-app { color: var(--python); background: var(--python-soft); border-color: rgba(96, 165, 250, .25); }
.tag-contenido { color: #c4b5fd; background: rgba(196, 181, 253, .1); border-color: rgba(196, 181, 253, .25); }

.metrics { display: flex; align-items: center; gap: .9rem; color: var(--text-dim); font-size: .88rem; }
.metrics span { display: inline-flex; align-items: center; gap: .3rem; }
.metrics i { font-size: 1.05rem; }

/* Botón corazón: queda por encima del link estirado de la tarjeta */
.like-btn {
    position: relative; z-index: 2;
    display: inline-flex; align-items: center; gap: .35rem;
    background: none; border: 1px solid transparent; border-radius: 999px;
    color: var(--text-dim); font: inherit; font-size: .88rem; padding: .25rem .55rem; cursor: pointer;
    transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.like-btn:hover { color: var(--heart); background: rgba(251, 113, 133, .08); }
.like-btn i { font-size: 1.1rem; }
.like-btn .ph-fill { display: none; }
.like-btn[aria-pressed="true"] { color: var(--heart); }
.like-btn[aria-pressed="true"] .ph-fill { display: inline; }
.like-btn[aria-pressed="true"] .ph { display: none; }
.like-btn.is-popping i { animation: pop .45s var(--ease); }
.like-btn-lg { white-space: nowrap; border-color: var(--line-strong); padding: .6rem .75rem; font-size: .95rem; font-weight: 600; color: var(--text); min-height: 46px; justify-content: center; border-radius: var(--radius-btn); }
@keyframes pop { 40% { transform: scale(1.35); } }

/* ---------- Apps (layout en filas) ---------- */
.app-list { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); max-width: 1040px; margin-inline: auto; }
@media (min-width: 860px) { .app-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.app-row { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); transition: border-color .3s var(--ease), transform .3s var(--ease); }
.app-row:hover { border-color: rgba(96, 165, 250, .4); transform: translateY(-2px); }
.app-row .media { aspect-ratio: 1; border-radius: 14px; }
.app-row .media img { padding: 6px; }
.app-row .tags { margin-bottom: .4rem; }
.app-row h3 { font-size: 1.08rem; margin: 0 0 .25rem; }
.app-row h3 a { color: var(--text); }
.app-row h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.app-row p { color: var(--text-muted); font-size: .9rem; margin: 0 0 .6rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 480px) { .app-row { grid-template-columns: 120px minmax(0, 1fr); } }

/* ---------- Cómo funciona ---------- */
.steps { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); counter-reset: paso; max-width: 1000px; margin-inline: auto; }
.step { text-align: center; padding-inline: 8px; }
.step-icon { width: 60px; height: 60px; margin: 0 auto 1rem; border-radius: 18px; display: grid; place-items: center; font-size: 1.7rem; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(251, 191, 36, .25); }
.step h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.step p { color: var(--text-muted); margin: 0; font-size: .97rem; }
@media (min-width: 760px) {
    .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); position: relative; }
    .steps::before { content: ""; position: absolute; top: 30px; left: 16%; right: 16%; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); z-index: -1; }
}

/* ---------- Banda YouTube ---------- */
.band {
    position: relative; overflow: hidden;
    display: grid; gap: 20px; align-items: center; justify-items: center; text-align: center;
    padding: 40px 24px; border-radius: 24px;
    background: linear-gradient(135deg, #1b2440 0%, #121a2e 100%);
    border: 1px solid var(--line-strong);
}
.band::after { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; top: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, .22), transparent 65%); pointer-events: none; }
.band h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); margin-bottom: .4rem; }
.band p { color: var(--text-muted); margin: 0; max-width: 52ch; }
.band .yt-icon { font-size: 3rem; color: #ff4e45; }
@media (min-width: 860px) { .band { grid-template-columns: auto 1fr auto; text-align: left; justify-items: start; padding: 40px 48px; gap: 32px; } }

/* ---------- Contacto ---------- */
.split { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: .9fr 1.1fr; gap: 56px; } }
.contact-copy h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.4rem); }
.contact-copy p { color: var(--text-muted); }
.contact-points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.contact-points li { display: flex; gap: .75rem; align-items: flex-start; color: var(--text-muted); }
.contact-points i { color: var(--accent); font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.contact-points strong { color: var(--text); display: block; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow); }
@media (min-width: 640px) { .panel { padding: 32px; } }
.panel-center { text-align: center; }
.panel-center .btn { margin: .25rem; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.field label { font-size: .92rem; font-weight: 600; color: var(--text); }
.field .help { font-size: .82rem; color: var(--text-dim); }
.field .error { font-size: .85rem; color: var(--danger); display: flex; gap: .35rem; align-items: center; }
.field .error ul { margin: 0; padding: 0; list-style: none; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.field-row a { font-size: .85rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea, select {
    width: 100%;
    font: inherit; font-size: 1rem; color: var(--text);
    background: var(--bg-soft);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-input);
    padding: .75rem .9rem;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); opacity: 1; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(251, 191, 36, .18); background: #0b1324; }
textarea { resize: vertical; min-height: 110px; }
.has-error input, .has-error textarea { border-color: var(--danger); }

.divider { display: flex; align-items: center; gap: .9rem; color: var(--text-dim); font-size: .85rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

.form-note { font-size: .82rem; color: var(--text-dim); text-align: center; margin: 1rem 0 0; }

/* ---------- Auth ---------- */
.auth { padding-block: 40px 64px; }
.auth-grid { display: grid; gap: 32px; align-items: center; max-width: 1000px; margin-inline: auto; }
.auth-card { width: 100%; max-width: 440px; margin-inline: auto; }
.auth-card h1 { font-size: 1.9rem; margin-bottom: .35rem; text-align: center; }
.auth-card .lead { color: var(--text-muted); text-align: center; margin-bottom: 1.5rem; }
.auth-side { display: none; }
.auth-side h2 { font-size: 2rem; }
.auth-side ul { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.auth-side li { display: flex; gap: .8rem; color: var(--text-muted); }
.auth-side li i { color: var(--excel); font-size: 1.35rem; flex-shrink: 0; }
.auth-side li strong { display: block; color: var(--text); }
.auth-alt { text-align: center; margin: 1.25rem 0 0; color: var(--text-muted); font-size: .95rem; }
@media (min-width: 900px) {
    .auth { padding-block: 64px 96px; }
    .auth-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
    .auth-side { display: block; }
}

.state { text-align: center; max-width: 520px; margin-inline: auto; padding-block: 72px; }
.state-icon { width: 76px; height: 76px; margin: 0 auto 1.5rem; border-radius: 22px; display: grid; place-items: center; font-size: 2.2rem; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(251, 191, 36, .25); }
.state-icon.is-ok { color: var(--excel); background: var(--excel-soft); border-color: rgba(52, 211, 153, .25); }
.state-icon.is-error { color: var(--danger); background: var(--danger-soft); border-color: rgba(248, 113, 113, .25); }
.state h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.4rem); }
.state p { color: var(--text-muted); }
.state .actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.state-code { font-family: var(--font-display); font-size: clamp(4rem, 3rem + 6vw, 7rem); font-weight: 800; line-height: 1; color: var(--accent); margin-bottom: .5rem; letter-spacing: -0.04em; }

/* ---------- Listados ---------- */
.page-head { padding-block: 40px 8px; text-align: center; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); margin-bottom: .5rem; }
.page-head p { color: var(--text-muted); font-size: 1.08rem; max-width: 60ch; margin: 0 auto; }

.toolbar { display: flex; flex-direction: column; gap: 14px; align-items: center; margin: 28px auto 32px; max-width: 760px; }
.search { position: relative; width: 100%; }
.search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 1.2rem; pointer-events: none; }
.search input { padding-left: 2.8rem; min-height: 50px; border-radius: 999px; }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-muted); font-size: .9rem; font-weight: 500; background: transparent; }
.pill:hover { color: var(--text); border-color: rgba(148, 163, 184, .5); }
.pill[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

.pagination { display: flex; justify-content: center; align-items: center; gap: .5rem; margin-top: 40px; flex-wrap: wrap; }
.pagination span { color: var(--text-muted); font-size: .92rem; padding-inline: .5rem; }

.empty { text-align: center; padding: 48px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius-card); max-width: 620px; margin-inline: auto; }
.empty i.empty-icon { font-size: 2.6rem; color: var(--text-dim); display: block; margin-bottom: .75rem; }
.page { padding-bottom: 72px; }
.empty h3 { font-size: 1.25rem; margin-bottom: .35rem; }
.empty p { color: var(--text-muted); margin-bottom: 1.25rem; }

/* ---------- Detalle ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .88rem; color: var(--text-dim); padding-block: 24px 0; list-style: none; margin: 0; padding-left: 0; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb li + li::before { content: "/"; margin-right: .35rem; color: var(--text-dim); }

.detail { display: grid; gap: 28px; padding-block: 20px 48px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "aside" "info"; }
.detail-media-area { grid-area: media; min-width: 0; }
.detail-aside { grid-area: aside; min-width: 0; }
.detail-info { grid-area: info; min-width: 0; }
.detail-media-area:empty { display: none; }
@media (min-width: 980px) {
    .detail { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "media aside" "info aside"; column-gap: 40px; row-gap: 8px; align-items: start; }
    .detail-aside { position: sticky; top: calc(var(--nav-h) + 20px); }
}

.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-card); overflow: hidden; background: #000; border: 1px solid var(--line); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.detail-media { border-radius: var(--radius-card); max-width: 560px; margin-inline: auto; aspect-ratio: 1; }
.detail-media img { padding: 20px; }

.prose { color: var(--text-muted); font-size: 1.03rem; line-height: 1.75; }
.prose p { margin-bottom: 1.1em; }
.prose strong { color: var(--text); }
.detail-block { margin-top: 32px; }
.detail-block > h2 { font-size: 1.4rem; margin-bottom: 1rem; }

.gated { position: relative; margin-top: 24px; padding: 32px 24px; text-align: center; border-radius: var(--radius-card); border: 1px solid rgba(251, 191, 36, .3); background: linear-gradient(180deg, rgba(251, 191, 36, .08), rgba(251, 191, 36, .02)); }
.gated i.gated-icon { font-size: 2.2rem; color: var(--accent); }
.gated h3 { margin: .6rem 0 .35rem; font-size: 1.3rem; }
.gated p { color: var(--text-muted); max-width: 44ch; margin: 0 auto 1.25rem; }
.gated .actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }

.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 72%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.gallery a { scroll-snap-align: start; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--surface-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.gallery a:hover img { transform: scale(1.04); }
@media (min-width: 760px) { .gallery { grid-auto-columns: minmax(240px, 42%); } }

.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--shadow); }
.aside-card h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); margin: .75rem 0 1rem; }
.aside-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 1.25rem; }
.aside-stats div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; }
.aside-stats strong { display: block; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; }
.aside-stats span { font-size: .78rem; color: var(--text-dim); }
.aside-actions { display: grid; gap: .6rem; }
.aside-actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.aside-meta { list-style: none; margin: 1.25rem 0 0; padding: 1.1rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .6rem; font-size: .92rem; }
.aside-meta li { display: flex; justify-content: space-between; gap: 1rem; color: var(--text-muted); }
.aside-meta li strong { color: var(--text); font-weight: 500; text-align: right; }
.aside-meta .is-free { color: var(--excel); }
.aside-note { font-size: .84rem; color: var(--text-dim); text-align: center; margin: .75rem 0 0; }

/* ---------- Comentarios ---------- */
.comments { max-width: 760px; }
.comments-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.comments-head h2 { margin: 0; font-size: 1.4rem; }
.comment-form { margin-bottom: 2rem; }
.comments .empty { margin: 0 0 1.5rem; padding: 20px; max-width: none; }
.comments .empty p { margin: 0; }
.comment-form .actions { display: flex; justify-content: flex-end; }
.comment { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding-block: 18px; border-top: 1px solid var(--line); }
.comment .avatar { width: 40px; height: 40px; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin-bottom: .25rem; }
.comment-meta strong { color: var(--text); font-size: .95rem; }
.comment-meta time { color: var(--text-dim); font-size: .82rem; }
.comment-body { color: var(--text-muted); white-space: pre-line; word-wrap: break-word; margin: 0 0 .5rem; }
.comment-actions { display: flex; gap: 1rem; align-items: center; }
.comment-actions summary { cursor: pointer; color: var(--accent); font-size: .87rem; font-weight: 600; list-style: none; }
.comment-actions summary::-webkit-details-marker { display: none; }
.comment-reply-form { margin-top: .75rem; }
.comment-reply-form textarea { min-height: 80px; }
.comment-reply-form .btn { margin-top: .5rem; }
.replies { margin-top: .5rem; padding-left: 14px; border-left: 2px solid var(--line-strong); }
.replies .comment { border-top: 0; padding-block: 10px; grid-template-columns: 32px minmax(0, 1fr); }
.replies .avatar { width: 32px; height: 32px; font-size: .8rem; }
.badge-author { font-size: .7rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: .05rem .5rem; }

/* ---------- Galería de destacados ---------- */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 80%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-card); scroll-snap-align: start; border: 1px solid var(--line); }
@media (min-width: 760px) { .strip { grid-auto-columns: minmax(280px, 32%); } }

/* ---------- Detrás del proyecto ---------- */
.about { display: grid; gap: 28px; align-items: center; justify-items: center; text-align: center; max-width: 980px; margin-inline: auto; }
.about-logo { width: min(280px, 70%); }
.about h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.4rem); }
.about p { color: var(--text-muted); max-width: 60ch; }
.adema-card { display: inline-flex; align-items: center; gap: .9rem; margin-top: .5rem; padding: .8rem 1.1rem; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .03); color: var(--text); text-align: left; }
.adema-card:hover { border-color: var(--accent); color: var(--text); }
.adema-card i { font-size: 1.6rem; color: var(--accent); }
.adema-card small { display: block; color: var(--text-dim); font-size: .8rem; }
@media (min-width: 860px) { .about { grid-template-columns: 300px 1fr; text-align: left; justify-items: start; gap: 56px; } .about-logo { width: 100%; } }

/* ---------- Mi cuenta ---------- */
.profile { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; padding-block: 40px 16px; }
.profile h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.4rem); margin: 0; }
.profile p { margin: 0; color: var(--text-muted); }
.profile-stats { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.list-rows { list-style: none; padding: 0; margin: 0; max-width: 760px; margin-inline: auto; }
.list-rows li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-rows .media { aspect-ratio: 1; border-radius: 12px; }
.list-rows .media img { padding: 4px; }
.list-rows strong { display: block; color: var(--text); font-size: .98rem; line-height: 1.3; }
.list-rows small { color: var(--text-dim); }

/* ---------- Tabla (tickets) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-card); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-dim); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface); }
td { color: var(--text-muted); }
tr:last-child td { border-bottom: 0; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: rgba(8, 13, 26, .75); padding-block: 48px 28px; margin-top: 48px; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; }
.footer-brand img { height: 44px; width: auto; margin-bottom: .9rem; }
.footer-brand p { color: var(--text-muted); font-size: .94rem; max-width: 38ch; }
.footer h3 { font-family: var(--font-body); font-size: .85rem; font-weight: 600; color: var(--text); letter-spacing: .02em; margin-bottom: .9rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer ul a { color: var(--text-muted); font-size: .93rem; }
.footer ul a:hover { color: var(--text); }
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-strong); color: var(--text-muted); font-size: 1.2rem; }
.socials a:hover { color: var(--accent); border-color: var(--accent); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .75rem; align-items: center; text-align: center; color: var(--text-dim); font-size: .87rem; }
.footer-bottom p { margin: 0; }
.footer-bottom p a { color: var(--text-muted); margin-left: .5rem; }
.footer-bottom p a:hover { color: var(--text); }
.adema-credit { display: inline-flex; align-items: center; gap: .45rem; color: var(--text-muted); }
.adema-credit strong { color: var(--text); font-weight: 600; }
.adema-credit:hover strong { color: var(--accent); }
@media (min-width: 860px) {
    .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
    .footer-brand { grid-column: auto; }
    .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---------- Animación de entrada ---------- */
@media (prefers-reduced-motion: no-preference) {
    .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
    .js .reveal.is-visible { opacity: 1; transform: none; }
    .hero-copy > * { animation: rise .8s var(--ease) both; }
    .hero-copy > *:nth-child(2) { animation-delay: .08s; }
    .hero-copy > *:nth-child(3) { animation-delay: .16s; }
    .hero-copy > *:nth-child(4) { animation-delay: .24s; }
    .hero-art { animation: rise 1s .15s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Páginas legales ---------- */
.legal-head .legal-fecha { font-size: .88rem; color: var(--text-dim); margin-top: .75rem; }
.legal { display: grid; gap: 28px; margin-top: 32px; grid-template-columns: minmax(0, 1fr); }
.legal-toc details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px 20px; }
.legal-toc summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.legal-toc summary::-webkit-details-marker { display: none; }
.legal-toc summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; }
.legal-toc details[open] summary::after { content: "−"; }
.legal-toc ol { margin: .75rem 0 0; padding-left: 1.2rem; display: grid; gap: .35rem; font-size: .92rem; }
.legal-toc ol a { color: var(--text-muted); }
.legal-toc ol a:hover { color: var(--accent); }
.legal-otra { font-size: .88rem; color: var(--text-dim); margin: 1rem 4px 0; }
.legal-body { max-width: 72ch; min-width: 0; }
.legal-body section { padding-top: 8px; margin-bottom: 36px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.legal-body h2 { font-size: 1.4rem; margin-bottom: .75rem; color: var(--text); }
.legal-body h3 { font-size: 1.08rem; margin: 1.4rem 0 .5rem; color: var(--text); }
.legal-body ul { padding-left: 1.2rem; margin: 0 0 1.1em; display: grid; gap: .45rem; }
.legal-body code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: .05rem .35rem; color: var(--text); }
.legal-resumen { background: var(--accent-soft); border: 1px solid rgba(251, 191, 36, .25); border-radius: var(--radius-card); padding: 20px 24px 8px; }
.legal-resumen h2 { font-size: 1.15rem; }
.legal-tabla { margin: 0 0 1.1em; }
.legal-tabla td, .legal-tabla th { font-size: .9rem; }
.legal-aviso { font-size: .9rem; border-left: 3px solid var(--line-strong); padding-left: 14px; color: var(--text-dim); }
.legal-dos { display: grid; gap: 14px; margin-bottom: 1.1em; }
.legal-si, .legal-no { border-radius: 14px; padding: 16px 18px 6px; border: 1px solid var(--line); background: var(--surface); }
.legal-si h3, .legal-no h3 { margin-top: 0; display: flex; align-items: center; gap: .45rem; }
.legal-si h3 i { color: var(--excel); }
.legal-no h3 i { color: var(--danger); }
@media (min-width: 720px) { .legal-dos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) {
    .legal-tabla { border: 0; overflow: visible; }
    .legal-tabla table, .legal-tabla tbody, .legal-tabla tr, .legal-tabla td { display: block; width: 100%; }
    .legal-tabla thead { display: none; }
    .legal-tabla tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; }
    .legal-tabla td { border: 0; padding: 4px 0; }
    .legal-tabla td::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }
}
@media (min-width: 980px) {
    .legal { grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; }
    .legal-toc { position: sticky; top: calc(var(--nav-h) + 20px); }
    .legal-toc summary { pointer-events: none; }
    .legal-toc summary::after { content: none; }
}

/* ---------- Zona de peligro (eliminar cuenta) ---------- */
.state-form { text-align: left; margin-top: 1.5rem; }
.state-form .actions { justify-content: flex-end; margin-top: .5rem; }
.danger-zone { max-width: 760px; margin: 0 auto; border: 1px solid rgba(248, 113, 113, .3); background: var(--danger-soft); border-radius: var(--radius-card); padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.danger-zone h2 { font-size: 1.1rem; margin: 0 0 .25rem; }
.danger-zone p { margin: 0; color: var(--text-muted); font-size: .92rem; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(248, 113, 113, .5); }
.btn-danger:hover { background: var(--danger); color: #1a0505; border-color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: #1a0505; }
.btn-danger-solid:hover { background: #fca5a5; color: #1a0505; }
.form-note a { color: var(--text-muted); text-decoration: underline; }
