/*
    Paleta NEUTRA de producto (ADR-003 fase 2c).
    Los valores de marca de cada deployment NO viven aquí: el middleware
    (functions/_middleware.js) inyecta un <style id="config-theme"> después de
    esta hoja que sobreescribe las variables de :root con theme.* de la tabla
    deployment_config. Si el middleware no puede rellenar, esta paleta neutra
    es lo que se ve: sin marca, jamás la de otro cliente.
    Deuda conocida (documentada en ADR-004): quedan acentos literales fuera de
    :root (aurora, glows, overlay del hero, reel.css); se convertirán a
    variables en una pasada posterior.
*/

:root {
    --black:     #0A0A0C;
    --surface:   #131318;
    --surface-2: #1B1B22;

    --teal:      #7C8894;
    --teal-dim:  rgba(124, 136, 148, 0.14);
    --gold:      #9AA3AD;
    --gold-dim:  rgba(154, 163, 173, 0.14);
    --pink:      #A7ADB8; /* color del like */

    --text:   #F4F3F1;
    --muted:  #9A9AA4;
    --border: rgba(255, 255, 255, 0.10);

    --font-display: system-ui, sans-serif;
    --font-body: system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, monospace;

    --max: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Fondo animado: aurora teal/oro a la deriva (detrás de todo) */
.aurora { position: fixed; inset: -20%; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(80px); }
.aurora .a1 {
    width: 52vw; height: 52vw; top: -8%; left: -8%;
    background: radial-gradient(circle, rgba(31, 211, 199, 0.30), transparent 70%);
    animation: drift1 19s ease-in-out infinite;
}
.aurora .a2 {
    width: 46vw; height: 46vw; top: 18%; right: -10%;
    background: radial-gradient(circle, rgba(243, 183, 58, 0.26), transparent 70%);
    animation: drift2 23s ease-in-out infinite;
}
.aurora .a3 {
    width: 42vw; height: 42vw; bottom: -14%; left: 28%;
    background: radial-gradient(circle, rgba(31, 211, 199, 0.18), transparent 70%);
    animation: drift3 27s ease-in-out infinite;
}
@keyframes drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, 6vh) scale(1.15); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-6vw, 5vh) scale(1.1); } }
@keyframes drift3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(5vw, -6vh) scale(1.2); } }

/* ===== Header (compartido landing + clips) ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(10, 10, 12, 0.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid transparent;
    background:
        linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
        linear-gradient(135deg, var(--teal), var(--gold)) border-box;
}
img.brand-mark { width: 30px; height: 30px; object-fit: cover; border: 1px solid var(--border); background: none; }

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.brand-name .t { color: var(--teal); }
.brand-name .g { color: var(--gold); }

.site-nav { display: flex; align-items: center; gap: 18px; }
.nav-link { font-family: var(--font-body); font-weight: 500; font-size: 0.92rem; color: var(--text); }
.nav-link:hover { color: var(--teal); }

/* ===== Botones (compartidos) ===== */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    padding: 12px 22px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s ease, filter 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--black); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--teal); }
.btn-secondary:hover { background: var(--teal-dim); }

.nav-btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--black);
    background: var(--gold);
    border-radius: 9px;
    padding: 9px 16px;
    transition: filter 0.18s ease;
}
.nav-btn:hover { filter: brightness(1.08); }

/* ============================================================
   ===============  LANDING REDISEÑADO (HUD)  =================
   ============================================================ */

/* ---------- Eyebrows (etiquetas mono) ---------- */
.lp-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.lp-eyebrow--teal { color: var(--teal); }
.lp-eyebrow--gold { color: var(--gold); }
.lp-live {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--teal); flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(31, 211, 199, 0.5);
    animation: pulse 1.8s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(31, 211, 199, 0.5); }
    70%  { box-shadow: 0 0 0 9px rgba(31, 211, 199, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 211, 199, 0); }
}

/* ---------- Hero ---------- */
.lp-hero {
    position: relative;
    overflow: hidden;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lp-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background: var(--hero-banner, none) center / cover no-repeat; /* la inyecta el middleware (theme.assets.banner) */
    animation: kenburns 24s ease-in-out infinite alternate;
}
@keyframes kenburns {
    from { transform: scale(1.05); }
    to   { transform: scale(1.18); }
}
.lp-hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background:
        radial-gradient(78% 78% at 50% 42%, rgba(10, 10, 12, 0.55), rgba(10, 10, 12, 0.86)),
        linear-gradient(to bottom, rgba(10, 10, 12, 0.60) 0%, rgba(10, 10, 12, 0.98) 94%);
}
/* malla HUD muy tenue, desvanecida hacia los bordes */
.lp-hero-grid {
    position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.6;
    background-image:
        linear-gradient(rgba(31, 211, 199, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 211, 199, 0.05) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(72% 72% at 50% 45%, #000, transparent);
            mask-image: radial-gradient(72% 72% at 50% 45%, #000, transparent);
}

.lp-hero-inner {
    position: relative; z-index: 2;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 120px 24px 84px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: rise 0.7s ease-out both;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lp-eyebrow { margin-bottom: 30px; }

.lp-sub-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--muted);
    margin-bottom: 8px;
}

/* ---------- Odómetro ---------- */
.lp-odo {
    display: inline-flex;
    align-items: flex-end;
    font-family: var(--font-mono);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.lp-odo--xl { font-size: clamp(3.4rem, 13vw, 8rem); letter-spacing: -0.01em; }
.lp-odo--md { font-size: clamp(1.5rem, 5vw, 2.2rem); }
.lp-odo.teal { color: var(--teal); text-shadow: 0 0 42px rgba(31, 211, 199, 0.32); }
.lp-odo.gold { color: var(--gold); text-shadow: 0 0 32px rgba(243, 183, 58, 0.28); }
.lp-odo .od-col { height: 1em; overflow: hidden; display: inline-block; }
.lp-odo .od-reel { display: flex; flex-direction: column; will-change: transform; }
.lp-odo .od-d { height: 1em; display: flex; align-items: center; justify-content: center; }
.lp-odo .od-sep { display: inline-block; padding: 0 0.04em; }

/* línea de telemetría bajo el número estrella */
.lp-baseline { width: min(560px, 86%); height: 16px; position: relative; margin: 16px 0 10px; }
.lp-baseline::before {
    content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--teal), transparent);
}
.lp-baseline::after {
    content: ""; position: absolute; left: 8%; right: 8%; top: 4px; height: 8px;
    background-image: repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 26px);
}
.lp-handle {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--gold);
    margin-bottom: 36px;
}
.lp-handle:hover { color: var(--teal); }

/* ---------- Gauges secundarios (views / videos) ---------- */
.lp-gauges { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 38px; }
.lp-gauge {
    position: relative;
    min-width: 200px;
    padding: 16px 24px 14px;
    background: rgba(19, 19, 24, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(4px);
}
.lp-g-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    display: block;
    margin-bottom: 8px;
}
/* esquinas tipo instrumento */
.lp-gauge i { position: absolute; width: 9px; height: 9px; }
.lp-gauge i.tl { top: -1px; left: -1px; border-top: 2px solid var(--teal); border-left: 2px solid var(--teal); }
.lp-gauge i.tr { top: -1px; right: -1px; border-top: 2px solid var(--teal); border-right: 2px solid var(--teal); }
.lp-gauge i.bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--teal); border-left: 2px solid var(--teal); }
.lp-gauge i.br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--teal); border-right: 2px solid var(--teal); }
.lp-gauge.gold i { border-color: var(--gold); }

.lp-tagline {
    font-size: 1.08rem;
    color: var(--text);
    max-width: 540px;
    line-height: 1.5;
    margin-bottom: 30px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-yt { display: inline-flex; align-items: center; gap: 9px; }
.btn-yt svg { width: 18px; height: 18px; }

/* ---------- Redes ---------- */
.lp-socials { display: flex; gap: 12px; justify-content: center; margin-top: 30px; }
.social {
    width: 42px; height: 42px; border-radius: 50%;
    display: grid; place-items: center;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.15s ease;
}
.social:hover { color: var(--teal); border-color: var(--teal); background: var(--teal-dim); transform: translateY(-2px); }
.social svg { width: 20px; height: 20px; }

/* botón "copiar email" */
.copy-email { display: inline-flex; align-items: center; gap: 8px; }
.copy-email svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Callout de Clips ---------- */
.lp-clips { max-width: var(--max); margin: 0 auto; padding: 72px 24px 0; }
.lp-clips-inner {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(31, 211, 199, 0.10), rgba(243, 183, 58, 0.07)),
        var(--surface);
    padding: 40px 34px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.lp-clips-text { max-width: 580px; }
.lp-clips-text .lp-eyebrow { margin-bottom: 12px; }
.lp-clips-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    letter-spacing: -0.01em;
    line-height: 1.12;
    margin-bottom: 10px;
}
.lp-clips-body { color: var(--muted); font-size: 1rem; line-height: 1.55; }

/* ---------- Para marcas ---------- */
.lp-pitch { max-width: 720px; margin: 0 auto; padding: 84px 24px; text-align: center; }
.lp-pitch .lp-eyebrow { margin-bottom: 14px; }
.lp-pitch-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}
.lp-pitch-body { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin-bottom: 28px; }
.lp-pitch-cta { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.partner { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); }
.partner a { color: var(--teal); }

/* ===== Landing: últimos vídeos de YouTube ===== */
.lp-videos { max-width: var(--max); margin: 0 auto; padding: 24px 24px 84px; }
.lp-videos-head { margin-bottom: 26px; }
.lp-videos-head .lp-eyebrow { margin-bottom: 10px; }
.lp-videos-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    letter-spacing: -0.01em;
}
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.video-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    color: var(--text);
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.video-card:hover { border-color: var(--teal); transform: translateY(-3px); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(10, 10, 12, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.video-play::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 3px;
    border-left: 15px solid var(--text);
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
}
.video-card:hover .video-play { opacity: 1; }
.video-meta { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.video-title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-date { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.lp-videos-more {
    display: inline-block;
    margin-top: 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--teal);
}
.lp-videos-more:hover { color: var(--gold); }

/* ===== Footer ===== */
.site-footer {
    max-width: var(--max);
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}
.brand-name.small { font-size: 0.95rem; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--teal); }
.copy { font-family: var(--font-mono); font-size: 0.8rem; }

/* ============================================================
   ===============  PÁGINA DE CLIPS (intacta)  ================
   ============================================================ */
.login-btn, .panel-btn {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 9px 16px;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}
.login-btn:hover, .panel-btn:hover { border-color: var(--teal); background: var(--surface); }

.user-info { font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.user-info a { color: var(--teal); }

.page-main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.state {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 40px 0;
}

/* controles (buscador + orden) */
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 22px; }
.search {
    flex: 1 1 220px;
    max-width: 320px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 9px 14px;
    outline: none;
    transition: border-color 0.18s ease;
}
.search::placeholder { color: var(--muted); }
.search:focus { border-color: var(--teal); }
.sort {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 9px 14px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s ease;
}
.sort:focus { border-color: var(--teal); }
.sort option { background: var(--surface); color: var(--text); }

/* pestañas por canal */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.tab {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.tab:hover { color: var(--text); border-color: var(--teal); }
.tab.active { color: var(--black); background: var(--teal); border-color: var(--teal); }

/* grid + tarjetas */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: var(--teal); transform: translateY(-3px); }
.card-video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
/* poster como <img> perezosa: mismo encuadre que el poster del <video>
   (contain sobre negro: los clips verticales se ven enteros, sin recortes) */
.card-poster {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    display: block;
    object-fit: contain;
}
/* centinela del render por tandas: invisible, ocupa una fila entera del grid */
.grid-sentinel { grid-column: 1 / -1; height: 1px; }
.card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}
.creator {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.creator::before { content: "@"; color: var(--teal); }

.like {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.18s ease, border-color 0.18s ease;
}
.like:hover { color: var(--pink); border-color: var(--pink); }
.like:disabled { opacity: 0.6; cursor: default; }
.like .heart { font-size: 0.95rem; line-height: 1; }
.like.liked { color: var(--pink); border-color: var(--pink); }

/* ===== Clips: cabecera HUD ===== */
.clips-head { margin-bottom: 22px; }
.clips-head .lp-eyebrow { margin-bottom: 10px; }
.clips-head .title { margin-bottom: 6px; }
.clips-readout {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    min-height: 1em;
}

/* ===== Clips: esqueletos de carga ===== */
.card.skeleton { pointer-events: none; }
.sk-video { width: 100%; aspect-ratio: 16 / 9; }
.sk-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.sk-line { height: 12px; width: 45%; border-radius: 6px; }
.sk-pill { height: 28px; width: 64px; border-radius: 999px; }
.sk-video, .sk-line, .sk-pill {
    background: linear-gradient(100deg, var(--surface-2) 30%, rgba(255, 255, 255, 0.06) 50%, var(--surface-2) 70%);
    background-size: 200% 100%;
    animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ===== Clips: estado vacío / error ===== */
.empty { grid-column: 1 / -1; text-align: center; padding: 60px 16px; }
.empty-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 8px;
}
.empty-sub {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
    max-width: 440px;
    margin: 0 auto;
}

/* ===== Clips: "pop" del corazón al dar like ===== */
.like .heart { display: inline-block; }
.like .heart.pop { animation: heart-pop 0.4s ease; }
@keyframes heart-pop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.45); }
    60%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* ===== Clips: @creador clicable (abre perfil) ===== */
.creator {
    background: none;
    border: none;
    padding: 0;
    min-width: 0;
    cursor: pointer;
    text-align: left;
    transition: color 0.15s ease;
}
.creator:hover { color: var(--teal); }

/* ===== Clips: cabecera de perfil de rider ===== */
.rider-head { margin-bottom: 24px; }
.rider-back {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 18px;
    cursor: pointer;
    transition: color 0.15s ease;
}
.rider-back:hover { color: var(--teal); }
.rider-profile {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(31, 211, 199, 0.08), rgba(243, 183, 58, 0.05)),
        var(--surface);
}
.rider-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--text);
    border: 2px solid transparent;
    background:
        linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
        linear-gradient(135deg, var(--teal), var(--gold)) border-box;
}
.rider-meta { flex: 1 1 auto; min-width: 0; }
.rider-meta .lp-eyebrow { margin-bottom: 6px; }
.rider-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 4vw, 2rem);
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Antiguedad del fan bajo el nombre (ADR-012); mismo tono que .rs-label */
.rider-since {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin-top: 4px;
}
.rider-stats { display: flex; flex-wrap: wrap; gap: 22px; flex-shrink: 0; }
.rider-stat { display: flex; flex-direction: column; gap: 4px; }
.rs-num {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(1.2rem, 3.2vw, 1.55rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.rs-num.pink { color: var(--pink); }
.rs-num.teal { color: var(--teal); }
.rs-num.gold { color: var(--gold); }
.rs-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

/* Avatar real de Discord (cae a la inicial si no hay imagen) */
.rider-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ===== Clips: badges / hitos del perfil ===== */
.rider-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text);
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
}
.badge-ico { font-size: 0.85rem; line-height: 1; }

/* ===== Clips: captura de email (solo en tu perfil) ===== */
/* --- "Your month": stats personales del creador (panel My clips) ------------ */
.my-stats {
    margin-top: 16px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}
.ms-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
}
.ms-window {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin-left: 10px;
}
.ms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    margin-top: 14px;
}
.ms-stat { display: flex; flex-direction: column; gap: 4px; }
.ms-num {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(1.05rem, 2.6vw, 1.3rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.ms-num.teal { color: var(--teal); }
.ms-num.gold { color: var(--gold); }
.ms-reacts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 16px;
}
.ms-react {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 999px;
    padding: 5px 11px;
    line-height: 1;
    font-size: 0.9rem;
}
.ms-react-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.ms-top {
    margin-top: 14px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.5;
}
.ms-top-link { color: var(--gold); text-decoration: none; }
.ms-top-link:hover { text-decoration: underline; }

.email-capture {
    margin-top: 16px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}
.ec-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}
.ec-sub {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 14px;
    max-width: 560px;
}
.ec-form { display: flex; flex-wrap: wrap; gap: 10px; }
.ec-input {
    flex: 1 1 260px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.18s ease;
}
.ec-input::placeholder { color: var(--muted); }
.ec-input:focus { border-color: var(--teal); }
.ec-save { flex: 0 0 auto; }
.ec-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 12px;
    min-height: 1em;
}
.ec-status--ok { color: var(--teal); }
.ec-status--error { color: var(--pink); }
.ec-remove {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}
.ec-remove:hover { color: var(--pink); }

/* ===== Toasts (avisos propios, sin diálogos del navegador) ===== */
.toast-wrap {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(440px, calc(100vw - 32px));
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-left: 3px solid var(--teal);
    border-radius: 12px;
    padding: 12px 12px 12px 16px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.in { opacity: 1; transform: translateY(0); }
.toast.out { opacity: 0; transform: translateY(10px); }
.toast--warn  { border-left-color: var(--gold); }
.toast--error { border-left-color: var(--pink); }
.toast-msg { flex: 1; }
.toast-action {
    flex-shrink: 0;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--black);
    background: var(--teal);
    border: none;
    border-radius: 8px;
    padding: 7px 12px;
    cursor: pointer;
    transition: filter 0.15s ease;
}
.toast-action:hover { filter: brightness(1.08); }
.toast--warn .toast-action { background: var(--gold); }
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 6px;
}
.toast-close:hover { color: var(--text); }

/* ===== Responsive ===== */
@media (max-width: 720px) {
    .lp-clips-inner { flex-direction: column; align-items: flex-start; text-align: left; }
}
@media (max-width: 600px) {
    .lp-hero { min-height: 86vh; }
    .lp-hero-inner { padding: 96px 20px 56px; }
    .lp-gauges { width: 100%; }
    .lp-gauge { min-width: 0; flex: 1 1 100%; }
    .lp-pitch { padding: 56px 20px; }
    .lp-clips { padding-top: 44px; }
    .lp-clips-inner { padding: 30px 22px; }
    .grid { grid-template-columns: 1fr; }
    .user-info { display: none !important; }
    .rider-profile { gap: 16px; }
    .rider-stats { gap: 22px; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
    .lp-hero-inner, .lp-hero-bg, .aurora span, .lp-live { animation: none !important; }
    .lp-odo .od-reel { transition: none !important; }
    .sk-video, .sk-line, .sk-pill, .like .heart.pop { animation: none !important; }
    .btn:hover, .card:hover, .video-card:hover { transform: none; }
}


/* ===== Clips: fila de acciones (vistas · compartir · descargar) ===== */
.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px 14px;
    border-top: 1px solid var(--border);
}

.views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.views-ico { color: var(--teal); font-size: 0.62rem; line-height: 1; }

.card-act-btns { display: inline-flex; gap: 8px; flex-shrink: 0; }

.act {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 11px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.18s ease, border-color 0.18s ease;
}
.act:hover { color: var(--teal); border-color: var(--teal); }
.act-ico { font-size: 0.85rem; line-height: 1; }

/* ===== Clips: menú de compartir (anclado, fixed para no recortarse) ===== */
.share-menu {
    position: fixed;
    z-index: 100;
    min-width: 172px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: share-in 0.14s ease;
}
@keyframes share-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.share-item {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text);
    background: none;
    border: none;
    border-radius: 8px;
    padding: 9px 12px;
    text-align: left;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease;
}
.share-item:hover { background: var(--surface-2); color: var(--teal); }

/* ===== Clips: resaltado al abrir un enlace ?clip= ===== */
.card--focus {
    animation: clip-focus 2.1s ease;
}
@keyframes clip-focus {
    0%   { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim); }
    70%  { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim); }
    100% { border-color: var(--border); box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .share-menu { animation: none; }
    .card--focus { animation: none; border-color: var(--teal); }
}

/* ==== Tarjeta -> reel: el vídeo de la tarjeta es un enlace al clip en el reel ==== */
.card-media { position: relative; display: block; }
.card-media .card-video,
.card-media .card-poster { pointer-events: none; } /* el clic es del enlace */
.card-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px; /* centra ópticamente el triángulo */
    background: rgba(10, 10, 12, 0.55);
    border: 1px solid var(--border);
    backdrop-filter: blur(6px);
    color: var(--text);
    font-size: 1.05rem;
    transition: transform 0.15s ease, border-color 0.18s ease;
}
.card-media:hover .card-play { transform: scale(1.1); border-color: var(--teal); }
.card-media:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .card-play { transition: none; }
    .card-media:hover .card-play { transform: none; }
}


/* ---- Banner "únete" del muro de clips (permanente) --------------------------- */
/* Mismo mensaje que la bienvenida del reel, pero fijo: el muro es la landing de
   la comunidad y la puerta al Discord tiene que estar siempre a la vista.
   Convive con ambas cabeceras (muro y perfil de rider): no se oculta nunca. */
.clips-join {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* móvil: el botón cae a su propia línea */
    gap: 12px 18px;
    margin: 18px 0 6px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--teal);
    border-radius: 14px;
    background: var(--surface);
}
.cj-text {
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
    flex: 1 1 320px;
}
.cj-strong { color: var(--text); font-weight: 700; }
.cj-btn { flex: 0 0 auto; text-decoration: none; }


/* ==== 👑 Clip of the Week: tarjeta hero del muro (ADICIÓN: nada del original se toca) ==== */
/* Marco dorado (el oro es el color de premio del sistema; el teal, de la
   comunidad). Solo la pinta app.js cuando /api/cotw trae ganador vigente. */
.cotw-hero {
    display: flex;
    gap: 18px;
    align-items: stretch;
    margin: 18px 0 6px;
    padding: 14px;
    background:
        linear-gradient(135deg, var(--gold-dim), transparent 60%),
        var(--surface);
    border: 1px solid var(--gold);
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(243, 183, 58, 0.15), 0 12px 32px rgba(0, 0, 0, 0.35);
}
/* nuestro display:flex ganaria al [hidden] del navegador: explicito (la
   misma guarda que reel.css). Sin esto, el hero oculto (perfil, o modulo
   cotw pausado/apagado) se pinta como una caja dorada VACIA. */
.cotw-hero[hidden] { display: none; }

/* media: mismo lenguaje que .card-media (reutiliza .card-play como botón de play) */
.cotw-media {
    position: relative;
    display: block;
    flex: 0 0 42%;
    max-width: 440px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.cotw-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* el clic es del enlace */
}
.cotw-media:hover .card-play { transform: scale(1.1); border-color: var(--gold); }
.cotw-media:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.cotw-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 4px 6px;
}
.cotw-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
}
.cotw-rider {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    align-self: flex-start;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}
.cotw-rider:hover { color: var(--gold); }
.cotw-caption {
    color: var(--muted);
    font-size: 0.92rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.cotw-stats {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
}
.cotw-cta {
    align-self: flex-start;
    margin-top: 4px;
    text-decoration: none;
}

@media (max-width: 720px) {
    .cotw-hero { flex-direction: column; gap: 12px; }
    .cotw-media { flex: none; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cotw-media:hover .card-play { transform: none; }
}

/* ---- 🏆 Concursos (ADR-014, ADICION) --------------------------------------
   Banners de concursos abiertos sobre el grid, cabecera de la vista de
   concurso y la barra de puntuacion 1-10 de cada tarjeta. Oro suave, en la
   familia visual de la carrera del CotW (gold-dim). */
/* misma guarda que .cotw-hero: sin ella, los banners ocultos (perfiles,
   modulo pausado) seguirian visibles porque display:flex gana a [hidden]. */
.contest-banners[hidden] { display: none; }
.contest-banners {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 18px;
}
.contest-banner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    text-align: left;
    background: var(--gold-dim);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    color: var(--text);
    font: inherit;
}
.contest-banner:hover { border-color: var(--gold); }
.contest-banner .cb-title { font-weight: 600; }
.contest-banner .cb-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
}

.contest-head { margin: 0 0 18px; }
.contest-title { font-size: 1.5rem; margin: 6px 0 4px; }
.contest-status {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0;
}
.contest-podium {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 12px;
}
.podium-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rate-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding: 10px 14px 12px;
}
.rate-info {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--gold);
}
.rate-note {
    font-size: 0.8rem;
    color: var(--muted);
}
.rate-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.rate-btn {
    min-width: 30px;
    padding: 4px 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}
.rate-btn:hover:not(:disabled) { color: var(--text); border-color: var(--gold); }
.rate-btn:disabled { opacity: 0.5; cursor: default; }
.rate-btn.active {
    color: var(--black);
    background: var(--gold);
    border-color: var(--gold);
    font-weight: 700;
}