/* =======================================================
   ZONATV — Centro de Tutoriales (página pública)
======================================================= */

:root {
    --bg:        #09090b;
    --bg-2:      #0f0f12;
    --surface:   #141418;
    --surface-2: #1b1b21;
    --surface-3: #23232b;
    --line:      rgba(255,255,255,.07);
    --line-2:    rgba(255,255,255,.12);
    --text:  #f5f5f7;
    --muted: #a1a1aa;
    --dim:   #6b6b76;
    --accent:      #ef2b2d;
    --accent-hi:   #ff4a4a;
    --accent-soft: rgba(239,43,45,.12);
    --accent-line: rgba(239,43,45,.38);
    --ok: #22c55e;
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
    --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: var(--font); font-size: 16px; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.bg-halo {
    position: absolute; top: 0; left: 0; right: 0; height: 720px; pointer-events: none; z-index: 0;
    background:
        radial-gradient(800px 420px at 50% -80px, rgba(239,43,45,.20), transparent 70%),
        radial-gradient(400px 300px at 85% 30%, rgba(239,43,45,.06), transparent 70%);
}
.bg-grain-pub { display: none; }

.v-container { position: relative; z-index: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- HEADER ---------- */
.v-header {
    position: sticky; top: 0; z-index: 60;
    background: rgba(9,9,11,.82);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.v-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.v-logo { display: flex; align-items: center; gap: 12px; min-width: 0; }
.v-logo-img { height: 38px; width: auto; border-radius: 7px; }
.v-logo-icon { font-size: 1.6rem; }
.v-logo-text { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.v-logo-sub  { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; }

.v-nav { display: flex; align-items: center; gap: 2px; }
.v-nav-link {
    padding: .45rem .7rem; border-radius: 8px;
    font-size: .86rem; font-weight: 600; color: var(--muted); white-space: nowrap;
    transition: color .15s, background .15s;
}
.v-nav-link:hover, .v-nav-link.is-active { color: var(--text); background: var(--surface-2); }
.v-nav-link-cta { margin-left: 6px; background: var(--accent); color: #fff; }
.v-nav-link-cta:hover { background: var(--accent-hi); color: #fff; }

.v-menu-btn {
    display: none; width: 42px; height: 42px; border-radius: 10px;
    background: var(--surface-2); border: 1px solid var(--line-2); cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.v-menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.v-menu-btn.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.v-menu-btn.active span:nth-child(2) { opacity: 0; }
.v-menu-btn.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.v-mobile-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 55;
    background: rgba(12,12,15,.97);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 8px 12px 14px;
    display: flex; flex-direction: column;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .2s, opacity .2s;
}
.v-mobile-nav.active { transform: none; opacity: 1; pointer-events: auto; }
.v-mobile-link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 10px; border-radius: 10px;
    font-weight: 600; font-size: .98rem;
}
.v-mobile-link:hover { background: var(--surface-2); }
.v-mobile-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-size: 1rem; }

/* ---------- HERO ---------- */
.v-hero { position: relative; padding: 56px 0 40px; text-align: center; }
.v-hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .38rem .85rem; border-radius: 999px;
    background: var(--accent-soft); border: 1px solid var(--accent-line);
    color: #fca5a5; font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.v-hero-title {
    margin: 18px auto 12px; max-width: 18ch;
    font-size: clamp(2rem, 6vw, 3.3rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08;
}
.v-hero-desc { margin: 0 auto; max-width: 56ch; color: var(--muted); font-size: 1.05rem; }

.v-hero-cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    margin-top: 40px; text-align: left;
}
.v-hero-card {
    display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
    padding: 14px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line);
    transition: border-color .15s, transform .15s, background .15s;
}
.v-hero-card:hover { border-color: var(--accent-line); background: var(--surface-2); transform: translateY(-2px); }
.v-hero-card-icon {
    grid-row: 1 / span 2; width: 52px; height: 52px; border-radius: 12px; overflow: hidden;
    background: var(--surface-3); display: grid; place-items: center;
}
.v-hero-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.v-hero-card-icon .emoji { font-size: 1.6rem; }
.v-hero-card-title { font-weight: 700; font-size: .98rem; line-height: 1.25; align-self: end; }
.v-hero-card-desc  { font-size: .8rem; color: var(--muted); align-self: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- TUTORIAL ---------- */
.v-tuto { padding: 40px 0; scroll-margin-top: calc(var(--header-h) + 8px); }
.v-tuto + .v-tuto { border-top: 1px solid var(--line); }
.v-tuto-header { margin-bottom: 20px; }
.v-tuto-badge {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .3rem .75rem .3rem .3rem; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line-2);
    font-size: .82rem; font-weight: 700; color: var(--muted);
}
.v-tuto-badge-logo { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.v-tuto-title { margin: 14px 0 4px; font-size: clamp(1.45rem, 4vw, 2rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
.v-tuto-subtitle { margin: 0; color: var(--muted); }
.v-tuto-intro {
    margin-bottom: 22px; padding: 12px 16px;
    border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0;
    background: var(--surface); color: #d4d4d8; font-size: .95rem;
}
.v-empty { padding: 16px; border-radius: 12px; background: var(--surface); color: var(--muted); }

.v-steps { position: relative; display: flex; flex-direction: column; gap: 12px; }
.v-step {
    position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 16px;
    padding: 18px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line);
}
.v-step-number {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-hi);
    font-weight: 800; font-size: 1rem;
}
.v-step-content { min-width: 0; }
.v-step-title { margin: 7px 0 6px; font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.v-step-body p { margin: 0; color: #c9c9d0; font-size: .95rem; }

.v-code-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 14px; }
.v-code-box {
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 14px; border-radius: 12px;
    background: var(--bg-2); border: 1.5px dashed var(--line-2);
    cursor: pointer; transition: border-color .15s, background .15s;
    -webkit-tap-highlight-color: transparent;
}
.v-code-box:hover { border-color: var(--accent-line); }
.v-code-label { font-size: .7rem; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.v-code-value { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; letter-spacing: .06em; color: #fff; }
.v-code-copy { font-size: .74rem; color: var(--muted); font-weight: 600; }
.v-code-box.copied { border-style: solid; border-color: var(--ok); background: rgba(34,197,94,.07); }
.v-code-box.copied .v-code-copy { color: var(--ok); }

.v-links { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.v-link {
    position: relative; display: flex; flex-direction: column;
    padding: 11px 56px 11px 14px; border-radius: 12px;
    background: var(--bg-2); border: 1px solid var(--line-2);
    transition: border-color .15s, background .15s;
}
.v-link:hover { border-color: var(--accent-line); background: var(--surface-2); }
.v-link-label { font-weight: 700; font-size: .92rem; }
.v-link-label::after { content: ' ↗'; color: var(--accent-hi); }
.v-link-url { font-family: var(--mono); font-size: .76rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-link-copy {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: 9px;
    background: var(--surface-3); border: 0; color: var(--muted); font-size: 1rem; cursor: pointer;
}
.v-link-copy:hover { color: var(--text); }
.v-link-copy.copied { background: var(--ok); color: #04130a; }

.v-info-box {
    display: flex; gap: 10px; align-items: flex-start;
    margin-top: 14px; padding: 12px 14px; border-radius: 12px;
}
.v-info-box p { margin: 0; }
.v-info-success { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25); }
.v-info-success p { color: #bbf7d0 !important; }
.v-info-icon { font-size: 1.05rem; line-height: 1.5; }

/* ---------- SOPORTE ---------- */
.v-support { padding: 56px 0 64px; text-align: center; border-top: 1px solid var(--line); }
.v-support-title { margin: 0 0 8px; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; letter-spacing: -.025em; }
.v-support-desc { margin: 0 auto; max-width: 52ch; color: var(--muted); }
.v-support-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; gap: 12px; margin-top: 28px; }
.v-support-card {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 22px 18px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line);
    transition: border-color .15s, transform .15s;
}
.v-support-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.v-support-card-img { width: 56px; height: 56px; border-radius: 16px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; margin-bottom: 8px; }
.v-support-card-img img { width: 100%; height: 100%; object-fit: cover; }
.v-support-emoji { font-size: 1.6rem; }
.v-support-card h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.v-support-card p { margin: 0; color: var(--muted); font-size: .88rem; }

/* ---------- FOOTER ---------- */
.v-footer { border-top: 1px solid var(--line); padding: 22px 0; }
.v-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.v-footer-logo { font-weight: 800; }
.v-footer p { margin: 0; color: var(--dim); font-size: .84rem; }

/* ---------- TOAST / FAB ---------- */
.v-toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 100;
    transform: translate(-50%, 16px); opacity: 0;
    background: var(--text); color: var(--bg);
    padding: .6rem 1.1rem; border-radius: 999px; font-weight: 700; font-size: .88rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: transform .2s, opacity .2s;
}
.v-toast.show { transform: translate(-50%, 0); opacity: 1; }
.v-fab {
    position: fixed; right: 16px; bottom: 20px; z-index: 50;
    width: 46px; height: 46px; border-radius: 14px;
    background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
    font-size: 1.15rem; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.v-fab:hover { border-color: var(--accent-line); }

/* ---------- ANIMACIÓN DE ENTRADA ---------- */
.js-on .v-step, .js-on .v-hero-card, .js-on .v-support-card {
    opacity: 0; transform: translateY(10px);
    transition: opacity .4s ease, transform .4s ease, border-color .15s, background .15s;
}
.js-on .v-step.visible, .js-on .v-hero-card.visible, .js-on .v-support-card.visible { opacity: 1; transform: none; }
.js-on .v-hero-card.visible:hover, .js-on .v-support-card.visible:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
    .js-on .v-step, .js-on .v-hero-card, .js-on .v-support-card { opacity: 1; transform: none; transition: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1000px) {
    .v-nav { display: none; }
    .v-menu-btn { display: flex; }
}
@media (max-width: 820px) {
    .v-hero-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    :root { --header-h: 60px; }
    .v-logo-img { height: 32px; }
    .v-hero { padding: 40px 0 28px; }
    .v-hero-desc { font-size: .98rem; }
    .v-hero-cards { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 28px; }
    .v-hero-card { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 10px; padding: 12px; }
    .v-hero-card-icon { grid-row: auto; width: 44px; height: 44px; }
    .v-hero-card-desc { white-space: normal; }
    .v-tuto { padding: 32px 0; }
    .v-step { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
    .v-step-number { width: 34px; height: 34px; border-radius: 10px; font-size: .92rem; }
    .v-step-title { margin-top: 0; }
    .v-code-boxes { grid-template-columns: 1fr 1fr; }
    .v-code-value { font-size: 1.3rem; }
    .v-support-cards { grid-template-columns: 1fr; }
    .v-footer-inner { flex-direction: column; text-align: center; }
}
/* logos con fondo blanco: mostrarlos completos */
.v-hero-card-icon:has(img), .v-support-card-img:has(img) { background: #fff; }
.v-hero-card-icon img, .v-support-card-img img, .v-tuto-badge-logo { object-fit: contain; background: #fff; }
