/* ===== Base Design System ===== */
:root {
    --primary: #00BCD4;
    /* Cyan */
    --primary-dark: #0097A7;
    --primary-deep: #006978;
    --secondary: #FFC107;
    /* Amber */
    --secondary-dark: #FFA000;
    --dark: #1A1A1A;
    --light: #F8F9FA;
    --white: #FFFFFF;
    --gray: #6C757D;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --z-nav: 1000;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Evita que la navbar fija tape el contenido al saltar a un ancla */
section[id],
#download,
#top {
    scroll-margin-top: 100px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 2rem);
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    line-height: 1.15;
}

.highlight {
    color: var(--primary);
}

.highlight-secondary {
    color: var(--secondary);
}

/* Foco visible accesible para navegación por teclado */
:focus-visible {
    outline: 3px solid var(--primary-dark);
    outline-offset: 3px;
    border-radius: 6px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.btn-sm {
    min-height: 44px;
    padding: 0.55rem 1.4rem;
    font-size: 0.9rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-nav);
    padding: 1.25rem 0;
    transition: var(--transition);
}

.navbar.sticky {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 0.75rem 0;
    box-shadow: var(--shadow);
}

.navbar .container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo i,
.logo span {
    color: var(--primary);
}

/* Logo como imagen (cuando media.logo_url está definido en el CMS) */
.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-menu ul a:hover {
    color: var(--primary);
}

.nav-cta {
    color: var(--white);
}

/* Botón hamburguesa (oculto en desktop) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.nav-toggle-bar {
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}

body.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero Section */
.hero {
    padding: clamp(7rem, 14vw, 10rem) 0 clamp(4rem, 8vw, 6rem);
    background: linear-gradient(135deg, #f0faff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    background: radial-gradient(circle, rgba(0, 188, 212, 0.1) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-block;
    background: rgba(0, 188, 212, 0.12);
    color: var(--primary-deep);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.hero .lead {
    font-size: clamp(1.05rem, 1vw + 0.9rem, 1.25rem);
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--dark);
    color: var(--white);
    padding: 0.7rem 1.4rem;
    min-height: 56px;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
}

.store-btn:hover {
    transform: translateY(-4px);
    background: #000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.store-btn i {
    font-size: 1.9rem;
}

.store-text span {
    display: block;
    font-size: 0.72rem;
    opacity: 0.8;
}

.store-text strong {
    font-size: 1.05rem;
}

.store-note {
    margin-top: 1rem;
    font-size: 0.82rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-image {
    position: relative;
    z-index: 1;
}

.image-wrapper {
    position: relative;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.hero-image img {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.15));
}

/* Services Section */
.services {
    padding: clamp(4rem, 9vw, 8rem) 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    max-width: 640px;
    margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}

.section-title h2 {
    font-size: clamp(1.9rem, 4vw + 0.4rem, 2.5rem);
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    padding: 3rem 2rem;
    background: var(--white);
    border-radius: 24px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.service-card.active {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-deep) 100%);
    color: var(--white);
    border: none;
    box-shadow: 0 15px 40px rgba(0, 151, 167, 0.35);
}

.service-card.active .service-icon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.service-card.active h3,
.service-card.active p {
    color: var(--white);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(0, 188, 212, 0.1);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 2rem;
    transition: var(--transition);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Features Section */
.features {
    padding: clamp(4rem, 9vw, 8rem) 0;
    background-color: var(--light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    transition: var(--transition);
}

.feature-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.feature-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--secondary);
    color: var(--dark);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.feature-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.feature-item p {
    color: var(--gray);
}

/* CTA Partners */
.cta-partners {
    padding: clamp(4rem, 9vw, 8rem) 0;
    background: var(--dark);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.cta-partners::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.06) 0%, transparent 70%);
    bottom: -300px;
    left: -300px;
    pointer-events: none;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: clamp(2.1rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.cta-content>p {
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    max-width: 700px;
    margin: 0 auto 4rem;
    opacity: 0.85;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 3.5rem;
}

.step {
    position: relative;
}

.step-num {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 188, 212, 0.35);
}

.step h5 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.step p {
    opacity: 0.75;
}

/* Footer */
footer {
    padding: clamp(4rem, 8vw, 6rem) 0 2rem;
    background: #fdfdfd;
    border-top: 1px solid #eee;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-info p {
    color: var(--gray);
    margin: 1.5rem 0;
    max-width: 320px;
}

.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-links a {
    width: 44px;
    height: 44px;
    background: var(--light);
    color: var(--dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul a {
    text-decoration: none;
    color: var(--gray);
    transition: color 0.2s ease;
}

.footer-links ul a:hover {
    color: var(--primary);
}

.footer-contact p {
    color: var(--gray);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== Reveal on scroll (se dispara una sola vez) ===== */
.js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

.stagger>*:nth-child(1) {
    transition-delay: 0.05s;
}

.stagger>*:nth-child(2) {
    transition-delay: 0.13s;
}

.stagger>*:nth-child(3) {
    transition-delay: 0.21s;
}

.stagger>*:nth-child(4) {
    transition-delay: 0.29s;
}

.stagger>*:nth-child(5) {
    transition-delay: 0.37s;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-menu {
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        padding: 1.75rem;
        border-radius: 18px;
        border: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: var(--shadow-lg);
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s var(--ease-out);
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .nav-menu ul a {
        display: block;
        padding: 0.75rem 0.5rem;
        border-radius: 10px;
    }

    .nav-menu ul a:hover {
        background: rgba(0, 188, 212, 0.08);
    }

    .nav-cta {
        width: 100%;
        margin-top: 0.5rem;
    }

    body.nav-open .nav-menu {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero .lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-btns {
        justify-content: center;
    }

    .store-note {
        justify-content: center;
    }

    .services-grid,
    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .footer-info p {
        margin-left: auto;
        margin-right: auto;
    }

    .social-links {
        justify-content: center;
    }

    .footer-contact p {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .store-btn {
        justify-content: center;
    }

    .hero-image img {
        max-width: 300px;
    }

    .service-card {
        padding: 2.5rem 1.5rem;
    }

    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        padding: 2rem;
    }
}

/* ===== Movimiento reducido (accesibilidad) ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .image-wrapper {
        animation: none !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
