/* Base layout, typography, buttons, nav shell — public homepage */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg);
    color: var(--dark);
    overflow-x: hidden;
}

.text-gradient {
    background: linear-gradient(90deg, #ff3366, #9933ff 50%, #2f80ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Títulos de sección — mismo sweep que el hero (.laser) */
.section-title .text-gradient {
    background: linear-gradient(90deg, #ff3366 0%, #9933ff 35%, #fff 50%, #9933ff 65%, #2f80ed 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sweep 4s linear infinite;
}

html.dark .section-title .text-gradient {
    background: linear-gradient(90deg, #ff6699 0%, #c084fc 35%, #ffffff 50%, #c084fc 65%, #60a5fa 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.35));
}

.laser {
    background: linear-gradient(90deg, #ff3366 0%, #9933ff 35%, #fff 50%, #9933ff 65%, #2f80ed 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sweep 4s linear infinite;
}

@keyframes sweep {
    0% { background-position: -100% center; }
    100% { background-position: 200% center; }
}

#neural-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--bg);
}

.glass-nav {
    position: sticky;
    top: 0;
    z-index: 150;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.glass-card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.btn-primary {
    background: var(--blue);
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    padding: 14px 28px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(91, 104, 246, 0.35);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    color: var(--dark);
    font-weight: 600;
    border-radius: 999px;
    padding: 14px 28px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-ghost:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.section {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 500;
    letter-spacing: -1px;
    line-height: 1.15;
}

.chip {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 12px;
    border-radius: 999px;
}

.enterprise-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.enterprise-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 10;
}

.case-card {
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.case-img {
    height: 160px;
    background-size: cover;
    background-position: center;
}

.tool-chip {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
}

.metrics-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}

.metrics-bar > div {
    background: #fff;
    padding: 28px 20px;
    text-align: center;
}

.metrics-bar strong {
    display: block;
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -1px;
    color: var(--dark);
}

.metrics-bar span {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.hero-mockup {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.hero-phones {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    min-height: 340px;
    padding-top: 20px;
}

.phone-frame {
    width: 200px;
    border: 9px solid #1e293b;
    border-radius: 32px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
    position: relative;
    flex-shrink: 0;
    transition: transform 0.4s;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 16px;
    background: #1e293b;
    border-radius: 0 0 10px 10px;
    z-index: 5;
}

.phone-frame img {
    width: 100%;
    display: block;
    aspect-ratio: 9 / 19.5;
    object-fit: cover;
    object-position: top;
}

.phone-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    color: var(--muted);
}

.phone-float-a {
    animation: phoneFloatA 6s ease-in-out infinite;
}

.phone-float-b {
    animation: phoneFloatB 6s ease-in-out infinite;
}

@keyframes phoneFloatA {
    0%, 100% { transform: rotate(-4deg) translateY(0); }
    50% { transform: rotate(-4deg) translateY(-12px); }
}

@keyframes phoneFloatB {
    0%, 100% { transform: rotate(5deg) translateY(0); }
    50% { transform: rotate(5deg) translateY(-12px); }
}

.segment-btn {
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    transition: 0.2s;
}

.segment-btn.active {
    background: var(--dark);
    color: #fff;
    border-color: var(--dark);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #f59e0b;
    font-size: 15px;
    flex-shrink: 0;
}

.theme-toggle .fa-moon {
    display: none;
}

.nav-hamburger {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--dark);
}

.mob-sheet {
    position: fixed;
    inset: 0;
    z-index: 280;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.mob-sheet.open {
    opacity: 1;
    pointer-events: auto;
}

.contact-drawer {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
}

.contact-drawer.open {
    display: flex;
}

.drawer-panel {
    background: #fff;
    width: 100%;
    max-width: 400px;
    border-radius: 24px 24px 0 0;
    padding: 32px 28px 40px;
    animation: slideUp 0.35s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.case-modal {
    position: fixed;
    inset: 0;
    z-index: 250;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.case-modal.open {
    display: flex;
}

.case-modal-inner {
    background: #fff;
    border-radius: 24px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
}

.case-modal-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: grid;
    gap: 0.5rem;
}

.case-modal-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #64748b;
}

.case-modal-benefits .fa-check {
    color: #5b68f6;
    margin-top: 0.2rem;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.lab-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    border-radius: 32px;
    padding: 0;
    color: #fff;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.lab-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(153, 51, 255, 0.15), transparent 70%);
    pointer-events: none;
}

.nav-link {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: 0.2s;
}

@media (max-width: 768px) {
    .metrics-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .lab-section {
        padding: 0;
    }

    .hero-phones {
        gap: 12px;
        min-height: 300px;
    }

    .phone-frame {
        width: 155px;
    }
}

/* Dark mode — layout primitives */
html.dark body {
    background: #0f172a;
    color: #f8fafc;
}

html.dark #neural-canvas {
    background: #0f172a;
}

html.dark .glass-nav {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark .glass-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

html.dark .btn-ghost {
    background: rgba(30, 41, 59, 0.8);
    border-color: #334155;
    color: #e2e8f0;
}

html.dark .metrics-bar {
    background: #334155;
}

html.dark .metrics-bar > div {
    background: #1e293b;
}

html.dark .metrics-bar strong {
    color: #f8fafc;
}

html.dark .drawer-panel,
html.dark .case-modal-inner {
    background: #1e293b;
    color: #f8fafc;
}

html.dark .tool-chip {
    background: #334155;
    color: #cbd5e1;
}

html.dark .case-modal-benefits li {
    color: #94a3b8;
}

html.dark .case-modal-benefits .fa-check {
    color: #818cf8;
}

html.dark .segment-btn {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

html.dark .segment-btn.active {
    background: var(--blue);
    border-color: var(--blue);
}

html.dark .theme-toggle {
    background: rgba(30, 41, 59, 0.7);
    border-color: #334155;
    color: #93c5fd;
}

html.dark .theme-toggle .fa-sun {
    display: none;
}

html.dark .theme-toggle .fa-moon {
    display: block;
}

html.dark .nav-hamburger {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

html.dark .mob-sheet-panel {
    background: #0f172a;
}

html.dark .mob-sheet-panel button {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

html.dark .ai-panel button.bg-slate-100 {
    background: #334155 !important;
    color: #94a3b8 !important;
}

html.dark .btn-primary {
    color: #fff !important;
}

html.dark .brand-logo,
html.dark .nav-logo,
html.dark .footer-logo {
    filter: invert(1) brightness(2);
}

html.dark .text-slate-500,
html.dark .text-slate-700 {
    color: #94a3b8 !important;
}

html.dark .phone-label {
    color: #94a3b8;
}

html.dark p strong.text-slate-700 {
    color: #e2e8f0 !important;
}
