/* ===================================================================
   +Simple v2 — Pomelo-inspired, vanilla
   Iteración 1: foundation, header, hero, stats
   =================================================================== */

:root {
    /* Brand */
    --primary: #2563eb;
    --primary-600: #1d4ed8;
    --primary-100: #dbeafe;
    --primary-50: #eff6ff;
    --accent: #3b82f6;

    /* Surfaces (light theme by default — like Pomelo) */
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.40);
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    /* Text */
    --text-primary: #0b1220;
    --text-secondary: #334155;
    --text-muted: #64748b;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 30px 80px -20px rgba(37, 99, 235, 0.35);

    /* Layout */
    --container: 1200px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 32px;

    /* Header */
    --header-h: 72px;
}

/* ============== Reset ============== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
    color: var(--text-primary);
    background: var(--bg);
    line-height: 1.55;
    overflow-x: clip;
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* ============== Section route SVGs (PCB-style rieles + vehículos) ============== */
/* Inserted as the first child of each <section>. Sits BEHIND every other element
   in the section: the section creates a stacking context (isolation: isolate),
   the SVG is z-index 0 inside it, and any sibling that needs to be above just
   inherits the natural document order (or sets z-index: 1+).
   The path stroke uses a per-section gradient with fade at both endpoints, and
   vehicles (circles with animateMotion) animate opacity to fade in/out in sync
   with the visible region of the line. */
.section-paths {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
@media (prefers-reduced-motion: reduce) {
    .section-paths { display: none; }
}
@media (max-width: 800px) {
    .section-paths { opacity: 0.7; }
}

/* Page fade overlay — covers the screen during anchor jumps so the
   scroll-driven animations don't visibly fire as the page scrolls past sections. */
.page-fade {
    position: fixed;
    inset: 0;
    background: #ffffff;
    pointer-events: none;
    opacity: 0;
    z-index: 500;
    transition: opacity .28s cubic-bezier(.4,0,.2,1);
}
.page-fade.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Lenis required state */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ============== Typography ============== */
h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.08;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); letter-spacing: -0.03em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ============== Buttons ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9375rem;
    border: 1px solid transparent;
    transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
    white-space: nowrap;
}
.btn-lg { padding: 0.95rem 1.65rem; font-size: 1rem; }
.btn-primary {
    background: var(--text-primary);
    color: #fff;
    box-shadow: 0 8px 24px rgba(11, 18, 32, 0.18);
}
.btn-primary:hover { background: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--text-primary); transform: translateY(-1px); }

/* ============== Header (floating, glassmorphic) ============== */
.site-header {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 28px), 1180px);
    z-index: 100;
    border-radius: 999px;
    background: var(--bg-glass);
    backdrop-filter: saturate(220%) blur(28px);
    -webkit-backdrop-filter: saturate(220%) blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 0 0 1px rgba(15, 23, 42, 0.04),
        0 12px 32px rgba(15, 23, 42, 0.08);
    transition: top .3s ease, background .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.55);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 0 0 1px rgba(15, 23, 42, 0.06),
        0 18px 44px rgba(15, 23, 42, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.55rem 0.8rem 0.55rem 1.25rem;
    min-height: var(--header-h);
}
.logo img { height: 30px; }
.nav-links {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
    margin-right: auto;
}
.nav-links a {
    padding: 0.5rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 999px;
    transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--text-primary); background: rgba(15, 23, 42, 0.04); }
.header-cta { display: flex; gap: 0.5rem; align-items: center; }
.header-cta .btn { padding: 0.55rem 1.1rem; font-size: 0.875rem; }

.hamburger {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    align-items: center;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 200;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    padding: 6rem 1.5rem 2rem;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 1rem; }
.mobile-menu nav a { font-size: 1.25rem; font-weight: 600; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.mobile-menu nav a.btn { border: 1px solid var(--border-strong); border-radius: 999px; text-align: center; }
.close-mobile-menu {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: 0;
    font-size: 2.5rem;
    color: var(--text-primary);
    line-height: 1;
}

/* ============== Hero ============== */
.hero {
    position: relative;
    padding: calc(var(--header-h) + 80px) 1.5rem 120px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(80% 60% at 50% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}
.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: -1;
    opacity: 0.7;
}
.hero-glow-1 {
    width: 720px; height: 720px;
    background: radial-gradient(closest-side, rgba(37, 99, 235, 0.45), transparent);
    top: -180px; left: -120px;
}
.hero-glow-2 {
    width: 600px; height: 600px;
    background: radial-gradient(closest-side, rgba(59, 130, 246, 0.30), transparent);
    bottom: -150px; right: -100px;
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 60% 70% at 50% 35%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 35%, black 30%, transparent 80%);
    z-index: -1;
}

.hero-inner {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    text-align: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-sm);
}
.hero-eyebrow .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
    50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.05); }
}

/* Headline animado palabra a palabra */
.hero-title {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}
.hero-title .line {
    display: block;
    overflow: hidden;
    /* Reserve space inside the overflow:hidden box for descenders (g, p, y, etc.)
       and compensate with negative margin so layout stays the same. */
    padding-bottom: 0.18em;
    margin-bottom: -0.18em;
}
.hero-title .word, .hero-title .punct {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
}
.hero-title .word.accent {
    background: linear-gradient(120deg, var(--primary) 0%, #60a5fa 50%, var(--primary) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 6s linear infinite;
}
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.hero-subtitle {
    max-width: 720px;
    margin: 0 auto 2.25rem;
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Reveal helper for non-headline elements */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 1.5px solid var(--border-strong);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}
.hero-scroll-hint span {
    width: 3px; height: 8px;
    background: var(--primary);
    border-radius: 3px;
    animation: scroll-hint 1.8s ease-in-out infinite;
}
@keyframes scroll-hint {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(10px); opacity: 0.3; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ============== Stats ============== */
.stats {
    padding: 120px 1.5rem;
    background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
    position: relative;
    isolation: isolate;
}
.stats-inner {
    max-width: var(--container);
    margin: 0 auto;
}
.stats-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 4rem;
}
.stats-header .eyebrow { display: inline-block; margin-bottom: 1rem; }
.stats-header h2 { margin-bottom: 1rem; }
.stats-header p { color: var(--text-muted); font-size: 1.0625rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}
.stat-card {
    padding: 2.5rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 50% 0%, rgba(37, 99, 235, 0.05), transparent 60%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: var(--shadow-md);
}
.stat-card:hover::before { opacity: 1; }

.stat-number {
    font-size: clamp(3rem, 5vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, var(--text-primary) 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.65rem;
}
.stat-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* ============== Helpers ============== */
.text-accent {
    background: linear-gradient(120deg, var(--primary) 0%, #60a5fa 50%, var(--primary) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 6s linear infinite;
}

.placeholder {
    min-height: 50vh;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    background: var(--bg-soft);
    border-top: 1px dashed var(--border);
}

/* ============================================================
   DIFERENCIALES — "Tecnología para escalar" Pomelo-style 2x2
   ============================================================ */
.differentials {
    padding: 140px 1.5rem 120px;
    background: #0a1430;
    position: relative;
    overflow: clip;
    isolation: isolate;
    color: #fff;
}
.differentials::before {
    /* subtle ambient glow */
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 80%;
    background:
        radial-gradient(closest-side, rgba(37, 99, 235, 0.20), transparent 70%),
        radial-gradient(closest-side, rgba(16, 185, 129, 0.15), transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.differentials::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 60%;
    height: 70%;
    background: radial-gradient(closest-side, rgba(217, 70, 239, 0.18), transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.differentials-inner {
    position: relative;
    z-index: 1;
    max-width: var(--container);
    margin: 0 auto;
}
.differentials-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 4.5rem;
}
.differentials-header .eyebrow {
    display: inline-block;
    margin-bottom: 1.25rem;
    color: #93c5fd;
}
.differentials-header h2 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: clamp(2.5rem, 5vw, 4rem);
}
.differentials-header h2 .text-accent {
    background: linear-gradient(120deg, #ffffff 0%, #93c5fd 50%, #a7f3d0 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.differentials-header p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.0625rem;
}

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

.diff2-card {
    position: relative;
    padding: 2.5rem 2rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.025);
    background-image:
        radial-gradient(circle at 1.5px 1.5px, rgba(255, 255, 255, 0.05) 1.5px, transparent 0);
    background-size: 22px 22px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-align: center;
    transition: border-color .35s ease, transform .35s ease, background-color .35s ease, box-shadow .35s ease;
    overflow: hidden;
    isolation: isolate;
}
.diff2-card::before {
    /* hover/highlight glow — top-only, like Pomelo */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 60%;
    background: radial-gradient(70% 100% at 50% 0%, rgba(37, 99, 235, 0.20), transparent 75%);
    opacity: 0;
    transition: opacity .35s ease;
    z-index: -1;
    pointer-events: none;
}
.diff2-card:hover {
    border-color: rgba(255, 255, 255, 0.30);
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
}
.diff2-card:hover::before { opacity: 1; }

.diff2-icon-wrap {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto 1.5rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #fff;
    font-size: 1.55rem;
    transition: background .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.diff2-icon-wrap-filled {
    background: linear-gradient(140deg, var(--primary) 0%, #10b981 100%);
    border-color: transparent;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.18), 0 18px 40px -8px rgba(37, 99, 235, 0.55);
}
.diff2-card:hover .diff2-icon-wrap:not(.diff2-icon-wrap-filled) {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06);
}

.diff2-card h3 {
    color: #fff;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.85rem;
}
.diff2-card p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 320px;
    margin: 0 auto;
}

@media (max-width: 800px) {
    .differentials-grid { grid-template-columns: 1fr; gap: 1rem; }
    .differentials { padding: 90px 1.25rem; }
}

/* Resultados embebidos dentro de Differentials (dark variant de stats) */
.differentials-stats {
    margin-top: 5rem;
    padding-top: 1rem;
}
.differentials-stats .stats-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3rem;
}
.differentials-stats .stats-header h2 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4.2vw, 3rem);
}
.differentials-stats .stats-header p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.0625rem;
}
.differentials-stats .stat-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-align: center;
}
.differentials-stats .stat-card::before {
    background: radial-gradient(120% 80% at 50% 0%, rgba(37, 99, 235, 0.22), transparent 60%);
}
.differentials-stats .stat-card:hover {
    border-color: rgba(255, 255, 255, 0.30);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}
.differentials-stats .stat-number {
    background: linear-gradient(180deg, #fff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.differentials-stats .stat-label {
    color: rgba(255, 255, 255, 0.72);
}
@media (max-width: 800px) {
    .differentials-stats { margin-top: 3rem; padding-top: 3rem; }
    .differentials-stats .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
@media (max-width: 520px) {
    .differentials-stats .stats-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   DASHBOARD section — laptop mockup + features
   ============================================================ */
.dashboard-section {
    padding: 140px 1.5rem 100px;
    background: #ffffff;
    background-image:
        radial-gradient(40% 40% at 18% 30%, rgba(37, 99, 235, 0.06), transparent 65%),
        radial-gradient(35% 35% at 82% 70%, rgba(16, 185, 129, 0.05), transparent 65%);
    position: relative;
    overflow: clip;
    isolation: isolate;
}
.dashboard-inner {
    max-width: var(--container);
    margin: 0 auto;
}
.dashboard-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 3.5rem;
}
.dashboard-header .eyebrow { display: inline-block; margin-bottom: 1rem; }
.dashboard-header h2 { margin-bottom: 1rem; }
.dashboard-header p { color: var(--text-muted); font-size: 1.0625rem; }

.dashboard-visual {
    position: relative;
    text-align: center;
    margin: 0 auto 5rem;
    max-width: 1000px;
}
.dashboard-visual::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: -10%;
    background:
        radial-gradient(50% 60% at 50% 50%, rgba(37, 99, 235, 0.18), transparent 70%),
        radial-gradient(35% 50% at 30% 80%, rgba(16, 185, 129, 0.10), transparent 70%);
    filter: blur(50px);
    z-index: 0;
    pointer-events: none;
}
.dashboard-visual img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    height: auto;
    display: inline-block;
    filter: drop-shadow(0 60px 80px rgba(15, 23, 42, 0.18));
}

.dashboard-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 980px;
    margin: 0 auto;
}
.d-feature {
    text-align: center;
    padding: 1.5rem 1rem;
}
.d-feature i {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 0.85rem;
    display: inline-block;
}
.d-feature h4 {
    font-size: 1.15rem;
    margin-bottom: 0.45rem;
    letter-spacing: -0.015em;
}
.d-feature p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* ============================================================
   DRIVER section — stats + 2-column with phone mockup
   ============================================================ */
.driver-section {
    padding: 120px 1.5rem 140px;
    background: linear-gradient(180deg, #f4f8ff 0%, #ffffff 100%);
    position: relative;
    overflow: clip;
    isolation: isolate;
}
.driver-inner {
    max-width: var(--container);
    margin: 0 auto;
}
.driver-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 3rem;
}
.driver-header .eyebrow { display: inline-block; margin-bottom: 1rem; }
.driver-header h2 { margin-bottom: 1rem; }

.driver-stats {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 980px;
    margin: 0 auto 5rem;
    padding: 2.5rem 2.5rem;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.04));
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 24px;
    box-shadow: 0 20px 50px -20px rgba(37, 99, 235, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.d-stat-divider {
    width: 1px;
    height: 100px;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.18), transparent);
}
.d-stat { text-align: center; }
.d-stat-eyebrow {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 0.5rem;
}
.d-stat-num {
    font-size: clamp(3rem, 6vw, 4.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #10b981 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.d-stat p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 360px;
    margin: 0 auto;
}

/* ===== Driver pinned stage: phone morphs + laptop slides in + phrase appears ===== */
.driver-stage {
    height: 220vh;
    position: relative;
}
.driver-stage-sticky {
    position: sticky;
    top: 90px;
    height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    padding: 1.5rem 0;
    /* container for absolute-positioned phone & laptop */
    overflow: visible;
}
.driver-stage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.driver-stage-spacer {
    /* keeps grid balanced; visuals are absolutely positioned over this column */
    height: 460px;
}
.driver-text h3 {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}
.driver-text > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}
.driver-text strong { color: var(--primary); font-weight: 700; }
.driver-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.driver-bullets li {
    padding-left: 1.85rem;
    position: relative;
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 0.95rem;
}
.driver-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #10b981);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}
.driver-bullets li strong { color: var(--text-primary); font-weight: 700; }

/* Glow behind the visuals (positioned over sticky) */
.dvs-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 70%;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(50% 60% at 50% 60%, rgba(37, 99, 235, 0.22), transparent 70%),
        radial-gradient(40% 55% at 30% 50%, rgba(16, 185, 129, 0.18), transparent 70%);
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}

/* Phone — absolutely positioned over the sticky.
   Vertical anchor uses a FIXED pixel offset from sticky center (not %)
   so the composition stays consistent regardless of viewport height. */
.dv-phone {
    position: absolute;
    top: calc(50% + 160px);
    right: 14%;
    width: clamp(180px, 22%, 280px);
    height: auto;
    transform: translateY(-50%);
    transform-origin: right center;
    z-index: 3;
    filter: drop-shadow(0 30px 50px rgba(15, 23, 42, 0.32));
    will-change: transform;
}

/* Laptop — absolutely positioned, initially off-right and invisible.
   Pixel offset chosen so its bottom aligns with the phone's bottom. */
.dv-laptop {
    position: absolute;
    top: calc(50% + 225px);
    left: 50%;
    width: clamp(420px, 72%, 820px);
    height: auto;
    z-index: 2;
    opacity: 0;
    transform: translate(50%, -50%);
    filter: drop-shadow(0 50px 80px rgba(15, 23, 42, 0.20));
    will-change: transform, opacity;
}

/* Final phrase — appears at the end of the timeline */
.driver-final-phrase {
    text-align: center;
    font-size: clamp(1.05rem, 1.6vw, 1.4rem);
    font-weight: 500;
    color: var(--text-secondary);
    max-width: 980px;
    margin: 0 auto;
    padding: 0 1.5rem;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(16px);
    will-change: transform, opacity;
}
.driver-final-phrase strong {
    color: var(--text-primary);
    font-weight: 700;
    display: inline-block;
    margin-bottom: 0.3rem;
}

@media (max-width: 980px) {
    /* Disable pin and show composed final state */
    .driver-stage { height: auto; }
    .driver-stage-sticky {
        position: static;
        height: auto;
        gap: 2rem;
    }
    .driver-stage-grid { grid-template-columns: 1fr; gap: 2rem; }
    .driver-stage-spacer { height: 380px; }
    /* Phone & laptop in their composed final state (no scroll-driven anim) */
    .dv-phone {
        right: 8%;
        top: auto;
        bottom: 5%;
        width: 22%;
        max-width: 180px;
        transform: none;
    }
    .dv-laptop {
        opacity: 1;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 95%;
        max-width: 600px;
    }
    .driver-final-phrase { opacity: 1; transform: none; }
}

/* Reduced motion: skip pin and show composed end state */
@media (prefers-reduced-motion: reduce) {
    .driver-stage { height: auto; }
    .driver-stage-sticky { position: static; height: auto; }
    .dv-phone {
        right: 8%;
        top: auto;
        bottom: 5%;
        width: 22%;
        transform: none;
    }
    .dv-laptop {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    .driver-final-phrase { opacity: 1; transform: none; }
}

@media (max-width: 800px) {
    .dashboard-section { padding: 90px 1.25rem; }
    .dashboard-features { grid-template-columns: 1fr; gap: 0.5rem; }
    .driver-section { padding: 90px 1.25rem; }
    .driver-stats { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.5rem; }
    .d-stat-divider { width: 80%; height: 1px; background: linear-gradient(90deg, transparent, rgba(15,23,42,0.18), transparent); justify-self: center; }
    .driver-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .driver-visual { order: -1; }
    .driver-visual img { max-width: 280px; }
}

/* ============================================================
   SCENARIOS — Pomelo "Tecnología para escalar" structure
   Dark navy bg + cloud + 3 cards in a row (Pomelo had 4 in 2x2)
   ============================================================ */
.scenarios {
    padding: 140px 1.5rem 120px;
    background: #0a1430;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
}
.scenarios-inner {
    max-width: var(--container);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.scenarios-layout {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 3rem;
}

/* ===== LEFT: header + globe ===== */
.scenarios-left { position: relative; }
.scenarios-header { max-width: 480px; }
.scenarios-header h2 {
    color: #fff;
    font-size: clamp(2.5rem, 5.2vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: 1.25rem;
}
.scenarios-header p {
    color: rgba(255,255,255,0.72);
    font-size: 1.0625rem;
    line-height: 1.55;
}

.eyebrow-light {
    color: #93c5fd;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: none;
    padding: 0;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Globe illustration */
.scenarios-globe {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 480px;
    margin-top: 3rem;
}
.scenarios-globe span {
    position: absolute;
    pointer-events: none;
}
.globe-bg {
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,0.05), transparent 55%),
        radial-gradient(circle, rgba(37,99,235,0.05), transparent 75%);
}
.globe-meridians { inset: 0; }
.globe-meridians::before, .globe-meridians::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 50%;
}
.globe-meridians::before { transform: scaleX(0.55); }
.globe-meridians::after { transform: scaleX(0.25); }
.globe-dots {
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.20) 1.5px, transparent 0);
    background-size: 16px 16px;
    border-radius: 50%;
    -webkit-mask-image: radial-gradient(circle, black 45%, transparent 72%);
    mask-image: radial-gradient(circle, black 45%, transparent 72%);
}
.globe-pin {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(37,99,235,0.18), 0 0 18px rgba(37,99,235,0.55);
    animation: pin-pulse 2.6s ease-in-out infinite;
}
.globe-pin-1 { top: 38%; left: 30%; animation-delay: 0s; }
.globe-pin-2 { top: 56%; left: 60%; animation-delay: 0.5s; background: #10b981; box-shadow: 0 0 0 6px rgba(16,185,129,0.18), 0 0 18px rgba(16,185,129,0.55); }
.globe-pin-3 { top: 28%; left: 64%; animation-delay: 1.0s; }
.globe-pin-4 { top: 70%; left: 30%; animation-delay: 1.4s; background: #d946ef; box-shadow: 0 0 0 6px rgba(217,70,239,0.18), 0 0 18px rgba(217,70,239,0.50); }
.globe-pin-5 { top: 50%; left: 78%; animation-delay: 1.9s; }
@keyframes pin-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

/* ===== RIGHT: 3 cards in a row ===== */
.scenarios-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.diff-card {
    position: relative;
    padding: 2.5rem 2rem 2rem;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    background-color: rgba(255,255,255,0.025);
    background-image:
        radial-gradient(circle at 1.5px 1.5px, rgba(255,255,255,0.06) 1.5px, transparent 0);
    background-size: 22px 22px;
    text-align: center;
    transition: border-color .35s ease, transform .35s ease, background-color .35s ease;
    overflow: hidden;
    isolation: isolate;
}
.diff-card:hover {
    border-color: rgba(255,255,255,0.32);
    background-color: rgba(255,255,255,0.05);
    transform: translateY(-4px);
}

.diff-icon-wrap {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto 1.5rem;
    display: grid;
    place-items: center;
}
.diff-icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.22);
}
.diff-icon {
    color: #fff;
    font-size: 1.6rem;
    z-index: 1;
}
.diff-icon-wrap-filled {
    background: linear-gradient(140deg, var(--primary) 0%, #10b981 100%);
    border-radius: 50%;
    box-shadow: 0 12px 32px rgba(37,99,235,0.45), 0 0 0 1px rgba(255,255,255,0.10) inset;
}
.diff-icon-wrap-filled .diff-icon-ring { display: none; }

.diff-card h3 {
    color: #fff;
    font-size: 1.2rem;
    letter-spacing: -0.018em;
    margin-bottom: 0.65rem;
}
.diff-card p {
    color: rgba(255,255,255,0.65);
    font-size: 0.9375rem;
    line-height: 1.55;
}

/* Featured card — colored panel highlight (like Pomelo's first card) */
.diff-card-featured {
    border-color: rgba(37,99,235,0.40);
    background-color: rgba(37,99,235,0.06);
}
.diff-card-glow {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 70%;
    background:
        radial-gradient(70% 100% at 50% 0%, rgba(37,99,235,0.35), transparent 75%),
        radial-gradient(60% 90% at 50% 0%, rgba(16,185,129,0.18), transparent 80%);
    z-index: -1;
    pointer-events: none;
}

.scenarios-cta { text-align: center; margin-top: 1rem; }

@media (max-width: 980px) {
    .scenarios-layout { grid-template-columns: 1fr; gap: 3rem; }
    .scenarios-right { grid-template-columns: 1fr; gap: 1rem; }
    .scenarios-globe { max-width: 360px; margin: 1rem auto 0; }
}
@media (max-width: 600px) {
    .scenarios { padding: 90px 1.25rem; }
}

/* ============================================================
   ADAPTAMOS (cloud + drag carousel) — class kept for CSS reuse,
   now used by the "Pura tecnología" section
   ============================================================ */
   (white base, glow concentrated behind the marquee)
   ============================================================ */
.adaptamos {
    position: relative;
    padding: 140px 1.5rem 120px;
    overflow: hidden;
    isolation: isolate;
    background: #ffffff;
}
.adaptamos-bg {
    /* Focused glow cloud in the center: blue (+Simple) + green (third-party flows) animated mix */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(1200px, 95vw);
    height: 75%;
    z-index: 0;
    pointer-events: none;
    filter: blur(20px);
}
.adaptamos-bg::before,
.adaptamos-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    will-change: opacity, transform;
}
/* Layer A: blue + sutil fuchsia */
.adaptamos-bg::before {
    background:
        radial-gradient(50% 55% at 50% 50%, rgba(37, 99, 235, 0.50), transparent 65%),
        radial-gradient(40% 45% at 28% 48%, rgba(59, 130, 246, 0.45), transparent 60%),
        radial-gradient(38% 40% at 72% 55%, rgba(29, 78, 216, 0.42), transparent 60%),
        radial-gradient(25% 28% at 75% 30%, rgba(217, 70, 239, 0.22), transparent 65%),
        radial-gradient(22% 24% at 50% 22%, rgba(96, 165, 250, 0.30), transparent 65%);
    animation: cloud-pulse-blue 12s ease-in-out infinite;
}
/* Layer B: green + sutil fuchsia */
.adaptamos-bg::after {
    background:
        radial-gradient(48% 50% at 50% 55%, rgba(16, 185, 129, 0.42), transparent 65%),
        radial-gradient(38% 42% at 35% 60%, rgba(52, 211, 153, 0.38), transparent 60%),
        radial-gradient(35% 38% at 68% 45%, rgba(20, 184, 166, 0.35), transparent 60%),
        radial-gradient(25% 26% at 35% 25%, rgba(236, 72, 153, 0.20), transparent 65%),
        radial-gradient(22% 22% at 80% 80%, rgba(217, 70, 239, 0.18), transparent 65%);
    animation: cloud-pulse-green 12s ease-in-out infinite;
}
@keyframes cloud-pulse-blue {
    0%, 100% { opacity: 1; transform: scale(1) translate(0, 0); }
    25%      { opacity: 0.85; transform: scale(0.98) translate(-1%, 0.5%); }
    50%      { opacity: 0.45; transform: scale(0.94) translate(0, 1%); }
    75%      { opacity: 0.80; transform: scale(0.99) translate(1%, 0); }
}
@keyframes cloud-pulse-green {
    0%, 100% { opacity: 0.45; transform: scale(0.94) translate(0, 1%); }
    25%      { opacity: 0.80; transform: scale(0.99) translate(1%, 0); }
    50%      { opacity: 1; transform: scale(1.04) translate(0, 0); }
    75%      { opacity: 0.85; transform: scale(0.98) translate(-1%, -0.5%); }
}

/* Second cloud — smaller, top-right, overlapping with the main: blue + fuchsia + green touch */
.adaptamos-bg-2 {
    position: absolute;
    /* tirada a la derecha y un poco más arriba; se solapa con la nube principal */
    right: 12%;
    top: 18%;
    width: min(420px, 40vw);
    height: 320px;
    z-index: 0;
    pointer-events: none;
    filter: blur(28px);
}
.adaptamos-bg-2::before,
.adaptamos-bg-2::after {
    content: '';
    position: absolute;
    inset: 0;
    will-change: opacity, transform;
}
/* Blue + green */
.adaptamos-bg-2::before {
    background:
        radial-gradient(55% 60% at 50% 50%, rgba(37, 99, 235, 0.50), transparent 65%),
        radial-gradient(40% 45% at 35% 60%, rgba(59, 130, 246, 0.42), transparent 60%),
        radial-gradient(28% 32% at 70% 30%, rgba(16, 185, 129, 0.25), transparent 65%);
    animation: cloud2-blue 14s ease-in-out infinite;
}
/* Fuchsia + green touch */
.adaptamos-bg-2::after {
    background:
        radial-gradient(50% 55% at 55% 45%, rgba(217, 70, 239, 0.32), transparent 65%),
        radial-gradient(38% 40% at 70% 65%, rgba(236, 72, 153, 0.28), transparent 65%),
        radial-gradient(28% 30% at 30% 70%, rgba(52, 211, 153, 0.22), transparent 65%);
    animation: cloud2-pink 14s ease-in-out infinite;
}
@keyframes cloud2-blue {
    0%, 100% { opacity: 0.95; transform: scale(1); }
    50%      { opacity: 0.65; transform: scale(0.95); }
}
@keyframes cloud2-pink {
    0%, 100% { opacity: 0.55; transform: scale(0.95); }
    50%      { opacity: 0.85; transform: scale(1.02); }
}
.adaptamos-inner {
    position: relative;
    z-index: 1;
    max-width: var(--container);
    margin: 0 auto;
}
.adaptamos-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 4rem;
    padding: 3rem 1.5rem 3rem;
}
.adaptamos-header .eyebrow {
    display: inline-block;
    margin: 0 0 1rem 0;
    padding: 0.35rem 0.85rem 0.35rem 0.85rem;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    line-height: 1.5;
}
.adaptamos-header h2 { margin-bottom: 1rem; }
.adaptamos-header p { color: var(--text-secondary); font-size: 1.0625rem; }

/* Marquee — infinite auto-scrolling carousel */
.adaptamos-marquee-wrap {
    position: relative;
    overflow: hidden;
    padding: 1rem 0 1rem;
    /* Soft edge mask so cards fade in/out at the borders */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.adaptamos-marquee-wrap {
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.adaptamos-marquee-wrap.is-dragging { cursor: grabbing; }
.adaptamos-marquee {
    display: flex;
    gap: 1.25rem;
    width: max-content;
    will-change: transform;
}

/* Transparent card — only border visible, internal blue glow on hover */
.adaptamos-card {
    flex: 0 0 290px;
    max-width: 290px;
    min-height: 230px;
    padding: 1.75rem 1.5rem 1.75rem;
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    transition: border-color .4s ease, transform .4s ease, box-shadow .4s ease;
}
.adaptamos-card::before {
    /* internal blue glow on hover (visible through transparent card) */
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(70% 80% at 50% 0%, rgba(37, 99, 235, 0.25), transparent 70%);
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}
.adaptamos-card::after {
    /* subtle highlight along the top edge */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.45), transparent);
    opacity: 0.6;
}
.adaptamos-card:hover {
    border-color: rgba(37, 99, 235, 0.55);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -10px rgba(37, 99, 235, 0.25);
}
.adaptamos-card:hover::before { opacity: 1; }

.ac-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(37, 99, 235, 0.18);
    color: var(--primary);
    font-size: 1.15rem;
    display: grid;
    place-items: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.adaptamos-card h3 {
    color: var(--text-primary);
    font-size: 1.15rem;
    letter-spacing: -0.015em;
    margin-bottom: 0.4rem;
}
.adaptamos-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.adaptamos-cta { text-align: center; margin-top: 2.5rem; }

.adaptamos-footer-text {
    text-align: center;
    max-width: 980px;
    margin: 4rem auto 6rem;
    padding: 0 1.5rem;
    color: var(--text-secondary);
    font-size: clamp(1.05rem, 1.6vw, 1.4rem);
    font-weight: 500;
    line-height: 1.45;
}
.adaptamos-footer-text strong {
    color: var(--text-primary);
    font-weight: 700;
    display: inline-block;
    margin-bottom: 0.3rem;
}

/* ============================================================
   MODULES — sticky scroll-pin AI-native
   ============================================================ */
.modules {
    /* Intense +Simple blue background with subtle stains */
    background-color: #2563eb;
    background-image:
        radial-gradient(50% 60% at 12% 18%, rgba(147, 197, 253, 0.40), transparent 60%),
        radial-gradient(38% 50% at 88% 78%, rgba(255, 255, 255, 0.10), transparent 65%),
        radial-gradient(40% 45% at 60% 100%, rgba(29, 78, 216, 0.55), transparent 65%),
        radial-gradient(32% 38% at 95% 5%, rgba(15, 23, 42, 0.30), transparent 65%),
        radial-gradient(28% 32% at 5% 70%, rgba(30, 58, 138, 0.40), transparent 65%);
    position: relative;
    /* IMPORTANT: NOT overflow:hidden — that breaks position:sticky on children. */
    overflow: clip;
    isolation: isolate;
    padding-top: 140px;
    color: #fff;
}
.modules-sticky > .section-paths {
    /* SVG absoluto dentro del sticky → mismo stacking context que el bento, así el backdrop-filter del bento blurea correctamente la línea sin que se "desvanezca" en pantallas grandes */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.modules-sticky > .bento-row {
    position: relative;
    z-index: 1;
}
.modules::before {
    /* spectrum stain — top-left bright */
    content: '';
    position: absolute;
    top: -10%;
    left: -8%;
    width: 60%;
    height: 70%;
    background:
        radial-gradient(closest-side, rgba(167, 243, 208, 0.30), transparent 70%),
        radial-gradient(closest-side, rgba(34, 211, 238, 0.22), transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}
.modules::after {
    /* spectrum stain — bottom-right warm magenta */
    content: '';
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 60%;
    height: 70%;
    background:
        radial-gradient(closest-side, rgba(217, 70, 239, 0.22), transparent 70%),
        radial-gradient(closest-side, rgba(251, 191, 36, 0.14), transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: -1;
}
.modules-glow { display: none; }

.modules-header {
    max-width: 880px;
    margin: 0 auto 1.6rem;
    padding: 0 1.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
}
.modules-header .eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    color: #fff;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(255,255,255,0.30);
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.modules-header h2 {
    margin-bottom: 1rem;
    color: #fff;
}
.modules-header h2 .text-accent {
    /* Override shimmer for dark context: white → light blue */
    background: linear-gradient(120deg, #ffffff 0%, #bfdbfe 50%, #ffffff 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.modules-header p { color: rgba(255, 255, 255, 0.85); font-size: 1.0625rem; }

.modules-stage {
    /* Tall section so we can pin and progress through modules */
    /* reducido 30% para evitar mucho espacio luego del último módulo */
    height: 210vh;
    position: relative;
    z-index: 1;
}
.modules-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 1.5rem 3rem;
}
/* ===== Bento expandible — horizontal panels collapsing & expanding ===== */
.bento-row {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    gap: 14px;
    height: clamp(440px, 64vh, 580px);
}

.bento-panel {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    background-color: rgba(255, 255, 255, 0.025);
    background-image:
        radial-gradient(circle at 1.5px 1.5px, rgba(255, 255, 255, 0.05) 1.5px, transparent 0);
    background-size: 22px 22px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    isolation: isolate;
    cursor: pointer;
    text-align: left;
    color: #fff;
    padding: 0;
    transition:
        flex-grow 0.7s cubic-bezier(.4, 0, .2, 1),
        background-color 0.5s ease,
        border-color 0.5s ease,
        box-shadow 0.5s ease;
}

/* highlight glow when active — drawn behind content but inside the panel */
.bento-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: radial-gradient(70% 100% at 50% 0%, rgba(96, 165, 250, 0.22), transparent 75%);
    opacity: 0;
    transition: opacity 0.45s ease;
    z-index: -1;
    pointer-events: none;
}
.bento-panel.is-active::before {
    opacity: 1;
}

.bento-panel.is-active {
    flex-grow: 6;
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow:
        0 30px 60px -20px rgba(15, 23, 42, 0.55),
        0 0 0 1px rgba(96, 165, 250, 0.18);
}

.bento-panel:hover:not(.is-active) {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.22);
}

/* Rail (always visible — the "spine" of each panel) */
.bento-rail {
    flex: 0 0 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.75rem 0.5rem;
    gap: 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 2;
}

.bento-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.78);
    transition:
        background 0.5s ease,
        border-color 0.5s ease,
        color 0.5s ease,
        box-shadow 0.5s ease,
        transform 0.5s ease;
    flex-shrink: 0;
}

.bento-panel.is-active .bento-icon {
    background: linear-gradient(140deg, var(--primary) 0%, #10b981 100%);
    border-color: transparent;
    color: #fff;
    box-shadow:
        0 0 0 6px rgba(37, 99, 235, 0.18),
        0 14px 30px -8px rgba(37, 99, 235, 0.55);
    transform: scale(1.05);
}

.bento-rail-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.62);
    transition: opacity 0.4s ease, color 0.4s ease;
    user-select: none;
}

.bento-panel.is-active .bento-rail-title {
    opacity: 0;
}

.bento-rail-num {
    margin-top: auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.40);
    letter-spacing: 0.1em;
    transition: color 0.4s ease;
}

.bento-panel.is-active .bento-rail-num {
    color: rgba(255, 255, 255, 0.82);
}

/* Body (only fully visible when active) */
.bento-body {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    padding: 2rem 2rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    justify-content: center;
    opacity: 0;
    transform: translateX(20px);
    transition:
        opacity 0.45s ease 0.05s,
        transform 0.5s cubic-bezier(.4, 0, .2, 1) 0.05s;
    pointer-events: none;
    overflow: hidden;
}

.bento-panel.is-active .bento-body {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.bento-lead {
    font-size: clamp(1.4rem, 2.2vw, 1.95rem);
    font-weight: 700;
    line-height: 1.16;
    background: linear-gradient(120deg, #ffffff 0%, #bfdbfe 50%, #a7f3d0 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 8s linear infinite;
    margin: 0;
    max-width: 480px;
}

.bento-body h3 {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.86);
    margin: 0;
    letter-spacing: -0.01em;
}

.bento-bullets {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 460px;
}

.bento-bullets li {
    position: relative;
    padding-left: 1.7rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.5;
}

.bento-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.85) 25%, transparent 30%);
}

.module-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.50);
    padding-bottom: 2px;
    width: fit-content;
    margin-top: 0.4rem;
    transition: color 0.25s ease, border-color 0.25s ease;
}
.module-link i { transition: transform 0.35s ease; }
.module-link:hover { color: #fff; border-color: #fff; }
.module-link:hover i { transform: translateX(3px); }

/* Mobile / reduced-motion fallback */
@media (max-width: 980px) {
    .modules-stage { height: auto; }
    .modules-sticky { position: static; height: auto; padding: 1rem 1.5rem 4rem; }
    /* SVG sticky no aplica en mobile (no hay scroll-pin) */
    .modules-sticky > .section-paths { display: none; }
    .bento-row {
        flex-direction: column;
        height: auto;
        gap: 1rem;
    }
    .bento-panel {
        flex: 0 0 auto;
        flex-direction: column; /* rail arriba, body abajo */
        min-height: auto;
        overflow: visible; /* que el contenido fluya sin recortarse */
        background: rgba(255, 255, 255, 0.04);
    }
    .bento-rail {
        flex: 0 0 auto;
        flex-direction: row;
        width: 100%;
        align-items: center;
        padding: 0.75rem 1rem; /* rail más compacto */
        gap: 0.85rem;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .bento-icon {
        width: 42px; /* icon más chico */
        height: 42px;
        font-size: 0.95rem;
        background: linear-gradient(140deg, var(--primary) 0%, #10b981 100%);
        border-color: transparent;
        color: #fff;
    }
    .bento-rail-title {
        writing-mode: horizontal-tb;
        transform: none;
        opacity: 1 !important;
        font-size: 0.88rem;
        color: rgba(255, 255, 255, 0.86);
    }
    .bento-rail-num {
        margin-top: 0;
        margin-left: auto;
        font-size: 0.75rem;
    }
    .bento-body {
        flex: 0 0 auto;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        padding: 1.25rem 1.25rem 1.5rem;
        height: auto;
        gap: 0.7rem;
        overflow: visible; /* mostrar todo el contenido del card */
    }
    .bento-lead { font-size: clamp(1.15rem, 4.5vw, 1.4rem); }
    .bento-body h3 { font-size: 1rem; }
}

/* Features responsive */
@media (max-width: 600px) {
    .features { padding: 90px 0 80px; }
    .feature-card { flex: 0 0 84vw; max-width: 84vw; padding: 2rem 1.5rem; }
    .features-track > .feature-card:first-child { margin-left: 1rem; }
    .features-track > .feature-card:last-child { margin-right: 1rem; }
    .adaptamos { padding: 90px 0; }
    .adaptamos-card { flex: 0 0 75vw; max-width: 75vw; min-height: 200px; }
    .adaptamos-marquee { animation-duration: 50s; }
}

/* Reduced motion — pause cloud pulse (marquee is JS, handled there) */
@media (prefers-reduced-motion: reduce) {
    .adaptamos-bg::before, .adaptamos-bg::after { animation: none; }
    .adaptamos-bg::before { opacity: 0.7; }
    .adaptamos-bg::after { opacity: 0.7; }
    .adaptamos-bg-2::before, .adaptamos-bg-2::after { animation: none; }
}

/* ============================================================
   CONTACTO — pitch + form (Pomelo-style)
   ============================================================ */
.contact-section {
    position: relative;
    padding: 140px 1.5rem 120px;
    background: #0a1430;
    overflow: clip;
    color: #fff;
    isolation: isolate;
}
.contact-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(40% 50% at 18% 30%, rgba(37, 99, 235, 0.30), transparent 65%),
        radial-gradient(35% 45% at 82% 70%, rgba(16, 185, 129, 0.22), transparent 65%),
        radial-gradient(30% 40% at 50% 100%, rgba(217, 70, 239, 0.18), transparent 70%);
    filter: blur(40px);
}
.contact-inner {
    max-width: var(--container);
    margin: 0 auto;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 5rem;
    align-items: start;
}

/* Left: pitch */
.contact-pitch .eyebrow-light {
    display: inline-block;
    margin-bottom: 1.25rem;
}
.contact-pitch h2 {
    color: #fff;
    margin-bottom: 1.25rem;
    font-size: clamp(2.25rem, 4.4vw, 3.5rem);
    letter-spacing: -0.03em;
}
.contact-pitch h2 .text-accent {
    background: linear-gradient(120deg, #ffffff 0%, #93c5fd 50%, #a7f3d0 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.contact-lead {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.contact-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.contact-benefits li {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0.75rem;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}
.contact-benefits li i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    color: #fff;
    background: linear-gradient(140deg, var(--primary), #10b981);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* Right: form card */
.contact-form-wrap {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 22px;
    padding: 2.25rem 2rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.35);
}
.formContact {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}
.formContact label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    letter-spacing: 0.02em;
}
.formContact input,
.formContact select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.formContact input::placeholder { color: rgba(255, 255, 255, 0.40); }
.formContact input:focus,
.formContact select:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.65);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.20);
}
.formContact select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
.formContact select option { background: #0a1430; color: #fff; }
.formContact input:invalid:not(:placeholder-shown) {
    border-color: rgba(239, 68, 68, 0.55);
}

.contact-submit {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 1.4rem;
    background: linear-gradient(135deg, var(--primary) 0%, #10b981 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.35);
}
.contact-submit i { transition: transform .25s ease; }
.contact-submit:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(37, 99, 235, 0.50); }
.contact-submit:hover i { transform: translateX(4px); }
.contact-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.contact-fineprint {
    color: rgba(255, 255, 255, 0.50);
    font-size: 0.78rem;
    text-align: center;
    margin-top: 0.5rem;
}

/* Submission result modal — shared by light/dark contexts */
.contact-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 30, 0.70);
    backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility 0s linear .25s;
    padding: 1rem;
}
.contact-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity .25s ease, visibility 0s;
}
.contact-modal {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    color: var(--text-primary);
    border-radius: 20px;
    padding: 2rem 1.75rem;
    text-align: center;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.40);
    transform: translateY(12px);
    transition: transform .35s ease;
}
.contact-modal-overlay.is-open .contact-modal { transform: translateY(0); }
.contact-modal-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: grid; place-items: center;
    margin: 0 auto 1rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
}
.contact-modal.success .contact-modal-icon { background: linear-gradient(140deg, var(--primary), #10b981); }
.contact-modal.error .contact-modal-icon { background: linear-gradient(140deg, #ef4444, #f97316); }
.contact-modal-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.018em;
}
.contact-modal-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.contact-modal-close {
    padding: 0.7rem 1.4rem;
    background: var(--text-primary);
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background .25s ease;
}
.contact-modal-close:hover { background: var(--primary); }

@media (max-width: 880px) {
    .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .contact-section { padding: 90px 1.25rem; }
    .form-row-2 { grid-template-columns: 1fr; gap: 1.1rem; }
    .contact-form-wrap { padding: 1.75rem 1.5rem; }
}

/* ============== Footer ============== */
.site-footer {
    padding: 3rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
}
.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-logo { height: 28px; }
.footer-rights { color: var(--text-muted); font-size: 0.875rem; }

/* ============== Responsive ============== */
@media (max-width: 980px) {
    .nav-links, .header-cta { display: none; }
    .hamburger { display: flex; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .site-header { top: 10px; width: calc(100% - 20px); }
    .header-inner { padding: 0.5rem 0.55rem 0.5rem 1rem; min-height: 60px; }
    .hero { padding: 110px 1.25rem 80px; }
    .stats { padding: 80px 1.25rem; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .hero-title .word, .hero-title .punct { transform: none; opacity: 1; }
    [data-reveal] { opacity: 1; transform: none; }
}

/* ============================================================
   Lang switcher dropdown (desktop + mobile)
   ============================================================ */

.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.02em;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.lang-trigger:hover,
.lang-switcher.is-open .lang-trigger {
    border-color: rgba(37, 99, 235, 0.4);
    color: #2563eb;
    background: rgba(37, 99, 235, 0.04);
}

.lang-trigger-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.75;
}

.lang-trigger:hover .lang-trigger-icon,
.lang-switcher.is-open .lang-trigger-icon {
    opacity: 1;
}

.lang-trigger-label {
    letter-spacing: 0.04em;
}

.lang-trigger-arrow {
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 0.15rem;
    transition: transform 0.18s ease;
    opacity: 0.7;
}

.lang-switcher.is-open .lang-trigger-arrow {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    min-width: 200px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1100;
}

.lang-switcher.is-open .lang-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.lang-menu li {
    margin: 0;
    list-style: none;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: inherit;
    text-align: left;
    font-family: inherit;
    transition: background 0.12s ease, color 0.12s ease;
}

.lang-option:hover {
    background: rgba(15, 23, 42, 0.04);
}

.lang-option .lang-code {
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    padding: 0.18rem 0.45rem;
    border-radius: 5px;
    min-width: 30px;
    text-align: center;
}

.lang-option .lang-name {
    flex: 1;
}

.lang-option .lang-check {
    margin-left: auto;
    color: #2563eb;
    opacity: 0;
    font-weight: 700;
    font-size: 0.85rem;
}

.lang-option.is-active .lang-check {
    opacity: 1;
}

.lang-option.is-active {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.06);
}

/* Mobile: dentro del mobile-menu el dropdown se comporta como acordeón */
.mobile-menu .lang-switcher {
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.mobile-menu .lang-trigger {
    width: 100%;
    justify-content: space-between;
}

.mobile-menu .lang-trigger-label {
    flex: 1;
    text-align: left;
    margin-left: 0.4rem;
}

.mobile-menu .lang-menu {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: none;
    background: rgba(15, 23, 42, 0.02);
    opacity: 1;
    transform: none;
    pointer-events: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.22s ease, padding 0.22s ease;
    padding: 0 0.35rem;
    border: 0;
}

.mobile-menu .lang-switcher.is-open .lang-menu {
    max-height: 280px;
    padding: 0.35rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

/* Soporte para fade-in al cambiar de idioma */
html.lang-fade-in body {
    animation: langFadeIn 0.3s ease-out;
}

@keyframes langFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================================
   Nav dropdown (Developers menu en el nav principal)
   Patrón general reutilizable para items de nav con submenu.
   ============================================================ */

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: none;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    font: inherit;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-dropdown-trigger:hover,
.nav-dropdown.is-open .nav-dropdown-trigger {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.04);
}

.nav-dropdown-arrow {
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 0.1rem;
    opacity: 0.7;
    transition: transform 0.18s ease;
}

.nav-dropdown.is-open .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.4rem;
    min-width: 300px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 1100;
}

.nav-dropdown.is-open .nav-dropdown-panel {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.nav-dropdown-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.12s ease;
}

.nav-dropdown-item:hover {
    background: var(--surface-2);
}

.nav-dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary-50);
    color: var(--primary);
    flex-shrink: 0;
}

.nav-dropdown-icon svg {
    width: 16px;
    height: 16px;
}

.nav-dropdown-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.nav-dropdown-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-dropdown-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.nav-dropdown-tag {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--primary-50);
    color: var(--primary);
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--primary-100);
}

/* Mobile dropdown via <details> */
.mobile-menu details.nav-dropdown-mobile {
    border-bottom: 1px solid var(--border);
    padding: 0.4rem 0;
}

.mobile-menu details.nav-dropdown-mobile > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.6rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.mobile-menu details.nav-dropdown-mobile > summary::-webkit-details-marker {
    display: none;
}

.mobile-menu details.nav-dropdown-mobile > summary::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 300;
    line-height: 1;
}

.mobile-menu details.nav-dropdown-mobile[open] > summary::after {
    content: '−';
}

.mobile-menu details.nav-dropdown-mobile a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.55rem 0 0.55rem 1rem;
    border-bottom: none;
}

.mobile-menu details.nav-dropdown-mobile a:hover {
    color: var(--primary);
}
