/* ============================================
   DripHub Landing Page — Custom CSS
   Complementa Tailwind com detalhes finos
   ============================================ */

/* ── Base overrides ── */
:root {
    --primary: #D50032;
    --primary-hover: #b3002a;
    --accent: #8B0000;
    --dark: #0a0a0a;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    overflow-x: hidden;
}

/* ── Navbar backdrop blur on scroll ── */
#navbar {
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* ── Scroll animations ── */
[data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

[data-animate].in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children inside sections with .stagger */
.stagger > [data-animate]:nth-child(1) { transition-delay: 0s; }
.stagger > [data-animate]:nth-child(2) { transition-delay: 0.1s; }
.stagger > [data-animate]:nth-child(3) { transition-delay: 0.2s; }
.stagger > [data-animate]:nth-child(4) { transition-delay: 0.3s; }
.stagger > [data-animate]:nth-child(5) { transition-delay: 0.4s; }
.stagger > [data-animate]:nth-child(6) { transition-delay: 0.5s; }

/* ── Marquee animation ── */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
    width: max-content;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* ── Range slider custom ── */
.slider-primary {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #D50032 0%, #D50032 var(--value, 50%), #e5e7eb var(--value, 50%), #e5e7eb 100%);
    outline: none;
}

.slider-primary::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #D50032;
    cursor: pointer;
    border: 4px solid #fff;
    box-shadow: 0 4px 16px rgba(213, 0, 50, 0.4),
                0 0 0 1px rgba(213, 0, 50, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.slider-primary::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(213, 0, 50, 0.5),
                0 0 0 8px rgba(213, 0, 50, 0.1);
}

.slider-primary::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #D50032;
    cursor: pointer;
    border: 4px solid #fff;
    box-shadow: 0 4px 16px rgba(213, 0, 50, 0.4);
    transition: transform 0.2s;
}

.slider-primary::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* ── Details accordion smooth ── */
details {
    transition: background-color 0.2s;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    padding-bottom: 0.5rem;
}

details > div {
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Pulse glow ── */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(213, 0, 50, 0.4),
                    0 20px 60px -20px rgba(213, 0, 50, 0.4);
    }
    50% {
        box-shadow: 0 0 0 16px rgba(213, 0, 50, 0),
                    0 20px 60px -20px rgba(213, 0, 50, 0.6);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* ── Float ── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ── Focus states ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
details:focus-visible {
    outline: 2px solid #D50032;
    outline-offset: 2px;
    border-radius: 8px;
}

/* ── Text gradient helper ── */
.text-gradient-primary {
    background: linear-gradient(135deg, #D50032 0%, #8B0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Section divider ── */
.section-divider {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 50%, transparent 100%);
}

/* ── Print optimizations ── */
@media print {
    #navbar,
    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Responsive tweaks ── */
@media (max-width: 640px) {
    h1, h2, h3 {
        letter-spacing: -0.02em;
    }
}

/* ============================================
   A PLATAFORMA — Tabs Showcase
   Interactive tabs (desktop) + accordion (mobile)
   ============================================ */

.tabs-showcase { align-items: start; }

/* Tab triggers (left column) */
.tab-trigger {
    display: block;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.tab-trigger-inner {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 1.25rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.62;
}

.tab-trigger:hover .tab-trigger-inner {
    opacity: 1;
    border-color: rgba(213, 0, 50, 0.15);
    transform: translateY(-1px);
}

.tab-trigger[aria-selected="true"] .tab-trigger-inner {
    opacity: 1;
    border-color: rgba(213, 0, 50, 0.35);
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 100%);
    box-shadow: 0 12px 32px -16px rgba(213, 0, 50, 0.25);
}

.tab-icon {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.tab-body { flex: 1; min-width: 0; }

.tab-heading {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--dark);
    margin: 0 0 0.15rem 0;
    letter-spacing: -0.01em;
}

.tab-desc {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.45;
    margin: 0;
    font-weight: 500;
}

.tab-full {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.55;
    margin: 0.5rem 0 0 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
}

.tab-trigger[aria-selected="true"] .tab-full {
    max-height: 200px;
    opacity: 1;
}

/* Preview (right column) */
.tab-preview-wrap {
    position: relative;
    min-height: 480px;
}

.tab-panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tab-panel.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

.tab-panel[hidden] { display: none; }
.tab-panel.is-active[hidden] { display: block; }

.preview-card {
    height: 100%;
    min-height: 480px;
    border-radius: 1.75rem;
    background: linear-gradient(155deg, #0f0f12 0%, #1a1a1f 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 40px 80px -32px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview-chrome {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.15rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.preview-chrome .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

.preview-chrome-title {
    margin-left: 0.75rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Sora', sans-serif;
    letter-spacing: 0.02em;
}

.preview-chrome-time {
    margin-left: auto;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Sora', sans-serif;
}

.preview-body {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

/* --- Chat (Super Agente) --- */
.preview-chat { justify-content: flex-end; gap: 0.6rem; }

.chat-bubble {
    max-width: 78%;
    padding: 0.7rem 0.95rem;
    border-radius: 1.1rem;
    font-size: 0.9rem;
    line-height: 1.45;
    position: relative;
}

.chat-in {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-bottom-left-radius: 0.3rem;
}

.chat-out {
    align-self: flex-end;
    background: #10b981;
    color: #fff;
    border-bottom-right-radius: 0.3rem;
}

.chat-time {
    display: block;
    font-size: 0.65rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    text-align: right;
}

.chat-typing {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.6rem 0.9rem;
    border-radius: 1rem;
    display: inline-flex;
    gap: 4px;
}
.chat-typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: chatDot 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.chat-resolved {
    margin-top: 0.5rem;
    padding: 0.6rem 0.9rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 0.75rem;
    color: #6ee7b7;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.chat-resolved i { font-size: 1rem; }

/* --- Checkout --- */
.preview-checkout { color: #fff; }

.checkout-product {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.checkout-cover {
    width: 3rem; height: 3rem;
    border-radius: 0.6rem;
    background: linear-gradient(135deg, #D50032 0%, #8B0000 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff;
}
.checkout-title { font-weight: 700; font-size: 0.95rem; }
.checkout-price { font-size: 1.1rem; font-weight: 700; margin-top: 0.15rem; }
.checkout-installments { font-size: 0.72rem; color: rgba(255,255,255,0.55); font-weight: 500; margin-left: 0.35rem; }

.checkout-methods { display: flex; gap: 0.5rem; }
.checkout-method {
    flex: 1;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.8rem;
    text-align: center;
    color: rgba(255,255,255,0.7);
    display: flex; align-items: center; justify-content: center; gap: 0.35rem;
}
.checkout-method.is-selected {
    background: rgba(213, 0, 50, 0.18);
    border-color: rgba(213, 0, 50, 0.5);
    color: #fff;
}
.checkout-method i { font-size: 1rem; }

.checkout-cta {
    padding: 0.9rem;
    background: #D50032;
    color: #fff;
    font-weight: 700;
    border-radius: 0.9rem;
    border: 0;
    cursor: default;
    font-size: 0.95rem;
}

.checkout-fee-badge {
    margin-top: 0.25rem;
    align-self: center;
    padding: 0.45rem 0.85rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 999px;
    color: #6ee7b7;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex; align-items: center; gap: 0.4rem;
}

/* --- Área de Membros --- */
.preview-members {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    color: #fff;
}
.members-desktop {
    flex: 1;
    display: flex;
    background: rgba(255,255,255,0.04);
    border-radius: 0.9rem;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    min-height: 280px;
}
.members-sidebar {
    width: 38%;
    padding: 1rem 0.85rem;
    background: rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.members-brand {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    color: #D50032;
    margin-bottom: 0.5rem;
}
.members-module {
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.6);
    display: flex; align-items: center; gap: 0.45rem;
}
.members-module.is-active {
    background: rgba(213, 0, 50, 0.18);
    color: #fff;
}
.members-player {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.members-thumb {
    flex: 1;
    background: linear-gradient(135deg, #3b0010 0%, #0a0a0a 100%);
    border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: rgba(255,255,255,0.85);
    min-height: 140px;
}
.members-progress {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    overflow: hidden;
}
.members-progress-fill {
    width: 62%;
    height: 100%;
    background: #D50032;
    border-radius: 999px;
}
.members-meta {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
}

.members-phone {
    width: 120px;
    flex: 0 0 auto;
    background: #000;
    border-radius: 1.5rem;
    padding: 0.5rem 0.4rem;
    border: 3px solid #222;
    position: relative;
    min-height: 240px;
}
.members-phone-notch {
    width: 40px; height: 12px;
    background: #000;
    border-radius: 0 0 10px 10px;
    margin: 0 auto 0.5rem;
}
.members-phone-screen {
    background: #111;
    border-radius: 1rem;
    padding: 0.6rem 0.5rem;
    display: flex; flex-direction: column; gap: 0.4rem;
    min-height: 200px;
}
.members-phone-brand {
    font-size: 0.6rem; font-weight: 800;
    color: #D50032; text-align: center;
    letter-spacing: 0.1em; margin-bottom: 0.3rem;
}
.members-phone-card {
    background: rgba(213,0,50,0.15);
    border: 1px solid rgba(213,0,50,0.3);
    border-radius: 0.5rem;
    padding: 0.5rem;
    font-size: 0.65rem;
    color: #fff;
    display: flex; align-items: center; gap: 0.35rem;
}
.members-phone-card.alt {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

/* --- Afiliados --- */
.preview-affiliate { color: #fff; }
.affiliate-stats { display: flex; gap: 0.75rem; }
.affiliate-stat {
    flex: 1;
    padding: 0.9rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 0.85rem;
    display: flex; flex-direction: column; gap: 0.25rem;
}
.affiliate-stat-label { font-size: 0.7rem; color: rgba(255,255,255,0.55); }
.affiliate-stat-value { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.2rem; }
.affiliate-stat-value.accent { color: #6ee7b7; }

.affiliate-list { display: flex; flex-direction: column; gap: 0.5rem; }
.affiliate-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.75rem;
}
.affiliate-avatar {
    width: 2rem; height: 2rem; border-radius: 50%;
    background: #D50032;
    font-size: 0.72rem; font-weight: 700;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.affiliate-info { flex: 1; display: flex; flex-direction: column; font-size: 0.85rem; }
.affiliate-info small { font-size: 0.68rem; color: rgba(255,255,255,0.45); }
.affiliate-amount { font-weight: 700; color: #6ee7b7; font-size: 0.85rem; }

.affiliate-split {
    margin-top: auto;
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    padding-top: 0.35rem;
}

/* --- Comunidade --- */
.preview-community { color: #fff; gap: 0.6rem; }
.community-thread {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.85rem;
}
.community-avatar {
    width: 2.2rem; height: 2.2rem; border-radius: 50%;
    flex: 0 0 auto;
    font-size: 0.7rem; font-weight: 700; color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.community-body { flex: 1; min-width: 0; }
.community-head { font-size: 0.82rem; }
.community-head strong { font-weight: 700; }
.community-head span { color: rgba(255,255,255,0.45); font-size: 0.72rem; }
.community-body p {
    margin: 0.2rem 0;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.4;
}
.community-meta {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.45);
    display: flex; gap: 0.75rem;
    align-items: center;
}
.community-meta i { color: rgba(255,255,255,0.55); }

/* --- Recuperação --- */
.preview-recovery { color: #fff; }
.recovery-step {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.85rem;
    align-items: flex-start;
}
.recovery-icon {
    width: 2.2rem; height: 2.2rem;
    border-radius: 0.6rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: #fff;
    flex: 0 0 auto;
}
.recovery-icon.wa { background: #25D366; }
.recovery-icon.em { background: #3b82f6; }
.recovery-icon.pix { background: #D50032; }
.recovery-body strong { font-size: 0.82rem; display: block; margin-bottom: 0.15rem; }
.recovery-body p { margin: 0; font-size: 0.8rem; color: rgba(255,255,255,0.7); line-height: 1.4; }

.recovery-badge {
    margin-top: auto;
    align-self: center;
    padding: 0.5rem 0.95rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 999px;
    color: #6ee7b7;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex; align-items: center; gap: 0.45rem;
}

/* ── Mobile: accordion mode ── */
@media (max-width: 1023px) {
    .tabs-showcase { display: flex; flex-direction: column; gap: 0.75rem; }

    .tab-preview-wrap { display: none; }

    .tab-trigger { order: 0; }

    .tab-trigger-inner { padding: 1rem; }

    /* Mobile: inject a panel slot after the active trigger via DOM (JS) */
    .tab-panel-mobile {
        margin: -0.25rem 0 0.5rem;
    }
    .tab-panel-mobile .preview-card {
        min-height: 380px;
        border-radius: 1.25rem;
    }
}

@media (max-width: 640px) {
    .preview-members { flex-direction: column; }
    .members-phone { width: 100%; max-width: 220px; margin: 0 auto; }
    .members-desktop { width: 100%; }
}

/* =========================================== */
/* O PROBLEMA — tabela comparativa              */
/* =========================================== */
.problema-nums,
.problema-nums dd {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.problema-card {
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 20px 40px -20px rgba(15, 23, 42, 0.1);
}

.problema-table {
    border-collapse: collapse;
    min-width: 560px;
}

.problema-table th,
.problema-table td {
    vertical-align: middle;
}

/* Mobile: empilhar label em cima, valor embaixo — ambos à esquerda.
   Dá largura total pro valor monetário respirar sem quebrar linha. */
@media (max-width: 767px) {
    .problema-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 2px !important;
    }
    .problema-row dt {
        font-size: 0.8125rem;
        color: rgb(107 114 128);
    }
    .problema-row dd {
        font-size: 1.125rem;
        white-space: nowrap;
    }
    .problema-row.is-highlight dd {
        font-size: 1.5rem;
        line-height: 1.15;
    }
}
