/* Estilos propios de Axentra (extraídos del <style> de la landing original).
   Se carga ANTES de estilos.css (Tailwind compilado), igual que en el original. */

/* Fuentes locales (variables, woff2) */
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 300 600;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg-primary: #040907;
    --bg-secondary: #071310;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(199, 107, 26, 0.25);
    --esmeralda: #10b981;
    --esmeralda-glow: rgba(16, 185, 129, 0.15);
    --cobre: #c76b1a;
    --cobre-glow: rgba(199, 107, 26, 0.12);
    --text-primary: #eef7f2;
    --text-secondary: #7d998e;
    --text-muted: #3d4d47;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--esmeralda);
    border-radius: 2px;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* Glass card */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.glass-esmeralda {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(4, 9, 7, 0.6) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.glass-cobre {
    background: linear-gradient(135deg, rgba(199, 107, 26, 0.07) 0%, rgba(4, 9, 7, 0.6) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(199, 107, 26, 0.18);
}

/* Glow effects */
.glow-esmeralda {
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.12), 0 0 80px rgba(16, 185, 129, 0.06);
}

.glow-cobre {
    box-shadow: 0 0 40px rgba(199, 107, 26, 0.10), 0 0 80px rgba(199, 107, 26, 0.05);
}

.text-glow-esmeralda {
    text-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

/* Grid pattern (circuito) */
.grid-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* Gradient borders */
.border-gradient-esmeralda {
    position: relative;
}

.border-gradient-esmeralda::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.5), rgba(199, 107, 26, 0.2), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Hero ambient gradient */
.hero-gradient {
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(16, 185, 129, 0.16) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 88% 55%, rgba(199, 107, 26, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 40% 60% at 8% 75%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
        var(--bg-primary);
}

/* Scan line effect */
.scan-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), transparent);
    animation: scan 4s linear infinite;
}

@keyframes scan {
    to {
        top: 100%;
    }
}

/* Pulse dot (estado operativo) */
.pulse-dot {
    position: relative;
}

/* Cursor de terminal parpadeante */
.log-cursor {
    animation: blink-cursor 1s step-end infinite;
    color: #10b981;
}

@keyframes blink-cursor {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.pulse-dot::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--esmeralda);
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0;
        transform: scale(1.8);
    }
}

/* Navigation */
/* ============================
   BARRA INFERIOR MÓVIL
   ============================ */
.mobile-tabbar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    background: rgba(3, 7, 6, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 6px;
    color: #7d998e;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
    flex: 1;
    min-width: 0;
}

.tab-item:active,
.tab-item:hover {
    color: var(--esmeralda);
}

@media (min-width: 768px) {
    .mobile-tabbar {
        display: none;
    }
}

@media (max-width: 767px) {
    body {
        padding-bottom: 62px;
    }
}

nav.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(3, 7, 6, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

footer nav,
main nav {
    position: static !important;
    background: transparent !important;
    border: none !important;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
}

/* Hero: oculto sólo cuando hay JS y GSAP lo animará (clase .js). Sin JS, el contenido se ve. */
.js .hero-text {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
}

/* Card hover */
.pillar-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.pillar-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(16, 185, 129, 0.08);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--esmeralda) 0%, #047857 100%);
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.25s ease;
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.25s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(199, 107, 26, 0.3);
}

:focus-visible {
    outline: 2px solid var(--esmeralda);
    outline-offset: 3px;
}

/* Metric bar */
.metric-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--esmeralda), var(--esmeralda-400, #34d399));
    transition: width 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Service tag */
.service-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(110, 231, 183, 0.9);
    letter-spacing: 0.02em;
}

.stack-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.stack-tag:hover {
    border-color: rgba(16, 185, 129, 0.35);
    color: #d1fae5;
}

/* Section label */
.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--esmeralda);
}

/* Revelado al hacer scroll: igual, sólo con JS activo */
.js .gsap-hidden {
    opacity: 0;
    transform: translateY(60px);
}

.logo-mark {
    width: 32px;
    height: 32px;
}

/* Philosophy block */
.philo-block {
    position: relative;
    overflow: hidden;
}

.philo-block::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--esmeralda), transparent);
}

/* Footer gradient line */
.footer-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.4), rgba(199, 107, 26, 0.3), transparent);
}

/* Node diagram lines */
.node-line {
    stroke-dasharray: 4 4;
    animation: dash 20s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -200;
    }
}

/* Roadmap connector */
.roadmap-line {
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.5), rgba(16, 185, 129, 0.05));
}

/* Accesibilidad: respetar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .scan-line::after {
        display: none;
    }
}

