/* ========================================
   Naxion Landing Page - Styles (Redesign)
   ======================================== */

/* ========== CSS VARIABLES - NEW PALETTE ========== */
:root {
    /* Backgrounds - Deep Neutral Grays */
    --color-bg-primary: #121212;
    --color-bg-secondary: #1A1A1A;
    --color-bg-tertiary: #0A0A0A;
    --color-bg-card: #202020;
    --color-bg-card-hover: #2A2A2A;

    /* Borders */
    --color-border: #333333;
    --color-border-hover: rgba(25, 230, 179, 0.4);

    /* Grid overlay */
    --color-grid: rgba(255, 255, 255, 0.03);

    /* Text */
    --color-text-primary: #EAEAEA;
    --color-text-secondary: #AAAAAA;
    --color-text-muted: #777777;

    /* Accents */
    --color-accent: #19E6B3;
    --color-accent-secondary: #0FB792;
    --color-accent-glow: #2FFFD0;
    --color-accent-glow-soft: rgba(25, 230, 179, 0.1);
    --color-accent-glow-medium: rgba(25, 230, 179, 0.2);

    /* Status (minimal use) */
    --color-warning: #F2C94C;
    --color-danger: #EB5757;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing - Fluid (adapts to viewport) */
    --space-xs: clamp(0.2rem, 0.5vw, 0.25rem);
    --space-sm: clamp(0.4rem, 0.75vw, 0.5rem);
    --space-md: clamp(0.75rem, 1vw, 0.875rem);
    --space-lg: clamp(1rem, 1.5vw, 1.25rem);
    --space-xl: clamp(1.5rem, 2vw, 1.75rem);
    --space-2xl: clamp(2rem, 3vw, 2.5rem);
    --space-3xl: clamp(2.5rem, 4vw, 3rem);
    --space-4xl: clamp(3rem, 5vw, 4rem);

    /* Border radius - Fluid */
    --radius-sm: clamp(6px, 1vw, 8px);
    --radius-md: clamp(8px, 1.25vw, 12px);
    --radius-lg: clamp(12px, 1.75vw, 18px);
    --radius-xl: clamp(16px, 2vw, 22px);
    --radius-full: 9999px;

    /* Shadows - Softer, green-tinted */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(25, 230, 179, 0.12);
    --shadow-glow-strong: 0 0 30px rgba(25, 230, 179, 0.2);
    --shadow-glow-cta: 0 4px 20px rgba(25, 230, 179, 0.25);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-mode: 350ms ease-out;

    /* Layout - Fluid */
    --header-height: clamp(56px, 8vh, 64px);
    --container-max: min(1140px, 90vw);
    --container-narrow: min(780px, 85vw);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
    /* Solid base */
    overflow-x: hidden;
    min-height: 100vh;
}

/* Subtle grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--color-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-grid) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -2;
    opacity: 0.5;
    /* Muted grid */
}

/* Animated Mesh Gradient Background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(at 0% 0%, rgba(25, 230, 179, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(25, 230, 179, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(25, 230, 179, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(25, 230, 179, 0.05) 0px, transparent 50%);
    background-size: 150% 150%;
    animation: meshFlow 15s ease infinite alternate;
    pointer-events: none;
    z-index: -1;
    opacity: 1;
    transition: opacity 1.5s ease;
    /* Fade in effect */
}

/* Hide mesh ONLY when specifically dimmed (scrolled to chaos section) */
body.chaos-mode.dimmed-background::after {
    opacity: 0;
    transition: opacity 1s ease;
}

/* Ensure default chaos mode is VISIBLE (light/green) for Hero/Footer */
body.chaos-mode::after {
    opacity: 1;
    animation: meshFlow 15s ease infinite alternate;
}

@keyframes meshFlow {
    0% {
        background-position: 0% 0%;
        background-size: 150% 150%;
    }

    33% {
        background-position: 50% 20%;
        background-size: 140% 160%;
    }

    66% {
        background-position: 100% 80%;
        background-size: 160% 140%;
    }

    100% {
        background-position: 50% 100%;
        background-size: 150% 150%;
    }
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

/* ========== TYPOGRAPHY ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-text-primary);
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 0.8;
    /* ← Aún más apretado */
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-glow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-md);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    max-width: min(560px, 80vw);
    margin: 0 auto var(--space-xl);
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
}

/* ========== LAYOUT ========== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

section {
    padding: var(--space-3xl) 0;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-secondary) 100%);
    color: var(--color-bg-primary);
    box-shadow: var(--shadow-glow-cta);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(25, 230, 179, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-primary);
    border: 1.5px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-glow-soft);
}

.btn-outline {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-outline:hover {
    background: var(--color-accent-glow-soft);
}

.btn-small {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8rem;
}

.btn-large {
    padding: var(--space-md) var(--space-2xl);
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    transition: all var(--transition-base);
    background: transparent;
}

.header.scrolled {
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    /* ← Necesario para el centrado absoluto del nav */
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
}

.nav {
    display: none;
}

.nav-list {
    display: flex;
    gap: var(--space-xl);
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-accent);
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
}

.mobile-menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all var(--transition-base);
}

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

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(20px);
    padding: var(--space-xl);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
}

.mobile-nav-link {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.mobile-nav-link:hover {
    color: var(--color-accent);
}

@media (min-width: 768px) {
    .nav {
        display: block;
        position: absolute;
        /* ← Centrado absoluto ajustado */
        left: 47%;
        transform: translateX(-50%);
    }

    .mobile-menu-toggle {
        display: none;
    }

    .header .btn-primary {
        display: inline-flex;
    }
}

.header .btn-primary {
    display: none;
}

@media (min-width: 768px) {
    .header .btn-primary {
        display: inline-flex;
    }
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--header-height) + clamp(1.5rem, 3vh, 2.5rem));
    /* Más espacio con header */
    padding-bottom: var(--space-md);
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: grid;
    gap: var(--space-lg);
    /* Gap reducido entre eyebrow y contenido */
}

.hero-content {
    text-align: center;
    width: 100%;
}

.hero-eyebrow {
    color: var(--color-accent);
    font-size: clamp(1.2rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-3xl);
    /* Más gap con el bloque de abajo */
    text-shadow: 0 0 20px var(--color-accent-glow-soft);
    text-align: center;
    width: 100%;
}

.hero-title {
    margin-bottom: var(--space-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.hero-title-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.hero-title .logo-inline {
    height: 42px;
    /* TAMAÑO LOGO HERO MÓVIL */
    width: auto;
    display: inline-block;
    vertical-align: middle;
    margin-left: -12px;
    /* ← Ajusta para recortar espacio izquierdo */
    margin-right: -8px;
    /* ← Ajusta para recortar espacio derecho */
}

.hero-title-text {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
}

.hero-title-text.accent {
    color: var(--color-accent);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 520px;
    margin: 0 auto var(--space-xl);
    line-height: 1.65;
}

.hero-bullets {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    text-align: left;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.hero-bullets li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.bullet-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
}

.hero-ctas {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-md);
}

.hero-microtext {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Video Placeholder - BIGGER */
.hero-video {
    display: flex;
    justify-content: center;
    order: 1;
    /* En móvil/zoom: vídeo va después del contenido */
}

.video-placeholder {
    position: relative;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--color-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 0 40px rgba(25, 230, 179, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-base);
}

.video-placeholder:hover {
    border-color: var(--color-accent);
    box-shadow:
        0 0 50px rgba(25, 230, 179, 0.12),
        0 12px 40px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
    .hero-ctas {
        flex-direction: row;
        justify-content: center;
    }

    .hero-video {
        order: 0;
    }
}

@media (min-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr 1.2fr;
        align-items: center;
        gap: 0 var(--space-3xl);
        /* Eliminado gap vertical */
    }

    .hero-eyebrow {
        grid-column: 1 / -1;
        /* Ocupa todo el ancho */
        margin-top: calc(-1 * clamp(1rem, 2.5vw, 2rem));
        /* Reducido para mantener espacio con header */
        margin-bottom: 30px;
    }

    .hero-content {
        text-align: left;
    }

    .hero-title {
        align-items: flex-start;
    }

    .hero-title-line {
        justify-content: flex-start;
    }

    .hero-title .logo-inline {
        height: 62px;
        /* TAMAÑO LOGO HERO DESKTOP */
        margin-left: 0px;
        /* ← Ajusta para recortar espacio izquierdo (desktop) */
        margin-right: 10px;
        /* ← Ajusta para recortar espacio derecho (desktop) */
    }

    .hero-subtitle {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-bullets {
        margin-left: 0;
    }

    .hero-ctas {
        justify-content: flex-start;
    }

    .video-placeholder {
        max-width: 580px;
        min-height: 340px;
    }
}

/* Pantalla completa (altura grande): posicionamiento original más agresivo */
@media (min-width: 1024px) and (min-height: 750px) {
    .hero-eyebrow {
        margin-top: calc(-1 * clamp(3rem, 5vw, 4rem));
        /* Original agresivo en fullscreen */
    }
}

/* ========== PATH SECTION ========== */
.path-section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-3xl);
}

.path-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.path-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.path-guide {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

/* Mode Toggle */
.mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-bg-card);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
}

.mode-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: color var(--transition-base);
    cursor: pointer;
}

.mode-label.active {
    color: var(--color-accent);
}

#modeCaosLabel.active {
    color: var(--color-danger);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-primary);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--color-text-muted);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.toggle-switch input:checked+.toggle-slider {
    border-color: var(--color-accent);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
    background: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent-glow-medium);
}

/* ========== MODE CONTROL - PATH WRAPPER ========== */
.mode-content {
    position: relative;
}

.path-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    padding-left: 36px;
    transition: opacity var(--transition-mode), transform var(--transition-mode);
}

.path-wrapper.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
    width: 100%;
}

/* Path Line - Mobile (vertical) */
.path-line {
    position: absolute;
    left: 13px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.path-line-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg,
            var(--color-accent) 0%,
            var(--color-accent-glow) 40%,
            var(--color-accent) 100%);
    background-size: 100% 200%;
    animation: pathPulse 4s linear infinite;
    box-shadow: 0 0 12px var(--color-accent-glow-medium);
    transition: height 0.3s ease-out;
}

@keyframes pathPulse {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 0% 200%;
    }
}

/* Path Stop */
.path-stop {
    position: relative;
    opacity: 0;
    transform: translateX(-50px);
    /* Reveal from left */
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy reveal */
}

.path-stop.visible {
    opacity: 1;
    transform: translateX(0);
}

.stop-marker {
    position: absolute;
    left: -36px;
    top: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.stop-number {
    width: 20px;
    height: 20px;
    background: transparent;
    /* Vacío por defecto */
    border: 2px solid var(--color-accent);
    /* Borde verde */
    border-radius: 50%;
    transition: all var(--transition-slow);
}

.path-stop.visible .stop-number {
    background: var(--color-accent);
    /* Se rellena de verde cuando visible */
    box-shadow: 0 0 16px var(--color-accent-glow-soft);
}

/* Stop Card - SMALLER */
.stop-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    /* ← Más compacto */
    transition: all var(--transition-base);
    max-width: 100%;
}

.path-stop.visible .stop-card {
    border-color: rgba(25, 230, 179, 0.2);
    box-shadow: 0 0 24px var(--color-accent-glow-soft);
}

.stop-card:hover {
    background: rgba(42, 42, 42, 0.5);
    /* Semi-transparent lighter background on hover */
    transform: translateX(4px);
}

.stop-icon {
    display: none;
    /* ← Icono eliminado */
}

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

.stop-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    /* ← Menor margen inferior */
}

.stop-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.stop-block {
    color: var(--color-text-secondary);
}

.stop-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    display: block;
    margin-bottom: 2px;
}

.stop-block p {
    font-size: 0.85rem;
    line-height: 1.4;
}

.btn-example {
    width: 100%;
    margin-top: var(--space-sm);
}

/* Desktop Path Layout - ZIGZAG */
@media (min-width: 1024px) {
    .path-wrapper {
        padding-left: 0;
        gap: var(--space-lg);
    }

    .path-line {
        left: 50%;
        transform: translateX(-50%);
        width: 3px;
    }

    .path-stop {
        width: calc(50% - 50px);
        max-width: 420px;
    }

    /* Zigzag: odd right, even left */
    .path-stop:nth-child(odd) {
        margin-left: auto;
        margin-right: calc(50% + 30px);
    }

    .path-stop:nth-child(even) {
        margin-left: calc(50% + 30px);
        margin-right: auto;
    }

    .path-stop:nth-child(odd) .stop-marker {
        left: auto;
        right: -50px;
    }

    .path-stop:nth-child(even) .stop-marker {
        left: -50px;
    }

    .path-stop:nth-child(odd) .stop-card:hover {
        transform: translateX(-4px);
    }

    .stop-card {
        padding: var(--space-lg) var(--space-xl);
        position: relative;
        overflow: visible;
        /* Allow glow to spill if needed, but border is internal */
        background: rgba(255, 255, 255, 0.01);
        /* Maximum transparency */
        /* backdrop-filter: blur(4px); Removed to allow grid to show */
        /* -webkit-backdrop-filter: blur(4px); */
        border: 1px solid rgba(255, 255, 255, 0.1);
        /* Glass border */
    }

    /* Traveling Light Border for Control Cards */
    .stop-card::before {
        content: '';
        position: absolute;
        inset: -1px;
        /* Just outside border */
        border-radius: inherit;
        padding: 1px;
        /* Width of the flowing border */
        background: conic-gradient(from var(--border-angle), transparent 20%, var(--color-accent) 80%, transparent 100%);
        -webkit-mask:
            linear-gradient(#fff 0 0) content-box,
            linear-gradient(#fff 0 0);
        mask:
            linear-gradient(#fff 0 0) content-box,
            linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        opacity: 1;
        /* Maximized opacity for intense look */
        filter: drop-shadow(0 0 8px var(--color-accent));
        /* Add external glow to the line itself */
        animation: borderRotate 6s linear infinite;
        /* Faster rotation */
        pointer-events: none;
    }

    /* Define property for rotation if browser supports, else fallback */
    @property --border-angle {
        syntax: '<angle>';
        initial-value: 0deg;
        inherits: false;
    }

    @keyframes borderRotate {
        from {
            --border-angle: 0deg;
        }

        to {
            --border-angle: 360deg;
        }
    }

    .btn-example {
        width: auto;
    }
}

/* ========== MODE CAOS - DOLOR CONTENT ========== */
.chaos-content {
    transition: opacity var(--transition-mode), transform var(--transition-mode);
}

.chaos-content.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
    width: 100%;
    top: 0;
}

.chaos-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.chaos-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
}

.chaos-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.chaos-grid {
    display: grid;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

/* Vibration Keyframes */
@keyframes vibrate {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-0.7px, 0.7px);
    }

    40% {
        transform: translate(-0.7px, -0.7px);
    }

    60% {
        transform: translate(0.7px, 0.7px);
    }

    80% {
        transform: translate(0.7px, -0.7px);
    }

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

.pain-card {
    background: rgba(255, 255, 255, 0.01);
    /* Even more transparent */
    /* backdrop-filter: blur(4px); Removed to allow grid to show */
    /* -webkit-backdrop-filter: blur(4px); */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Glass border */
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    /* Increased padding */
    display: flex;
    gap: var(--space-md);
    align-items: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: visible;
}

/* Chaos Rotations */
.pain-card:nth-child(1) {
    transform: rotate(-1.5deg);
}

.pain-card:nth-child(2) {
    transform: rotate(1.2deg);
}

.pain-card:nth-child(3) {
    transform: rotate(-2deg);
}

.pain-card:nth-child(4) {
    transform: rotate(1.5deg);
}

.pain-card:nth-child(5) {
    transform: rotate(-1deg);
}

.pain-card:nth-child(6) {
    transform: rotate(2deg);
}

.pain-card:hover {
    animation: vibrate 0.4s linear infinite;
    background: rgba(42, 42, 42, 0.7);
    /* Semi-transparent lighter background on hover */
    transform: rotate(0deg) scale(1.02);
    /* Reset rotation and slightly scale up on hover for readability */
    z-index: 10;
}

/* Red Traveling Border for Chaos Cards */
.pain-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(from var(--border-angle), transparent 20%, var(--color-danger) 80%, transparent 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 1;
    /* Constant visibility */
    animation: borderRotate 4s linear infinite;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Removed .pain-card:hover::before as it's now always visible */

.pain-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(235, 87, 87, 0.15);
    /* Red tint */
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-danger);
    /* Red icon */
}

.pain-icon svg {
    width: 24px;
    /* Slightly larger visual size if needed, but keeping container ref */
    height: 24px;
    stroke-width: 2px;
    filter: drop-shadow(0 0 3px var(--color-danger));
    /* Red glow */
}

.pain-text {
    flex: 1;
}

.pain-text p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.45;
}

.pain-text p:first-child {
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.chaos-cta {
    text-align: center;
}

.chaos-cta p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
    .chaos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== FEELING SECTION ========== */
.feeling-section {
    padding-top: var(--space-4xl);
    /* Aumentado de 2xl */
    padding-bottom: var(--space-4xl);
    /* Aumentado de 2xl */
}

.feeling-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.feeling-cards {
    display: grid;
    gap: var(--space-md);
    max-width: 900px;
    margin: 0 auto;
}

.feeling-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-base);
}

.feeling-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.feeling-icon {
    width: 56px;
    height: 56px;
    background: var(--color-accent-glow-soft);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    margin: 0 auto var(--space-md);
}

.feeling-icon svg {
    width: 32px;
    height: 32px;
}

.feeling-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-primary);
    font-style: italic;
}

@media (min-width: 768px) {
    .feeling-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== PROCESS SECTION ========== */
.process-section {
    padding-top: var(--space-4xl);
    /* Aumentado de xl */
    padding-bottom: var(--space-4xl);
    /* Aumentado de 2xl */
}

.process-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    text-align: center;
}

.process-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
    margin-top: var(--space-2xl);
    /* Aumentado espacio con el título */
}

.process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    max-width: 260px;
}

.step-title {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--color-text-primary);
    line-height: 1.1;
}

.step-number-circle {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-bg-primary);
    box-shadow: var(--shadow-glow);
}

.step-text {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.process-connector {
    display: none;
    /* Ocultar líneas entre círculos */
}

.process-ctas {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
}

@media (min-width: 768px) {
    .process-steps {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        width: 100%;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        gap: 0;
    }

    .process-step:first-child {
        justify-self: start;
        /* Optional: Align text left within step? No, user wants box left, text usually centered in box? Keeping box behavior default (centered content) or specific? */
        /* Currently .process-step has align-items: center (column flex). Keep that. */
    }

    .process-step:nth-child(3) {
        justify-self: center;
    }

    .process-step:last-child {
        justify-self: end;
    }

    .process-connector {
        display: none;
        /* Ocultar también en desktop */
    }

    .process-ctas {
        flex-direction: row;
        justify-content: center;
    }
}

/* ========== FAQ SECTION ========== */
.faq-section {
    padding-top: var(--space-4xl);
    /* Aumentado de xl */
    padding-bottom: var(--space-4xl);
    /* Aumentado de 2xl */
}

.faq-container {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.faq-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-item:hover {
    border-color: rgba(25, 230, 179, 0.3);
}

.faq-item.active {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-primary);
    background: transparent;
    transition: color var(--transition-base);
}

.faq-question:hover {
    color: var(--color-accent);
}

.faq-icon {
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: all var(--transition-base);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--color-accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-base);
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* ========== POWER ON ANIMATION ========== */
.power-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2000;
    opacity: 0;
    mix-blend-mode: overlay;
}

.power-overlay.active {
    animation: powerSurge 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes powerSurge {
    0% {
        opacity: 0;
        background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8) 0%, transparent 0%);
    }

    10% {
        opacity: 1;
        background: radial-gradient(circle at center, rgba(255, 255, 255, 0.9) 0%, var(--color-accent-glow) 30%, transparent 60%);
    }

    100% {
        opacity: 0;
        background: radial-gradient(circle at center, rgba(255, 255, 255, 0) 0%, var(--color-accent) 60%, transparent 100%);
    }
}

/* ========== FINAL SECTION ========== */
.final-section {
    text-align: center;
    padding-top: var(--space-sm);
    padding-bottom: var(--space-lg);
}

.final-container {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.final-title {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    margin-bottom: var(--space-md);
    line-height: 1.25;
}

.final-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
}

.final-ctas {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-md);
}

.final-microtext {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

@media (min-width: 768px) {
    .final-ctas {
        flex-direction: row;
        justify-content: center;
    }
}

/* ========== FOOTER ========== */
.footer {
    background: var(--color-bg-card);
    border-top: 1px solid var(--color-border);
    padding: var(--space-xl) 0;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
}

.footer-logo {
    height: 70px;
    opacity: 0.7;
}

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

/* ========== MODALS ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 16, 15, 0.85);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: all var(--transition-base);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    background: var(--color-bg-primary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-card-hover);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
    padding-right: var(--space-2xl);
}

/* Example Modal */
.modal-example {
    max-width: 800px;
    width: 90vw;
    text-align: center;
    padding: var(--space-2xl);
    /* "Frame" effect */
}

/* Logística Modal Specific Resize */
#modalLogistica .modal-example {
    max-width: 700px;
}

/* Devoluciones Modal Specific Resize */
#modalDevoluciones .modal-example {
    max-width: 950px;
}

.modal-example .modal-title {
    text-align: center;
    padding-right: 0;
}

.example-placeholder {
    background: #F2F2F2;
    border: 2px solid var(--color-accent);
    border-radius: var(--radius-md);
    padding: var(--space-3xl) var(--space-xl);
    margin-bottom: var(--space-md);
}

.example-placeholder-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.example-note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.modal-close-btn {
    margin-top: var(--space-sm);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-glow-soft);
}

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

.form-checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-sm);
}

.form-checkbox input {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--color-accent);
}

.form-checkbox label {
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Modal Example Image */
.modal-example-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: block;
}

/* Form Success */
.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
    padding: var(--space-xl) 0;
}

.form-success.active {
    display: flex;
}

.contact-form.hidden {
    display: none;
}

.success-icon {
    color: var(--color-accent);
}

.form-success h4 {
    font-size: 1.15rem;
    color: var(--color-accent);
}

.form-success p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Chaos Mode body class - now toggles content visibility */
body.chaos-mode .path-wrapper {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
}

body.chaos-mode .chaos-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
}

/* ========== UTILITIES ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}