/* =============================================================
   Landing pública (index + r/) — comparte tokens con el CRM.
   Estética sobria, indigo accent, tema dark/light.
   ============================================================= */

:root {
    --bg:           #0a0b0f;
    --bg-elev-1:    #12141b;
    --bg-elev-2:    #181a23;
    --bg-elev-3:    #20232e;
    --border:       rgba(255, 255, 255, 0.06);
    --border-strong:rgba(255, 255, 255, 0.10);
    --text:         #e7e9ee;
    --text-muted:   #8b909c;
    --text-faint:   #5b606b;
    --accent:       #6366f1;
    --accent-hover: #7c7fea;
    --accent-soft:  rgba(99, 102, 241, 0.14);
    --accent-ring:  rgba(99, 102, 241, 0.30);
    --success:      #22c55e;
    --success-soft: rgba(34, 197, 94, 0.14);
    --danger:       #ef4444;
    --danger-soft:  rgba(239, 68, 68, 0.14);
    --radius-sm: 6px;
    --radius:    8px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --container-max: 1100px;
}

html[data-theme="light"] {
    --bg:           #f6f8fb;
    --bg-elev-1:    #ffffff;
    --bg-elev-2:    #f3f4f8;
    --bg-elev-3:    #e7e9ef;
    --border:       rgba(15, 23, 42, 0.08);
    --border-strong:rgba(15, 23, 42, 0.14);
    --text:         #1f2328;
    --text-muted:   #57606a;
    --text-faint:   #8b929c;
    --accent:       #4f46e5;
    --accent-hover: #4338ca;
    --accent-soft:  rgba(79, 70, 229, 0.10);
    --accent-ring:  rgba(79, 70, 229, 0.22);
    color-scheme: light;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 120ms; }
a:hover { color: var(--accent-hover); }

/* ----- NAV ----- */
.lp-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.lp-nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.lp-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
}

.lp-brand:hover { color: var(--text); }

.lp-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.lp-nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lp-icon-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 120ms, color 120ms;
    line-height: 1;
}
.lp-icon-btn:hover { background: var(--bg-elev-2); color: var(--text); }

/* ----- BUTTONS ----- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 120ms, border-color 120ms, color 120ms, transform 120ms;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-ghost:hover {
    background: var(--bg-elev-2);
    color: var(--text);
}
.btn-lg {
    padding: 12px 22px;
    font-size: 15px;
}
.btn-block { width: 100%; justify-content: center; }

/* ----- HERO ----- */
.hero {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 80px 24px 60px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(34px, 4.4vw, 52px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.hero h1 .accent {
    color: var(--accent);
}

.hero-sub {
    font-size: 17px;
    color: var(--text-muted);
    margin-bottom: 28px;
    max-width: 520px;
}

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hero-meta {
    color: var(--text-faint);
    font-size: 13px;
}

.hero-meta a { color: var(--text-muted); }
.hero-meta a:hover { color: var(--accent); }

/* Hero visual: tarjeta minimal con "device frame" */
.hero-visual {
    position: relative;
    height: 420px;
}

.device-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 380px;
    background: var(--bg-elev-1);
    border: 1px solid var(--border-strong);
    border-radius: 36px;
    padding: 16px 14px;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.device-frame::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: var(--bg-elev-3);
    border-radius: 999px;
}

.device-screen {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.device-row {
    background: var(--bg-elev-2);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
}

.device-row.now { background: var(--accent-soft); border-color: transparent; }

.device-row-cover {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    flex-shrink: 0;
}

.device-row-meta { min-width: 0; flex: 1; }
.device-row-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.device-row-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.device-row .play-icon {
    color: var(--accent);
    font-size: 18px;
}

/* Decoración detrás del device */
.hero-visual::before,
.hero-visual::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
}
.hero-visual::before {
    top: 10%;
    left: 20%;
    width: 200px;
    height: 200px;
    background: var(--accent);
}
.hero-visual::after {
    bottom: 10%;
    right: 10%;
    width: 180px;
    height: 180px;
    background: #06b6d4;
}

/* ----- SECTIONS ----- */
section.lp {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 60px 24px;
}

.lp-section-head {
    text-align: center;
    margin-bottom: 48px;
}

.lp-section-eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.lp-section-head h2 {
    font-size: clamp(26px, 3vw, 34px);
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.lp-section-head p {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto;
}

/* ----- FEATURES ----- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.feature-card {
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: border-color 150ms, transform 150ms;
}

.feature-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ----- STATS ----- */
.stats-strip {
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
}

.stat-cell {
    text-align: center;
}

.stat-cell .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stat-cell .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 6px;
}

/* ----- CTA emisoras ----- */
.cta-card {
    background: linear-gradient(135deg, var(--accent-soft), transparent);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

.cta-card h3 {
    font-size: 22px;
    color: var(--text);
    margin-bottom: 6px;
    font-weight: 600;
}

.cta-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ----- FOOTER ----- */
.lp-footer {
    border-top: 1px solid var(--border);
    margin-top: 60px;
    padding: 28px 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.lp-footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lp-footer-links {
    display: flex;
    gap: 16px;
}

.lp-footer-links a { color: var(--text-muted); }
.lp-footer-links a:hover { color: var(--accent); }

/* ----- Responsive ----- */
@media (max-width: 880px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 50px 24px 30px;
        gap: 32px;
        text-align: center;
    }
    .hero-cta { justify-content: center; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-visual { height: 360px; }
    .cta-card { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 520px) {
    .device-frame { width: 240px; height: 340px; }
    .hero-visual { height: 320px; }
    .stats-strip { padding: 20px; gap: 18px; }
    .stat-cell .value { font-size: 26px; }
}

/* ----- r/ share page ----- */
.share-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.share-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-elev-1);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.share-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.share-cover {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--accent-soft);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.share-cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 26px;
}

.share-meta { min-width: 0; }
.share-meta h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.2;
}
.share-meta .sub {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.share-meta .sub .dot { color: var(--text-faint); }

.share-slogan {
    background: var(--bg-elev-2);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 13.5px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.5;
    border-left: 3px solid var(--accent);
}

.share-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.share-divider {
    text-align: center;
    color: var(--text-faint);
    font-size: 12px;
    margin: 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-stores {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-store {
    flex: 1;
    min-width: 140px;
    background: var(--bg-elev-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 10px 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 120ms, border-color 120ms;
    text-decoration: none;
}

.share-store:hover {
    background: var(--bg-elev-3);
    border-color: var(--accent);
    color: var(--text);
}

.share-store .store-mark { font-size: 22px; color: var(--accent); }
.share-store .store-text { display: flex; flex-direction: column; line-height: 1.1; }
.share-store .store-text small { color: var(--text-muted); font-size: 11px; }

.share-skeleton {
    height: 64px;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--bg-elev-2), var(--bg-elev-3), var(--bg-elev-2));
    background-size: 200% 100%;
    animation: skeleton 1.4s infinite;
}
.share-skeleton.text { height: 14px; border-radius: 4px; }
.share-skeleton.text.short { width: 60%; }
@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.share-error {
    background: var(--danger-soft);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: var(--danger);
    padding: 14px;
    border-radius: var(--radius);
    text-align: center;
    font-size: 14px;
}

.share-foot {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Mini-player estilo app (in-page, fixed bottom) */
.mini-player {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 420px;
    background: var(--bg-elev-1);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 100;
    backdrop-filter: blur(12px);
}
.mini-player.is-on { display: flex; }

.mini-cover {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 22px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.mini-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mini-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-sub {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mini-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--danger);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mini-live .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--danger);
    animation: livePulse 1.4s infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.7); }
}

.mini-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 120ms;
    flex-shrink: 0;
}
.mini-btn:hover { background: var(--accent-hover); }
.mini-btn[aria-pressed="false"] { background: var(--accent); }

.mini-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-faint);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 120ms, color 120ms;
}
.mini-close:hover { background: var(--bg-elev-3); color: var(--text); }

/* Estado "intentando abrir la app" en el centro */
.share-trying {
    text-align: center;
    padding: 20px 0;
}
.share-trying-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
    animation: tryPulse 1.6s ease-in-out infinite;
}
.share-trying p { color: var(--text-muted); font-size: 13.5px; }
@keyframes tryPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 var(--accent-ring); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 12px transparent; }
}
