/**
 * HAON Platform - Landing Page Styles (v2)
 * 8 sections, clean layout, minimal decoration
 */

/* ============================================
   LAYOUT
   ============================================ */
.landing-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    padding: 0;
}

/* ============================================
   SHARED SECTION STYLES
   ============================================ */
section {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 80px 20px;
}

.section-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.2em;
    color: var(--text-primary);
    margin: 0 0 25px;
    font-weight: bold;
}

.section-lead {
    font-size: 1.3em;
    color: var(--text-secondary);
    margin: 0 0 30px;
    line-height: 1.6;
}

.section-description {
    font-size: 1.15em;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   NAV — Fixed top bar
   ============================================ */
.haon-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 30px;
    background: rgba(15, 40, 71, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-brand img {
    height: 36px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--haon-white);
}

/* Language selector */
.lang-selector {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text-secondary);
    font-size: 0.85em;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-current:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
}

.lang-flag {
    font-size: 1.15em;
    line-height: 1;
}

.lang-code {
    font-weight: 600;
}

.lang-arrow {
    font-size: 0.7em;
    opacity: 0.6;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(15, 40, 71, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    list-style: none;
    padding: 6px 0;
    margin: 0;
    min-width: 160px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.lang-selector:hover .lang-dropdown,
.lang-selector:focus-within .lang-dropdown {
    display: block;
}

.lang-dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9em;
    transition: background var(--transition-fast);
}

.lang-dropdown li a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.lang-dropdown li a.lang-active {
    color: var(--haon-accent);
    font-weight: 600;
}

/* ============================================
   SECTION 1 — HERO
   ============================================ */
.hero-section {
    text-align: center;
    padding: 0;
    min-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 60px; /* nav height */
}

/* Video background */
.hero-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(15, 40, 71, 0.45) 0%,
        rgba(15, 40, 71, 0.65) 60%,
        rgba(15, 40, 71, 0.92) 100%
    );
}

/* Animated mesh background (fallback when no video) */
.hero-mesh {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-mesh::before,
.hero-mesh::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
}

.hero-mesh::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(44, 121, 224, 0.6) 0%, transparent 70%);
    top: -15%;
    left: -10%;
    animation: meshFloat 18s ease-in-out infinite;
}

.hero-mesh::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(91, 163, 232, 0.4) 0%, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation: meshFloat 22s ease-in-out infinite 6s;
}

/* Subtle grid overlay */
.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 100%);
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 40px;
    position: relative;
    z-index: 2;
}

/* Logo */
.logo {
    margin-bottom: 50px;
}

.logo img {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Stance — ahora es el H1 principal del hero (amarillo marca) */
.hero-stance {
    font-size: 2.6em;
    color: var(--text-primary);
    margin: 0 auto 35px;
    max-width: 860px;
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

/* Description */
.hero-description {
    font-size: 1.1em;
    line-height: 1.9;
    color: var(--text-secondary);
    margin: 0 auto 30px;
    max-width: 720px;
    font-weight: 300;
}

/* Kill shot */
.hero-killshot {
    font-size: 1.25em;
    font-weight: 600;
    color: var(--haon-white);
    margin: 0 0 50px;
    text-shadow: 0 0 30px rgba(91, 163, 232, 0.4);
}

/* CTAs */
.hero-ctas {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 16px 36px;
    border-radius: 10px;
    font-size: 1.05em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.btn-primary {
    background: var(--haon-accent);
    color: var(--haon-black);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2),
                0 4px 15px rgba(0, 0, 0, 0.2);
    animation: ctaGlow 3s ease-in-out infinite 2.5s;
}

.btn-primary:hover {
    background: #ffe033;
    transform: translateY(-3px);
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.4),
                0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ============================================
   SECTION 2 — HOW IT WORKS
   ============================================ */
.how-it-works-section {
    background: var(--haon-blue);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.step {
    text-align: center;
    padding: 35px 25px;
    background: #ffffff;
    border: 1px solid rgba(15, 40, 71, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(15, 40, 71, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(15, 40, 71, 0.28);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--haon-blue-bright);
    color: var(--haon-white);
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(44, 121, 224, 0.4);
}

.step h3 {
    font-size: 1.2em;
    color: #0f2847;
    margin: 0 0 12px;
    font-weight: 700;
}

.step p {
    font-size: 1em;
    color: #5a6b82;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   SECTION 3 — MODULES IN PRODUCTION
   ============================================ */
.catalogo-section {
    padding: 80px 20px;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px 0 50px;
    align-items: stretch;
}

.module-card {
    padding: 32px 26px;
    background: #ffffff;
    border: 1px solid rgba(15, 40, 71, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(15, 40, 71, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.module-card p:not(.module-stat) {
    flex: 1;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(15, 40, 71, 0.28);
}

.module-card h3 {
    font-size: 1.2em;
    color: #0f2847;
    margin: 0 0 12px;
    font-weight: 700;
}

.module-card p {
    font-size: 1em;
    color: #5a6b82;
    line-height: 1.7;
    margin: 0 0 8px;
}

.module-stat {
    margin-top: 12px !important;
    font-weight: 600;
    color: #0f2847 !important;
}

.stat-number {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--haon-blue-bright);
    display: inline-block;
}

/* Module summary + expand-in-place detail */
.module-summary {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.module-summary > p:not(.module-stat) {
    flex: 1;
}

.module-detail-toggle {
    margin-top: 18px;
    align-self: flex-start;
    background: var(--haon-blue-bright);
    border: none;
    color: var(--haon-white);
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.95em;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.module-detail-toggle:hover {
    background: var(--haon-blue);
    transform: translateY(-1px);
}

.module-detail {
    display: none;
}

.modules-grid.is-expanded .module-card:not(.is-active) {
    display: none;
}

.modules-grid.is-expanded .module-card.is-active {
    grid-column: 1 / -1;
    min-height: auto;
    padding: 40px 45px;
}

.module-card.is-active .module-summary {
    display: none;
}

.module-card.is-active .module-detail {
    display: block;
    animation: detailFade 0.35s ease-out;
    max-width: 920px;
}

.module-detail h4 {
    color: var(--haon-blue-bright);
    font-size: 1.05em;
    font-weight: 700;
    margin: 22px 0 10px;
    letter-spacing: 0.02em;
}

.module-detail h4:first-child {
    margin-top: 0;
}

.module-detail p {
    color: #5a6b82;
    line-height: 1.75;
    margin: 0 0 12px;
    font-size: 1em;
}

.module-detail p strong {
    color: #0f2847;
}

.module-detail ul {
    margin: 8px 0 16px;
    padding-left: 22px;
}

.module-detail li {
    color: #5a6b82;
    line-height: 1.65;
    margin: 8px 0;
}

.module-detail-close {
    margin-top: 28px;
    background: transparent;
    border: 1px solid rgba(15, 40, 71, 0.25);
    color: #0f2847;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
}

.module-detail-close:hover {
    border-color: var(--haon-blue-bright);
    color: var(--haon-blue-bright);
}

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

/* Delivery options */
.delivery-options {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.delivery-options > h3 {
    font-size: 1.3em;
    color: var(--text-primary);
    margin: 0 0 25px;
    font-weight: 600;
}

.delivery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

.delivery-option {
    padding: 25px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--bg-glass-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.delivery-option:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.delivery-option h4 {
    font-size: 1.05em;
    color: var(--text-primary);
    margin: 0 0 10px;
    font-weight: 600;
}

.delivery-option p {
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.delivery-note {
    font-size: 0.9em;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.section-cta-text {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-top: 30px;
    text-align: center;
}

.section-cta-text a {
    color: var(--haon-accent);
    text-decoration: none;
    font-weight: 600;
}

.section-cta-text a:hover {
    text-decoration: underline;
}

/* ============================================
   SECTION 4 — CUSTOM MODULES
   ============================================ */
.custom-modules-section {
    background: rgba(255, 255, 255, 0.03);
}

.custom-modules-section p {
    font-size: 1.05em;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0 0 20px;
}

.custom-example {
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--haon-accent);
    border-radius: 0 10px 10px 0;
    margin: 25px 0;
}

.custom-example p {
    margin: 0;
    font-size: 1em;
}

.custom-closing {
    font-weight: 600;
    color: var(--text-primary) !important;
    font-size: 1.1em !important;
}

.custom-how {
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    margin-top: 25px;
}

.custom-how p {
    margin: 0;
    font-size: 0.95em;
    color: var(--text-muted);
}

/* ============================================
   SECTION 5 — TECHNOLOGY
   ============================================ */
.technology-section {
    padding: 80px 20px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 30px 0 40px;
}

.tech-item {
    padding: 30px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 14px;
    border: 1px solid var(--bg-glass-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-item:hover {
    background: var(--bg-glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.tech-item h3 {
    font-size: 1.15em;
    color: var(--haon-accent);
    margin: 0 0 12px;
    font-weight: 700;
}

.tech-item p {
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.tech-compliance {
    font-size: 0.95em;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin: 0;
    line-height: 1.7;
}

/* ============================================
   SECTION 6 — WHY HAON
   ============================================ */
.why-haon-section {
    background: rgba(255, 255, 255, 0.03);
}

.why-lead {
    font-size: 1.25em !important;
    font-weight: 600;
    color: var(--text-primary) !important;
    margin-bottom: 25px !important;
}

.why-haon-section p {
    font-size: 1.05em;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0 0 20px;
}

.fundacion-callout {
    margin-top: 30px;
    padding: 25px 30px;
    background: rgba(255, 215, 0, 0.06);
    border-left: 4px solid var(--haon-accent);
    border-radius: 0 12px 12px 0;
    animation: borderPulse 3s ease-in-out infinite;
}

.fundacion-callout p {
    margin: 0;
    font-size: 1em;
}

/* ============================================
   SECTION 8 — FOOTER
   ============================================ */
.landing-footer {
    width: 100%;
    padding: 60px 20px 30px;
    background: rgba(0, 0, 0, 0.15);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-brand {
    text-align: center;
    margin-bottom: 40px;
}

.footer-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 15px;
}

.footer-brand p {
    font-size: 0.95em;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0 0 15px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95em;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--haon-accent);
}

.footer-legal {
    text-align: center;
    margin-bottom: 20px;
}

.footer-legal p {
    font-size: 0.85em;
    color: var(--text-muted);
    margin: 0 0 8px;
    line-height: 1.6;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--text-secondary);
}

.footer-closing {
    text-align: center;
}

.footer-closing p {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin: 0 0 5px;
}

.footer-fundacion {
    font-size: 0.85em !important;
    color: var(--text-muted) !important;
}

.footer-meta {
    text-align: center;
    margin-top: 20px;
    opacity: 0.4;
}

.footer-meta small {
    font-size: 0.8em;
    color: var(--text-muted);
}

/* ============================================
   FORM CLOSING LINE
   ============================================ */
.form-closing {
    text-align: center;
    font-size: 1em;
    color: var(--text-secondary);
    margin-top: 25px;
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    section {
        padding: 50px 15px;
    }

    .section-content {
        padding: 0 10px;
    }

    .section-title {
        font-size: 1.7em;
    }

    /* Nav */
    .haon-nav {
        padding: 0 15px;
    }

    .nav-links {
        display: none;
    }

    .nav-brand img {
        height: 30px;
    }

    /* Hero */
    .hero-section {
        min-height: 540px;
        padding-top: 60px;
    }

    .hero-content {
        padding: 40px 20px;
    }

    .logo img {
        max-width: 240px;
    }

    .hero-stance {
        font-size: 1.9em;
    }

    .hero-description {
        font-size: 0.95em;
    }

    .hero-killshot {
        font-size: 1.05em;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .hero-mesh::before {
        width: 350px;
        height: 350px;
    }

    .hero-mesh::after {
        width: 300px;
        height: 300px;
    }

    /* Steps */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .step {
        padding: 20px 15px;
    }

    /* Modules */
    .modules-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .module-card {
        padding: 24px 20px;
        min-height: auto;
    }

    .modules-grid.is-expanded .module-card.is-active {
        padding: 28px 22px;
    }

    .module-detail h4 {
        font-size: 1em;
    }

    .module-detail p,
    .module-detail li {
        font-size: 0.95em;
    }

    /* Delivery */
    .delivery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .delivery-option {
        padding: 20px;
    }

    /* Tech */
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tech-item {
        padding: 25px;
    }

    /* Footer */
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .landing-footer {
        padding: 40px 15px 25px;
    }
}

@media (max-width: 480px) {
    .hero-stance {
        font-size: 1.55em;
    }

    .section-title {
        font-size: 1.4em;
    }

    .logo img {
        max-width: 200px;
    }

    .hero-mesh::before {
        width: 250px;
        height: 250px;
        filter: blur(60px);
    }

    .hero-mesh::after {
        width: 200px;
        height: 200px;
        filter: blur(60px);
    }
}
