/* ═══════════════════════════════════════════════════
   MetaLogic — Arquitectura Digital
   Brand Design System & Styles
   ═══════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
    --sky-blue: #6EC1E4;
    --cognitive-blue: #3F8FD2;
    --deep-blue: #1F3C88;
    --neural-purple: #5B2D8B;
    --deep-purple: #3B1C5A;
    --bg-dark: #0a0a1a;
    --bg-section: #0d0d24;
    --text-primary: #f0f0f8;
    --text-secondary: rgba(240, 240, 248, 0.65);
    --text-muted: rgba(240, 240, 248, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg-strong: rgba(255, 255, 255, 0.07);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 0 30px rgba(91, 45, 139, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea {
    font-family: inherit;
    border: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--sky-blue);
    outline-offset: 3px;
}

.code-font {
    font-family: var(--font-code);
}

.code-tag {
    color: var(--sky-blue);
    font-family: var(--font-code);
    font-size: 0.85em;
}

/* ── Utilities ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--sky-blue), var(--neural-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-card {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.section {
    padding: 120px 0;
    position: relative;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn .material-icons-round {
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cognitive-blue), var(--neural-purple));
    color: #fff;
    box-shadow: 0 4px 20px rgba(63, 143, 210, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(63, 143, 210, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--sky-blue);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
}

.btn-sm:hover {
    border-color: var(--sky-blue);
}

.btn-glow {
    background: linear-gradient(135deg, var(--cognitive-blue), var(--neural-purple));
    color: #fff;
    padding: 16px 32px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--sky-blue), var(--neural-purple), var(--sky-blue));
    border-radius: 50px;
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
    filter: blur(15px);
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(91, 45, 139, 0.6), 0 0 80px rgba(110, 193, 228, 0.2);
}

.btn-glow:hover::before {
    opacity: 1;
}

/* ── Reveal Animation ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Section Headers ── */
.section-header {
    text-align: center;
    margin-bottom: 30px;
    /* Reduced to bring cards closer */
}

.section-tag {
    display: inline-block;
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--sky-blue);
    margin-bottom: 16px;
    padding: 6px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(110, 193, 228, 0.4));
}

.logo-img.large {
    height: 52px;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
}

.logo-text.large {
    font-size: 1.8rem;
}

.logo-accent {
    color: var(--sky-blue);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 50px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--glass-bg);
}

/* ═══════════════════════════════════════════════════
   NAV DROPDOWN (Sitios Web → Catálogo)
   ═══════════════════════════════════════════════════ */
.nav-dropdown {
    position: relative;
}

.nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    padding: 10px;
    padding-top: 18px; /* bridge the visual gap without losing hover */
    border-radius: 14px;
    background: rgba(10, 10, 26, 0.92);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
    z-index: 1002;
}

.nav-submenu li {
    width: 100%;
}

.nav-sublink {
    display: flex;
    width: 100%;
    justify-content: flex-start;
}

.nav-dropdown:hover .nav-submenu,
.nav-dropdown:focus-within .nav-submenu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-cta {
    background: linear-gradient(135deg, var(--cognitive-blue), var(--neural-purple)) !important;
    color: #fff !important;
    padding: 8px 20px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    cursor: pointer;
    z-index: 1001;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.hero-section {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#neural-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, var(--bg-dark) 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 100px 24px 80px;
    max-width: 900px;
}

.brutal-headline {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
    display: flex;
    flex-wrap: nowrap;
    /* Prevent wrapping during typing */
    justify-content: center;
    gap: 0.1em;
    min-height: 1.2em;
    /* Ensure stable height */
}

.type-word {
    display: inline-block;
}

.word-1 {
    color: #FFFFFF;
}

.word-2 {
    background: linear-gradient(135deg, #FFFFFF 0%, #6EC1E4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.word-3 {
    background: linear-gradient(135deg, #6EC1E4 0%, #A47CF3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(164, 124, 243, 0.4));
}

.type-cursor {
    color: #6EC1E4;
    font-weight: 300;
    margin-left: 2px;
    animation: blink 0.8s infinite;
    display: inline-block;
    width: 0.1em;
    vertical-align: middle;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #A0A0A0;
    /* Soft Grey */
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
    letter-spacing: 0.01em;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.9s forwards;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    margin-top: 60px;
    opacity: 0;
    animation: fadeUp 0.8s ease 1.1s forwards;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--sky-blue), var(--cognitive-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sky-blue);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
    color: var(--text-muted);
}

@keyframes bounce {

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

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════
   CATALOG — DESKTOP MONITORS
   ═══════════════════════════════════════════════════ */
.catalog-section {
    background: var(--bg-section);
    contain: layout;
}

.catalog-apps {
    background: var(--bg-dark);
    contain: layout;
}

/* ═══════════════════════════════════════════════════
   FAN VITRINA — MASTERPIECE EFFECT
   ═══════════════════════════════════════════════════ */

/* Stage */
.fan-wrapper {
    position: relative;
    padding: 0px 0 40px;
    overflow: visible;
}

.fan-stage {
    position: relative;
    height: 560px;
    perspective: 1800px;
    perspective-origin: 50% 60%;
    max-width: 1140px;
    margin: -80px auto 0;
    /* Marginal negative increased to pull much closer to subtitle */
    overflow: visible;
}

/* ── Card shell (handles X position) ── */
.fan-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 520px;
    cursor: pointer;
    transform: translateX(calc(-50% + 300px)) translateY(900px) translateZ(0);
    opacity: 0;
    z-index: 2;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transition: transform 1.4s cubic-bezier(0.175, 0.885, 0.32, 1.1), opacity 0.8s ease;
}

.fan-card:focus-visible {
    outline: 2px solid var(--sky-blue);
    outline-offset: 4px;
    border-radius: 12px;
}

.fan-card.fan-card-center {
    width: 600px;
    z-index: 3;
}

/* ════════════════════════════
   STACKED STATE  (.is-stacked)
   Phase 1: All cards land at the same spot to the RIGHT of the title
   — illusion of ONE single card next to the heading
   ════════════════════════════ */
.fan-stage.is-stacked .fan-card {
    opacity: 1;
    width: 520px;
    transform: translateX(calc(-50% + 300px)) translateY(-300px) translateZ(0);
}

/* Keep z-order, but never offset positions — perfect overlap */
.fan-stage.is-stacked .fan-card:nth-child(1) {
    z-index: 1;
}

.fan-stage.is-stacked .fan-card:nth-child(2) {
    z-index: 2;
}

.fan-stage.is-stacked .fan-card.fan-card-center {
    z-index: 5;
}

.fan-stage.is-stacked .fan-card:nth-child(4) {
    z-index: 2;
}

.fan-stage.is-stacked .fan-card:nth-child(5) {
    z-index: 1;
}

.fan-stage.is-stacked .fan-card-inner {
    opacity: 1;
    transform: scale(1);
}

.fan-stage.is-stacked .fan-card.fan-card-center .fan-card-inner {
    transform: scale(1);
}

.fan-card-inner {
    position: relative;
    width: 100%;
    transform-origin: center bottom;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.1), opacity 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

/* Base Shadow for JS tilt */
.fan-card.is-hovering .fan-card-inner {
    box-shadow:
        0 0 0 2px var(--sky-blue),
        0 0 40px rgba(110, 193, 228, 0.4),
        0 20px 60px rgba(0, 0, 0, 0.7);
}

/* ── Browser mockup shell ── */
.fan-browser {
    border-radius: 12px;
    overflow: hidden;
    background: #0d0d24;
    position: relative;
    box-shadow:
        0 0 0 1px rgba(110, 193, 228, 0.18),
        0 28px 64px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.fan-browser::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 5;
}

.fan-browser-center {
    box-shadow:
        0 0 0 1.5px var(--sky-blue),
        0 32px 72px rgba(0, 0, 0, 0.9),
        0 0 50px rgba(110, 193, 228, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Browser toolbar — realistic design ── */
.fan-bar {
    height: 46px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
}

/* Per-browser toolbar colors */
.fan-bar-chrome {
    background: #202124;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fan-bar-firefox {
    background: #1C1B22;
    border-bottom: 2px solid #FF9400;
}

.fan-bar-edge {
    background: #121212;
    border-bottom: 1px solid #0078D7;
}

.fan-bar-safari {
    background: #F1F3F4;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Browser-specific mockup borders */
.fan-browser-firefox {
    border-top: 2px solid rgba(255, 113, 57, 0.5);
}

.fan-browser-edge {
    border-top: 2px solid rgba(104, 187, 255, 0.35);
}

.fan-browser-safari {
    border-top: 2px solid rgba(0, 0, 0, 0.08);
}

/* Windows-style controls on the right */
.fan-win-controls {
    display: flex;
    align-items: center;
    margin-left: auto;
    height: 100%;
}

.win-btn {
    width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    transition: background 0.2s;
}

.fan-bar-safari .win-btn {
    color: rgba(0, 0, 0, 0.6);
}

.win-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.win-close:hover {
    background: #E81123 !important;
    color: white !important;
}

/* Traffic-light dots (retaining for Safari/Mac cards if any) */
.fan-dots {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

/* Nav buttons (back / fwd / refresh) */
.fan-nav-btns {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-shrink: 0;
}

.fan-nav-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 16px;
    font-weight: 300;
    line-height: 1;
    cursor: default;
    user-select: none;
}

.fan-nav-btn.fan-refresh {
    font-size: 14px;
}

.fan-bar-safari .fan-nav-btn {
    color: rgba(0, 0, 0, 0.38);
}

/* Address bar */
.fan-addressbar {
    flex: 1;
    height: 28px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 7px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.fan-bar-safari .fan-addressbar {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.fan-bar-chrome .fan-addressbar {
    background: #292A2D;
    border-radius: 20px;
}

.fan-bar-firefox .fan-addressbar {
    background: #2B2A33;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.fan-bar-edge .fan-addressbar {
    background: #1E1E1E;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Lock icon (CSS-drawn) */
.fan-lock {
    flex-shrink: 0;
    width: 10px;
    height: 12px;
    position: relative;
    display: block;
}

.fan-lock::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 10px;
    height: 7px;
    border-radius: 2px;
    background: #28C840;
}

.fan-lock::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 7px;
    border: 1.5px solid #28C840;
    border-radius: 4px 4px 0 0;
    border-bottom: none;
}

.fan-bar-safari .fan-lock::before {
    background: #28C840;
}

.fan-bar-safari .fan-lock::after {
    border-color: #28C840;
}

/* URL text */
.fan-url-text {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    font-family: var(--font-code);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.fan-bar-safari .fan-url-text {
    color: rgba(0, 0, 0, 0.65);
}

/* Right-side menu dots */
.fan-bar-actions {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
    padding: 4px 3px;
    border-radius: 5px;
}

.fan-action-dot {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.fan-bar-safari .fan-action-dot {
    background: rgba(0, 0, 0, 0.28);
}

/* Screen area */
.fan-screen {
    width: 100%;
    height: 272px;
    overflow: hidden;
    position: relative;
    background: #050510;
}

.fan-card-center .fan-screen {
    height: 323px;
}

.fan-video,
.fan-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Scroll-pan image (gym / artisan) */
.fan-scroll-img {
    height: auto;
    min-height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 7s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

/* Card label badge */
.fan-label {
    position: absolute;
    top: -34px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(5, 5, 20, 0.75);
    backdrop-filter: blur(12px);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--sky-blue);
    border: 1px solid rgba(110, 193, 228, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease, top 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.fan-card:hover .fan-label {
    opacity: 1;
    top: -42px;
}

/* ════════════════════════════
   FANNED STATE  (.is-fanned)
   Phase 2: cards spread to center and rotate outward
   NOTE: .is-stacked stays on element so opacity:1 is preserved
   ════════════════════════════ */
.fan-stage.is-fanned .fan-card {
    opacity: 1;
    /* explicit — stays visible */
    /* transition duration/delay set by JS for stagger */
    transition: transform 1.55s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.fan-stage.is-fanned .fan-card-inner {
    transition:
        transform 1.55s cubic-bezier(0.175, 0.885, 0.32, 1.1),
        box-shadow 0.5s ease;
}

/* Final positions (outer shell — X axis) */
.fan-stage.is-fanned .fan-card:nth-child(1) {
    transform: translateX(calc(-50% - 340px)) translateY(-50%);
    z-index: 1;
}

.fan-stage.is-fanned .fan-card:nth-child(2) {
    transform: translateX(calc(-50% - 170px)) translateY(-50%);
    z-index: 2;
}

.fan-stage.is-fanned .fan-card.fan-card-center {
    transform: translateX(-50%) translateY(-50%);
    width: 476px;
    z-index: 5;
}

.fan-stage.is-fanned .fan-card:nth-child(4) {
    transform: translateX(calc(-50% + 170px)) translateY(-50%);
    z-index: 2;
}

.fan-stage.is-fanned .fan-card:nth-child(5) {
    transform: translateX(calc(-50% + 340px)) translateY(-50%);
    z-index: 1;
}

/* Final rotations + scale (inner) */
.fan-stage.is-fanned .fan-card:nth-child(1) .fan-card-inner {
    transform: rotate(-30deg) scale(0.87);
}

.fan-stage.is-fanned .fan-card:nth-child(2) .fan-card-inner {
    transform: rotate(-15deg) scale(0.92);
}

.fan-stage.is-fanned .fan-card.fan-card-center .fan-card-inner {
    transform: rotate(0deg) scale(1.0);
}

.fan-stage.is-fanned .fan-card:nth-child(4) .fan-card-inner {
    transform: rotate(15deg) scale(0.92);
}

.fan-stage.is-fanned .fan-card:nth-child(5) .fan-card-inner {
    transform: rotate(30deg) scale(0.87);
}

.fan-stage.is-fanned .fan-card:hover {
    z-index: 30 !important;
}

.fan-stage.is-fanned .fan-card:hover .fan-card-inner {
    /* JS will control the dynamic transform and override this temporarily */
    transform: rotate(0deg) scale(1.1) translateZ(0);
    border-radius: 20px;
}

/* Scroll-pan disabled (keep images static) */
.fan-stage.is-fanned .fan-card:hover .fan-scroll-img {
    transform: none;
}

/* CTA below */
.fan-cta {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

/* Responsive ── fan */
@media (max-width: 1200px) {
    .fan-stage {
        height: 425px;
    }

    .fan-card {
        width: 289px;
    }

    .fan-card.fan-card-center {
        width: 340px;
    }

    /* Phase 0: hidden below-right */
    .fan-card:nth-child(1),
    .fan-card:nth-child(2),
    .fan-card.fan-card-center,
    .fan-card:nth-child(4),
    .fan-card:nth-child(5) {
        transform: translateX(calc(-50% + 220px)) translateY(700px);
    }

    /* Phase 1: stacked — right of title (compact offset for narrower screens) */
    .fan-stage.is-stacked .fan-card {
        width: 289px;
        transform: translateX(calc(-50% + 220px)) translateY(-280px);
    }

    .fan-stage.is-stacked .fan-card.fan-card-center {
        width: 289px;
    }

    /* Phase 2: fanned — tighter spacing */
    .fan-stage.is-fanned .fan-card:nth-child(1) {
        transform: translateX(calc(-50% - 246px)) translateY(-50%);
    }

    .fan-stage.is-fanned .fan-card:nth-child(2) {
        transform: translateX(calc(-50% - 123px)) translateY(-50%);
    }

    .fan-stage.is-fanned .fan-card.fan-card-center {
        transform: translateX(-50%) translateY(-50%);
        width: 340px;
    }

    .fan-stage.is-fanned .fan-card:nth-child(4) {
        transform: translateX(calc(-50% + 123px)) translateY(-50%);
    }

    .fan-stage.is-fanned .fan-card:nth-child(5) {
        transform: translateX(calc(-50% + 246px)) translateY(-50%);
    }

    .fan-screen {
        height: 192px;
    }

    .fan-card-center .fan-screen {
        height: 230px;
    }
}

@media (max-width: 768px) {
    .fan-stage {
        height: auto;
        perspective: none;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        padding: 20px 24px 30px;
        align-items: stretch;
        scrollbar-width: none;
        max-width: 100%;
        margin: 0;
    }

    .fan-stage::-webkit-scrollbar {
        display: none;
    }

    .fan-card,
    .fan-card.fan-card-center,
    .fan-card:nth-child(1),
    .fan-card:nth-child(2),
    .fan-card:nth-child(4),
    .fan-card:nth-child(5) {
        position: relative;
        left: auto;
        top: auto;
        width: 75vw;
        max-width: 280px;
        flex: 0 0 auto;
        scroll-snap-align: center;
        transform: none !important;
        opacity: 1 !important;
        z-index: 1 !important;
    }

    .fan-card-inner,
    .fan-stage.is-stacked .fan-card-inner,
    .fan-stage.is-fanned .fan-card .fan-card-inner,
    .fan-stage.is-fanned .fan-card:hover .fan-card-inner {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }

    .fan-screen {
        height: 153px;
    }

    .fan-card-center .fan-screen {
        height: 153px;
    }

    .fan-stage.is-fanned .fan-card {
        transition: none !important;
    }
}

/* ── CTA Capsule (shared) ── */
.composition-cta {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.bento-capsule {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px 40px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
}

.bento-capsule:hover {
    background: #fff;
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.bento-capsule .material-icons-round {
    font-size: 1.4rem;
}

/* ═══════════════════════════════════════════════════
   CATALOG — PHONE FRAMES
   ═══════════════════════════════════════════════════ */
.phone-showcase {
    grid-template-columns: repeat(5, 1fr);
}

.phone-card {
    max-width: 220px;
    margin: 0 auto;
}

.phone-frame {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 12px 8px 16px;
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}

.phone-card:hover .phone-frame {
    border-color: rgba(110, 193, 228, 0.3);
    box-shadow: var(--shadow-glow);
}

.phone-notch {
    width: 80px;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin: 0 auto 8px;
}

.phone-screen {
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 9/19;
}

.phone-home-bar {
    width: 60px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 10px;
    margin: 10px auto 0;
}

/* ── Preview Gradients (mobile) ── */
.app-preview-1 {
    background: linear-gradient(180deg, #059669, #047857, #065f46);
}

.app-preview-2 {
    background: linear-gradient(180deg, #2563eb, #1d4ed8, #1e40af);
}

.app-preview-3 {
    background: linear-gradient(180deg, #d97706, #b45309, #92400e);
}

.app-preview-4 {
    background: linear-gradient(180deg, #dc2626, #b91c1c, #991b1b);
}

.app-preview-5 {
    background: linear-gradient(180deg, #7c3aed, #6d28d9, #5b21b6);
}

/* ═══════════════════════════════════════════════════
   RAG LAB
   ═══════════════════════════════════════════════════ */
.rag-section {
    background: var(--bg-section);
}

.rag-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    min-height: 500px;
}

.rag-upload-zone {
    background: var(--glass-bg);
    border: 2px dashed var(--neural-purple);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.rag-upload-zone::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, transparent, rgba(91, 45, 139, 0.15), transparent);
    opacity: 0;
    transition: var(--transition);
}

.rag-upload-zone:hover,
.rag-upload-zone.drag-over {
    border-color: var(--sky-blue);
    box-shadow: 0 0 40px rgba(91, 45, 139, 0.3), inset 0 0 40px rgba(91, 45, 139, 0.05);
}

.rag-upload-zone:hover::before {
    opacity: 1;
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon-wrapper {
    position: relative;
    margin-bottom: 20px;
    display: inline-block;
}

.upload-icon {
    font-size: 3.5rem;
    color: var(--neural-purple);
}

.upload-pulse {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    border: 2px solid var(--neural-purple);
    opacity: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.upload-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.upload-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.uploaded-files {
    width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.file-item .material-icons-round {
    color: var(--sky-blue);
    font-size: 1.2rem;
}

/* ── Chat ── */
.rag-chat {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28c840;
    box-shadow: 0 0 8px rgba(40, 200, 64, 0.5);
}

.chat-model {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 3px 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 300px;
    max-height: 400px;
}

.chat-message {
    display: flex;
    gap: 12px;
    animation: fadeUp 0.4s ease;
}

.chat-message.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, var(--neural-purple), var(--deep-purple));
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--cognitive-blue), var(--deep-blue));
}

.message-avatar .material-icons-round {
    font-size: 1.1rem;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius);
}

.bot-message .message-bubble {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.user-message .message-bubble {
    background: linear-gradient(135deg, var(--cognitive-blue), var(--neural-purple));
}

.message-bubble p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.message-time {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--glass-border);
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.chat-input-area input:focus {
    border-color: var(--neural-purple);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cognitive-blue), var(--neural-purple));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(91, 45, 139, 0.5);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingDot 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {

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

    30% {
        transform: translateY(-6px);
    }
}

/* ═══════════════════════════════════════════════════
   PROCESS TIMELINE
   ═══════════════════════════════════════════════════ */
.process-section {
    background: var(--bg-dark);
}

.timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 40px 0;
}

.timeline-track {
    position: absolute;
    top: 142px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: var(--glass-border);
    border-radius: 4px;
}

.timeline-progress {
    position: absolute;
    top: 142px;
    left: 40px;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--sky-blue), var(--neural-purple));
    border-radius: 4px;
    box-shadow: 0 0 15px var(--sky-blue);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1), height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 10px;
    cursor: pointer;
    will-change: transform;
}

.step-node {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-icon-wrap {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--glass-bg-strong), rgba(0, 0, 0, 0.4));
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: perspective(1000px) rotateX(10deg) rotateY(-10deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* ── Individual Step Animations ── */

/* 1. Discovery - Circular Scan */
.step-discovery:hover .material-icons-round {
    animation: scanIcon 2s infinite linear;
}

.step-discovery:hover .step-pulse-effect {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--sky-blue) 0%, transparent 70%);
    opacity: 0.15;
    animation: radialPulse 2s infinite;
}

/* 2. Strategy - Precision Stroke */
.step-strategy:hover .material-icons-round {
    animation: pivotIcon 1.5s infinite ease-in-out;
}

.step-strategy:hover .step-pulse-effect {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 10px;
    background: var(--sky-blue);
    border-radius: 100px 100px 0 0;
    filter: blur(8px);
    opacity: 0.8;
}

/* 3. Design - Color Pulse */
.step-design:hover .material-icons-round {
    animation: colorPulse 3s infinite alternate;
}

.step-design:hover .step-icon-wrap {
    border-color: var(--neural-purple);
    box-shadow: 0 0 25px rgba(91, 45, 139, 0.5);
    transform: perspective(1000px) rotateZ(5deg) scale(1.1);
}

/* 4. Development - Binary Writing */
.step-development:hover .material-icons-round {
    animation: binarySplit 1s infinite alternate;
}

.step-development:hover .step-icon-wrap::before {
    content: '1010';
    position: absolute;
    font-family: var(--font-code);
    font-size: 8px;
    color: var(--sky-blue);
    opacity: 0.3;
    animation: binaryBits 1.5s infinite steps(4);
}

/* 5. Launch - Ascending Propulsion / Fly-out */
.step-launch .step-icon-wrap {
    overflow: visible;
}

.step-launch .material-icons-round {
    display: inline-block;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
}

.step-launch:hover .material-icons-round {
    animation: blastOff 1.5s forwards ease-in;
}

@keyframes blastOff {
    0% {
        transform: translate(0, 0) scale(1.1);
    }

    10% {
        transform: translate(-3px, 1px) scale(1.1);
    }

    20% {
        transform: translate(2px, -3px) scale(1.2);
    }

    30% {
        transform: translate(-2px, -8px) scale(1.2);
        opacity: 1;
    }

    40% {
        transform: translate(20px, -20px) scale(1.3);
    }

    50% {
        transform: translate(45px, -45px) scale(1.4);
    }

    60% {
        transform: translate(80px, -80px) scale(1.5);
    }

    100% {
        transform: translate(500px, -500px) scale(2);
        opacity: 0;
    }
}

.step-launch:hover .step-icon-wrap {
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translate(5px, -10px) scale(1.05);
    box-shadow: 0 15px 40px rgba(110, 193, 228, 0.6);
}

.step-launch:hover .step-icon-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, var(--sky-blue), transparent);
    opacity: 0.4;
}

/* ── Keyframes ── */
@keyframes scanIcon {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(3px, 3px);
    }

    50% {
        transform: translate(0, 5px);
    }

    75% {
        transform: translate(-3px, 3px);
    }

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

@keyframes radialPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }

    50% {
        opacity: 0.15;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes pivotIcon {

    0%,
    100% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }
}

@keyframes colorPulse {
    0% {
        color: var(--sky-blue);
        filter: drop-shadow(0 0 10px var(--sky-blue));
    }

    100% {
        color: var(--neural-purple);
        filter: drop-shadow(0 0 15px var(--neural-purple));
    }
}

@keyframes binarySplit {
    0% {
        letter-spacing: normal;
    }

    100% {
        letter-spacing: 12px;
    }
}

@keyframes binaryBits {
    0% {
        content: '10';
        top: 10%;
        left: 10%;
    }

    25% {
        content: '01';
        top: 70%;
        left: 60%;
    }

    50% {
        content: '11';
        top: 20%;
        left: 80%;
    }

    75% {
        content: '00';
        top: 60%;
        left: 20%;
    }
}

@keyframes rocketShake {
    0% {
        transform: translate(1px, 1px);
    }

    100% {
        transform: translate(-1px, -1px);
    }
}

.step-connector {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--glass-border), transparent);
    margin: 0 auto;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.timeline-step:hover .step-connector {
    background: linear-gradient(to bottom, var(--sky-blue), transparent);
    opacity: 1;
    height: 45px;
}

.step-icon-wrap .material-icons-round {
    font-size: 2.2rem;
    color: var(--sky-blue);
    filter: drop-shadow(0 0 10px rgba(110, 193, 228, 0.6));
    transition: var(--transition);
}

.timeline-step.active .step-icon-wrap {
    border-color: var(--sky-blue);
    background: linear-gradient(135deg, var(--bg-dark), var(--deep-blue));
    box-shadow: 0 0 30px rgba(110, 193, 228, 0.4);
}

.timeline-step.active .step-icon-wrap .material-icons-round {
    color: #fff;
    filter: drop-shadow(0 0 15px #fff);
}

.step-node::after {
    content: '';
    width: 16px;
    height: 16px;
    background: var(--bg-dark);
    border: 3px solid var(--glass-border);
    border-radius: 50%;
    display: block;
    margin: 0 auto;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 5;
}

.timeline-step:hover .step-node::after {
    background: var(--sky-blue);
    border-color: var(--sky-blue);
    box-shadow: 0 0 20px var(--sky-blue);
    transform: scale(1.3);
}

.timeline-step.active .step-node::after {
    background: var(--sky-blue);
    border-color: var(--sky-blue);
    box-shadow: 0 0 15px var(--sky-blue);
}

.step-number {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-step.active .step-number {
    color: var(--sky-blue);
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 180px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════
   NUESTRA MISIÓN
   ═══════════════════════════════════════════════════ */
.mission-section {
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
    margin-top: 60px;
}

/* Columna Izquierda (Visual) - Animación Impresionante */
.mission-visual-wrapper {
    position: relative;
    overflow: hidden;
    height: 480px;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 50px rgba(91, 45, 139, 0.2);
}

/* Efecto de entrada: Reveal + Digital Sweep */
.mission-visual-wrapper.reveal {
    transform: perspective(1000px) rotateY(15deg) scale(0.9);
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mission-visual-wrapper.reveal.visible {
    transform: perspective(1000px) rotateY(0deg) scale(1);
    opacity: 1;
}

.mission-glow {
    position: absolute;
    inset: 10%;
    background: var(--neural-purple);
    filter: blur(100px);
    opacity: 0.3;
    z-index: 0;
    animation: glowBreath 6s infinite alternate ease-in-out;
}

@keyframes glowBreath {
    0% {
        transform: scale(0.8);
        opacity: 0.2;
    }

    100% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

.mission-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2) brightness(0.8);
    mix-blend-mode: plus-lighter;
    transition: filter 0.8s ease;
}

.mission-visual-wrapper:hover .mission-image {
    filter: grayscale(50%) contrast(1.1) brightness(1);
}

.mission-mask {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, var(--bg-dark) 20%, transparent);
    z-index: 3;
}

/* Scanline animation */
.mission-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--sky-blue), transparent);
    z-index: 4;
    opacity: 0;
    box-shadow: 0 0 15px var(--sky-blue);
}

.mission-visual-wrapper.reveal.visible .mission-scanline {
    animation: scanVertical 4s infinite linear;
    opacity: 0.8;
}

@keyframes scanVertical {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}

.mission-icon-floating {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    border: 2px solid var(--neural-purple);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 0 30px rgba(91, 45, 139, 0.6);
    z-index: 10;
}

.mission-custom-icon-large {
    width: 60px;
    height: 60px;
    object-fit: contain;
    animation: floatingIcon 3s infinite alternate ease-in-out;
    display: block;
}

@keyframes floatingIcon {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-8px);
        filter: drop-shadow(0 0 10px rgba(110, 193, 228, 0.6));
    }
}

/* Columna Derecha (Contenido Bullet Points) */
.mission-bullets {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.mission-bullet {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Staggered Reveal for Bullets */
.mission-bullet.reveal {
    transform: translateX(40px);
    opacity: 0;
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mission-bullet.reveal.visible {
    transform: translateX(0);
    opacity: 1;
}

.mission-bullet.reveal.visible:nth-child(1) {
    transition-delay: 0.2s;
}

.mission-bullet.reveal.visible:nth-child(2) {
    transition-delay: 0.4s;
}

.mission-bullet.reveal.visible:nth-child(3) {
    transition-delay: 0.6s;
}

.mission-bullet-icon {
    flex-shrink: 0;
    background: rgba(91, 45, 139, 0.1);
    border: 1px solid rgba(164, 124, 243, 0.3);
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 20px rgba(91, 45, 139, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mission-bullet:hover .mission-bullet-icon {
    background: rgba(91, 45, 139, 0.4);
    box-shadow: 0 0 35px rgba(164, 124, 243, 0.5), inset 0 0 20px rgba(164, 124, 243, 0.4);
    border-color: var(--sky-blue);
    transform: scale(1.15);
}

.mission-custom-icon {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(110, 193, 228, 0.5));
    transition: all 0.4s ease;
}

.mission-bullet:hover .mission-custom-icon {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8)) brightness(1.2);
}

.mission-bullet p {
    font-size: 1.15rem;
    line-height: 1.4;
    color: #a0a0a0;
    margin: 0;
    transition: color 0.3s ease;
}

.mission-bullet p strong {
    color: #FFFFFF;
    display: inline;
    font-size: 1.25rem;
    font-weight: 700;
    margin-right: 4px;
}

.mission-bullet:hover p {
    color: #dcdcdc;
}

.mission-canvas-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7;
}

.mission-section .container {
    position: relative;
    z-index: 10;
}

/* Responsive */
@media (max-width: 1024px) {
    .mission-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .mission-visual-wrapper {
        height: 350px;
        order: 2;
    }
}


/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.footer-section {
    background: var(--deep-purple);
    padding: 100px 0 max(40px, env(safe-area-inset-bottom, 40px));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
}

.footer-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-desc {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.contact-form {
    padding: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--neural-purple);
    box-shadow: 0 0 12px rgba(91, 45, 139, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.footer-info {
    padding-top: 20px;
}

.footer-brand {
    margin-bottom: 32px;
}

.footer-brand-tag {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.contact-item .material-icons-round {
    color: var(--sky-blue);
    font-size: 1.2rem;
}

.footer-services h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.footer-services ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-services a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-services a:hover {
    color: var(--sky-blue);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    background: var(--bg-section);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-body {
    padding: 30px;
}

.modal-preview {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .section {
        padding: 90px 0;
    }

    .desktop-showcase {
        grid-template-columns: repeat(2, 1fr);
    }

    .desktop-showcase .device-card:last-child {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }

    .phone-showcase {
        grid-template-columns: repeat(3, 1fr);
    }

    .timeline {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .timeline-track {
        top: 0;
        bottom: 0;
        left: 30px;
        right: auto;
        width: 3px;
        height: 100%;
        position: absolute;
    }

    .timeline-progress {
        top: 0;
        left: 30px;
        width: 3px;
        height: 0%;
        transition: height 0.8s ease;
    }

    .timeline-step {
        position: relative;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 20px 0 20px 80px;
        margin-bottom: 30px;
    }

    .step-node {
        margin-bottom: 0;
        position: absolute;
        left: 0;
    }

    .step-icon-wrap {
        width: 60px;
        height: 60px;
        border-radius: 12px;
        transform: none !important;
    }

    .step-icon-wrap .material-icons-round {
        font-size: 1.5rem;
    }

    .step-node::after {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 240px;
        height: 100vh;
        background: rgba(10, 10, 26, 0.97);
        backdrop-filter: blur(30px);
        flex-direction: column;
        padding: 75px 20px 20px;
        gap: 2px;
        transition: right 0.35s ease;
        z-index: 999;
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-menu > li > .nav-link {
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    /* Dropdown behaves like a normal list on mobile */
    .nav-submenu {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 4px 0 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .nav-submenu li {
        width: 100%;
    }

    .nav-submenu .nav-link {
        padding-left: 0;
        font-size: 0.88rem;
        opacity: 0.95;
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    .nav-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .nav-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .desktop-showcase {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }

    .desktop-showcase .device-card:last-child {
        max-width: none;
    }

    .phone-showcase {
        grid-template-columns: repeat(2, 1fr);
    }

    .phone-card {
        max-width: 180px;
    }

    .rag-container {
        grid-template-columns: 1fr;
    }

    .chat-messages {
        min-height: 250px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .mission-visual-wrapper {
        height: 220px;
    }

    body.nav-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }
}

@media (max-width: 480px) {
    .phone-showcase {
        grid-template-columns: 1fr;
        max-width: 200px;
        margin: 0 auto;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .rag-upload-zone {
        padding: 24px;
    }

    .contact-form {
        padding: 20px;
    }
}

/* ── Form Demo Badge ── */
.form-demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 5px 14px;
    margin-bottom: 16px;
    font-family: var(--font-code);
    letter-spacing: 0.02em;
}

.form-demo-badge .material-icons-round {
    font-size: 0.9rem;
    color: var(--sky-blue);
}

/* ═══════════════════════════════════════════════════
   REDUCED MOTION — Las animaciones se mantienen;
   solo se suavizan las micro-animaciones que pueden
   afectar a usuarios con sensibilidad vestibular.
   ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

    /* Fan: mantiene la secuencia pero sin rebote (spring → ease) */
    .fan-card,
    .fan-card-inner {
        transition-duration: 0.5s !important;
        transition-timing-function: ease !important;
        transition-delay: 0ms !important;
    }

    /* Reveal: fade sin slide */
    .reveal {
        transform: none !important;
        transition: opacity 0.5s ease !important;
    }

    .reveal.visible {
        transform: none !important;
    }

    /* Scroll indicator: no rebota */
    @keyframes bounce {

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

    /* Cursor: parpadeo lento */
    @keyframes blink {

        0%,
        49%,
        100% {
            opacity: 1;
        }

        50%,
        99% {
            opacity: 0;
        }
    }

    /* Rocket shake: quitar vibration */
    @keyframes rocketShake {

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

    /* Scan: quitar tremble */
    @keyframes scanIcon {

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

    /* ISO tilt en step icons: flat */
    .step-icon-wrap {
        transform: none !important;
    }

    /* Hero entry: sin delay de animación */
    .hero-buttons,
    .hero-stats {
        animation-duration: 0.3s !important;
        animation-delay: 0s !important;
    }
}

/* ═══════════════════════════════════════════════════
   11. STATIC FOOTER + ENTRANCE TRANSITION
   ═══════════════════════════════════════════════════ */

#main-wrapper {
    position: relative;
    background: var(--bg-dark);
}

.footer-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 0%, rgba(0, 212, 255, 0.12), transparent 32%),
        radial-gradient(circle at 82% 18%, rgba(138, 92, 246, 0.14), transparent 28%),
        linear-gradient(180deg, #11112a 0%, #0a0a1a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.footer-section::before,
.footer-section::after {
    content: '';
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-section::before {
    inset: 0 0 auto;
    height: 110px;
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.14), transparent 78%);
    transform: translateY(-24px);
}

.footer-section::after {
    width: 340px;
    height: 340px;
    top: -140px;
    right: -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138, 92, 246, 0.16) 0%, rgba(138, 92, 246, 0) 70%);
    transform: scale(0.88);
}

.footer-section .container {
    position: relative;
    z-index: 1;
}

.footer-grid,
.footer-bottom {
    opacity: 0;
    transform: translateY(56px);
    transition:
        opacity 0.75s ease,
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-form-wrapper,
.footer-info {
    opacity: 0;
    transform: translateY(34px) scale(0.98);
    transition:
        opacity 0.75s ease,
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-bottom {
    transition-delay: 0.12s;
}

.footer-info {
    transition-delay: 0.08s;
}

.footer-section.footer-in-view::before,
.footer-section.footer-in-view::after {
    opacity: 1;
    transform: none;
}

.footer-section.footer-in-view .footer-grid,
.footer-section.footer-in-view .footer-bottom,
.footer-section.footer-in-view .footer-form-wrapper,
.footer-section.footer-in-view .footer-info {
    opacity: 1;
    transform: none;
}

.footer-section.footer-in-view .footer-form-wrapper {
    animation: footerPulseGlow 1.2s ease 0.18s both;
}

@keyframes footerPulseGlow {
    0% {
        box-shadow: 0 0 0 rgba(0, 212, 255, 0);
    }
    45% {
        box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.16), 0 0 26px rgba(0, 212, 255, 0.12);
    }
    100% {
        box-shadow: 0 0 0 rgba(0, 212, 255, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-section::before,
    .footer-section::after,
    .footer-grid,
    .footer-bottom,
    .footer-form-wrapper,
    .footer-info {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}

/* ═══════════════════════════════════════════════════
   12. FLOATING ACTION BUTTON (FAB)
   ═══════════════════════════════════════════════════ */
.fab-wrapper {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.fab-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    margin-bottom: 15px;
}

.fab-wrapper.active .fab-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.fab-toggle,
.fab-item {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, background 0.3s ease;
    text-decoration: none;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(164, 124, 243, 0.3);
    color: #fff;
    position: relative;
}

.fab-toggle {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--neural-purple) 0%, #3a1563 100%);
    box-shadow: 0 0 20px rgba(91, 45, 139, 0.6), inset 0 0 10px rgba(164, 124, 243, 0.4);
    z-index: 2;
}

.fab-toggle .material-icons-round {
    font-size: 2rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-wrapper.active .fab-toggle .material-icons-round {
    transform: rotate(90deg) scale(0);
    opacity: 0;
}

.fab-toggle::after {
    content: 'close';
    font-family: 'Material Icons Round';
    position: absolute;
    font-size: 2rem;
    color: white;
    transform: rotate(-90deg) scale(0);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-wrapper.active .fab-toggle::after {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

.fab-item:hover {
    transform: scale(1.1);
    background: var(--neural-purple);
    border-color: var(--sky-blue);
    box-shadow: 0 0 20px rgba(110, 193, 228, 0.5);
}

.fab-item .material-icons-round {
    font-size: 1.5rem;
}

/* Tooltips */
.fab-item::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 70px;
    background: rgba(10, 10, 26, 0.9);
    color: #a0a0a0;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.fab-item:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    color: #fff;
}/* ---------------------------------------------------
   CHATBOT CON IA SECTION
   --------------------------------------------------- */
.ai-chatbot-section {
    background: var(--bg-section);
    padding-top: 60px;
}

.chatbot-tabs-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

/* ── Bot Mascots ── */

/* Wrapper info box — bot_def absolute left, text box centered */
.chatbot-info-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 1.5rem auto 0;
    max-width: 860px;
    padding-left: 40px; /* reserve space so text stays centered */
}

/* Robot reading the definition — absolute, anchored to left */
.bot-def-mascot {
    position: absolute;
    left: -80px;
    bottom: -10px;
    width: 160px;
    height: auto;
    z-index: 2;
    filter: drop-shadow(0 8px 20px rgba(63, 143, 210, 0.35));
    pointer-events: none;
}

/* ── Per-tab mascots — all absolute inside .tab-content-container ── */
.tab-mascot {
    position: absolute;
    width: 160px;
    height: auto;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.tab-mascot.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Atención: bottom-center, slightly below card edge */
.bot-at-pos {
    bottom: -30px;
    left: 45%;
    transform: translateX(-50%);
    width: 130px;
    filter: drop-shadow(0 8px 24px rgba(110, 193, 228, 0.4));
}
.bot-at-pos.hidden   { transform: translateX(-50%) translateY(12px); }

/* RRHH: flush with bottom edge of card */
.bot-rrhh-pos {
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(0 8px 24px rgba(63, 143, 210, 0.4));
}
.bot-rrhh-pos.hidden { transform: translateX(-50%) translateY(12px); }

/* Capacitación: top-right, floating above the card */
.bot-cap-pos {
    top: -90px;
    right: -20px;
    width: 200px;
    filter: drop-shadow(0 8px 24px rgba(31, 60, 136, 0.5));
}
.bot-cap-pos.hidden  { transform: translateY(-12px); }

/* Procesos: bottom-left, outside the card */
.bot-prod-pos {
    bottom: -104px;
    left: -30px;
    width: 130px;
    filter: drop-shadow(0 8px 24px rgba(91, 45, 139, 0.5));
}
.bot-prod-pos.hidden { transform: translateY(12px); }

/* Inventario: bottom-center */
.bot-inv-pos {
    bottom: 0;
    left: 45%;
    transform: translateX(-50%);
    filter: drop-shadow(0 8px 24px rgba(59, 28, 90, 0.5));
}
.bot-inv-pos.hidden  { transform: translateX(-50%) translateY(12px); }

/* Give the tab card extra bottom padding so the bot doesn't clip content */
.tab-content-container {
    position: relative;
    overflow: visible;
}

/* Casos de Usos label */
.tabs-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}
.tabs-legend .material-icons-round {
    font-size: 1.1rem;
    color: var(--cognitive-blue);
}
.tabs-legend span:last-child {
    font-family: var(--font-code);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Tabs Navigation */
.tabs-navigation {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.tabs-navigation::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Tab buttons: card shape, icon on top */
.tab-btn {
    border-radius: 14px !important;
    padding: 0.85rem 1.25rem !important;
    min-width: 94px;
    white-space: normal !important;
    text-align: center;
}

.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}
.btn-glass:hover {
    background: var(--glass-bg-strong);
    border-color: rgba(110, 193, 228, 0.4);
    color: var(--sky-blue);
}
.btn-glass.active {
    background: linear-gradient(135deg, rgba(91, 45, 139, 0.25), rgba(63, 143, 210, 0.25));
    border-color: var(--sky-blue);
    color: var(--sky-blue);
    box-shadow: 0 0 14px rgba(110, 193, 228, 0.18);
}

/* Tab icon SVG */
.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}
.tab-icon svg {
    width: 28px;
    height: 28px;
    color: inherit;
    filter: drop-shadow(0 0 4px currentColor);
    transition: filter 0.3s ease;
}
.btn-glass.active .tab-icon svg,
.btn-glass:hover .tab-icon svg {
    filter: drop-shadow(0 0 8px rgba(110, 193, 228, 0.8));
}

/* Tab icon — wider variant for process flow icon */
.tab-icon--lg {
    width: 44px;
    height: 28px;
}
.tab-icon--lg svg {
    width: 44px;
    height: 28px;
}
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.btn-glass.active .tab-label,
.btn-glass:hover .tab-label {
    opacity: 1;
}

/* Desktop: slightly larger tab label */
@media (min-width: 993px) {
    .tab-label {
        font-size: 0.9rem;
    }
}

/* Tab Content Container */
.tab-content-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    align-items: center;
}

/* Text Column */
.tab-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.tab-badge {
    background: rgba(110, 193, 228, 0.1);
    color: var(--sky-blue);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-family: var(--font-code);
}

.tab-text h3 {
    font-size: 2rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.2;
    margin: 0;
}

.tab-text p {
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 1.1rem;
    line-height: 1.6;
}

.chatbot-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chatbot-benefits li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-main);
}
.chatbot-benefits li .material-icons-round {
    color: var(--cognitive-blue);
}

/* Visual Column */
.visual-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    background: rgba(255,255,255,0.02);
}

.glow-backdrop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: var(--sky-blue);
    opacity: 0.2;
    filter: blur(40px);
    z-index: 0;
    transition: background 0.5s ease;
}

.visual-frame img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transition: transform 0.5s ease;
    display: block;
}

.visual-frame:hover img {
    transform: scale(1.02);
}

/* Animation - original slide-in (kept for other uses) */
.fade-in-slide {
    animation: fadeInSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInSlide {
    0%  { opacity: 0; transform: translateX(20px); }
    100%{ opacity: 1; transform: translateX(0); }
}



/* Responsive */
@media (max-width: 992px) {
    .tab-content-container {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
    .tabs-navigation {
        justify-content: flex-start;
    }
    .tab-text h3 {
        font-size: 1.75rem;
    }
}
.chatbot-demo-action {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}
.demo-cta-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--neural-purple), var(--cognitive-blue));
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.demo-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(91, 45, 139, 0.4);
}
.chatbot-info-box {
    background: rgba(63, 143, 210, 0.08);
    border: 1px solid rgba(63, 143, 210, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 2rem auto;
    max-width: 800px;
    text-align: left;
}
.chatbot-info-box .info-icon {
    color: var(--cognitive-blue);
    font-size: 1.8rem;
    flex-shrink: 0;
}
.chatbot-info-box p {
    margin: 0;
    color: var(--text-secondary);
    font-family: var(--font-main);
    line-height: 1.6;
    font-size: 1.05rem;
}

/* ============================================================
   MOBILE UX — global improvements  ≤ 768 px
   ============================================================ */

/* ── Hero ── */
@media (max-width: 768px) {
    .brutal-headline {
        flex-wrap: wrap;
        justify-content: center;
        font-size: clamp(1.9rem, 9vw, 2.4rem);
        gap: 0.12em;
    }

    .hero-content {
        padding: 80px 20px 60px;
    }

    /* ── Fan carousel prev/next buttons ── */
    .fan-mobile-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1.25rem;
        padding: 0.25rem 0 1rem;
    }

    .fan-arrow-btn {
        background: rgba(255, 255, 255, 0.07);
        border: 1px solid rgba(255, 255, 255, 0.18);
        color: #fff;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        font-size: 1.6rem;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s, border-color 0.2s;
        flex-shrink: 0;
    }

    .fan-arrow-btn:hover,
    .fan-arrow-btn:active {
        background: rgba(110, 193, 228, 0.18);
        border-color: var(--sky-blue);
    }

    .fan-mobile-dots {
        display: flex;
        gap: 6px;
        align-items: center;
    }

    .fan-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.25);
        transition: background 0.3s, transform 0.3s;
    }

    .fan-dot.active {
        background: var(--sky-blue);
        transform: scale(1.3);
    }

    /* ── Chatbot section ── */

    /* Hide all floating bot mascots on mobile — no room */
    .tab-mascot,
    .bot-def-mascot {
        display: none;
    }

    /* Remove the padding-left reserved for bot_def */
    .chatbot-info-wrapper {
        padding-left: 0;
    }

    /* ── Ver Catálogo button ── */
    .bento-capsule {
        padding: 14px 28px;
        width: auto;
    }
}

/* On desktop: hide the mobile-only UI */
@media (min-width: 769px) {
    .fan-mobile-nav {
        display: none;
    }

    .tabs-nav-mobile {
        display: none;
    }

    .chatbot-mobile-avatar-wrap {
        display: none;
    }
}

/* Tablet (769px–992px): show icon tab cards, hide arrow nav, hide visual-frame */
@media (max-width: 992px) {
    /* Show icon tab cards — keep .tabs-navigation visible */
    .tabs-navigation {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
        padding-bottom: 0.25rem;
    }

    /* Hide arrow-style mobile nav */
    .tabs-nav-mobile {
        display: none;
    }

    /* Slightly compact tab cards for tablet */
    .tab-btn {
        border-radius: 12px !important;
        padding: 0.7rem 1rem !important;
        min-width: 82px;
    }

    .tab-icon svg {
        width: 24px;
        height: 24px;
    }

    .tab-label {
        font-size: 0.72rem;
    }

    /* Replace screenshot with bot avatar */
    .visual-frame {
        display: none;
    }

    .chatbot-mobile-avatar-wrap {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 1rem 0 0.5rem;
    }

    .chatbot-mobile-avatar {
        width: 200px;
        height: auto;
        filter: drop-shadow(0 8px 24px rgba(63, 143, 210, 0.4));
    }
}

/* Mobile (≤600px): wrap icon tabs into 3-column grid */
@media (max-width: 600px) {
    .tabs-navigation {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.45rem;
    }

    .tab-btn {
        border-radius: 10px !important;
        padding: 0.6rem 0.65rem !important;
        min-width: 72px;
        max-width: calc(33.33% - 0.45rem);
    }

    .tab-icon {
        width: 22px;
        height: 22px;
    }

    .tab-icon svg {
        width: 22px;
        height: 22px;
    }

    .tab-label {
        font-size: 0.66rem;
    }
}
