/* ==========================================================================
   LANDING PAGE OFICIAL — SEFIRA
   Diseño de Alta Fidelidad | SaaS Modern Glassmorphic
   Paleta: Sea Green (#1f8a4c), Dark Spruce (#124a2a), Golden Pollen (#ffcf56),
           Onyx (#0e1611), Bright Snow (#f8fafc), Scarlet Rush (#da2c38)
   ========================================================================== */

/* 1. Variables CSS y Tokens de Marca */
:root {
    /* Paleta Oficial Sefira */
    --sea-green: #1f8a4c;
    --sea-green-hover: #176d3b;
    --sea-green-light: #e8f5ec;
    --sea-green-glow: rgba(31, 138, 76, 0.28);
    --dark-spruce: #124a2a;
    --darker-spruce: #0c361e;
    --golden-pollen: #ffcf56;
    --golden-glow: rgba(255, 207, 86, 0.35);
    --bright-snow: #f8fafc;
    --onyx: #0e1611;
    --onyx-card: #15221a;
    --onyx-border: rgba(31, 138, 76, 0.28);
    --scarlet-rush: #da2c38;
    --gunmetal: #3a3a40;
    --warm-cream: #faf9f4;
    --slate-gray: #64748b;
    --border-light: rgba(227, 230, 226, 0.95);
    
    /* Superficies y Fondos Modo Claro */
    --bg-page: var(--bright-snow);
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.88);
    --bg-section-warm: #f6f8f5;
    --text-primary: var(--onyx);
    --text-secondary: var(--slate-gray);
    --text-muted: #8a96a3;
    --border-subtle: var(--border-light);
    --shadow-soft: 0 4px 20px rgba(18, 74, 42, 0.06);
    --shadow-card: 0 10px 30px rgba(18, 74, 42, 0.08);
    --shadow-hover: 0 16px 36px rgba(31, 138, 76, 0.16);

    /* Tipografías */
    --font-heading: 'Sora', sans-serif;
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Courier Prime', Courier, monospace;

    /* Espaciados y Radios */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;
    --nav-height: 74px;
}

/* Modo Oscuro (Onyx) */
html.dark-mode {
    --bg-page: #080d0a;
    --bg-surface: var(--onyx);
    --bg-surface-glass: rgba(14, 22, 17, 0.9);
    --bg-section-warm: #0a120d;
    --text-primary: #f1f5f3;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-subtle: var(--onyx-border);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 16px 40px rgba(31, 138, 76, 0.3);
}

/* 2. Reset y Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 15px; /* Escala ligeramente alejada para mayor perspectiva y confort visual */
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    letter-spacing: -0.025em;
    line-height: 1.25;
}

p {
    color: var(--text-secondary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.75rem;
}

/* 3. Navegación Flotante Glassmorphic (Encabezado Expandido y Espacioso) */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.25s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-soft);
}

.site-header .container,
.site-header .navbar {
    max-width: 1440px;
    padding-left: clamp(1.25rem, 3vw, 3rem);
    padding-right: clamp(1.25rem, 3vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 2.5vw, 2.5rem);
    height: 100%;
}

/* Logotipo Oficial Sefira */
.site-brand,
.brand-placeholder {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--sea-green);
    letter-spacing: -0.03em;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-logo-img {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px var(--sea-green-glow));
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s ease;
}

.site-brand:hover .brand-logo-img,
.brand-placeholder:hover .brand-logo-img {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 14px var(--sea-green-glow));
}

.site-brand span.brand-text,
.brand-placeholder span.brand-text {
    background: linear-gradient(135deg, var(--sea-green), var(--dark-spruce));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

html.dark-mode .site-brand span.brand-text,
html.dark-mode .brand-placeholder span.brand-text {
    background: linear-gradient(135deg, #2ecc71, var(--bright-snow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.2vw, 2.5rem);
    list-style: none;
    margin: 0 auto;
    min-width: 0;
}

.mobile-only-login-item {
    display: none;
}

.nav-link {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--sea-green);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--sea-green);
    transition: width 0.25s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Separación holgada entre botones de acción */
    flex-shrink: 0;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-ui);
    font-size: 0.94rem;
    font-weight: 600;
    padding: 0.72rem 1.45rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sea-green), var(--dark-spruce));
    color: #ffffff;
    box-shadow: 0 4px 14px var(--sea-green-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px var(--sea-green-glow);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
    background: var(--sea-green-light);
    color: var(--sea-green);
    border-color: var(--sea-green);
    transform: translateY(-2px);
}

html.dark-mode .btn-secondary:hover {
    background: rgba(31, 138, 76, 0.16);
    color: #2ecc71;
}

.btn-login {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.65rem 1rem;
}

.btn-login:hover {
    color: var(--sea-green);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.65rem 1.25rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--sea-green);
    background: var(--bg-page);
}

/* Botón Modo Oscuro */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    color: var(--golden-pollen);
    border-color: var(--golden-pollen);
    transform: scale(1.06);
}

/* Botón Menú Móvil */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
}

/* 4. Hero Section */
.hero-section {
    padding-top: calc(var(--nav-height) + 2.5rem);
    padding-bottom: 3.5rem;
    position: relative;
    overflow: hidden;
}

.hero-glow-bg {
    display: none; /* Retirado: sin auras ni gradientes de fondo */
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 840px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--sea-green-light);
    color: var(--sea-green);
    border: 1px solid rgba(31, 138, 76, 0.25);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

html.dark-mode .hero-badge {
    background: rgba(31, 138, 76, 0.16);
    color: #2ecc71;
}

.hero-badge i {
    color: var(--golden-pollen);
}

.hero-title {
    font-size: clamp(1.85rem, 3.4vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-title .highlight-text {
    background: linear-gradient(135deg, var(--sea-green), #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

html.dark-mode .hero-title .highlight-text {
    background: linear-gradient(135deg, #2ecc71, var(--golden-pollen));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.85rem;
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 2.75rem;
}

.hero-ctas .btn {
    padding: 0.75rem 1.65rem;
    font-size: 0.95rem;
}

/* Mockup Visual Hero (Limpio y simétrico, sin gradientes aurorales) */
.hero-mockup-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: var(--border-subtle);
    box-shadow: var(--shadow-soft);
}

.hero-mockup-inner {
    background: var(--bg-surface);
    border-radius: calc(var(--radius-lg) - 1px);
    overflow: hidden;
    padding: 1.5rem 1.25rem;
}

/* Pipeline Preview simplificado en Hero */
.hero-pipeline-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hero-pipeline-preview::-webkit-scrollbar {
    display: none;
}

.hero-node-pill {
    flex: 1 1 0;
    min-width: 135px;
    height: 140px; /* Altura estrictamente idéntica para simetría perfecta */
    box-sizing: border-box;
    background: var(--bg-page);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.hero-node-pill:hover {
    border-color: var(--sea-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px var(--sea-green-glow);
}

.hero-node-pill .pill-badge {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    background: var(--sea-green);
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 6px;
}

.hero-node-pill i {
    font-size: 1.4rem;
    color: var(--sea-green);
}

.hero-node-pill span.pill-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hero-node-pill small.pill-desc {
    font-size: 0.74rem;
    color: var(--text-secondary);
    min-height: 2.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.25;
}

/* 5. SECCIÓN DE VIDEO EXPLICATIVO (Showcase Audiovisual) */
.section-video {
    padding: 5rem 0;
    background-color: var(--bg-section-warm);
    position: relative;
}

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

.section-tag {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sea-green);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.video-player-container {
    max-width: 920px;
    margin: 0 auto;
    position: relative;
    border-radius: var(--radius-lg);
    padding: 10px;
    background: linear-gradient(135deg, rgba(31, 138, 76, 0.28), rgba(255, 207, 86, 0.2));
    box-shadow: var(--shadow-card);
}

.video-frame-16-9 {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 1024;
    padding-top: 53.333%; /* Fallback 15:8 (1920x1024) */
    background: #000000;
    border-radius: calc(var(--radius-lg) - 4px);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

@supports (aspect-ratio: 1920 / 1024) {
    .video-frame-16-9 {
        padding-top: 0;
    }
}

/* Poster de video / estado inicial */
.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1b3524 0%, #0a140e 100%);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 2rem;
    text-align: center;
}

.video-poster:hover {
    background: radial-gradient(circle at center, #234730 0%, #0d1a12 100%);
}

.video-play-btn {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--golden-pollen), #e6b800);
    color: var(--onyx);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 0 30px var(--golden-glow), 0 8px 24px rgba(0, 0, 0, 0.4);
    margin-bottom: 1.5rem;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
    padding-left: 5px; /* Centrado visual del icono play */
}

.video-poster:hover .video-play-btn {
    transform: scale(1.12);
    box-shadow: 0 0 45px var(--golden-glow), 0 12px 28px rgba(0, 0, 0, 0.5);
}

.video-poster h3 {
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.video-poster p {
    color: #cbd5e1;
    font-size: 0.95rem;
    max-width: 480px;
}

.video-frame-16-9 iframe,
.video-frame-16-9 video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

.video-poster-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: rgba(31, 138, 76, 0.3);
    border: 1px solid rgba(255, 207, 86, 0.45);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    color: var(--golden-pollen);
    font-weight: 600;
    margin-bottom: 0.85rem;
    letter-spacing: 0.02em;
}

/* 5b. SECCIÓN DE PILARES ESTRATÉGICOS (Value Proposition Canvas) */
.section-pillars {
    padding: 5rem 0;
    position: relative;
    background-color: var(--bg-page);
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

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

@media (max-width: 640px) {
    .pillars-grid {
        grid-template-columns: 1fr;
    }
}

.pillar-card {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.pillar-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--sea-green);
}

.pillar-card.highlight-card {
    border-color: rgba(31, 138, 76, 0.45);
    background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(31, 138, 76, 0.04) 100%);
}

.pillar-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--dark-spruce), var(--sea-green));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 14px var(--sea-green-glow);
}

.pillar-card.highlight-card .pillar-icon-box {
    background: linear-gradient(135deg, var(--sea-green), #2db566);
}

.pillar-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.35;
}

.pillar-text {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.pillar-pain-tag {
    background: rgba(218, 44, 56, 0.08);
    border-left: 3px solid var(--scarlet-rush);
    padding: 0.6rem 0.85rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.pillar-pain-tag i {
    color: var(--scarlet-rush);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

html.dark-mode .pillar-pain-tag {
    background: rgba(218, 44, 56, 0.15);
    color: #cbd5e1;
}

/* 6. PIPELINE SHOWCASE (Las 5 Etapas del Software - Simétricas y Proporcionales) */
.section-pipeline {
    padding: 4.5rem 0;
    position: relative;
}

.pipeline-steps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .pipeline-steps-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.pipeline-card {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.85rem 1.15rem 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    min-height: 285px; /* Altura idéntica y simétrica garantizada */
    box-sizing: border-box;
}

.pipeline-card:hover {
    border-color: var(--sea-green);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.pipeline-card .card-step-num {
    position: absolute;
    top: -13px;
    left: 16px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--onyx);
    color: #ffffff;
    padding: 2px 9px;
    border-radius: 10px;
    border: 2px solid var(--bg-surface);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.pipeline-card:hover .card-step-num {
    background: var(--sea-green);
    color: #ffffff;
}

.pipeline-card .icon-vessel {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: var(--sea-green-light);
    color: var(--sea-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    margin-bottom: 1.1rem;
    transition: all 0.2s ease;
}

html.dark-mode .pipeline-card .icon-vessel {
    background: rgba(31, 138, 76, 0.18);
    color: #2ecc71;
}

.pipeline-card:hover .icon-vessel {
    background: linear-gradient(135deg, var(--sea-green), var(--dark-spruce));
    color: #ffffff !important;
    transform: scale(1.05);
}

.pipeline-card h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    min-height: 1.4em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pipeline-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
    flex-grow: 1; /* Alinea los botones de todas las tarjetas horizontalmente */
    margin-bottom: 1rem;
}

.btn-pipeline-modal {
    margin-top: auto;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--sea-green);
    background: rgba(31, 138, 76, 0.08);
    border: 1px solid rgba(31, 138, 76, 0.22);
    border-radius: var(--radius-full);
    padding: 0.38rem 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark-mode .btn-pipeline-modal {
    background: rgba(46, 204, 113, 0.12);
    border-color: rgba(46, 204, 113, 0.28);
    color: #2ecc71;
}

.btn-pipeline-modal:hover {
    background: var(--sea-green);
    color: #ffffff !important;
    border-color: var(--sea-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--sea-green-glow);
}

/* ========================================================
   POP-UP PEQUEÑO DE MÓDULO (Explicación Compacta)
   ======================================================== */
.sefira-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 16, 12, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sefira-popup-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.sefira-popup-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    position: relative;
    padding: 1.75rem 1.6rem;
    transform: scale(0.94) translateY(8px);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sefira-popup-backdrop.is-open .sefira-popup-card {
    transform: scale(1) translateY(0);
}

.sefira-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-page);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.sefira-popup-close:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.popup-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--sea-green);
    background: var(--sea-green-light);
    padding: 2px 8px;
    border-radius: 6px;
    margin-bottom: 0.6rem;
}

html.dark-mode .popup-badge {
    background: rgba(31, 138, 76, 0.2);
    color: #2ecc71;
}

.popup-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.popup-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--sea-green-light);
    color: var(--sea-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

html.dark-mode .popup-icon {
    background: rgba(31, 138, 76, 0.2);
    color: #2ecc71;
}

.popup-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.popup-lead {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.1rem;
}

.popup-subtitle {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.popup-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.35rem;
}

.popup-list li {
    font-family: var(--font-ui);
    font-size: 0.86rem;
    color: var(--text-primary);
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    line-height: 1.4;
}

.popup-list li i {
    color: var(--sea-green);
    margin-top: 3px;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sefira-popup-footer {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
}

/* 8. MATRIZ COMPARATIVA (Antes vs. Con Sefira) */
.section-comparison {
    padding: 6rem 0;
}

.comparison-table-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    font-family: var(--font-heading);
    padding: 1.5rem 1.25rem;
    font-size: 1.05rem;
    text-align: left;
    border-bottom: 1.5px solid var(--border-subtle);
}

.comparison-table th.col-feature {
    width: 40%;
}

.comparison-table th.col-before {
    width: 30%;
    color: var(--scarlet-rush);
    background: rgba(218, 44, 56, 0.04);
}

.comparison-table th.col-sefira {
    width: 30%;
    color: var(--sea-green);
    background: rgba(31, 138, 76, 0.06);
}

.comparison-table td {
    padding: 1.2rem 1.25rem;
    font-size: 0.94rem;
    border-bottom: 1px solid var(--border-subtle);
}

.comparison-table td.col-before {
    color: #718096;
    background: rgba(218, 44, 56, 0.02);
}

.comparison-table td.col-before i {
    color: var(--scarlet-rush);
    margin-right: 0.4rem;
}

.comparison-table td.col-sefira {
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(31, 138, 76, 0.04);
}

.comparison-table td.col-sefira i {
    color: var(--sea-green);
    margin-right: 0.4rem;
}

/* 9. FAQ (Preguntas Frecuentes) */
.section-faq {
    padding: 6rem 0;
    background-color: var(--bg-section-warm);
}

.faq-accordion {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--sea-green);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.35rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
}

.faq-icon {
    font-size: 0.9rem;
    color: var(--sea-green);
    transition: transform 0.25s ease;
}

.faq-item.is-open .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
    padding: 0 1.5rem 1.35rem;
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.6;
}

/* 10. FORMULARIO DE CONTACTO */
.section-contact {
    padding: 6rem 0;
    position: relative;
}

.contact-card-wrapper {
    max-width: 760px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 3rem;
    position: relative;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-page);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--sea-green);
    box-shadow: 0 0 0 3px var(--sea-green-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 110px;
}

.form-feedback {
    display: none;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-top: 1.25rem;
    font-family: var(--font-ui);
    font-size: 0.93rem;
}

.form-feedback.success {
    display: block;
    background: var(--sea-green-light);
    color: var(--dark-spruce);
    border: 1px solid var(--sea-green);
}

.form-feedback.error {
    display: block;
    background: #fdecec;
    color: var(--scarlet-rush);
    border: 1px solid var(--scarlet-rush);
}

/* 11. FOOTER */
.site-footer {
    background-color: var(--onyx);
    color: #cbd5e1;
    padding: 4.5rem 0 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-brand .brand-placeholder {
    margin-bottom: 0.35rem;
}

.footer-brand-tagline {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--golden-pollen);
    letter-spacing: 0.03em;
    margin-bottom: 0.85rem;
    display: inline-block;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.92rem;
    max-width: 320px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--golden-pollen);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    font-size: 0.85rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.footer-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.footer-social-btn:hover {
    color: #ffffff;
    background: var(--sea-green);
    border-color: var(--sea-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--sea-green-glow);
}

/* ========================================================
   11. RESPONSIVIDAD Y OPTIMIZACIÓN MÓVIL (Samsung A55 y Smartphones)
   ======================================================== */
@keyframes slideDownNav {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    :root {
        --nav-height: 68px;
    }

    .site-header .container,
    .site-header .navbar {
        padding-left: 1.15rem;
        padding-right: 1.15rem;
    }

    /* Ocultar botón largo de Iniciar Sesión en la barra superior móvil */
    .desktop-only-login {
        display: none !important;
    }

    /* Mostrar botón de Iniciar Sesión dentro del menú desplegable */
    .mobile-only-login-item {
        display: block !important;
        width: 100%;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-subtle);
    }

    .btn-mobile-login {
        width: 100%;
        justify-content: center;
        padding: 0.82rem 1.25rem;
        font-size: 0.95rem;
    }

    .nav-actions {
        gap: 0.65rem;
    }

    .brand-placeholder {
        font-size: 1.4rem;
        gap: 0.65rem;
    }

    .brand-placeholder .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 1.15rem;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 10px;
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        color: var(--text-primary);
        font-size: 1.15rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-nav-toggle:hover {
        border-color: var(--sea-green);
        color: var(--sea-green);
    }

    /* Cajón desplegable Glassmorphic */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--bg-surface-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 1.25rem 1.25rem 1.75rem;
        border-bottom: 1px solid var(--border-subtle);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
        gap: 0.35rem;
        box-sizing: border-box;
        z-index: 999;
        margin: 0;
    }

    .nav-links.is-open {
        display: flex;
        animation: slideDownNav 0.22s ease forwards;
    }

    .nav-link {
        display: block;
        padding: 0.72rem 1rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: var(--radius-sm);
        color: var(--text-primary);
    }

    .nav-link:hover,
    .nav-link.active {
        background: var(--sea-green-light);
        color: var(--sea-green);
    }

    html.dark-mode .nav-link:hover,
    html.dark-mode .nav-link.active {
        background: rgba(31, 138, 76, 0.18);
        color: #2ecc71;
    }

    .nav-link::after {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.15rem;
    }

    /* Cuadrícula de Pipeline en Móvil (Espaciado generoso para evitar encimamientos) */
    .pipeline-steps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 420px;
        margin: 0 auto;
    }

    .pipeline-card {
        min-height: auto;
        padding: 2.2rem 1.25rem 1.5rem;
    }

    .pipeline-card .card-step-num {
        top: -12px;
        left: 20px;
        z-index: 2;
    }

    /* Transformación de Tabla Comparativa a Tarjetas Móviles */
    .comparison-table-wrapper {
        background: transparent;
        border: none;
        box-shadow: none;
        overflow: visible;
    }

    .comparison-table,
    .comparison-table tbody,
    .comparison-table tr,
    .comparison-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .comparison-table thead {
        display: none; /* Ocultar cabecera de columnas tradicional en móvil */
    }

    .comparison-table tr {
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        margin-bottom: 1.25rem;
        padding: 1.2rem;
        box-shadow: var(--shadow-soft);
    }

    .comparison-table td.col-feature {
        font-family: var(--font-heading);
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--text-primary);
        padding: 0 0 0.75rem 0;
        border-bottom: 1px solid var(--border-subtle);
        margin-bottom: 0.75rem;
        background: transparent;
    }

    .comparison-table td.col-before {
        padding: 0.75rem 0.85rem;
        border-radius: var(--radius-sm);
        background: rgba(218, 44, 56, 0.05);
        border: 1px solid rgba(218, 44, 56, 0.16);
        margin-bottom: 0.65rem;
        font-size: 0.86rem;
        line-height: 1.45;
        color: var(--text-secondary);
        border-bottom: 1px solid rgba(218, 44, 56, 0.16);
    }

    .comparison-table td.col-before::before {
        content: "Método Tradicional";
        font-family: var(--font-ui);
        font-weight: 700;
        font-size: 0.74rem;
        color: var(--scarlet-rush);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        display: block;
        margin-bottom: 0.25rem;
    }

    .comparison-table td.col-sefira {
        padding: 0.75rem 0.85rem;
        border-radius: var(--radius-sm);
        background: rgba(31, 138, 76, 0.08);
        border: 1px solid rgba(31, 138, 76, 0.22);
        font-size: 0.88rem;
        line-height: 1.45;
        font-weight: 500;
        color: var(--text-primary);
        border-bottom: 1px solid rgba(31, 138, 76, 0.22);
    }

    .comparison-table td.col-sefira::before {
        content: "Con Plataforma Sefira";
        font-family: var(--font-ui);
        font-weight: 700;
        font-size: 0.74rem;
        color: var(--sea-green);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        display: block;
        margin-bottom: 0.25rem;
    }

    html.dark-mode .comparison-table td.col-before {
        background: rgba(218, 44, 56, 0.12);
        border-color: rgba(218, 44, 56, 0.28);
        color: #fca5a5;
    }

    html.dark-mode .comparison-table td.col-sefira {
        background: rgba(46, 204, 113, 0.12);
        border-color: rgba(46, 204, 113, 0.3);
        color: #e2e8f0;
    }

    html.dark-mode .comparison-table td.col-sefira::before {
        color: #2ecc71;
    }
}

@media (max-width: 640px) {
    /* Tipografía Hero y Secciones */
    .hero-title {
        font-size: clamp(1.65rem, 6vw, 2.1rem);
    }

    .hero-desc {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: clamp(1.45rem, 5vw, 1.85rem);
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    /* Pastillas del Mockup en Hero */
    .hero-mockup-inner {
        padding: 1.15rem 0.85rem;
    }

    .hero-node-pill {
        min-width: 115px;
        height: 125px;
        padding: 0.85rem 0.45rem;
    }

    .hero-node-pill i {
        font-size: 1.25rem;
    }

    .hero-node-pill span.pill-title {
        font-size: 0.82rem;
    }

    .hero-node-pill small.pill-desc {
        font-size: 0.7rem;
    }

    /* Ventana del Video Explicativo en Móvil (No se corta el texto) */
    .video-player-container {
        padding: 6px;
    }

    .video-frame-16-9:not(.is-playing) {
        padding-top: 0;
        min-height: 290px;
        height: auto;
    }

    .video-frame-16-9.is-playing {
        min-height: 0;
    }

    .video-frame-16-9:not(.is-playing) .video-poster {
        position: relative;
        height: auto;
        min-height: 290px;
        padding: 1.75rem 1rem;
    }

    .video-play-btn {
        width: 58px;
        height: 58px;
        font-size: 1.35rem;
        margin-bottom: 1rem;
        padding-left: 4px;
    }

    .video-poster h3 {
        font-size: 1.15rem;
        margin-bottom: 0.4rem;
    }

    .video-poster p {
        font-size: 0.85rem;
        line-height: 1.45;
        max-width: 320px;
    }

    /* Formulario de Contacto y Footer */
    .contact-form-grid {
        grid-template-columns: 1fr;
    }

    .contact-card-wrapper {
        padding: 1.65rem 1.15rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}
