/* ===== VARIABLES ===== */
:root {
    --color-bg: #0a0a0f;
    --color-bg-alt: #12121a;
    --color-surface: #1a1a2e;
    --color-border: #2a2a3e;
    --color-text: #e4e4e7;
    --color-text-muted: #9ca3af;
    --color-primary: #7c3aed;
    --color-primary-light: #a78bfa;
    --color-accent: #06b6d4;
    --color-gradient-1: #7c3aed;
    --color-gradient-2: #06b6d4;
    --font-family: 'Inter', sans-serif;
    --font-display: 'Audiowide', sans-serif;
    --container-max: 1200px;
    --header-height: 72px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

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

/* ===== ACCESSIBILITY ===== */
.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;
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ===== UTILITY ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
    background: var(--color-bg);
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 900px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border) 20%, var(--color-primary-light) 50%, var(--color-border) 80%, transparent);
    opacity: 0.4;
    pointer-events: none;
}

.section__subtitle {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 3rem;
}

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    /* Radio suave (no pildora) para un look minimalista coherente en todo el sitio */
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid transparent;
}

/* Boton primario: linea neon cyan que se enciende al hover */
.btn--primary {
    background: rgba(6, 182, 212, 0.05);
    color: var(--color-accent);
    border: 1px solid rgba(6, 182, 212, 0.55);
}

.btn--primary:hover {
    color: #ffffff;
    background: rgba(6, 182, 212, 0.12);
    border-color: var(--color-accent);
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.45), inset 0 0 14px rgba(6, 182, 212, 0.12);
    transform: translateY(-2px);
}

/* Boton secundario: contorno tenue que reacciona con neon violeta al hover */
.btn--outline {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.btn--outline:hover {
    color: var(--color-primary-light);
    border-color: var(--color-primary-light);
    box-shadow: 0 0 18px rgba(167, 139, 250, 0.35);
    transform: translateY(-2px);
}

.btn--full {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    /* Radio suave para que coincida con los campos del formulario (no forma de pildora) */
    border-radius: var(--radius-md);
}

/* ===== BOTON NEON (minimalista de linea) =====
   Se aplica al boton "Enviar mensaje" del formulario.
   Contorno neon en vez de relleno solido; el brillo se intensifica al hover. */
.btn--full.btn--primary {
    background: rgba(6, 182, 212, 0.04);
    color: var(--color-accent);
    border: 1px solid rgba(6, 182, 212, 0.55);
    box-shadow: 0 0 0 rgba(6, 182, 212, 0), inset 0 0 0 rgba(6, 182, 212, 0);
    letter-spacing: 0.03em;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.btn--full.btn--primary:hover {
    color: #ffffff;
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--color-accent);
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.45), inset 0 0 14px rgba(6, 182, 212, 0.15);
    transform: none;
}

.btn--full.btn--primary:focus-visible {
    border-color: var(--color-accent);
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.45);
}

.btn--full.btn--primary:disabled {
    color: var(--color-text-muted);
    border-color: var(--color-border);
    background: transparent;
    box-shadow: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switcher {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-radius: 6px;
    transition: var(--transition);
}

.lang-toggle:hover,
.lang-switcher.is-open .lang-toggle {
    color: var(--color-text);
    background: rgba(124, 58, 237, 0.08);
}

.lang-globe {
    width: 16px;
    height: 16px;
    color: inherit;
}

.lang-current {
    line-height: 1;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 4px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 200;
    min-width: 48px;
}

.lang-switcher.is-open .lang-dropdown {
    display: flex;
}

.lang-option {
    display: block;
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-align: center;
    color: var(--color-text-muted);
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}

.lang-option:hover {
    background: rgba(124, 58, 237, 0.12);
    color: var(--color-text);
}

.lang-option.is-active {
    background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2));
    color: #fff;
    pointer-events: none;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: var(--transition);
    /* Fondo oscuro con blur permanente para que el contenido nunca se transparente
       detras del logo/menu (incluso al recargar en medio de la pagina). */
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(10, 10, 15, 0.92);
    border-bottom-color: var(--color-border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 1.5rem;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.logo-icon {
    color: var(--color-primary-light);
    font-size: 1.5rem;
}

.nav__list {
    display: flex;
    gap: 2rem;
}

.nav__link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    transition: var(--transition);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2));
    transition: var(--transition);
}

.nav__link:hover,
.nav__link.active {
    color: var(--color-text);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

.nav__toggle,
.nav__close {
    display: none;
    background: none;
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: visible;
    padding-top: var(--header-height);
    z-index: 1;
    background: var(--color-bg);
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.hero__subtitle {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 3.75rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero__description {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
    line-height: 1.7;
}

.hero__buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero decorative shapes */
.hero__visual {
    position: fixed;
    top: 0;
    right: 0;
    width: 55%;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.hero__shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    will-change: transform;
}

.hero__shape--1 {
    width: 280px;
    height: 280px;
    background: var(--color-primary);
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.hero__shape--2 {
    width: 180px;
    height: 180px;
    background: var(--color-accent);
    bottom: 10%;
    right: 30%;
    animation-delay: -3s;
}

.hero__shape--3 {
    width: 130px;
    height: 130px;
    background: #8b5cf6;
    top: 40%;
    right: 50%;
    animation-delay: -5s;
}


/* ===== SERVICES ===== */
.services {
    background: var(--color-bg-alt);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Services container - holds both background and cards */
.services__container {
    position: relative;
}

/* PCB Background - sticky inside container, full width */
.services__pcb-wrapper {
    position: sticky;
    top: 0;
    width: 100vw;
    height: 100vh;
    margin-left: calc(-50vw + 50%);
    z-index: 0;
    pointer-events: none;
    margin-bottom: -100vh;
}

.services__pcb {
    width: 100%;
    height: 100%;
    opacity: 1;
}

/* Cards content layer */
.services__content {
    position: relative;
    z-index: 2;
}

/* Comet glow effect */
.comet-head {
    filter: drop-shadow(0 0 3px currentColor);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.service__card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gradient-1), var(--color-gradient-2));
    opacity: 0;
    transition: var(--transition);
}

.service__card:hover {
    transform: translateY(-5px);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.1);
}

.service__card:hover::before {
    opacity: 1;
}

.service__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(6, 182, 212, 0.12));
    color: var(--color-primary-light);
    margin-bottom: 1.5rem;
}

.service__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.service__description {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ===== ABOUT ===== */
.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about__text {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.about__text:last-of-type {
    margin-bottom: 1.75rem;
}

.about__highlights {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
}

.highlight {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.highlight:hover {
    border-color: rgba(124, 58, 237, 0.4);
    transform: translateX(4px);
}

/* Punto/acento neon a la izquierda de cada highlight */
.highlight::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2));
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

.highlight__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about__visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about__image-placeholder {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 50% 40%, rgba(124, 58, 237, 0.12), transparent 60%), linear-gradient(135deg, var(--color-surface), var(--color-bg-alt));
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-light);
    position: relative;
    overflow: hidden;
}

/* Borde con gradiente sutil */
.about__image-placeholder::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2));
    z-index: -1;
    opacity: 0.25;
}

/* Lineas PCB sutiles de fondo (coherente con la seccion de servicios) */
.about__image-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: url('pcb-traces.svg') center / cover no-repeat;
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
}

/* Glow suave detras del cubo + flotacion sutil */
.about__image-placeholder svg {
    position: relative;
    z-index: 1;
    width: 96px;
    height: 96px;
    filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.45));
    animation: about-float 5s ease-in-out infinite;
}

@keyframes about-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== PORTFOLIO ===== */
.portfolio {
    background: var(--color-bg-alt);
    position: relative;
    z-index: 1;
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.portfolio__item {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.portfolio__image {
    width: 100%;
    aspect-ratio: 4/3;
    position: relative;
    transition: var(--transition);
}

.portfolio__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    padding: 1.5rem;
    text-align: center;
}

.portfolio__tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent);
    background: rgba(6, 182, 212, 0.12);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
}

.portfolio__overlay h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.portfolio__overlay p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.portfolio__item:hover .portfolio__overlay {
    opacity: 1;
}

/* ===== OCCLIVO CARD ===== */
.portfolio__item--occlivo {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.occlivo-card {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    min-height: 280px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, #0f172a 0%, #1a1a2e 50%, #0f172a 100%);
    border: 1px solid var(--color-border);
}

.occlivo-card:hover {
    border-color: #2cc7c0;
    box-shadow: 0 0 40px rgba(44, 199, 192, 0.08), inset 0 0 60px rgba(44, 199, 192, 0.03);
}

.occlivo-card__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
}

.occlivo-card__logo {
    margin-bottom: 1rem;
}

.occlivo-logo {
    width: 60px;
    height: 60px;
}

.occlivo-logo__ring {
    transition: stroke-dasharray 0.6s cubic-bezier(0.4, 0, 0.2, 1), stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.occlivo-card:hover .occlivo-logo__ring {
    stroke-dasharray: 1020 268;
    stroke-dashoffset: 304;
}

.occlivo-logo__dot {
    transform-origin: 227px 238px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.occlivo-card:hover .occlivo-logo__dot {
    transform: rotate(-15deg);
}

.occlivo-card__name {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.occlivo-card__name span {
    color: #3b82f6;
}

.occlivo-card__desc {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}

.occlivo-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #2cc7c0;
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(44, 199, 192, 0.25);
    transition: var(--transition);
}

.occlivo-card:hover .occlivo-card__cta {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(44, 199, 192, 0.35);
}

@media (max-width: 480px) {
    .occlivo-card {
        min-height: 220px;
    }

    .occlivo-card__name {
        font-size: 1.4rem;
    }
}

/* ===== TRINOVA CARD ===== */
.portfolio__item--trinova {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.trinova-card {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    min-height: 280px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: #4a4b4c;
    cursor: pointer;
    transition: var(--transition);
    background: #ffffff;
    border: 1px solid var(--color-border);
}

.trinova-card:hover {
    border-color: #6fcfeb;
    box-shadow: 0 0 40px rgba(111, 207, 235, 0.12), inset 0 0 60px rgba(111, 207, 235, 0.04);
}

.trinova-card__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
}

.trinova-card__logo {
    margin-bottom: 0.25rem;
}

.trinova-card__img {
    width: 180px;
    height: auto;
    filter: brightness(0.4);
}

.trinova-card__tagline {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #4a4b4c;
    margin-bottom: 1.5rem;
}

.trinova-card__dots {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
}

.trinova-card__dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6fcfeb;
    opacity: 0.4;
    will-change: transform, opacity;
    -webkit-animation: trinova-dot-bounce 0.6s ease-in-out infinite;
    animation: trinova-dot-bounce 0.6s ease-in-out infinite;
}

.trinova-card__dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.trinova-card__dots span:nth-child(3) {
    animation-delay: 0.3s;
}

@-webkit-keyframes trinova-dot-bounce {
    0%, 100% { opacity: 0.4; -webkit-transform: translateY(0); transform: translateY(0); }
    50% { opacity: 1; -webkit-transform: translateY(-6px); transform: translateY(-6px); }
}

@keyframes trinova-dot-bounce {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-6px); }
}

.trinova-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #6fcfeb;
    color: #1f2224;
    box-shadow: 0 8px 20px rgba(111, 207, 235, 0.25);
    transition: var(--transition);
}

.trinova-card:hover .trinova-card__cta {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(111, 207, 235, 0.35);
}

@media (max-width: 480px) {
    .trinova-card {
        min-height: 220px;
    }

    .trinova-card__img {
        width: 140px;
    }

    .trinova-card__content {
        padding: 1.5rem 1rem;
    }
}

/* ===== CONTACT ===== */
.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: stretch;
}

/* La columna de info distribuye su contenido en toda la altura del formulario */
.contact__info {
    display: flex;
    flex-direction: column;
}

.contact__text {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 440px;
}

.contact__details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Cada dato de contacto es ahora una tarjeta con icono en recuadro */
.contact__detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    text-decoration: none;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

a.contact__detail:hover {
    border-color: rgba(6, 182, 212, 0.5);
    transform: translateY(-2px);
}

.contact__detail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(6, 182, 212, 0.12));
    color: var(--color-primary-light);
}

.contact__detail-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.contact__detail-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.contact__detail-value {
    font-size: 0.95rem;
    color: var(--color-text);
    word-break: break-word;
}

/* Nota de respuesta rapida al pie de la columna izquierda */
.contact__note {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 1.75rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.contact__note-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
    flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form__input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    transition: var(--transition);
}

.form__input::placeholder {
    color: var(--color-text-muted);
}

.form__input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form__input.error {
    border-color: #ef4444;
}

.form__select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

/* Honeypot - hidden from users */
.form__honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* Form feedback messages */
.form__feedback {
    font-size: 0.9rem;
    padding: 0;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.form__feedback.success {
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.form__feedback.error {
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: 4rem 0 2rem;
    position: relative;
    z-index: 1;
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__text {
    color: var(--color-text-muted);
    margin-top: 1rem;
    font-size: 0.95rem;
    max-width: 300px;
}

.footer__links h4,
.footer__social h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer__links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__links a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer__links a:hover {
    color: var(--color-primary-light);
}

.social__links {
    display: flex;
    gap: 0.75rem;
}

.social__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: var(--transition);
}

.social__link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer__bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    text-align: center;
}

.footer__bottom p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + 2rem);
        padding-bottom: 2rem;
    }

    .hero__visual {
        display: none !important;
    }

    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__description {
        max-width: 100%;
    }

    .hero__buttons {
        justify-content: center;
    }

    .about__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about__highlights {
        justify-content: center;
    }

    .about__visual {
        order: -1;
    }

    .about__image-placeholder {
        max-width: 280px;
    }

    .contact__grid {
        grid-template-columns: 1fr;
    }

    .footer__content {
        grid-template-columns: 1fr 1fr;
    }
}

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

    /* PCB background mobile - hidden */
    .services__pcb-wrapper {
        display: none;
    }

    .services__pcb {
        display: none;
    }

    /* Mobile Navigation */
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: var(--color-bg-alt);
        border-left: 1px solid var(--color-border);
        padding: 5rem 2rem 2rem;
        transition: var(--transition);
        z-index: 1001;
    }

    .nav__menu.show {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 1.5rem;
    }

    .nav__link {
        font-size: 1.1rem;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        font-size: 2rem;
        color: var(--color-text);
        background: none;
        cursor: pointer;
        border: none;
    }

    .lang-switcher {
        order: 2;
        margin-left: auto;
    }

    .nav__toggle {
        order: 3;
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        cursor: pointer;
        border: none;
    }

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

    .hero__shape--1 {
        width: 180px;
        height: 180px;
    }

    .hero__shape--2 {
        width: 110px;
        height: 110px;
    }

    .hero__shape--3 {
        width: 80px;
        height: 80px;
    }

    .about__highlights {
        gap: 1rem;
    }

    .footer__content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .portfolio__grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Portfolio dedicated cards need full width on tablet */
    .portfolio__item--occlivo,
    .portfolio__item--trinova {
        grid-column: span 2;
    }

    .occlivo-card,
    .trinova-card {
        aspect-ratio: 16/9;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }

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

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

    .services__grid {
        grid-template-columns: 1fr;
    }

    .portfolio__grid {
        grid-template-columns: 1fr;
    }

    .portfolio__item--occlivo,
    .portfolio__item--trinova {
        grid-column: span 1;
    }

    .occlivo-card,
    .trinova-card {
        aspect-ratio: 4/3;
    }

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

    .highlight {
        width: 100%;
    }
}

/* ===== WHATSAPP FLOAT ===== */
.wa-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #ffffff;
    display: grid;
    place-items: center;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    z-index: 90;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.wa-float svg {
    width: 28px;
    height: 28px;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
