/* =================================================================
   COMPRAPIDA — Estilos
   Paleta B: Tech moderno (negro + teal + amarillo)
   Tipografía: Plus Jakarta Sans
   ================================================================= */

/* ===== Variables ===== */
:root {
    --primary:        #0F172A;
    --primary-soft:   #1E293B;
    --secondary:      #14B8A6;
    --secondary-hov:  #0D9488;
    --accent:         #FBBF24;
    --bg:             #FAFAF9;
    --bg-card:        #FFFFFF;
    --gray-light:     #E7E5E4;
    --gray-mid:       #78716C;
    --text:           #1C1917;
    --text-soft:      #44403C;
    --text-on-dark:   #F5F5F4;
    --text-on-dark-soft: #A8A29E;
    --whatsapp:       #25D366;
    --shadow-sm:      0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md:      0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg:      0 16px 48px rgba(15, 23, 42, 0.12);
    --shadow-glow:    0 8px 32px rgba(20, 184, 166, 0.25);
    --radius-sm:      8px;
    --radius:         14px;
    --radius-lg:      20px;
    --container:      1180px;
    --transition:     200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5 { margin: 0 0 0.5em; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }

/* ===== Layout helpers ===== */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 96px 0;
}
.section-light { background: var(--bg); color: var(--text); }
.section-dark  { background: var(--primary); color: var(--text-on-dark); }

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}

.section-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.section-sub {
    font-size: 17px;
    color: var(--text-on-dark-soft);
    margin-top: 12px;
}

.section-light .section-sub { color: var(--text-soft); }

.eyebrow {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--secondary);
    margin: 0 0 12px;
}
.eyebrow-dark { color: var(--secondary-hov); }

.text-gradient {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }

.btn-primary {
    background: var(--secondary);
    color: #052E2B;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
    background: var(--secondary-hov);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-on-dark);
    border-color: rgba(255, 255, 255, 0.2);
}
.btn-ghost:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}
.section-light .btn-ghost { color: var(--text); border-color: var(--gray-light); }
.section-light .btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-whatsapp {
    background: var(--whatsapp);
    color: white;
    padding: 10px 18px;
    font-size: 14px;
}
.btn-whatsapp:hover {
    background: #1ebe5d;
    transform: translateY(-1px);
}

/* ===== Dropdown Plataforma (navegación entre sitio público y admin) ===== */
.platform-switch {
    position: relative;
}
.platform-switch > a {
    color: var(--secondary) !important;
    font-weight: 600 !important;
    padding: 8px 0;
    cursor: pointer;
}
.platform-switch .platform-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--primary-soft);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    min-width: 260px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.45);
    padding: 6px;
    z-index: 110;
}
.platform-switch:hover .platform-menu,
.platform-switch:focus-within .platform-menu {
    display: block;
}
.platform-menu a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 14px !important;
    border-radius: 8px;
    color: var(--text-on-dark) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: background var(--transition);
}
.platform-menu a:hover {
    background: rgba(255,255,255,0.06);
}
.platform-menu a.current {
    background: var(--secondary) !important;
    color: #052E2B !important;
    font-weight: 600 !important;
}
.platform-menu .pm-icon {
    font-size: 18px;
    line-height: 1;
}
.platform-menu .pm-meta {
    display: block;
    font-size: 11px;
    color: var(--text-on-dark-soft);
    margin-top: 2px;
    font-weight: 400;
}
.platform-menu a.current .pm-meta {
    color: rgba(5,46,43,0.7);
}

/* En mobile (cuando el nav está abierto verticalmente), comportarse como item normal */
@media (max-width: 1023px) {
    .platform-switch .platform-menu {
        position: static;
        display: block;
        margin: 8px 0 0;
        box-shadow: none;
        background: rgba(255,255,255,0.04);
    }
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-on-dark);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-on-dark);
}
.logo-accent { color: var(--secondary); }

.site-nav {
    display: none;
    align-items: center;
    gap: 28px;
}
.site-nav a:not(.btn) {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-on-dark-soft);
    transition: color var(--transition);
}
.site-nav a:not(.btn):hover {
    color: var(--secondary);
}

@media (min-width: 1024px) {
    .site-nav { display: flex; }
    .nav-toggle { display: none; }
}

/* Nav toggle (mobile) */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}
.nav-toggle span {
    height: 2px;
    background: var(--text-on-dark);
    border-radius: 2px;
    transition: var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* Mobile nav open */
.site-nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 32px 24px;
    gap: 20px;
    align-items: stretch;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-nav.is-open a:not(.btn) {
    padding: 12px 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    background: var(--primary);
    color: var(--text-on-dark);
    padding: 80px 0 100px;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(800px 400px at 20% 0%, rgba(20, 184, 166, 0.12), transparent 70%),
        radial-gradient(600px 300px at 80% 50%, rgba(251, 191, 36, 0.08), transparent 70%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    display: grid;
    gap: 64px;
    grid-template-columns: 1fr;
    align-items: center;
}
@media (min-width: 1024px) {
    .hero-inner { grid-template-columns: 1.1fr 1fr; gap: 80px; }
}

.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: 24px;
}
.hero-sub {
    font-size: 18px;
    color: var(--text-on-dark-soft);
    max-width: 540px;
    margin: 0 0 36px;
}
@media (min-width: 768px) { .hero-sub { font-size: 20px; } }

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 36px;
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-on-dark-soft);
}
.trust-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--secondary);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.2);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(20, 184, 166, 0.1); }
}

/* Hero visual */
.hero-visual {
    position: relative;
    height: 360px;
    display: none;
}
@media (min-width: 1024px) { .hero-visual { display: block; } }

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
}
.orb-teal {
    width: 280px; height: 280px;
    background: var(--secondary);
    top: 0; right: 40px;
}
.orb-yellow {
    width: 220px; height: 220px;
    background: var(--accent);
    bottom: 0; left: 0;
}

.card-float {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px 18px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-on-dark);
    box-shadow: var(--shadow-lg);
}
.card-1 { top: 20px; left: 0; }
.card-2 { top: 150px; right: 0; }
.card-3 { bottom: 40px; left: 60px; }

.card-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--secondary);
}
.card-dot.teal { background: var(--secondary); }
.card-dot.yellow { background: var(--accent); }

/* ===== Audience cards ===== */
.audience-card {
    background: var(--bg-card);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: var(--transition);
}
.audience-card:hover {
    border-color: var(--secondary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.audience-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
    color: var(--secondary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.audience-icon svg { width: 28px; height: 28px; }
.audience-card h3 { font-size: 22px; }
.audience-card p { color: var(--text-soft); margin: 0; }

/* ===== Services ===== */
.services-grid {
    margin-top: 32px;
}
.service-pillar {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    transition: var(--transition);
}
.service-pillar:hover {
    border-color: var(--secondary);
    background: rgba(20, 184, 166, 0.06);
    transform: translateY(-4px);
}
.pillar-featured {
    border-color: var(--secondary);
    background: rgba(20, 184, 166, 0.08);
}
.pillar-badge {
    position: absolute;
    top: -12px;
    left: 32px;
    background: var(--accent);
    color: #422006;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.pillar-number {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}
.pillar-title { font-size: 26px; margin-bottom: 8px; }
.pillar-desc { color: var(--text-on-dark-soft); margin: 0 0 24px; font-size: 15px; }
.pillar-list li {
    padding: 10px 0 10px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    color: var(--text-on-dark);
    font-size: 15px;
}
.pillar-list li:first-child { border-top: none; }
.pillar-list li::before {
    content: '';
    position: absolute;
    left: 4px; top: 18px;
    width: 14px; height: 8px;
    border-left: 2px solid var(--secondary);
    border-bottom: 2px solid var(--secondary);
    transform: rotate(-45deg);
}

/* ===== Why ===== */
.why-grid {
    display: grid;
    gap: 56px;
    grid-template-columns: 1fr;
    align-items: center;
}
@media (min-width: 1024px) {
    .why-grid { grid-template-columns: 1.3fr 1fr; gap: 80px; }
}
.why-content .section-title { text-align: left; }
.why-content .section-header { text-align: left; margin: 0 0 24px; max-width: none; }
.why-lead { font-size: 18px; color: var(--text-soft); margin: 0 0 36px; }

.why-points { display: grid; gap: 20px; }
.why-point {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.why-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--secondary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.why-icon svg { width: 18px; height: 18px; }
.why-point h4 { font-size: 17px; margin: 2px 0 4px; }
.why-point p { color: var(--text-soft); margin: 0; font-size: 15px; }

.why-stats {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
}
.stat-card.stat-accent {
    background: var(--primary);
    color: var(--text-on-dark);
    border-color: var(--primary);
    grid-column: span 2;
}
.stat-num {
    font-size: 44px;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.04em;
    line-height: 1;
}
.stat-accent .stat-num { color: var(--accent); }
.stat-label {
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 8px;
}
.stat-accent .stat-label { color: var(--text-on-dark-soft); }

/* ===== Process ===== */
.process-grid { margin-top: 24px; counter-reset: step; }
.process-step {
    position: relative;
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
}
.step-num {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--secondary);
    color: #052E2B;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 16px;
}
.process-step h3 { font-size: 19px; color: var(--text-on-dark); }
.process-step p { color: var(--text-on-dark-soft); margin: 0; font-size: 15px; }

/* ===== Contact ===== */
.contact-grid {
    display: grid;
    gap: 56px;
    grid-template-columns: 1fr;
    align-items: start;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }

.contact-info .section-title { text-align: left; }
.contact-lead { color: var(--text-soft); margin: 0 0 36px; font-size: 17px; }

.contact-channels { display: grid; gap: 14px; }
.channel {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--bg-card);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    transition: var(--transition);
}
.channel:not(.channel-static):hover {
    border-color: var(--secondary);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}
.channel-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.channel-icon svg { width: 22px; height: 22px; }
.channel-whatsapp .channel-icon {
    background: var(--whatsapp);
    color: white;
}
.channel-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-mid);
    font-weight: 700;
}
.channel-value {
    display: block;
    font-size: 15px;
    color: var(--text);
    font-weight: 600;
    margin-top: 2px;
}

/* Contact form */
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow-md);
}
.form-title { font-size: 22px; margin-bottom: 24px; }
.form-row { margin-bottom: 18px; }
.form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-soft);
}
.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    transition: var(--transition);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.form-row textarea { resize: vertical; min-height: 100px; }
.form-note {
    font-size: 13px;
    color: var(--gray-mid);
    text-align: center;
    margin: 14px 0 0;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--primary);
    color: var(--text-on-dark);
    padding: 64px 0 0;
}
.footer-inner {
    display: grid;
    gap: 48px;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) { .footer-inner { grid-template-columns: 1fr 2fr; } }

.footer-brand .logo-mark { font-size: 24px; font-weight: 800; }
.footer-brand p { color: var(--text-on-dark-soft); margin: 12px 0 0; max-width: 320px; }

.footer-cols {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(3, 1fr);
}
.footer-cols h5 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary);
    margin-bottom: 16px;
}
.footer-cols li { margin-bottom: 10px; }
.footer-cols a {
    color: var(--text-on-dark-soft);
    font-size: 14px;
    transition: color var(--transition);
}
.footer-cols a:hover { color: var(--secondary); }

.footer-bottom {
    margin-top: 56px;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    color: var(--text-on-dark-soft);
    text-align: center;
}

/* ===== Floating WhatsApp ===== */
.fab-whatsapp {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--whatsapp);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 99;
    transition: var(--transition);
    animation: fabPulse 2s ease-in-out infinite;
}
.fab-whatsapp:hover {
    transform: scale(1.1);
    animation: none;
}
@keyframes fabPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 12px rgba(37, 211, 102, 0); }
}

/* ===== Scroll-in animation ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* ===== Print ===== */
@media print {
    .site-header, .fab-whatsapp, .hero-visual, .hero-ctas { display: none; }
    .section { padding: 24px 0; }
}
