/* ========================
   VARIABLES & RESET
======================== */
:root {
    --bg: #050505;
    --bg-2: #0a0a0a;
    --bg-3: #111111;
    --surface: #161616;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #ffffff;
    --accent-2: #e0e0e0;
    --text: #ffffff;
    --text-2: #b0b0b0;
    --text-3: #808080;
    --radius: 12px;
    --font: 'Inter', sans-serif;
    --font-heading: 'Syncopate', sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --nav-h: 100px;
    --nav-h-scrolled: 75px;
    --glow: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: #050505;
    /* Fallback for older browsers or failed variables */
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
}

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

ul {
    list-style: none;
}

/* ========================
   NAVBAR
======================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    /* Altura fija y limpia */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    transition: background 0.4s ease, height 0.4s ease, border 0.4s ease;

    opacity: 0;
    animation: fadeInNavbar 1s 2.5s forwards;
}

#navbar.scrolled {
    height: 70px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes fadeInNavbar {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

/* Menú de navegación */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-2);
    padding: 8px 16px;
    transition: color 0.3s, opacity 0.3s;
}

.nav-link:hover {
    color: var(--text);
    opacity: 1;
}

.nav-link.active {
    color: var(--text) !important;
}

.nav-link.active::after,
.nav-link::after {
    display: none !important;
    content: none !important;
}

.nav-link.cta-nav {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text);
    padding: 10px 22px;
    border-radius: 4px;
    /* Más rectangular, más técnico */
    font-weight: 400;
    margin-left: 10px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-link.cta-nav:hover {
    background: var(--text);
    color: #000;
    border-color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 80px;
    /* Alineado con la altura del navbar */
    left: 0;
    right: 0;
    background: rgba(5, 5, 8, 0.98);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border);
    padding: 20px 0 30px;
    z-index: 999;
    transform: translateY(-110%);
    transition: transform 0.4s cubic-bezier(.4, 0, .2, 1);
    display: none;
    /* Oculto radicalmente */
}

.mobile-menu.open {
    transform: translateY(0);
    display: block;
}

.mobile-link {
    display: block;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}

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

/* ========================
   HERO
======================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--nav-h);
}

#servicios,
#proyectos,
#proceso {
    position: relative;
    overflow: hidden;
}

#servicios>*:not(.section-canvas),
#proyectos>*:not(.section-canvas),
#proceso>*:not(.section-canvas) {
    position: relative;
    z-index: 2;
}

.section-canvas {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
}

/* Three.js canvas */
#three-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Subtle edge vignette — only covers the very edges */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 140% 110% at 50% 50%, transparent 55%, rgba(5, 5, 8, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 780px;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(108, 99, 255, 0.12);
    border: 1px solid rgba(108, 99, 255, 0.3);
    color: #a09aff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.7s 0.2s forwards;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4cef8a;
    box-shadow: 0 0 8px #4cef8a;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hero-logo {
    width: 460px;
    /* Tamaño mucho más imponente */
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 0.8s 0.4s forwards;
    /* TRUCO DE NITIDEZ: Unimos blur y contraste para 're-vectorizar' visualmente */
    filter: brightness(1.2) contrast(1.1) blur(0.4px);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;

    /* Funde los bordes del cuadrado a transparente */
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
    mask-image: radial-gradient(circle at center, black 30%, transparent 90%);

    mix-blend-mode: screen;
    transform: translateZ(0);
    /* Aceleración por hardware para mejor renderizado */
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    /* Bajamos un poco el tamaño para que luzca más refinada */
    font-weight: 400;
    /* FUENTE FINA */
    line-height: 1.3;
    letter-spacing: 0.15em;
    /* MUCHO MÁS ESPACIO ENTRE LETRAS */
    margin-bottom: 24px;
    opacity: 0;
    /* Inicia invisible */
    text-transform: uppercase;
    animation: fadeUp 1.2s 1.8s forwards;
    /* Retraso de 1.8s para coordinar con el logo */
}

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

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-2);
    line-height: 1.75;
    max-width: 540px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp 0.8s 2.2s forwards;
    /* Aparece después del título */
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    animation: fadeUp 0.8s 2.5s forwards;
    /* Lo último en aparecer */
}

/* Scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 1s 1.6s forwards;
}

.hero-scroll-hint span {
    font-size: 0.7rem;
    font-family: var(--mono);
    letter-spacing: 0.12em;
    color: var(--text-3);
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-3), transparent);
    animation: scroll-anim 2s 1.8s infinite;
}

@keyframes scroll-anim {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* ========================
   BUTTONS
======================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #000;
    /* Texto negro sobre fondo blanco */
    font-family: var(--font);
    font-size: 0.93rem;
    font-weight: 700;
    padding: 13px 28px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background: #e0e0e0;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255, 255, 255, 0.15);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.93rem;
    font-weight: 500;
    padding: 13px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-mini {
    display: inline-flex;
    align-items: center;
    color: var(--accent-2);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 16px;
    transition: gap 0.2s;
    gap: 4px;
}

.btn-mini:hover {
    gap: 10px;
}

/* ========================
   STATS BAR
======================== */
.stats-bar {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-2);
    padding: 40px 24px;
}

.stats-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    padding: 10px 56px;
}

.stat-num {
    font-size: 2.6rem;
    font-weight: 900;
    font-family: var(--mono);
    background: linear-gradient(135deg, #fff, #999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-unit {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-2);
}

.stat p {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: var(--border);
}

/* ========================
   SECTIONS
======================== */
.section {
    padding: 100px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-dark {
    max-width: 100%;
    background: var(--bg-2);
    padding: 100px 24px;
}

.section-dark>* {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-family: var(--mono);
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.25);
    padding: 4px 14px;
    border-radius: 100px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 400;
    /* FUENTE FINA */
    text-transform: uppercase;
    letter-spacing: 0.2em;
    /* ESPACIADO ELEGANTE */
    margin-bottom: 14px;
    opacity: 0.85;
}

.section-header p {
    color: var(--text-2);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ========================
   SERVICES
======================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.service-card {
    position: relative;
    background: rgba(14, 14, 22, 0.92);
    /* Sólido por defecto (móvil) */
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 30px;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

/* Glassmorphism solo en computadoras (evita crash GPU en móvil) */
@supports (backdrop-filter: blur(1px)) {
    @media (pointer: fine) {
        .service-card {
            background: rgba(14, 14, 22, 0.55);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }
    }
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(700px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 255, 255, 0.06),
            transparent 40%);
    z-index: 0;
    pointer-events: none;
}

.service-card>* {
    position: relative;
    z-index: 2;
}

.service-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: -100%;
    width: 100%;
    height: 40%;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(255, 255, 255, 0.04) 50%,
            transparent 100%);
    animation: card-scan 5s ease-in-out infinite;
    animation-delay: var(--scan-delay, 0s);
    z-index: 1;
    pointer-events: none;
}

@keyframes card-scan {
    0% {
        top: -40%;
    }

    100% {
        top: 110%;
    }
}

@media (hover: hover) and (pointer: fine) {
    .service-card:hover {
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-6px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    }

    .service-card:hover::before {
        opacity: 1;
    }
}

.service-card.featured {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(18, 18, 26, 0.9);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 20px 60px rgba(255, 255, 255, 0.04);
}

.featured-label {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent);
}

.service-tag {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--accent-2);
    letter-spacing: 0.05em;
    margin-bottom: 10px;
    opacity: 0.8;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.65;
    margin-bottom: 20px;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.service-features li {
    font-size: 0.82rem;
    color: var(--text-2);
    padding-left: 16px;
    position: relative;
}

.service-features li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.7rem;
    top: 2px;
}

.service-arrow {
    font-size: 1.2rem;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.25s, transform 0.25s;
}

.service-card:hover .service-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ========================
   PROJECTS
======================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    transition: border-color 0.3s, transform 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(700px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 255, 255, 0.06),
            transparent 40%);
    z-index: 0;
    pointer-events: none;
}

.project-card>* {
    position: relative;
    z-index: 2;
}

@media (hover: hover) and (pointer: fine) {
    .project-card:hover {
        border-color: rgba(255, 255, 255, 0.25);
        transform: translateY(-4px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    }

    .project-card:hover::before {
        opacity: 1;
    }
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.project-type {
    font-size: 0.72rem;
    font-family: var(--mono);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 100px;
}

/* Igualamos .coming para que se vea igual que las otras badges */
.project-type.coming {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Sin borde punteado en la tarjeta de acción */
.project-coming {
    border-style: solid;
}

.project-year {
    font-size: 0.75rem;
    font-family: var(--mono);
    color: var(--text-3);
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.project-card p {
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.65;
}

.project-stack {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.project-stack span {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-3);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 6px;
}

.project-coming {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.1);
}

/* ========================
   PROCESS
======================== */
.process-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 200px;
    flex: 1 1 160px;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    position: relative;
    transition: background 0.3s, box-shadow 0.3s;
}

.step:hover .step-number {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

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

.step-content p {
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.6;
}

.step-connector {
    flex: 0 0 40px;
    height: 1px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    align-self: center;
    margin-bottom: 40px;
    margin-top: 0;
}

/* ========================
   CONTACT
======================== */
.section-contact {
    max-width: 100%;
    background: var(--bg-3);
    position: relative;
    overflow: hidden;
    padding: 100px 24px;
}

.section-contact .section-header,
.section-contact .contact-grid {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.section-contact .section-header {
    margin-bottom: 60px;
}

.contact-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent);
}

.contact-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    font-family: var(--mono);
    margin-bottom: 2px;
}

.contact-value {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
    transition: color 0.2s;
}

a.contact-value:hover {
    color: var(--accent-2);
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    -webkit-appearance: none;
    appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239090b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.form-group option {
    background: var(--surface);
}

/* ========================
   FOOTER
======================== */
.footer {
    position: relative;
    border-top: 1px solid var(--border);
    background: var(--bg);
    padding: 36px 24px;
    overflow: hidden;
}

.footer-canvas {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.2;
}

.footer-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
    opacity: 0.7;
    filter: grayscale(0.3);
    transition: opacity 0.3s;
}

.footer-logo:hover {
    opacity: 1;
}

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

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 0.82rem;
    color: var(--text-3);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.9;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .process-steps {
        flex-direction: column;
        align-items: center;
    }

    .step-connector {
        width: 1px;
        height: 30px;
        align-self: auto;
        margin-bottom: 0;
        margin-right: 0;
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    }

    .step {
        max-width: 100%;
    }
}

@media (max-width: 700px) {
    :root {
        --nav-h: 64px;
    }

    #navbar {
        padding: 0 5px;
        justify-content: center;
    }

    #navbar>div:first-child {
        display: none;
    }

    .nav-links {
        display: flex;
        flex-wrap: nowrap;
        gap: 0px;
        justify-content: center;
        width: 100%;
    }

    /* Ocultar 'Inicio' en móviles porque no entra el header */
    .nav-links li:first-child {
        display: none;
    }

    .nav-link {
        font-size: 0.58rem;
        padding: 6px 8px;
    }

    .nav-link.cta-nav {
        padding: 6px 10px;
        margin-left: 0;
        margin-top: -2px;
    }

    .stat {
        padding: 10px 24px;
    }

    .stat-divider {
        display: none;
    }

    .stats-inner {
        gap: 20px;
    }

    .hero-logo {
        width: 240px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ========================
   FORM ALERTS (PHP)
======================== */
.form-alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
}

.form-alert-ok {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #4ade80;
}

.form-alert-err {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* ========================
   WHATSAPP FLOATING BTN
======================== */
.btn-wsp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #050505;
    /* Fondo negro */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    visibility: hidden;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-wsp-float.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
    visibility: visible;
    pointer-events: all;
}

.btn-wsp-float:hover {
    background-color: #25D366;
    border-color: #25D366;
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.btn-wsp-float svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    /* Logo blanco */
    transition: fill 0.3s;
}

.btn-wsp-float:hover svg {
    fill: #ffffff;
}