/* =====================================================
   VIIA GROUP — Integraciones y Servicios
   Dirección de arte: especificación técnica industrial.
   Grafito profundo + rojo señal (identidad del logo)
   + ámbar gas como acento de línea.
   Tipografía: Barlow Condensed / Barlow / IBM Plex Mono
   ===================================================== */

:root {
    /* Base */
    --bg: #12151B;
    --bg-raised: #171B23;
    --bg-plate: #1C212B;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);

    /* Señalización industrial */
    --red: #E64A4A;
    --red-bright: #FF6B5B;
    --red-rgb: 230, 74, 74;
    --gas: #F2B33D;
    --aut: #5B9BD5;
    --con: #9AA3B2;

    /* Texto */
    --text: #F2F1EE;
    --text-2: #B9BEC7;
    --text-3: #838A96;

    /* Tipografía */
    --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --font-body: 'Barlow', 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Consolas', monospace;

    --container-max: 1200px;
    --section-pad: clamp(72px, 10vw, 128px);
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    scroll-padding-top: 90px;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-2);
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

::selection {
    background: var(--red);
    color: #fff;
}

/* =====================================================
   ELEMENTOS DE ESPECIFICACIÓN (sistema recurrente)
   ===================================================== */
.spec-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red-bright);
    margin-bottom: 20px;
}

.spec-eyebrow::before {
    content: "// ";
    color: var(--text-3);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(34px, 4.6vw, 54px);
    line-height: 1.04;
    letter-spacing: 0.005em;
    text-transform: uppercase;
    color: var(--text);
}

.section-subtitle {
    max-width: 560px;
    margin-top: 18px;
    font-size: 17px;
    color: var(--text-2);
}

.section-header {
    margin-bottom: clamp(40px, 6vw, 72px);
}

/* =====================================================
   BOTONES
   ===================================================== */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 14px 26px;
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
    background: var(--red);
    color: #fff;
}

.btn-primary:hover {
    background: var(--red-bright);
    transform: translateY(-2px);
}

.btn-secondary {
    border-color: var(--line-strong);
    color: var(--text);
    background: transparent;
}

.btn-secondary:hover {
    border-color: var(--red);
    color: var(--red-bright);
}

.btn-large {
    font-size: 21px;
    padding: 17px 32px;
}

.btn-icon,
.icon-wa {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.navbar.scrolled {
    background: rgba(18, 21, 27, 0.92);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--line);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.navbar-logo .logo-img {
    height: 34px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-2);
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
}

.btn-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--red);
    color: #fff;
    padding: 9px 18px;
}

.btn-nav-cta:hover {
    background: var(--red-bright);
    color: #fff;
}

.btn-nav-cta .icon-wa {
    width: 16px;
    height: 16px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
    position: relative;
    padding: 170px 0 90px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

/* retícula de plano técnico */
.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 90% 80% at 60% 0%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 60% 0%, black 30%, transparent 75%);
    opacity: 0.55;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 5.6vw, 68px);
    line-height: 1.02;
    text-transform: uppercase;
    color: var(--text);
}

.hero-title-accent {
    color: var(--red-bright);
}

/* ---- Rotador de rubros en el titular ---- */
.hero-rotator {
    position: relative;
    display: block;
    height: 1.06em;
    overflow: hidden;
}

.rotator-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(0.55em);
    transition: opacity 0.55s ease, transform 0.55s ease;
    will-change: opacity, transform;
}

.rotator-item.is-active {
    opacity: 1;
    transform: translateY(0);
}

.rotator-item.is-leaving {
    opacity: 0;
    transform: translateY(-0.55em);
}

.rotator-item[data-line="aut"] { color: var(--aut); }
.rotator-item[data-line="sci"] { color: var(--red-bright); }
.rotator-item[data-line="gas"] { color: var(--gas); }
.rotator-item[data-line="con"] { color: var(--con); }

.hero-subtitle {
    max-width: 560px;
    margin-top: 22px;
    font-size: 18px;
    color: var(--text-2);
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

/* franja de especificaciones */
.hero-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 52px;
    border-top: 1px solid var(--line);
}

.spec-item {
    flex: 1 1 120px;
    padding: 20px 18px 0 0;
}

.spec-item+.spec-item {
    border-left: 1px solid var(--line);
    padding-left: 18px;
}

.spec-value {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    white-space: nowrap;
}

.spec-label {
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-top: 8px;
}

/* visual del hero: equipo con placa de identificación */
.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-figure {
    position: relative;
    max-width: 460px;
}

.hero-figure::before {
    content: "";
    position: absolute;
    inset: -24px;
    border: 1px solid var(--line-strong);
    pointer-events: none;
}

/* marcas de registro en las esquinas */
.hero-figure::after {
    content: "";
    position: absolute;
    top: -29px;
    left: -29px;
    width: 11px;
    height: 11px;
    border-top: 2px solid var(--red);
    border-left: 2px solid var(--red);
}

/* ---- Showcase cinematográfico de rubros ---- */
:root {
    --slide-ms: 5200ms;
}

.hero-slides {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    background: var(--bg-plate);
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.9s ease;
    filter: saturate(0.95);
}

.hero-slide.is-active {
    opacity: 1;
    animation: kenburns var(--slide-ms) linear forwards;
}

@keyframes kenburns {
    from {
        transform: scale(1.03) translateX(0);
    }

    to {
        transform: scale(1.12) translateX(-1.5%);
    }
}

.hero-slide-contain {
    object-fit: contain;
    padding: 26px;
}

/* pestañas de rubro con progreso */
.hero-tabs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.hero-tab {
    position: relative;
    flex: 1;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    padding: 8px 0 10px;
    background: transparent;
    color: var(--text-3);
    border: none;
    border-top: 2px solid var(--line-strong);
    cursor: pointer;
    transition: color 0.2s ease;
}

.hero-tab:hover {
    color: var(--text);
}

.hero-tab::after {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--text-3);
}

.hero-tab.is-active {
    color: var(--text);
}

.hero-tab.is-active::after {
    animation: tabprogress var(--slide-ms) linear forwards;
}

.hero-tab[data-line="aut"].is-active { color: var(--aut); }
.hero-tab[data-line="sci"].is-active { color: var(--red-bright); }
.hero-tab[data-line="gas"].is-active { color: var(--gas); }
.hero-tab[data-line="con"].is-active { color: var(--con); }

.hero-tab[data-line="aut"].is-active::after { background: var(--aut); }
.hero-tab[data-line="sci"].is-active::after { background: var(--red-bright); }
.hero-tab[data-line="gas"].is-active::after { background: var(--gas); }
.hero-tab[data-line="con"].is-active::after { background: var(--con); }

@keyframes tabprogress {
    from { width: 0; }
    to { width: 100%; }
}

/* la placa cambia de texto con un parpadeo suave */
.hero-figure-plate.is-switching .plate-line {
    opacity: 0.15;
}

.hero-figure-plate .plate-line {
    transition: opacity 0.3s ease;
}

.hero-figure-plate {
    margin-top: 26px;
    padding: 12px 16px;
    border: 1px solid var(--line-strong);
    background: var(--bg-raised);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plate-line {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--text-2);
}

.plate-dim {
    color: var(--text-3);
}

/* =====================================================
   CLIENTES (marquee)
   ===================================================== */
.clients {
    padding: 44px 0;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.clients-label {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 26px;
}

.clients-marquee {
    position: relative;
    mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.clients-track {
    display: flex;
    align-items: center;
    gap: 24px;
    width: max-content;
    animation: marquee 48s linear infinite;
}

.clients-marquee:hover .clients-track {
    animation-play-state: paused;
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

.client-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    padding: 8px 22px;
    background: #FFFFFF;
    border: 1px solid var(--line-strong);
    flex-shrink: 0;
}

.client-chip img {
    height: 38px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

/* =====================================================
   SERVICIOS
   ===================================================== */
.services {
    padding: var(--section-pad) 0;
}

.service-list {
    display: flex;
    flex-direction: column;
}

.service-row {
    display: grid;
    grid-template-columns: 150px 1fr 320px;
    gap: clamp(24px, 4vw, 56px);
    padding: clamp(36px, 5vw, 56px) 0;
    border-top: 1px solid var(--line);
    align-items: start;
}

.service-row:last-child {
    border-bottom: 1px solid var(--line);
}

.service-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-code {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

.service-row[data-line="sci"] .service-code { color: var(--red-bright); }
.service-row[data-line="gas"] .service-code { color: var(--gas); }
.service-row[data-line="aut"] .service-code { color: var(--aut); }
.service-row[data-line="con"] .service-code { color: var(--con); }

.service-norm {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 5px 8px;
    border: 1px solid var(--line-strong);
    width: fit-content;
}

.service-title {
    font-family: var(--font-display);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.1;
    color: var(--text);
}

.service-description {
    margin-top: 14px;
    max-width: 520px;
}

.service-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.service-capabilities li {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-2);
    padding: 6px 12px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
}

.service-visual {
    justify-self: end;
    width: 100%;
    max-width: 320px;
}

.service-visual img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--line-strong);
    filter: saturate(0.92);
    transition: filter 0.25s ease;
}

.service-row:hover .service-visual img {
    filter: saturate(1.05);
}

/* rotador de fotos por línea de servicio */
.visual-rotator {
    position: relative;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line-strong);
    background: var(--bg-raised);
    overflow: hidden;
}

.visual-rotator img {
    position: absolute;
    inset: 0;
    height: 100%;
    border: none;
    opacity: 0;
    transition: opacity 0.8s ease, filter 0.25s ease;
}

.visual-rotator img.is-active {
    opacity: 1;
}

/* renders con transparencia (rociador) */
.visual-rotator img.img-contain {
    object-fit: contain;
    padding: 18px;
}

/* =====================================================
   PROCESO
   ===================================================== */
.process {
    padding: var(--section-pad) 0;
    background: var(--bg-raised);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    counter-reset: step;
}

.process-step {
    padding: 26px 22px 8px 0;
    border-top: 2px solid var(--line-strong);
    margin-right: 22px;
    position: relative;
}

.process-step::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 34px;
    height: 2px;
    background: var(--red);
}

.step-number {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--red-bright);
    letter-spacing: 0.1em;
}

.step-title {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text);
    margin: 10px 0 8px;
    line-height: 1.12;
}

.step-text {
    font-size: 15px;
    color: var(--text-2);
}

/* =====================================================
   OBRA REALIZADA
   ===================================================== */
.fieldwork {
    padding: var(--section-pad) 0;
}

.fieldwork-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.fieldwork-wide {
    grid-column: span 2;
}

.fieldwork-item {
    position: relative;
    border: 1px solid var(--line-strong);
    background: var(--bg-raised);
}

.fieldwork-item .visual-rotator {
    aspect-ratio: auto;
    height: 320px;
    border: none;
}

.fieldwork-item figcaption {
    padding: 14px 16px;
    font-size: 14.5px;
    color: var(--text-2);
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fieldwork-code {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    color: var(--red-bright);
}

/* =====================================================
   CERTIFICACIONES
   ===================================================== */
.certs {
    padding: var(--section-pad) 0;
    background: var(--bg-raised);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.cert-plate {
    padding: 22px 20px;
    background: var(--bg);
    border: 1px solid var(--line-strong);
    position: relative;
}

/* barreno de placa metálica */
.cert-plate::before,
.cert-plate::after {
    content: "";
    position: absolute;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: var(--bg-raised);
}

.cert-plate::before { left: 10px; }
.cert-plate::after { right: 10px; }

.cert-code {
    font-family: var(--font-display);
    font-size: 27px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text);
    letter-spacing: 0.03em;
}

.cert-name {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-3);
    line-height: 1.45;
}

/* =====================================================
   NOSOTROS
   ===================================================== */
.about {
    padding: var(--section-pad) 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: clamp(40px, 6vw, 88px);
    align-items: start;
}

.about-text {
    margin-top: 8px;
    max-width: 600px;
}

.about-text strong {
    color: var(--text);
    font-weight: 600;
}

.about-quote {
    margin-top: 34px;
    padding: 26px 28px;
    border-left: 3px solid var(--red);
    background: var(--bg-raised);
}

.about-quote p {
    font-size: 18px;
    color: var(--text);
    font-style: italic;
}

.about-quote footer {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
}

.quote-author {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text);
    letter-spacing: 0.04em;
}

.quote-role {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 3px;
}

.sectors-label {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 6px;
}

.sectors-list li {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sector-name {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text);
}

.sector-note {
    font-size: 14.5px;
    color: var(--text-3);
}

/* =====================================================
   CTA FINAL
   ===================================================== */
.cta-section {
    padding: var(--section-pad) 0;
    border-top: 1px solid var(--line);
    background:
        linear-gradient(rgba(var(--red-rgb), 0.06), transparent 60%),
        var(--bg-raised);
    text-align: center;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(34px, 4.6vw, 56px);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.05;
    color: var(--text);
}

.cta-section .spec-eyebrow {
    text-align: center;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 36px;
}

.cta-note {
    margin-top: 22px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: 0.06em;
    color: var(--text-3);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 40px;
}

.footer-logo .logo-img {
    height: 30px;
    width: auto;
}

.footer-tagline {
    margin-top: 18px;
    font-size: 14.5px;
    color: var(--text-3);
    max-width: 340px;
}

.footer-legal-line {
    margin-top: 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-3);
}

.footer-links-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 16px;
}

.footer-links li {
    margin-bottom: 10px;
    font-size: 15px;
    color: var(--text-3);
}

.footer-links a {
    color: var(--text-3);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--red-bright);
}

.footer-bottom {
    margin-top: 52px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-3);
}

/* =====================================================
   ASISTENTE VIRTUAL (widget de chat, estilo burbuja)
   ===================================================== */

/* Burbuja lanzadora — esquina inferior derecha, con luz "en línea" */
.vc-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 96;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    transition: background 0.2s ease, transform 0.2s ease;
}

.vc-launcher:hover {
    background: var(--red-bright);
    transform: scale(1.06);
}

.vc-launcher svg {
    width: 26px;
    height: 26px;
    position: absolute;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

/* dos iconos superpuestos: chat (cerrado) / flecha (abierto) */
.vc-launcher .vc-ico-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}

.vc-launcher.vc-open .vc-ico-chat {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}

.vc-launcher.vc-open .vc-ico-close {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* luz verde "en línea" con pulso */
.vc-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #4CC38A;
    border: 2px solid var(--bg);
}

.vc-dot::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid #4CC38A;
    animation: vcpulse 2s ease-out infinite;
}

@keyframes vcpulse {
    0%   { transform: scale(1); opacity: 0.8; }
    70%  { transform: scale(2.1); opacity: 0; }
    100% { transform: scale(2.1); opacity: 0; }
}

/* Panel — globo anclado a la burbuja */
.vc-panel {
    position: fixed;
    right: 22px;
    bottom: 94px;
    z-index: 95;
    width: min(380px, calc(100vw - 32px));
    height: min(560px, calc(100vh - 130px));
    display: flex;
    flex-direction: column;
    background: var(--bg-raised);
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    transform-origin: bottom right;
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.vc-panel.vc-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

.vc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-plate);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.vc-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vc-title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
}

.vc-status {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4CC38A;
}

.vc-status::before {
    content: "● ";
}

.vc-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-3);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.vc-close:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
}

.vc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.vc-messages::-webkit-scrollbar {
    width: 6px;
}

.vc-messages::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 3px;
}

.vc-messages::-webkit-scrollbar-track {
    background: transparent;
}

.vc-msg {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text);
    white-space: pre-wrap;
    border-radius: 12px;
}

.vc-msg-assistant {
    align-self: flex-start;
    background: var(--bg-plate);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}

.vc-msg-user {
    align-self: flex-end;
    background: var(--red);
    border-bottom-right-radius: 4px;
}

.vc-typing {
    color: var(--text-3);
    animation: vcblink 1.1s ease infinite;
}

@keyframes vcblink {
    50% { opacity: 0.35; }
}

.vc-wa {
    align-self: flex-start;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    color: #4CC38A;
    border: 1px solid rgba(76, 195, 138, 0.4);
    border-radius: 999px;
    padding: 7px 14px;
    transition: background 0.2s ease;
}

.vc-wa:hover {
    background: rgba(76, 195, 138, 0.12);
}

.vc-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 10px;
    flex-shrink: 0;
}

.vc-quick button {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-2);
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.vc-quick button:hover {
    color: var(--red-bright);
    border-color: var(--red);
}

.vc-form {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    background: var(--bg-plate);
    flex-shrink: 0;
}

.vc-form input {
    flex: 1;
    min-width: 0;
    background: var(--bg);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14.5px;
    padding: 10px 12px;
    outline: none;
}

.vc-form input:focus {
    border-color: var(--red);
}

.vc-form button {
    flex-shrink: 0;
    background: var(--red);
    border: none;
    border-radius: 10px;
    color: #fff;
    width: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.vc-form button:hover {
    background: var(--red-bright);
}

.vc-form button svg {
    width: 17px;
    height: 17px;
}

@media (max-width: 480px) {
    .vc-panel {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 88px;
        height: min(560px, calc(100dvh - 110px));
    }

    .vc-launcher {
        right: 16px;
        bottom: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vc-dot::after {
        animation: none;
    }

    .vc-panel {
        transition: none;
    }
}

/* =====================================================
   ANIMACIONES
   ===================================================== */
.animate-on-load {
    opacity: 0;
    transform: translateY(18px);
    animation: rise 0.7s ease forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .animate-on-load,
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        animation: none;
        transition: none;
    }

    .clients-track {
        animation: none;
    }

    .hero-slide.is-active,
    .hero-tab.is-active::after {
        animation: none;
    }

    .hero-tab.is-active::after {
        width: 100%;
    }

    html {
        scroll-behavior: auto;
    }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
    }

    .hero-figure {
        max-width: 300px;
    }

    .service-row {
        grid-template-columns: 110px 1fr;
    }

    .service-visual {
        grid-column: 2;
        justify-self: start;
        max-width: 420px;
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px 0;
    }

    .certs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        inset: 76px 0 auto 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        padding: 12px 24px 24px;
        transform: translateY(-130%);
        transition: transform 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 14px 0;
        font-size: 21px;
    }

    .btn-nav-cta {
        margin-top: 10px;
        justify-content: center;
        width: 100%;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero {
        padding-top: 130px;
    }

    .service-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-meta {
        flex-direction: row;
        align-items: center;
        gap: 14px;
    }

    .service-visual {
        grid-column: 1;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .process-step {
        margin-right: 0;
    }

    .fieldwork-grid {
        grid-template-columns: 1fr;
    }

    .fieldwork-wide {
        grid-column: span 1;
    }

    .fieldwork-item .visual-rotator {
        height: 240px;
    }

    .certs-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero-specs {
        flex-direction: column;
    }

    .spec-item {
        flex: 0 0 auto;
    }

    .spec-item+.spec-item {
        border-left: none;
        border-top: 1px solid var(--line);
        padding-left: 0;
        margin-top: 16px;
    }
}
