/* ================================================================
   GL.UY · Landing Page
   Tema: Rojo / Cerebro IA local
   Técnicas: CSS custom properties, color-mix, scroll-driven animations,
             :has(), container queries, glassmorphism, gradientes cónicos
   ================================================================ */

/* ============================ TOKENS ============================ */
:root {
    /* Paleta roja */
    --red-50:  #fff1f2;
    --red-200: #ffb0b0;
    --red-400: #ff5757;
    --red-500: #ef2333;
    --red-600: #d10920;
    --red-700: #a30015;
    --red-900: #3d0008;

    /* Fondo profundo */
    --bg-0: #060103;
    --bg-1: #0d0205;
    --bg-2: #14060a;
    --surface: rgba(255, 60, 70, 0.04);
    --surface-2: rgba(255, 60, 70, 0.08);
    --border: color-mix(in srgb, var(--red-400) 18%, transparent);
    --border-strong: color-mix(in srgb, var(--red-400) 35%, transparent);

    /* Texto */
    --text: #fff5f5;
    --text-muted: color-mix(in srgb, var(--text) 65%, transparent);
    --text-dim: color-mix(in srgb, var(--text) 45%, transparent);

    /* Gradientes */
    --grad-red: linear-gradient(135deg, #ff6b6b 0%, #ef2333 45%, #a30015 100%);
    --grad-text: linear-gradient(135deg, #ff8080 0%, #ef2333 60%, #ff3050 100%);
    --grad-aurora: conic-gradient(from 180deg at 50% 50%,
        #5a0008 0deg, #a30015 90deg, #ef2333 180deg, #5a0008 270deg, #5a0008 360deg);

    /* Sombras */
    --shadow-glow: 0 0 60px color-mix(in srgb, var(--red-500) 40%, transparent);
    --shadow-card: 0 20px 60px -20px rgba(0, 0, 0, 0.6),
                   0 0 0 1px var(--border) inset;

    /* Tipografía */
    --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    /* Layout */
    --container: 1200px;
    --radius: 16px;
    --radius-lg: 24px;

    /* Animación */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================ RESET ============================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg-0);
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; }
input, textarea { font: inherit; color: inherit; }

::selection { background: var(--red-600); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--red-700), var(--red-500));
    border-radius: 10px;
}

/* ============================ FONDO ============================ */
.bg-aurora {
    position: fixed; inset: -20% -10% auto -10%;
    height: 70vh;
    background:
        radial-gradient(60% 60% at 30% 30%, color-mix(in srgb, var(--red-600) 28%, transparent), transparent 60%),
        radial-gradient(50% 50% at 80% 20%, color-mix(in srgb, var(--red-500) 22%, transparent), transparent 60%),
        radial-gradient(40% 40% at 60% 80%, color-mix(in srgb, var(--red-700) 25%, transparent), transparent 60%);
    filter: blur(40px);
    z-index: -3;
    animation: aurora 18s var(--ease) infinite alternate;
}
@keyframes aurora {
    0%   { transform: translate3d(-2%, -2%, 0) scale(1); }
    100% { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

.bg-grid {
    position: fixed; inset: 0;
    background-image:
        linear-gradient(color-mix(in srgb, var(--red-400) 6%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--red-400) 6%, transparent) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
    z-index: -2;
    pointer-events: none;
}

.bg-particles {
    position: fixed; inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.55;
}

/* ============================ SCROLL PROGRESS BAR ============================ */
.scroll-progress {
    position: fixed; top: 0; left: 0;
    width: 0%; height: 2px;
    background: linear-gradient(90deg, var(--red-700), var(--red-400), #fff);
    z-index: 200;
    box-shadow: 0 0 12px var(--red-500);
    transition: width .1s linear;
}

/* ============================ NAV (rediseñado) ============================ */
.nav-wrapper {
    position: fixed;
    top: 1rem; left: 0; right: 0;
    z-index: 100;
    padding: 0 1rem;
    transition: top .35s var(--ease), transform .35s var(--ease);
}
.nav-wrapper.shrink { top: 0.5rem; }
.nav-wrapper.hide   { transform: translateY(-120%); }

.nav {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.7rem 0.7rem 0.7rem 1rem;
    border-radius: 18px;
    position: relative;
    isolation: isolate;
}

/* Background animado del nav (gradiente cónico que rota lento) */
.nav-bg {
    position: absolute; inset: 0;
    border-radius: inherit;
    z-index: -1;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--red-900) 55%, transparent) 0%,
        color-mix(in srgb, var(--bg-2) 88%, transparent) 100%);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid var(--border);
    overflow: hidden;
}
.nav-bg::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg,
        transparent 0deg,
        color-mix(in srgb, var(--red-500) 25%, transparent) 60deg,
        transparent 120deg,
        transparent 240deg,
        color-mix(in srgb, var(--red-400) 18%, transparent) 300deg,
        transparent 360deg);
    animation: nav-rotate 8s linear infinite;
    opacity: 0;
    transition: opacity .5s var(--ease);
}
.nav-wrapper.shrink .nav-bg::before { opacity: 1; }
@keyframes nav-rotate { to { transform: rotate(360deg); } }

.glass {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--red-900) 35%, transparent) 0%,
        color-mix(in srgb, var(--bg-2) 80%, transparent) 100%);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--border);
}

/* ----- Logo nuevo ----- */
.nav-logo {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    transition: background .3s var(--ease);
}
.nav-logo:hover { background: color-mix(in srgb, var(--red-500) 8%, transparent); }

.nav-logo-mark {
    position: relative;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--red-700) 40%, transparent),
        color-mix(in srgb, var(--red-900) 60%, transparent));
    border: 1px solid var(--border-strong);
    overflow: hidden;
}
.nav-logo-mark svg {
    width: 28px; height: 28px;
    filter: drop-shadow(0 0 10px var(--red-500));
    animation: logo-think 4s ease-in-out infinite;
}
@keyframes logo-think {
    0%, 100% { transform: scale(1) rotate(0deg); filter: drop-shadow(0 0 6px var(--red-600)); }
    50%      { transform: scale(1.08) rotate(-3deg); filter: drop-shadow(0 0 14px var(--red-400)); }
}
.nav-logo-pulse {
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid var(--red-400);
    opacity: 0;
    animation: logo-pulse 3s ease-out infinite;
}
@keyframes logo-pulse {
    0%   { opacity: 0.7; transform: scale(0.9); }
    100% { opacity: 0;   transform: scale(1.4); }
}

.nav-logo-text {
    display: flex; flex-direction: column;
    line-height: 1;
}
.nlt-main {
    font-weight: 700; font-size: 1.15rem;
    letter-spacing: 0.5px;
    background: linear-gradient(180deg, #fff, color-mix(in srgb, #fff 70%, var(--red-200)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.nlt-main .dot {
    color: var(--red-400);
    -webkit-text-fill-color: var(--red-400);
    animation: dot-blink 2s ease-in-out infinite;
}
@keyframes dot-blink {
    0%, 100% { opacity: 1; text-shadow: 0 0 8px var(--red-400); }
    50%      { opacity: 0.6; text-shadow: 0 0 0 transparent; }
}
.nlt-sub {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 3px;
}

/* ----- Links con indicador deslizante ----- */
.nav-links {
    display: flex; gap: 0.25rem;
    margin-left: auto;
    position: relative;
    padding: 0.35rem;
    border-radius: 12px;
}
.nav-link {
    position: relative;
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.55rem 0.95rem;
    border-radius: 9px;
    transition: color .25s var(--ease);
    z-index: 2;
}
.nav-link::before {
    content: attr(data-num);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--red-400);
    opacity: 0;
    transform: translateX(-4px);
    transition: all .25s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::before,
.nav-link.active::before { opacity: 1; transform: translateX(0); }

.nav-indicator {
    position: absolute;
    top: 50%; left: 0;
    width: 0; height: calc(100% - 0.7rem);
    transform: translateY(-50%);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--red-500) 18%, transparent),
        color-mix(in srgb, var(--red-700) 25%, transparent));
    border: 1px solid var(--border-strong);
    border-radius: 9px;
    transition: left .4s var(--ease), width .4s var(--ease);
    z-index: 1;
    pointer-events: none;
    box-shadow: 0 0 24px -4px color-mix(in srgb, var(--red-500) 50%, transparent),
                inset 0 1px 0 color-mix(in srgb, var(--red-200) 20%, transparent);
}

/* ----- Acciones del lado derecho ----- */
.nav-actions {
    display: flex; align-items: center; gap: 0.75rem;
}

.nav-status {
    display: flex; align-items: center; gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--red-900) 25%, transparent);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.ns-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 #4ade80;
    animation: ns-pulse 2s ease-out infinite;
}
@keyframes ns-pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, #4ade80 70%, transparent); }
    70%  { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* ----- Botón magnético ----- */
.btn-magnetic {
    position: relative;
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.65rem 0.65rem 0.65rem 1.15rem;
    border-radius: 999px;
    background: var(--grad-red);
    color: #fff;
    font-size: 0.88rem; font-weight: 500;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 24px -8px var(--red-500),
                inset 0 1px 0 rgba(255,255,255,0.25);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
    overflow: hidden;
    will-change: transform;
}
.btn-magnetic::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
    transform: translateX(-110%);
    transition: transform .7s var(--ease);
}
.btn-magnetic:hover::before { transform: translateX(110%); }
.btn-magnetic:hover {
    box-shadow: 0 14px 30px -8px var(--red-500),
                inset 0 1px 0 rgba(255,255,255,0.4);
}
.bm-arrow {
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: transform .25s var(--ease);
}
.btn-magnetic:hover .bm-arrow { transform: translateX(2px) rotate(-45deg); }

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    border-radius: 8px;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================ BUTTONS ============================ */
.btn-primary, .btn-outline {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all .3s var(--ease);
    will-change: transform;
}
.btn-primary {
    background: var(--grad-red);
    color: #fff;
    box-shadow: 0 10px 30px -10px var(--red-500),
                inset 0 1px 0 rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .6s var(--ease);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px -10px var(--red-500),
                inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-primary:hover::before { transform: translateX(100%); }

.btn-outline {
    border: 1px solid var(--border-strong);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--red-400);
    background: var(--surface-2);
}

.btn-block { width: 100%; justify-content: center; }

/* ============================ LAYOUT ============================ */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 7rem 0;
    position: relative;
}
.section-alt {
    background: linear-gradient(180deg,
        transparent 0%,
        color-mix(in srgb, var(--red-900) 20%, transparent) 50%,
        transparent 100%);
}

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 4rem;
}
.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--red-400);
    margin-bottom: 1rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
}
.section-title {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.section-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 1rem;
}

.grad-text {
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================ HERO ============================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.82rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}
.badge-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--red-400);
    box-shadow: 0 0 10px var(--red-400);
    animation: pulse 1.6s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.75rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex; gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.hero-stats {
    display: flex; gap: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.stat-num {
    font-size: 2rem;
    font-weight: 600;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}
.stat-label {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 0.4rem;
    font-family: var(--font-mono);
}

/* ----- Brain visual ----- */
.hero-visual {
    position: relative;
    display: flex; justify-content: center; align-items: center;
    aspect-ratio: 1 / 1;
}

.brain-stage {
    position: relative;
    width: min(100%, 560px);
    aspect-ratio: 1;
    display: grid; place-items: center;
}

.brain-glow {
    position: absolute; inset: 10%;
    background: radial-gradient(circle at center,
        var(--red-500) 0%,
        var(--red-700) 30%,
        transparent 70%);
    filter: blur(60px);
    opacity: 0.6;
    z-index: 0;
    animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50% { transform: scale(1.08); opacity: 0.8; }
}

.brain-rings {
    position: absolute; inset: 0;
    display: grid; place-items: center;
}
.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--border-strong);
}
.r1 { width: 70%; height: 70%; animation: spin 22s linear infinite; }
.r2 { width: 85%; height: 85%; animation: spin 32s linear infinite reverse;
      border-style: dashed; border-color: color-mix(in srgb, var(--red-500) 30%, transparent); }
.r3 { width: 100%; height: 100%; animation: spin 42s linear infinite;
      border-color: color-mix(in srgb, var(--red-400) 15%, transparent); }
@keyframes spin { to { transform: rotate(360deg); } }

.brain-svg {
    position: relative;
    z-index: 2;
    width: 80%;
    height: 80%;
    filter: drop-shadow(0 0 30px var(--red-600));
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.brain-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw 4s var(--ease) forwards;
}
.brain-line:nth-child(2)  { animation-delay: 0.1s; }
.brain-line:nth-child(3)  { animation-delay: 0.2s; }
.brain-line:nth-child(4)  { animation-delay: 0.3s; }
.brain-line:nth-child(5)  { animation-delay: 0.4s; }
.brain-line:nth-child(6)  { animation-delay: 0.5s; }
.brain-line:nth-child(7)  { animation-delay: 0.6s; }
.brain-line:nth-child(8)  { animation-delay: 0.7s; }
.brain-line:nth-child(9)  { animation-delay: 0.8s; }
.brain-line:nth-child(10) { animation-delay: 0.9s; }
.brain-line:nth-child(11) { animation-delay: 1.0s; }
.brain-line:nth-child(12) { animation-delay: 1.1s; }
.brain-line:nth-child(13) { animation-delay: 1.2s; }
.brain-line:nth-child(14) { animation-delay: 1.3s; }
.brain-line:nth-child(15) { animation-delay: 1.4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.synapse circle {
    animation: synapse 2.4s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}
.synapse circle:nth-child(odd)  { animation-delay: 0.3s; }
.synapse circle:nth-child(3n)   { animation-delay: 0.7s; }
.synapse circle:nth-child(4n)   { animation-delay: 1.2s; }
@keyframes synapse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.6); filter: drop-shadow(0 0 6px var(--red-400)); }
}

.brain-orbits {
    position: absolute; inset: 0;
    pointer-events: none;
}
.orbit {
    position: absolute;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--red-400);
    box-shadow: 0 0 16px var(--red-400), 0 0 6px #fff;
    top: 50%; left: 50%;
}
.o1 { animation: orbit1 8s linear infinite; }
.o2 { animation: orbit2 12s linear infinite; }
.o3 { animation: orbit3 16s linear infinite; }
@keyframes orbit1 {
    from { transform: rotate(0deg) translateX(220px) rotate(0deg); }
    to   { transform: rotate(360deg) translateX(220px) rotate(-360deg); }
}
@keyframes orbit2 {
    from { transform: rotate(120deg) translateX(180px) rotate(-120deg); }
    to   { transform: rotate(480deg) translateX(180px) rotate(-480deg); }
}
@keyframes orbit3 {
    from { transform: rotate(240deg) translateX(250px) rotate(-240deg); }
    to   { transform: rotate(600deg) translateX(250px) rotate(-600deg); }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    color: var(--text-dim);
    font-family: var(--font-mono); font-size: 0.7rem;
    letter-spacing: 3px; text-transform: uppercase;
}
.mouse {
    width: 22px; height: 36px;
    border: 1.5px solid var(--text-dim);
    border-radius: 12px;
    display: flex; justify-content: center;
    padding-top: 6px;
}
.dot-anim {
    width: 3px; height: 6px; border-radius: 2px;
    background: var(--red-400);
    animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(14px); opacity: 0; }
}

/* ============================ CARDS ============================ */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.card {
    position: relative;
    padding: 2rem 1.75rem;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--bg-2) 90%, transparent),
        color-mix(in srgb, var(--bg-1) 90%, transparent));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .4s var(--ease);
    isolation: isolate;
}
.card::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%),
        color-mix(in srgb, var(--red-500) 18%, transparent), transparent 50%);
    opacity: 0;
    transition: opacity .4s var(--ease);
    pointer-events: none;
    z-index: -1;
}
.card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-card), 0 30px 60px -20px color-mix(in srgb, var(--red-700) 40%, transparent);
}
.card:hover::before { opacity: 1; }

.card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: var(--grad-red);
    color: #fff;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px -8px var(--red-500);
}
.card-icon svg { width: 22px; height: 22px; }

.card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}
.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-shine {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.04) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform .8s var(--ease);
}
.card:hover .card-shine { transform: translateX(100%); }

/* ============================ TECNOLOGÍA ============================ */
.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.features {
    display: flex; flex-direction: column;
    gap: 2rem;
}
.features li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: start;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.features li:last-child { border-bottom: 0; padding-bottom: 0; }
.ft-num {
    font-family: var(--font-mono);
    font-size: 1.4rem; font-weight: 500;
    color: var(--red-400);
    width: 50px;
    line-height: 1;
}
.features h4 {
    font-size: 1.15rem; font-weight: 600;
    margin-bottom: 0.4rem;
}
.features p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Terminal */
.terminal {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.terminal-bar {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.7rem 1rem;
    background: color-mix(in srgb, var(--bg-2) 60%, transparent);
    border-bottom: 1px solid var(--border);
}
.terminal-bar .dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.terminal-bar .d1 { background: #ff5f57; }
.terminal-bar .d2 { background: #febc2e; }
.terminal-bar .d3 { background: #28c840; }
.terminal-title {
    margin-left: 1rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-dim);
}
.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-muted);
    overflow-x: auto;
}
.t-prompt { color: var(--red-400); margin-right: 0.5rem; }
.t-cmd { color: var(--text); }
.t-out { color: var(--text-dim); }
.t-ok  { color: #4ade80; }
.t-blink {
    display: inline-block;
    width: 8px; height: 16px;
    background: var(--red-400);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================ NOSOTROS ============================ */
.nosotros-wrap {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.kpis {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.kpi {
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    transition: transform .3s var(--ease);
}
.kpi:hover { transform: translateY(-4px); }
.kpi-num {
    font-size: 2.5rem;
    font-weight: 600;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}
.kpi-lbl {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ============================ CONTACTO ============================ */
.contact-card {
    padding: 3.5rem;
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.contact-form {
    display: flex; flex-direction: column;
    gap: 1.25rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.field {
    display: flex; flex-direction: column;
    gap: 0.45rem;
}
.field label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.field input, .field textarea {
    padding: 0.95rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all .25s var(--ease);
    resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field textarea:focus {
    outline: 0;
    border-color: var(--red-400);
    background: var(--surface-2);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--red-500) 15%, transparent);
}

.form-status {
    font-size: 0.85rem;
    color: var(--red-400);
    min-height: 1.2em;
    text-align: center;
}
.form-status.ok { color: #4ade80; }

/* ============================ FOOTER ============================ */
.footer {
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-1) 50%, transparent);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
    align-items: center;
}
.footer-tag {
    margin-top: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 4px;
}
.footer-links {
    display: flex; gap: 1.5rem;
    justify-content: center;
}
.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color .25s var(--ease);
}
.footer-links a:hover { color: var(--red-400); }
.footer-meta {
    display: flex; flex-direction: column;
    gap: 0.3rem;
    text-align: right;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* ============================ REVEAL ============================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    transition-delay: calc(var(--i, 0) * 0.08s);
}
.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 960px) {
    .hero-grid,
    .tech-grid,
    .nosotros-wrap,
    .contact-card {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .contact-card { padding: 2.5rem 1.75rem; }
    .hero { padding-top: 7rem; min-height: auto; }
    .scroll-indicator { display: none; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-links, .footer-meta { justify-content: center; text-align: center; align-items: center; }
}

@media (max-width: 1024px) {
    .nav-status { display: none; }
    .nlt-sub { display: none; }
}

@media (max-width: 880px) {
    .nav-links {
        position: absolute;
        top: calc(100% + 0.6rem);
        right: 0; left: 0;
        flex-direction: column;
        background: var(--bg-1);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 1.25rem;
        gap: 0.5rem;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition: all .3s var(--ease);
    }
    .nav-indicator { display: none; }
    .nav-links.open {
        opacity: 1; pointer-events: auto; transform: translateY(0);
    }
    .nav-link { width: 100%; }
    .nav-toggle { display: flex; }
    .btn-magnetic { padding: 0.55rem 0.55rem 0.55rem 0.95rem; font-size: 0.82rem; }
    .bm-text { display: none; }
    .hero-stats { flex-wrap: wrap; gap: 1.25rem; }
    .form-row { grid-template-columns: 1fr; }
    .section { padding: 5rem 0; }
}

@media (max-width: 480px) {
    .nlt-main { font-size: 1rem; }
    .nav-logo-mark { width: 34px; height: 34px; }
}
