/* ============================================
   EVIMEDIC GALEN AI — estilos específicos de página
   (el reset, header, footer, nav, botones y .container los aporta el
   styles.css global, que se carga ANTES que este archivo)
   ============================================ */

:root {
    --color-primary: #00556d;
    --color-primary-dark: #003d4f;
    --color-secondary: #36848b;
    --color-surface-alt: #f4f8f8;
    --color-accent-green: #2a9d8f;
    --color-text: #1a2a2e;
    --color-text-secondary: #5a6b6e;
    --color-text-muted: #8a9a9d;
    --color-border: #d4e0e1;
    --color-border-light: #e8eff0;
    --font-heading: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition-base: 0.3s ease;
    --section-padding: 128px;
}


/* ============================================
   CABECERAS DE SECCIÓN Y FLUJO
   (utilidades de la plantilla que el resto de subpáginas también
   duplican en su propio CSS: cada página carga solo el suyo)
   ============================================ */

.section-copy {
    max-width: 760px;
    margin: 0 auto 56px;
    text-align: center;
}

.section-title {
    margin: 22px 0 18px;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.section-subtitle {
    max-width: 700px;
    margin: 0 auto;
    color: var(--color-text-secondary);
    font-size: 18px;
    line-height: 1.7;
}

.flow-section {
    padding: var(--section-padding) 0;
    background: transparent;
}

.flow-timeline {
    position: relative;
    margin-top: 18px;
    padding-top: 18px;
}

.flow-timeline__track {
    position: absolute;
    top: 44px;
    left: 8.5%;
    right: 8.5%;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(185, 210, 212, 0.5) 0%, rgba(185, 210, 212, 0.22) 100%);
    overflow: hidden;
}

.flow-timeline__progress {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    box-shadow:
        0 0 0 1px rgba(54, 132, 139, 0.08),
        0 0 18px rgba(54, 132, 139, 0.28);
    transition: width 0.18s ease-out, height 0.18s ease-out;
}

.flow-line {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.flow-step {
    position: relative;
    padding: 22px 18px;
    border: 1px solid var(--color-border-light);
    border-radius: 20px;
    background: rgba(247, 251, 251, 0.72);
    box-shadow: 0 6px 16px rgba(0, 61, 79, 0.03);
    text-align: center;
    opacity: 0.72;
    transition: border-color var(--transition-base), background var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base), opacity var(--transition-base);
}

.flow-step__dot {
    position: relative;
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: rgba(185, 210, 212, 0.95);
    box-shadow: none;
    transition: background var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.flow-step strong {
    color: rgba(0, 85, 109, 0.68);
    font-family: var(--font-heading);
    font-size: 15px;
    line-height: 1.45;
    transition: color var(--transition-base);
}

.flow-step.is-active {
    border-color: rgba(54, 132, 139, 0.3);
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 14px 30px rgba(0, 61, 79, 0.08),
        0 0 0 1px rgba(54, 132, 139, 0.06);
    opacity: 1;
    transform: translateY(-3px);
}

.flow-step.is-active .flow-step__dot {
    background: var(--color-primary);
    box-shadow: none;
    transform: scale(1.08);
}

.flow-step.is-active strong {
    color: var(--color-primary-dark);
}

.btn-play {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-primary);
    position: relative;
}

.btn-play::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 6px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid #fff;
}

.galen-hero {
    position: relative;
    overflow: hidden;
    padding: 118px 0 76px;
    background: transparent;
}

.galen-hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 36px;
}

.galen-hero__content {
    max-width: 610px;
}

.galen-hero__content .eyebrow {
    display: flex;
    width: min(100%, 440px);
    margin-inline: auto;
    justify-content: center;
    white-space: nowrap;
}

.galen-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(40px, 4.15vw, 60px);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-primary);
    margin: 24px 0 18px;
}

.galen-title-line {
    display: block;
}

@media (min-width: 769px) {
    .galen-title-line {
        white-space: nowrap;
    }
}

.galen-hero__subtitle {
    max-width: 560px;
    color: var(--color-text-secondary);
    font-size: 18px;
    line-height: 1.75;
}

.galen-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}

.galen-hero__visual {
    min-height: 520px;
    display: grid;
    place-items: center;
}

.galen-orbit {
    position: relative;
    width: min(570px, 100%);
    aspect-ratio: 1;
}

.galen-orbit__ring {
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    border: 1px solid rgba(54, 132, 139, 0.32);
    opacity: 0;
    transform-origin: center;
    animation: galenOrbitRipple 6.6s cubic-bezier(0.23, 1, 0.32, 1) infinite;
    pointer-events: none;
}

.galen-orbit__ring--outer {
    inset: 6%;
    border-style: dashed;
    animation-delay: -4.4s;
}

.galen-orbit__ring--middle {
    inset: 17%;
    animation-delay: -2.2s;
}

.galen-orbit__ring--inner {
    inset: 29%;
    animation-delay: 0s;
}

.galen-orbit__nodes {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.42;
    animation: galenNodeOrbit 38s linear infinite;
    pointer-events: none;
}

.galen-orbit__node {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(25, 119, 132, 0.72);
    box-shadow:
        0 0 0 5px rgba(54, 132, 139, 0.055),
        0 0 18px rgba(54, 132, 139, 0.12);
}

.galen-orbit__node--one { left: 50%; top: 6%; }

.galen-orbit__node--two { right: 13%; top: 26%; }

.galen-orbit__node--three { right: 25%; bottom: 12%; }

.galen-orbit__node--four { left: 16%; bottom: 27%; }

.galen-orbit__node--five { left: 20%; top: 25%; }

/* Blob con alfa real en el centro del orbe: sin máscaras, el propio vídeo
   trae la transparencia. El blob ocupa la misma fracción de frame que en el
   mp4 antiguo (~60%), así que las medidas no cambian entre fuentes. */
.galen-core-video {
    position: absolute;
    left: 50%;
    top: 50%;
    /* Bajo las tarjetas: el halo del vídeo no debe pasar por encima de ellas */
    z-index: 0;
    width: 58%;
    max-width: 340px;
    height: auto;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Reserva mp4 (fondo horneado): la máscara de siempre disimula su cuadrado */
.galen-core-video--baked {
    -webkit-mask-image: radial-gradient(circle, #000 44%, transparent 62%);
    mask-image: radial-gradient(circle, #000 44%, transparent 62%);
}

.galen-core-video--traveller {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 40;
    max-width: none;
    height: auto;
    transform: translate3d(0, 0, 0);
    filter:
        drop-shadow(0 8px 10px rgba(0, 54, 70, 0.16))
        drop-shadow(4px 2px 14px rgba(20, 145, 156, 0.12));
    animation: galenOrbShadow 3.4s ease-in-out infinite;
    animation-play-state: paused;
    transform-origin: center center;
    will-change: transform;
}

.galen-core-video--traveller.is-render-active {
    animation-play-state: running;
}

/* El recorte cerrado del atraque solo tiene sentido con el mp4 horneado */
.galen-core-video--traveller.is-docked.galen-core-video--baked {
    -webkit-mask-image: radial-gradient(circle, #000 31%, transparent 41%);
    mask-image: radial-gradient(circle, #000 31%, transparent 41%);
}

/* Orbe exclusivo de móvil: en escritorio no existe */
.galen-core-video-mobile {
    display: none;
}

/* Reserva mp4 del orbe móvil: misma máscara que disimula el fondo horneado */
.galen-core-video-mobile.galen-core-video--baked {
    -webkit-mask-image: radial-gradient(circle, #000 44%, transparent 62%);
    mask-image: radial-gradient(circle, #000 44%, transparent 62%);
}

/* En móvil la pelota viajera no se muestra */
@media (max-width: 768px) {
    .galen-core-video--traveller {
        display: none;
    }
}

@keyframes galenOrbShadow {
    0%,
    100% {
        filter:
            drop-shadow(0 7px 9px rgba(0, 54, 70, 0.15))
            drop-shadow(4px 2px 12px rgba(20, 145, 156, 0.1));
    }

    50% {
        filter:
            drop-shadow(-2px 11px 12px rgba(0, 54, 70, 0.2))
            drop-shadow(-3px 4px 17px rgba(20, 145, 156, 0.15));
    }
}

.galen-float {
    position: absolute;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 214px;
    min-height: 76px;
    padding: 13px 15px;
    overflow: hidden;
    border: 1px solid rgba(170, 205, 209, 0.46);
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(234, 244, 245, 0.78));
    box-shadow:
        0 22px 54px rgba(0, 61, 79, 0.12),
        0 5px 14px rgba(0, 61, 79, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(18px) saturate(1.18);
    backdrop-filter: blur(18px) saturate(1.18);
    animation: cardFloat 6.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.galen-orbit__ring,
.galen-orbit__nodes,
.galen-float {
    animation-play-state: paused;
}

.galen-orbit.is-render-active .galen-orbit__ring,
.galen-orbit.is-render-active .galen-orbit__nodes,
.galen-orbit.is-render-active .galen-float {
    animation-play-state: running;
}

.galen-float::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -70% auto auto -18%;
    width: 130px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(80, 191, 190, 0.16), transparent 68%);
    pointer-events: none;
}

.galen-float::after {
    content: "";
    position: absolute;
    top: 0;
    right: 18px;
    left: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.96), transparent);
    pointer-events: none;
}

.galen-float strong {
    min-width: 0;
    font-family: var(--font-heading);
    font-size: 14px;
    line-height: 1.28;
    font-weight: 700;
    letter-spacing: -0.012em;
    color: #073d4d;
    overflow-wrap: break-word;
}

.galen-float--top { left: 50%; top: 2%; transform: translateX(-50%); }

.galen-float--left { left: 0; top: 31%; animation-delay: -1.2s; }

.galen-float--right { right: -2%; top: 32%; animation-delay: -2s; }

.galen-float--bottom-left { left: 8%; bottom: 12%; animation-delay: -3s; }

.galen-float--bottom-right { right: 7%; bottom: 12%; animation-delay: -4s; }

.galen-icon {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--color-primary);
}

.galen-icon--green {
    background: transparent;
    color: var(--color-accent-green);
}

.galen-icon--blue {
    background: transparent;
    color: #2f77c4;
}

.galen-icon--dark {
    background: transparent;
    color: var(--color-primary-dark);
}

.galen-comparison,
.galen-assistant {
    padding: 96px 0;
    background: transparent;
}

.comparison-board {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px;
    overflow: hidden;
    border: 1px solid rgba(0, 85, 109, 0.11);
    border-radius: 34px;
    background:
        linear-gradient(145deg, rgba(235, 241, 242, 0.96), rgba(249, 251, 251, 0.98));
    box-shadow:
        0 28px 72px rgba(0, 56, 71, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

/* Sin card: el contenido va directo sobre el fondo de la sección */
.comparison-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 38px 36px 36px;
    overflow: hidden;
    border: 1px solid rgba(0, 85, 109, 0.1);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(247, 249, 249, 0.98), rgba(231, 237, 238, 0.92));
}

/* La columna de la izquierda pierde color a propósito: se lee como la opción
   peor incluso sin la card */
.comparison-card--muted {
    border-color: transparent;
    background: transparent;
    color: #698087;
    box-shadow: none;
}

/* Galen conserva el fondo azul del sistema; la trama vive en una capa
   independiente para no interferir con el contenido ni con la cascada. */
.comparison-card:not(.comparison-card--muted) {
    z-index: 2;
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #003d4f 0%, #005b73 52%, #217985 100%);
    box-shadow:
        0 24px 52px rgba(0, 62, 78, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: #fff;
}

.comparison-card:not(.comparison-card--muted)::before {
    content: none;
}

.comparison-card:not(.comparison-card--muted)::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: linear-gradient(135deg, #000, transparent 78%);
            mask-image: linear-gradient(135deg, #000, transparent 78%);
    pointer-events: none;
}

.comparison-card > * {
    position: relative;
    z-index: 1;
}

.comparison-card h3 {
    margin-bottom: 9px;
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: clamp(25px, 2.3vw, 32px);
    line-height: 1.15;
}

.comparison-card p {
    max-width: 42ch;
    margin-bottom: 30px;
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.55;
}

.comparison-card--muted h3 {
    color: #56717a;
    font-size: clamp(21px, 2.1vw, 29px);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.comparison-card:not(.comparison-card--muted) h3 {
    color: #fff;
}

.galen-orb-travel-enabled .comparison-card:not(.comparison-card--muted) h3 {
    padding-right: 92px;
}

.galen-orb-dock {
    position: absolute;
    top: 0;
    right: 4px;
    width: clamp(56px, 5vw, 72px);
    height: clamp(56px, 5vw, 72px);
    pointer-events: none;
}

.comparison-card:not(.comparison-card--muted) p {
    color: rgba(255, 255, 255, 0.76);
}

.comparison-board--showcase {
    display: block;
    min-height: 760px;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    perspective: 1200px;
}

.comparison-board--showcase .comparison-card--galen {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 8;
    width: min(560px, calc(100% - 500px));
    min-height: 550px;
    transform: translate(-50%, -50%);
}

.comparison-satellite {
    position: absolute;
    z-index: 2;
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    column-gap: 11px;
    row-gap: 4px;
    width: 280px;
    min-height: 94px;
    padding: 17px 20px;
    overflow: hidden;
    border: 1px solid rgba(90, 116, 123, 0.19);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(248, 250, 250, 0.95), rgba(229, 235, 236, 0.86));
    box-shadow:
        0 16px 34px rgba(42, 65, 71, 0.11),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
    color: #75878c;
    pointer-events: none;
}

.comparison-satellite__dot {
    grid-row: 1 / 3;
    align-self: center;
    width: 10px;
    height: 10px;
    border: 1px solid rgba(105, 128, 135, 0.28);
    border-radius: 50%;
    background: rgba(125, 146, 151, 0.22);
}

.comparison-satellite__label {
    color: #7d8d91;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.055em;
    line-height: 1.2;
    text-transform: uppercase;
}

.comparison-satellite strong {
    color: #526a70;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
}

.comparison-satellite--1 {
    top: 24px;
    left: 42px;
    width: 238px;
    opacity: 0.68;
    transform: rotateY(12deg) rotate(-1.2deg) scale(0.9);
}

.comparison-satellite--2 {
    top: 145px;
    left: 0;
    width: 325px;
    min-height: 116px;
    opacity: 0.84;
    transform: rotateY(13deg) rotate(0.7deg) scale(0.94);
}

.comparison-satellite--3 {
    top: 292px;
    left: 68px;
    width: 212px;
    min-height: 82px;
    opacity: 0.6;
    transform: rotateY(16deg) rotate(-1deg) scale(0.86);
}

.comparison-satellite--4 {
    bottom: 212px;
    left: 10px;
    width: 305px;
    min-height: 108px;
    opacity: 0.8;
    transform: rotateY(13deg) rotate(-0.4deg) scale(0.92);
}

.comparison-satellite--5 {
    bottom: 54px;
    left: 58px;
    width: 252px;
    min-height: 86px;
    opacity: 0.66;
    transform: rotateY(15deg) rotate(1deg) scale(0.88);
}

.comparison-satellite--6 {
    top: 34px;
    right: 54px;
    width: 260px;
    min-height: 84px;
    opacity: 0.62;
    transform: rotateY(-14deg) rotate(1.1deg) scale(0.88);
}

.comparison-satellite--7 {
    top: 154px;
    right: -2px;
    width: 318px;
    min-height: 114px;
    opacity: 0.8;
    transform: rotateY(-12deg) rotate(-0.8deg) scale(0.93);
}

.comparison-satellite--8 {
    top: 304px;
    right: 72px;
    width: 208px;
    min-height: 80px;
    opacity: 0.58;
    transform: rotateY(-16deg) rotate(1.2deg) scale(0.85);
}

.comparison-satellite--9 {
    right: 10px;
    bottom: 218px;
    width: 310px;
    min-height: 110px;
    opacity: 0.78;
    transform: rotateY(-13deg) rotate(0.6deg) scale(0.92);
}

.comparison-satellite--10 {
    right: 64px;
    bottom: 54px;
    width: 248px;
    min-height: 88px;
    opacity: 0.64;
    transform: rotateY(-15deg) rotate(-1deg) scale(0.87);
}

.comparison-satellite--11 {
    top: 4px;
    left: 50%;
    width: 192px;
    min-height: 74px;
    opacity: 0.42;
    transform: translateX(-50%) rotate(-0.8deg) scale(0.82);
}

.comparison-satellite--12 {
    bottom: 2px;
    left: 50%;
    width: 218px;
    min-height: 76px;
    opacity: 0.46;
    transform: translateX(-50%) rotate(0.8deg) scale(0.84);
}

.comparison-mobile-lane {
    display: none;
}

.check-list {
    list-style: none;
    display: grid;
    gap: 11px;
    margin-top: auto;
}

.check-list li {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 11px 14px 11px 48px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.09);
    font-size: 15px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.94);
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 14px;
    top: calc(50% - 12px);
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dff4ef;
    color: #168c7d;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 5px 14px rgba(0, 35, 45, 0.13);
}

.galen-assistant {
    overflow: hidden;
}

/* Solo lectores de pantalla: sin esto, el aria-live del carrusel se pinta */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}

.galen-assistant .section-copy {
    margin-bottom: 0;
}

.mini-icon {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: rgba(54, 132, 139, 0.1);
    font-size: 11px;
    font-weight: 800;
    color: var(--color-primary);
}

.assistant-note {
    max-width: 780px;
    margin: 10px auto 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-text-secondary);
    text-align: center;
    font-size: 14px;
}

.assistant-note strong {
    color: var(--color-primary);
}

/* Carrusel Galen: una capacidad al frente, el resto en profundidad */
.assistant-carousel {
    --assistant-ease: cubic-bezier(0.23, 1, 0.32, 1);
    --assistant-controls-offset: -22px;
    --assistant-timer-progress: 0;
    position: relative;
    width: min(1120px, 100%);
    margin: 0 auto;
    isolation: isolate;
}

.assistant-carousel__stage {
    position: relative;
    height: 430px;
    perspective: 1300px;
    perspective-origin: 50% 44%;
}

.assistant-carousel__halo {
    position: absolute;
    z-index: -1;
    left: 50%;
    top: 45%;
    width: min(650px, 72vw);
    aspect-ratio: 1;
    border: 1px dashed rgba(54, 132, 139, 0.18);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.assistant-carousel__halo::before,
.assistant-carousel__halo::after {
    content: "";
    position: absolute;
    inset: 12%;
    border: 1.5px solid rgba(54, 132, 139, 0.3);
    border-radius: inherit;
    transform-origin: center;
    animation: assistant-ripple-out 4.8s linear infinite;
    animation-play-state: paused;
}

.assistant-carousel.is-render-active .assistant-carousel__halo::before,
.assistant-carousel.is-render-active .assistant-carousel__halo::after {
    animation-play-state: running;
}

.assistant-carousel__halo::after {
    inset: 12%;
    background: radial-gradient(circle, rgba(81, 192, 201, 0.12), transparent 68%);
    border-color: rgba(54, 132, 139, 0.24);
    animation-delay: -2.4s;
}

@keyframes assistant-ripple-out {
    0% {
        opacity: 0;
        transform: scale(0.22);
    }

    12% {
        opacity: 0.78;
    }

    72% {
        opacity: 0.3;
    }

    100% {
        opacity: 0;
        transform: scale(1.28);
    }
}

.assistant-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    width: min(390px, calc(100vw - 40px));
    height: 500px;
    margin: 0;
    transform:
        translate(-50%, -50%)
        translate3d(var(--assistant-x, 0), var(--assistant-y, 0), var(--assistant-z, 0))
        rotateY(var(--assistant-rotate, 0deg))
        scale(var(--assistant-scale, 1));
    transform-origin: center;
    opacity: var(--assistant-opacity, 0);
    filter: saturate(var(--assistant-saturation, 0.8));
    pointer-events: none;
    will-change: auto;
    transition:
        transform 720ms var(--assistant-ease),
        opacity 520ms ease,
        filter 520ms ease;
}

.assistant-slide.is-clickable,
.assistant-slide.is-active {
    pointer-events: none;
}

.assistant-slide.is-render-hidden {
    visibility: hidden;
    transition:
        transform 720ms var(--assistant-ease),
        opacity 520ms ease,
        filter 520ms ease,
        visibility 0s linear 720ms;
}

.assistant-slide.is-active {
    filter: saturate(1);
}

.assistant-slide.is-clickable .assistant-slide__shell {
    pointer-events: auto;
    cursor: pointer;
}

.assistant-slide.is-active .assistant-slide__shell {
    pointer-events: auto;
    cursor: default;
}

.assistant-slide__shell {
    position: relative;
    width: 100%;
    height: 178px;
    box-sizing: border-box;
    padding: 24px;
    overflow: hidden;
    border: 1px solid rgba(0, 85, 109, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 2px 4px rgba(0, 61, 79, 0.06),
        0 24px 64px rgba(0, 61, 79, 0.13);
    transition:
        height 620ms var(--assistant-ease),
        box-shadow 620ms var(--assistant-ease),
        border-color 620ms ease;
}

.assistant-slide.is-active .assistant-slide__shell {
    height: 350px;
    border-color: rgba(0, 85, 109, 0.2);
    box-shadow:
        0 2px 5px rgba(0, 61, 79, 0.08),
        0 34px 90px rgba(0, 61, 79, 0.19);
}

.assistant-slide.is-question .assistant-slide__shell {
    height: 350px;
}

.assistant-slide.is-answer .assistant-slide__shell {
    height: 350px;
}

.assistant-slide.is-result .assistant-slide__shell {
    height: 350px;
}

.assistant-slide__header {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 38px;
}

.assistant-slide__icon {
    display: grid;
    flex: 0 0 28px;
    order: 2;
    width: 28px;
    height: 28px;
    margin-left: auto;
    place-items: center;
    color: var(--color-primary);
    background: none;
}

.assistant-slide__icon svg,
.assistant-carousel__arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.assistant-slide__badge {
    position: absolute;
    top: -27px;
    left: -5px;
    right: auto;
    z-index: 0;
    display: block;
    width: auto;
    height: auto;
    color: rgba(0, 85, 109, 0.065);
    background: none;
    border-radius: 0;
    font-family: var(--font-heading);
    font-size: 152px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.07em;
    pointer-events: none;
}

.assistant-slide h3 {
    margin: 0;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 750;
    line-height: 1.12;
}

.assistant-slide__description {
    min-height: 42px;
    margin: 12px 0 18px;
    color: var(--color-text-secondary);
    font-size: 13.5px;
    line-height: 1.5;
}

.assistant-slide__header h3,
.assistant-slide__description {
    position: relative;
    z-index: 1;
}

.assistant-slide__header h3 {
    order: 1;
}

.assistant-conversation {
    display: grid;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 85, 109, 0.09);
}

.assistant-message {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    opacity: 0;
    transform: translateY(8px) scale(0.97);
    transition:
        opacity 360ms ease,
        transform 440ms var(--assistant-ease);
}

.assistant-message--user {
    width: 91%;
    margin-left: auto;
    padding: 10px 13px;
    border: 1px solid rgba(0, 85, 109, 0.09);
    border-radius: 18px 18px 5px 18px;
    color: var(--color-text-secondary);
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 61, 79, 0.08);
}

.assistant-avatar {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, var(--color-secondary), var(--color-primary));
    font-size: 10px;
    font-weight: 800;
}

.assistant-message p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
}

.assistant-message--galen {
    position: relative;
    width: 94%;
    padding: 10px 38px 10px 12px;
    border: 1px solid rgba(0, 85, 109, 0.1);
    border-radius: 6px 18px 18px 18px;
    background: linear-gradient(135deg, rgba(240, 248, 248, 0.98), rgba(255, 255, 255, 0.98));
    box-shadow: 0 9px 24px rgba(0, 61, 79, 0.08);
}

.assistant-message--galen p {
    display: grid;
    gap: 2px;
}

.assistant-message--galen strong {
    color: var(--color-primary);
    font-size: 11px;
}

.assistant-message--galen i {
    position: absolute;
    top: 50%;
    right: 12px;
    display: grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #29b99f;
    font-size: 11px;
    font-style: normal;
    transform: translateY(-50%);
}

.assistant-galen-mark {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    color: var(--color-secondary);
    background: rgba(54, 132, 139, 0.09);
    border-radius: 9px;
}

.assistant-galen-mark svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.assistant-result {
    display: grid;
    gap: 0;
    margin-top: 2px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 85, 109, 0.08);
    border-radius: 15px;
    background: var(--color-surface-alt);
    opacity: 0;
    transform: translateY(8px) scale(0.97);
    transition:
        opacity 380ms ease,
        transform 500ms var(--assistant-ease);
}

.assistant-result div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 30px;
    border-bottom: 1px solid rgba(0, 85, 109, 0.08);
    font-size: 12px;
}

.assistant-result div:last-child {
    border-bottom: 0;
}

.assistant-result span {
    color: var(--color-text-muted);
}

.assistant-result strong {
    color: var(--color-primary);
    text-align: right;
}

.assistant-slide.is-question .assistant-message--user,
.assistant-slide.is-answer .assistant-message,
.assistant-slide.is-result .assistant-message,
.assistant-slide.is-result .assistant-result {
    opacity: 1;
    transform: none;
}

.assistant-slide--invoice .assistant-message--galen {
    position: relative;
    z-index: 2;
}

.assistant-slide--invoice .assistant-slide__description {
    min-height: 0;
    margin-top: 8px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.assistant-slide--invoice .assistant-conversation {
    gap: 8px;
    padding-top: 10px;
}

.assistant-slide--invoice.is-result .assistant-result {
    z-index: 1;
    min-height: 0;
    margin-top: -14px;
    padding: 21px 12px 7px;
    border-radius: 0 0 14px 14px;
    background: rgba(239, 246, 246, 0.7);
    opacity: 0.56;
    box-shadow: none;
}

.assistant-slide--invoice .assistant-result div {
    min-height: 18px;
    font-size: 10.5px;
}

.assistant-slide--invoice .assistant-result strong {
    font-weight: 700;
}

.assistant-carousel__controls {
    position: relative;
    z-index: 30;
    display: grid;
    justify-items: center;
    gap: 10px;
    margin-top: var(--assistant-controls-offset);
}

.assistant-carousel__timer {
    width: min(210px, 52vw);
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0, 85, 109, 0.12);
}

.assistant-carousel__timer span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-primary), #45aeb5);
    transform: scaleX(var(--assistant-timer-progress));
    transform-origin: left center;
}

.assistant-carousel__navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.assistant-carousel__arrow {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(0, 85, 109, 0.16);
    border-radius: 50%;
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.86);
    cursor: pointer;
    transition:
        color 220ms ease,
        background 220ms ease,
        border-color 220ms ease,
        transform 220ms var(--assistant-ease);
}

.assistant-carousel__dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.assistant-carousel__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 85, 109, 0.2);
    cursor: pointer;
    transition:
        width 360ms var(--assistant-ease),
        background 240ms ease;
}

.assistant-carousel__dot.is-active {
    width: 28px;
    background: var(--color-primary);
}

.assistant-carousel [data-assistant-live] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (hover: hover) {
    .assistant-carousel__arrow:hover {
        color: #fff;
        border-color: var(--color-primary);
        background: var(--color-primary);
        transform: scale(1.05);
    }
}

.galen-workflow {
    padding: 84px 0;
    background: transparent;
}

.galen-timeline .flow-line {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.galen-timeline .flow-step {
    text-align: left;
    min-height: 330px;
    padding: 24px 22px 20px;
}

.galen-timeline .flow-step__dot {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-right: 12px;
    margin-bottom: 16px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
}

.galen-timeline .flow-step__dot::after {
    content: "";
    position: absolute;
    inset: -10px;
    border: 8px solid rgba(54, 132, 139, 0.18);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.55);
}

.galen-timeline.visible .flow-step.is-active .flow-step__dot::after {
    animation: galen-step-halo 900ms cubic-bezier(0.2, 0.75, 0.25, 1) 1 both;
}

@keyframes galen-step-halo {
    0% {
        opacity: 0;
        transform: scale(0.55);
    }

    24% {
        opacity: 0.85;
    }

    100% {
        opacity: 0;
        transform: scale(1.55);
    }
}

.galen-timeline .flow-step p {
    margin-top: 8px;
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.55;
}

.flow-microchat {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.flow-microchat__message {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 52px;
    padding: 9px 10px;
    border: 1px solid rgba(0, 85, 109, 0.1);
    opacity: 0.68;
    transform: translateY(5px) scale(0.98);
    transition:
        opacity 360ms cubic-bezier(0.23, 1, 0.32, 1),
        transform 480ms cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 360ms cubic-bezier(0.23, 1, 0.32, 1);
}

.flow-microchat__message--user {
    width: 94%;
    margin-left: auto;
    border-radius: 16px 16px 5px 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 20px rgba(0, 61, 79, 0.06);
}

.flow-microchat__message--galen {
    width: 97%;
    border-radius: 5px 16px 16px 16px;
    background: linear-gradient(135deg, rgba(237, 247, 247, 0.98), rgba(252, 254, 254, 0.98));
    box-shadow: 0 8px 20px rgba(0, 61, 79, 0.055);
}

.flow-microchat__message--result {
    border-color: rgba(42, 157, 143, 0.2);
    background: linear-gradient(135deg, rgba(233, 247, 244, 0.98), rgba(252, 254, 254, 0.98));
}

.flow-microchat__avatar,
.flow-microchat__galen {
    display: grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
}

.flow-microchat__avatar {
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, var(--color-secondary), var(--color-primary));
}

.flow-microchat__avatar svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.flow-microchat__galen {
    border-radius: 8px;
    color: var(--color-secondary);
    background: rgba(54, 132, 139, 0.1);
}

.flow-microchat__galen svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.flow-microchat__copy {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 2px;
    color: var(--color-text-secondary);
    font-size: 10.5px;
    line-height: 1.38;
}

.flow-microchat__copy strong {
    display: block;
    margin-bottom: 2px;
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-size: 10px;
    line-height: 1.2;
}

.flow-microchat__message--result .flow-microchat__copy {
    padding-right: 24px;
}

.flow-microchat__status {
    position: absolute;
    right: 9px;
    bottom: 9px;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #29b99f;
}

.flow-microchat__status svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.flow-step.is-active .flow-microchat__message {
    opacity: 1;
    transform: none;
    box-shadow: 0 10px 24px rgba(0, 61, 79, 0.075);
}

.galen-timeline .flow-timeline__track {
    left: 11%;
    right: 11%;
}

@media (min-width: 769px) {
    .galen-timeline .flow-timeline__track {
        top: 53px;
    }
}

.impact-section {
    padding: 112px 0;
    background: transparent;
}

.impact-section__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(360px, 0.82fr) minmax(0, 1.18fr);
    gap: 96px;
    align-items: start;
}

.impact-copy > .eyebrow {
    display: flex;
    width: min(100%, 390px);
    margin-inline: auto;
    justify-content: center;
}

.impact-title {
    font-family: var(--font-heading);
    font-size: clamp(42px, 4.15vw, 60px);
    line-height: 1.07;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #10243c;
    margin: 30px 0 26px;
}

.impact-title span {
    display: block;
    color: var(--color-primary);
}

.impact-title .impact-title__line {
    color: #10243c;
    white-space: nowrap;
}

.impact-title .impact-title__line--accent {
    color: var(--color-primary);
}

.impact-title .impact-title__accent {
    display: inline;
    color: var(--color-primary);
}

.impact-lead {
    max-width: 590px;
    color: var(--color-text-secondary);
    font-size: 20px;
    line-height: 1.75;
}

.impact-rule {
    display: block;
    width: 92px;
    height: 3px;
    margin: 38px 0 22px;
    border-radius: 999px;
    background: var(--color-primary);
}

.impact-proof {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 520px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.impact-proof__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 0;
    color: var(--color-primary);
    background: transparent;
}

.impact-proof__icon svg {
    width: 24px;
    height: 24px;
}

.impact-proof strong {
    display: inline;
    color: #10243c;
    font-weight: 700;
}

.impact-proof strong::first-letter {
    color: inherit;
}

.impact-proof strong {
    line-height: 1.55;
}

.impact-proof p {
    margin-top: 6px;
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.65;
}

.impact-proof strong b,
.impact-card__stat b {
    color: var(--color-primary);
}

.impact-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 56px;
    padding-top: 40px;
}

.impact-card {
    --impact-card-pad-x: 26px;
    --impact-card-pad-bottom: 24px;
    position: relative;
    overflow: visible;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 26px 26px 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    box-shadow: 0 18px 48px rgba(0, 61, 79, 0.08);
}

.impact-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 1.5px;
    border-radius: inherit;
    background: linear-gradient(
        to top right,
        rgba(0, 85, 109, 0.32) 0%,
        rgba(0, 85, 109, 0.2) 48%,
        rgba(0, 85, 109, 0.08) 72%,
        transparent 100%
    );
    pointer-events: none;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
}

/* Sin burbuja: el propio glifo va relleno del azul bgModoAzul y sus detalles
   interiores (check, líneas del folio…) quedan en blanco encima */
.impact-card__icon {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 4;
    display: block;
    width: 60px;
    height: 60px;
    margin: 0;
    color: #00556d;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    pointer-events: none;
    transform: translate(50%, -50%);
    filter: drop-shadow(0 6px 12px rgba(0, 61, 79, 0.22));
}

/* Trazo azul y el interior del glifo relleno de blanco (no transparente) */
.impact-card__icon svg {
    display: block;
    width: 64%;
    height: 64%;
    margin: 18%;
    fill: #fff;
    stroke: currentColor;
    stroke-width: 1.6;
}

.impact-card h3 {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading);
    font-size: 28px;
    line-height: 1.16;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #10243c;
    margin-bottom: 16px;
}

.impact-card > p {
    position: relative;
    z-index: 1;
    color: var(--color-text-secondary);
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 28px;
}

.impact-card__stat {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: 82px;
    flex: 0 0 82px;
    gap: 14px;
    margin-top: auto;
    margin-right: calc(var(--impact-card-pad-x) * -1);
    margin-bottom: calc(var(--impact-card-pad-bottom) * -1);
    margin-left: calc(var(--impact-card-pad-x) * -1);
    padding: 10px var(--impact-card-pad-x) 10px 14px;
    border: 0;
    border-radius: 0 0 19px 19px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(135deg, #004f67 0%, #197c8a 100%);
    background-size: 22px 22px, 22px 22px, auto;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.35;
}

.impact-card__stat-number {
    align-self: stretch;
    flex: 0 0 78px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: clamp(32px, 2.6vw, 40px);
    font-weight: 750;
    line-height: 0.92;
    letter-spacing: -0.05em;
}

.impact-card__stat p strong {
    color: #fff;
    font-weight: 700;
}

.impact-card__stat p {
    flex: 1 1 auto;
    margin: 0;
}

.impact-footnote {
    grid-column: 1 / -1;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    max-width: min(940px, 100%);
    margin-top: -8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.impact-footnote span {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
}

@keyframes cardFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -6px; }
}

@keyframes galenOrbitRipple {
    0% {
        opacity: 0;
        transform: scale(0.78);
    }

    18% {
        opacity: 0.68;
    }

    72% {
        opacity: 0.24;
    }

    100% {
        opacity: 0;
        transform: scale(1.12);
    }
}

@keyframes galenNodeOrbit {
    to {
        transform: rotate(1turn);
    }
}

@media (max-width: 980px) {
.impact-section__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
.impact-section__inner {
        gap: 64px;
    }

.impact-title {
        font-size: clamp(40px, 4.7vw, 54px);
    }

.impact-card {
        padding: 30px 30px 26px;
    }

.impact-card h3 {
        font-size: 23px;
    }
}

@media (max-width: 1100px) {
.galen-hero__inner {
        grid-template-columns: 1fr;
    }

.galen-hero__content {
        max-width: 760px;
        text-align: center;
        margin: 0 auto;
    }

.galen-hero__subtitle {
        margin: 0 auto;
    }

.galen-hero__actions {
        justify-content: center;
    }

.impact-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

.comparison-board {
        grid-template-columns: 1fr;
        gap: 18px;
    }

.galen-timeline .flow-line {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 901px) and (max-width: 1100px) {
    .comparison-board {
        grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr);
        gap: 0;
    }

    .comparison-card {
        padding: 32px 28px 30px;
    }

}

@media (max-width: 900px) {
    .comparison-board {
        grid-template-columns: minmax(0, 1fr);
        max-width: 720px;
        gap: 18px;
        padding: 10px;
        border-radius: 26px;
    }

}

@media (max-width: 768px) {
.comparison-card--muted h3 {
        font-size: clamp(16px, 4.5vw, 21px);
    }

.galen-hero {
        padding-top: 84px;
        padding-bottom: 26px;
    }

    /* Título pegado más arriba: menos aire tras el eyebrow */
    .galen-hero__title {
        margin-top: 14px;
    }

.galen-hero__visual {
        min-height: auto;
    }

.galen-orbit {
        width: 100%;
        max-width: 430px;
        aspect-ratio: auto;
        display: block;
        /* Anillos (300px) + la card del icono activo, sin aire de más */
        height: 348px;
        padding-top: 0;
        touch-action: pan-y;
    }

    /* Anillos circulares de verdad (width = height) con el centro común en
       y=150px. Centrados con calc y no con transform: la animación de ripple
       redefine transform y pisaría el translateX. */
    .galen-orbit__ring {
        inset: auto;
    }

    .galen-orbit__ring--outer { top: 10px; left: calc(50% - 140px); width: 280px; height: 280px; }

    .galen-orbit__ring--middle { top: 48px; left: calc(50% - 102px); width: 204px; height: 204px; }

    .galen-orbit__ring--inner { top: 84px; left: calc(50% - 66px); width: 132px; height: 132px; }

    /* El orbe exclusivo de móvil ocupa el centro de los anillos */
    .galen-core-video-mobile {
        display: block;
        position: absolute;
        left: 50%;
        top: 150px;
        z-index: 0;
        width: 250px;
        height: auto;
        transform: translate(-50%, -50%);
        pointer-events: none;
    }

.galen-orbit__node {
        display: none;
    }

    /* Roscón de iconos: cada card queda reducida a su icono, colocada por el
       JS del dial en un anillo alrededor del orbe y girable con el dedo */
    .galen-float {
        position: absolute;
        left: 0;
        top: 0;
        /* Anula right/bottom de las variantes desktop: con top del JS +
           bottom heredado y height auto, la pill abierta salía comprimida */
        right: auto;
        bottom: auto;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        width: 64px;
        height: 64px;
        min-width: 0;
        min-height: 0;
        padding: 0;
        border-radius: 999px;
        transform: translate(-50%, -50%);
        /* Opaco: el glass translúcido dejaba ver los anillos a través de la
           pill y cada una salía de un color distinto según su posición */
        background: linear-gradient(145deg, #ffffff, #edf5f6);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        animation: none;
        cursor: pointer;
        transition: box-shadow 0.28s ease, padding 0.28s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .galen-float .galen-icon {
        flex: 0 0 auto;
        width: 34px;
        height: 34px;
        margin: 0;
        background: transparent;
    }

    .galen-float strong {
        display: none;
    }

    /* El icono que llega abajo se abre a su card de siempre: pill con
       icono + texto. La caja crece desde el propio icono. */
    .galen-float.is-dial-active {
        z-index: 3;
        /* max-content: con left + width auto, el absolute se encogería al
           hueco hasta el borde y cortaría el texto */
        width: max-content;
        height: auto;
        gap: 10px;
        padding: 15px 22px;
        box-shadow: 0 16px 34px rgba(0, 61, 79, 0.16);
    }

    .galen-float.is-dial-active .galen-icon {
        width: 25px;
        height: 25px;
    }

    .galen-float.is-dial-active strong {
        display: block;
        font-size: 13px;
        line-height: 1.2;
        white-space: nowrap;
        animation: galenDialLabel 0.3s cubic-bezier(0.23, 1, 0.32, 1) both;
    }

    @keyframes galenDialLabel {
        from {
            opacity: 0;
            transform: translateX(-5px);
        }
    }

.galen-comparison,
.galen-assistant,
.impact-section {
        padding: 76px 0;
    }

    /* Pegada al hero: el roscón ya cierra la sección de arriba */
    .galen-comparison {
        padding-top: 30px;
        padding-bottom: 28px;
    }

    /* En móvil, el ritmo entre ambas secciones se resuelve con un único
       intervalo corto en lugar de sumar sus dos paddings completos. */
    .galen-assistant {
        padding-top: 28px;
    }

.comparison-card {
        padding: 26px 22px 24px;
    }

.assistant-note {
        border-radius: 18px;
    }

.galen-timeline .flow-line {
        grid-template-columns: 1fr;
    }

.galen-timeline .flow-step {
        min-height: 0;
        padding-left: 58px;
    }

.galen-timeline .flow-step__dot {
        position: absolute;
        top: 22px;
        left: 14px;
    }

.galen-timeline .flow-timeline__track {
        left: 28px;
        right: auto;
    }

.impact-section__inner {
        gap: 42px;
    }

.impact-title {
        font-size: clamp(38px, 10vw, 54px);
        text-align: center;
    }

.impact-lead {
        font-size: 18px;
        margin-inline: auto;
        text-align: center;
    }

.impact-card {
        --impact-card-pad-x: 22px;
        --impact-card-pad-bottom: 22px;
        padding: 22px;
    }

.impact-card__stat-number {
        flex-basis: 96px;
        font-size: 42px;
    }

.impact-footnote {
        align-items: flex-start;
    }

    /* CTA final: panel a todo lo ancho y "¿Estás listo?" en una línea */
    .cta-final__inner {
        margin-inline: -30px;
        padding: 48px 22px;
        border-radius: 30px;
    }

    .cta-final__badge {
        display: flex;
        white-space: nowrap;
    }

    /* Las rayas crecen hasta llenar el panel (tope 150px por lado) */
    .cta-final__badge::before,
    .cta-final__badge::after {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        max-width: 150px;
    }
}

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

.galen-orbit {
        padding-top: 286px;
    }

.impact-card-grid {
        grid-template-columns: 1fr;
    }

.impact-card {
        min-height: 0;
    }

.impact-proof {
        flex-direction: row;
    }

.impact-footnote {
        justify-self: center;
        width: fit-content;
    }
}

@media (max-width: 1100px) {
    .comparison-board--showcase {
        min-height: 650px;
    }

    .comparison-board--showcase .comparison-card--galen {
        width: min(520px, calc(100% - 390px));
        min-height: 520px;
    }

    .comparison-satellite {
        max-width: 270px;
    }
}

@media (max-width: 900px) {
    .comparison-board--showcase {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: 0;
        gap: 14px;
        padding: 18px;
        overflow: hidden;
    }

    .comparison-board--showcase .comparison-card--galen {
        position: relative;
        inset: auto;
        grid-column: 1 / -1;
        order: 1;
        width: 100%;
        min-height: 0;
        transform: none;
    }

    .comparison-board--showcase .comparison-satellite {
        position: relative;
        inset: auto;
        order: 2;
        width: 100%;
        min-height: 106px;
        padding: 18px;
        opacity: 0.82;
        transform: none;
    }

}

@media (max-width: 600px) {
    .comparison-board--showcase {
        grid-template-columns: minmax(0, 1fr);
        padding: 12px;
    }

    .comparison-board--showcase .comparison-card--galen,
    .comparison-board--showcase .comparison-satellite {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .comparison-board--showcase {
        position: relative;
        display: block;
        width: 100%;
        min-height: 0;
        padding: 78px 0;
        overflow: visible;
        isolation: isolate;
    }

    .comparison-board--showcase > .comparison-satellite {
        display: none;
    }

    .comparison-board--showcase .comparison-card--galen {
        position: relative;
        inset: auto;
        left: 50%;
        z-index: 3;
        display: flex;
        width: min(500px, calc(100vw - 40px));
        max-width: none;
        min-height: 0;
        margin: 0;
        transform: translateX(-50%);
    }

    .comparison-mobile-lane {
        position: absolute;
        left: 50%;
        z-index: 1;
        display: block;
        width: 100vw;
        max-width: none;
        height: 132px;
        overflow: hidden;
        opacity: 0.74;
        pointer-events: none;
        transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1);
    }

    .comparison-mobile-lane--top {
        top: 5px;
        transform: translateX(-50%) rotate(-0.7deg);
    }

    .comparison-mobile-lane--bottom {
        bottom: 5px;
        transform: translateX(-50%) rotate(0.7deg);
    }

    .comparison-mobile-lane--middle-upper,
    .comparison-mobile-lane--middle-lower {
        z-index: 2;
        height: 154px;
        opacity: 0.62;
    }

    .comparison-mobile-lane--middle-upper {
        top: 36%;
        transform: translate(-50%, -50%) rotate(0.45deg);
    }

    .comparison-mobile-lane--middle-lower {
        top: 65%;
        transform: translate(-50%, -50%) rotate(-0.45deg);
    }

    .comparison-mobile-lane__track {
        display: flex;
        width: max-content;
        gap: 10px;
        animation: comparisonMobileLane 46s linear infinite;
        animation-play-state: paused;
        will-change: transform;
    }

    .comparison-mobile-lane--bottom .comparison-mobile-lane__track {
        animation-duration: 54s;
        animation-direction: reverse;
    }

    .comparison-mobile-lane--middle-upper .comparison-mobile-lane__track {
        animation-duration: 60s;
        animation-direction: reverse;
    }

    .comparison-mobile-lane--middle-lower .comparison-mobile-lane__track {
        animation-duration: 66s;
    }

    .comparison-board--showcase.is-render-active .comparison-mobile-lane__track {
        animation-play-state: running;
    }

    .comparison-mobile-lane__group {
        display: flex;
        flex: none;
        gap: 10px;
    }

    .comparison-mobile-satellite {
        display: grid;
        flex: 0 0 clamp(280px, 82vw, 350px);
        grid-template-columns: 10px minmax(0, 1fr);
        column-gap: 11px;
        row-gap: 4px;
        height: 116px;
        padding: 18px 20px;
        border: 1px solid rgba(90, 116, 123, 0.2);
        border-radius: 17px;
        background: linear-gradient(145deg, rgba(248, 250, 250, 0.96), rgba(229, 235, 236, 0.9));
        box-shadow: 0 11px 24px rgba(42, 65, 71, 0.1);
        color: #75878c;
        opacity: 1;
        transform: none;
    }

    .comparison-mobile-satellite .comparison-satellite__dot {
        grid-row: 2;
        grid-column: 1;
        width: 9px;
        height: 9px;
    }

    .comparison-mobile-satellite .comparison-satellite__label {
        grid-row: 1;
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 100%;
        font-size: 13px;
        letter-spacing: 0.015em;
        line-height: 1.15;
        text-align: center;
        white-space: nowrap;
    }

    .comparison-mobile-satellite strong {
        grid-row: 2;
        grid-column: 2;
        color: #526a70;
        font-family: var(--font-heading);
        font-size: 17px;
        font-weight: 600;
        line-height: 1.2;
    }

    .comparison-board--showcase:not(.visible) .comparison-mobile-lane {
        opacity: 0;
    }
}

@keyframes comparisonMobileLane {
    to {
        transform: translate3d(calc(-50% - 5px), 0, 0);
    }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .comparison-mobile-lane__track,
    .comparison-mobile-lane--bottom .comparison-mobile-lane__track {
        animation: none;
        transform: translate3d(-18%, 0, 0);
    }
}

/* ============================================
   ENTRADAS EN CASCADA
   El observer de galen-ai.js pone .visible al contenedor al entrar en
   pantalla; el contenido escalona su aparición desde ahí.
   ============================================ */

/* Comparación: los puntos de cada lista van cayendo uno tras otro. El estado
   oculto se limita a :not(.visible) para que, si las animaciones no corren,
   los puntos se vean igual en lugar de quedarse en opacity 0. */
.comparison-board:not(.visible) .check-list li {
    opacity: 0;
    transform: translateY(10px);
}

/* Cascada lenta y bien separada: se lee punto por punto */
.comparison-board.visible .check-list li {
    animation: galenItemIn 0.9s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.comparison-board.visible .check-list li:nth-child(1) { animation-delay: 250ms; }
.comparison-board.visible .check-list li:nth-child(2) { animation-delay: 700ms; }
.comparison-board.visible .check-list li:nth-child(3) { animation-delay: 1150ms; }
.comparison-board.visible .check-list li:nth-child(4) { animation-delay: 1600ms; }
.comparison-board.visible .check-list li:nth-child(5) { animation-delay: 2050ms; }
.comparison-board.visible .check-list li:nth-child(6) { animation-delay: 2500ms; }

/* El check crece a la vez que aparece su texto */
.comparison-board.visible .check-list li::before {
    animation: galenCheckIn 0.7s cubic-bezier(0.23, 1, 0.32, 1) both;
    animation-delay: inherit;
}

@keyframes galenItemIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes galenCheckIn {
    from {
        transform: scale(0.4);
    }

    to {
        transform: scale(1);
    }
}

/* Flujo: las cuatro cards entran de una en una. Se usa transición (no
   animación) para no pisar el encendido posterior de .is-active, que
   comparte las propiedades opacity y transform. */
.galen-timeline:not(.visible) .flow-step {
    opacity: 0;
    transform: translateY(20px);
}

.galen-timeline .flow-step:nth-child(2) { transition-delay: 90ms; }
.galen-timeline .flow-step:nth-child(3) { transition-delay: 180ms; }
.galen-timeline .flow-step:nth-child(4) { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {

    .galen-core-video--traveller {
        animation: none;
    }

    .galen-orbit__ring {
        animation: none;
        opacity: 0.34;
        transform: none;
    }

    .galen-orbit__nodes,
    .galen-float {
        animation: none;
    }

    .comparison-board .check-list li,
    .comparison-board.visible .check-list li,
    .comparison-board.visible .check-list li::before {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .galen-timeline:not(.visible) .flow-step {
        opacity: 0.72;
        transform: none;
    }

    .galen-timeline .flow-step {
        transition-delay: 0ms !important;
    }

    .galen-timeline .flow-step__dot::after {
        animation: none !important;
    }

    .flow-microchat__message {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ============================================
   INTEGRACIÓN CON EL PROYECTO
   ============================================ */

/* Botones del hero: el proyecto usa .btnLg en lugar de .btn--lg */
.galen-hero__actions .btnLg {
    padding-inline: 24px;
}

/* Carrusel de funcionalidades compartido: mismo espaciado que el resto de
   subpáginas (el bloque llega ya con margin-top propio del global) */
.quicknav-section {
    padding: 42px 0 0;
}

.quicknav-section .quickNavBlock {
    margin-top: 0;
}

.quickNavBlock h2 {
    max-width: 760px;
    margin: 0 auto;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 800;
    line-height: 1.14;
    text-align: center;
}

/* Flujo responsive heredado de la plantilla: la línea pasa a vertical y los
   pasos se apilan con el número anclado a la izquierda */
@media (max-width: 1024px) {
    .flow-line {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .flow-timeline__track {
        left: 12%;
        right: 12%;
    }
}

@media (max-width: 768px) {
    .galen-hero__actions .btn {
        width: 100%;
    }

    .flow-line {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .flow-timeline {
        padding-top: 0;
    }

    .flow-timeline__track {
        top: 0;
        bottom: 0;
        left: 18px;
        right: auto;
        width: 2px;
        height: auto;
    }

    .flow-timeline__progress {
        width: 100%;
        height: 0%;
    }

    .flow-step {
        padding: 18px 18px 18px 42px;
        text-align: left;
    }

    .flow-step__dot {
        position: absolute;
        top: 23px;
        left: 14px;
        margin-bottom: 0;
    }

    /* El eyebrow se mantiene en una línea y las rayitas ocupan el resto */
    .eyebrow {
        white-space: nowrap;
        width: min(100%, 440px);
        justify-content: center;
    }

    .eyebrow::before,
    .eyebrow::after {
        flex: 1 1 0;
        width: auto;
        min-width: 12px;
        max-width: 90px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .galen-assistant {
        overflow: visible;
    }

    .assistant-carousel {
        --assistant-controls-offset: -37px;
        left: 50%;
        width: calc(100vw - 20px);
        margin-left: 0;
        transform: translateX(-50%);
    }

    .assistant-carousel__stage {
        height: 460px;
        perspective: 1000px;
    }

    .assistant-carousel__halo {
        width: 540px;
        max-width: none;
        opacity: 0.75;
    }

    .assistant-slide {
        width: calc(100% - 24px);
        height: 480px;
    }

    .assistant-slide__shell {
        padding: 21px;
        height: 174px;
        border-radius: 22px;
    }

    .assistant-slide.is-active .assistant-slide__shell {
        height: 350px;
        box-shadow:
            0 2px 4px rgba(0, 61, 79, 0.08),
            0 14px 26px -16px rgba(0, 61, 79, 0.2);
    }

    .assistant-slide.is-question .assistant-slide__shell {
        height: 350px;
    }

    .assistant-slide.is-answer .assistant-slide__shell {
        height: 350px;
    }

    .assistant-slide.is-result .assistant-slide__shell {
        height: 350px;
    }

    .assistant-slide h3 {
        font-size: 20px;
    }

    .assistant-slide__description {
        margin-left: 0;
    }

    .assistant-note {
        margin-top: 24px;
    }
}

@media (max-width: 420px) {
    .assistant-carousel {
        --assistant-controls-offset: -37px;
    }

    .assistant-carousel__stage {
        height: 440px;
    }

    .assistant-slide {
        height: 462px;
    }

    .assistant-slide__shell {
        padding: 18px;
        height: 168px;
        border-radius: 20px;
    }

    .assistant-slide.is-active .assistant-slide__shell {
        height: 330px;
    }

    .assistant-slide.is-question .assistant-slide__shell {
        height: 330px;
    }

    .assistant-slide.is-answer .assistant-slide__shell {
        height: 330px;
    }

    .assistant-slide.is-result .assistant-slide__shell {
        height: 330px;
    }

    .assistant-slide__header {
        gap: 11px;
    }

    .assistant-slide__icon {
        flex-basis: 26px;
        width: 26px;
        height: 26px;
    }

    .assistant-slide__description {
        min-height: 38px;
        margin-top: 8px;
        margin-bottom: 12px;
        font-size: 12.5px;
    }

    .assistant-conversation {
        gap: 8px;
        padding-top: 12px;
    }

    .assistant-message {
        min-height: 45px;
    }

    .assistant-result {
        padding-block: 8px;
    }

    .assistant-result div {
        min-height: 27px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .assistant-slide,
    .assistant-slide__shell,
    .assistant-message,
    .assistant-result {
        transition-duration: 1ms !important;
    }

    .assistant-carousel__halo::before,
    .assistant-carousel__halo::after {
        animation: none;
    }
}

/* ============================================
   ASÍ TRABAJA GALEN AI · VIAJE ENTRE NODOS
   ============================================ */
.galen-workflow {
    position: relative;
    padding: 84px 0 0;
}

.galen-orb-workflow-dock {
    position: absolute;
    z-index: 3;
    top: -38px;
    left: calc(50% + 14px);
    /* Suelo alto: por debajo de ~1500px el 6vw encogía el orbe a 74px */
    width: clamp(90px, 6vw, 94px);
    height: clamp(90px, 6vw, 94px);
    pointer-events: none;
    transform: translateX(-50%);
}

/* Tablet: sin el hueco muerto alrededor del orbe aterrizado entre secciones */
@media (min-width: 769px) and (max-width: 1080px) {
    .galen-assistant {
        padding-bottom: 60px;
    }

    .galen-workflow {
        padding-top: 52px;
    }
}

.neural-flow {
    position: relative;
    height: 500vh;
    min-height: 3200px;
    margin-top: 0;
}

.neural-flow__sticky {
    position: sticky;
    z-index: 41;
    top: 8vh;
    height: 84vh;
    min-height: 620px;
    overflow: visible;
    border-radius: 42px;
    isolation: isolate;
    background:
        radial-gradient(circle at 50% 52%, rgba(92, 184, 190, 0.13), transparent 31%),
        radial-gradient(circle at 18% 22%, rgba(54, 132, 139, 0.055), transparent 21%),
        radial-gradient(circle at 82% 78%, rgba(0, 85, 109, 0.045), transparent 23%);
}

.galen-orb-network-dock {
    position: absolute;
    top: 52%;
    left: 50%;
    width: clamp(230px, 22vw, 310px);
    height: clamp(230px, 22vw, 310px);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.neural-flow__heading {
    position: absolute;
    z-index: 8;
    top: 0;
    left: 50%;
    width: min(820px, calc(100% - 32px));
    max-width: none;
    margin: 0;
    padding: 0 20px 24px;
    text-align: center;
    pointer-events: none;
    transform: translateX(-50%);
}

.neural-flow__heading .section-title {
    margin-top: 14px;
}

.neural-flow__sticky::before,
.neural-flow__sticky::after {
    content: "";
    position: absolute;
    z-index: -2;
    top: 52%;
    left: 50%;
    width: min(70%, 760px);
    aspect-ratio: 1;
    border: 1px solid rgba(54, 132, 139, 0.16);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.36);
    animation: neural-ripple-out 7.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    animation-play-state: paused;
    will-change: auto;
}

.neural-flow.is-render-active .neural-flow__sticky::before,
.neural-flow.is-render-active .neural-flow__sticky::after {
    animation-play-state: running;
    will-change: transform, opacity;
}

.neural-flow__sticky::after {
    animation-delay: -3.6s;
}

@keyframes neural-ripple-out {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.36);
    }

    12% {
        opacity: 0.58;
    }

    72% {
        opacity: 0.18;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.16);
    }
}

.neural-flow__network {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.neural-flow__path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.neural-flow__path--base {
    stroke: rgba(0, 85, 109, 0.24);
    stroke-width: 1.35;
    transition:
        stroke 520ms cubic-bezier(0.16, 1, 0.3, 1),
        stroke-width 520ms cubic-bezier(0.16, 1, 0.3, 1),
        filter 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.neural-flow__path--settle {
    stroke: rgba(0, 111, 137, 0.78);
    stroke-width: 2;
    opacity: 0;
    filter: drop-shadow(0 0 7px rgba(54, 132, 139, 0.28));
}

.neural-flow__path--settle.is-fading {
    animation: neural-line-settle 680ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.neural-flow__path--focus {
    stroke: rgba(0, 111, 137, 0.78);
    stroke-width: 2;
    filter: drop-shadow(0 0 7px rgba(54, 132, 139, 0.34));
}

.neural-flow__path--focus.is-reentering {
    animation: neural-line-reenter 680ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes neural-line-settle {
    0% {
        stroke: rgba(0, 111, 137, 0.78);
        opacity: 1;
    }

    100% {
        stroke: rgba(0, 85, 109, 0.24);
        opacity: 0;
    }
}

@keyframes neural-line-reenter {
    0% {
        stroke: rgba(0, 85, 109, 0.24);
        opacity: 0;
    }

    100% {
        stroke: rgba(0, 111, 137, 0.78);
        opacity: 1;
    }
}

.neural-flow__signal {
    fill: var(--color-secondary);
    opacity: 0;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 8px rgba(54, 132, 139, 0.7));
    transition: opacity 160ms ease-out;
}

.galen-timeline.neural-flow .flow-line {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: block;
}

.galen-timeline.neural-flow .flow-step,
.galen-timeline.neural-flow:not(.visible) .flow-step {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(540px, calc(100% - 48px));
    min-height: 390px;
    padding: 32px 32px 28px;
    margin: 0;
    border-color: rgba(54, 132, 139, 0.16);
    border-radius: 26px;
    background: rgba(250, 253, 253, 0.98);
    box-shadow: 0 22px 52px rgba(0, 61, 79, 0.1);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
    transform-origin: center;
    transition-delay: 0ms;
    transition:
        transform 1450ms cubic-bezier(0.16, 1, 0.3, 1),
        opacity 920ms cubic-bezier(0.16, 1, 0.3, 1),
        border-color 520ms cubic-bezier(0.16, 1, 0.3, 1),
        background-color 520ms cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 520ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: auto;
}

.galen-timeline.neural-flow .flow-step:first-child {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.galen-timeline.neural-flow .flow-step.is-active {
    border-color: rgba(54, 132, 139, 0.34);
    background: rgba(252, 254, 254, 0.99);
    box-shadow:
        0 24px 60px rgba(0, 61, 79, 0.13),
        0 0 0 1px rgba(54, 132, 139, 0.055);
}

.galen-timeline.neural-flow .flow-step.is-past {
    box-shadow: 0 14px 34px rgba(0, 61, 79, 0.06);
    pointer-events: none;
}

.galen-timeline.neural-flow .flow-step.is-network-highlighted {
    min-height: 0;
    padding-bottom: 26px;
    border-color: rgba(54, 132, 139, 0.38);
    background: rgba(252, 254, 254, 0.985);
    box-shadow:
        0 18px 42px rgba(0, 61, 79, 0.105),
        0 0 0 1px rgba(54, 132, 139, 0.07);
}

.galen-timeline.neural-flow .flow-step.is-network-highlighted > strong {
    color: var(--color-primary-dark);
}

.galen-timeline.neural-flow .flow-step.is-network-highlighted .flow-microchat__message {
    opacity: 1;
    transform: none;
}

.galen-timeline.neural-flow .flow-step.is-network-highlighted .flow-step__dot {
    color: rgba(250, 253, 253, 0.99);
    background: var(--color-primary);
    box-shadow: 0 0 0 8px rgba(54, 132, 139, 0.1);
}

.galen-timeline.neural-flow.is-network-complete .neural-flow__path--base {
    stroke: rgba(0, 111, 137, 0.46);
    stroke-width: 1.8;
    filter: drop-shadow(0 0 6px rgba(54, 132, 139, 0.18));
}

.galen-timeline.neural-flow .flow-step__dot {
    position: relative;
    top: auto;
    left: auto;
    width: 38px;
    height: 38px;
    margin-right: 15px;
    margin-bottom: 20px;
    font-size: 17px;
}

.galen-timeline.neural-flow .flow-step > strong {
    font-size: 21px;
    line-height: 1.28;
}

.galen-timeline.neural-flow .flow-step p {
    margin-top: 11px;
    font-size: 15.5px;
    line-height: 1.6;
}

.galen-timeline.neural-flow .flow-microchat {
    gap: 9px;
    margin-top: 21px;
}

.galen-timeline.neural-flow .flow-microchat__message {
    min-height: 60px;
    gap: 10px;
    padding: 11px 12px;
}

.galen-timeline.neural-flow .flow-microchat__message--user {
    width: 78%;
    min-height: 0;
    border: 0;
    color: rgba(250, 253, 253, 0.99);
    background: rgb(7 111 140);
    box-shadow: none;
}

.galen-timeline.neural-flow .flow-microchat__message--user .flow-microchat__avatar {
    display: none;
}

.galen-timeline.neural-flow .flow-microchat__message--user .flow-microchat__copy {
    padding-top: 0;
    color: inherit;
}

.galen-timeline.neural-flow .flow-microchat__message--galen,
.galen-timeline.neural-flow .flow-microchat__message--galen.flow-microchat__message--result {
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.galen-timeline.neural-flow .flow-microchat__avatar,
.galen-timeline.neural-flow .flow-microchat__galen {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
}

.galen-timeline.neural-flow .flow-microchat__galen {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 0;
    background: transparent;
}

.galen-timeline.neural-flow .flow-microchat__galen img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.galen-timeline.neural-flow .flow-microchat__copy {
    font-size: 12px;
    line-height: 1.45;
}

.galen-timeline.neural-flow .flow-microchat__message--galen .flow-microchat__copy {
    min-height: 58px;
    padding: 10px 38px 10px 13px;
    border-radius: 5px 17px 17px 17px;
    background: rgba(240, 243, 244, 0.96);
}

.galen-timeline.neural-flow .flow-microchat__copy strong {
    margin-bottom: 3px;
    font-size: 11.5px;
}

.galen-timeline.neural-flow .flow-microchat__message--galen .flow-microchat__status {
    right: 11px;
    bottom: 10px;
}

.neural-flow__position {
    position: absolute;
    z-index: 5;
    right: 30px;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(0, 85, 109, 0.46);
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.neural-flow__position i {
    display: block;
    width: 34px;
    height: 1px;
    background: rgba(0, 85, 109, 0.2);
}

.neural-flow__position span:first-child {
    color: var(--color-secondary);
}

.assistant-carousel.is-render-active .assistant-slide {
    will-change: transform, opacity;
}

.assistant-carousel.is-render-active .assistant-slide.is-render-hidden {
    will-change: auto;
}

.neural-flow.is-render-active .flow-step {
    will-change: transform, opacity;
}

.neural-flow__state-progress {
    position: absolute;
    z-index: 6;
    bottom: 88px;
    left: 50%;
    width: min(250px, calc(100% - 144px));
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(0, 85, 109, 0.13);
    transform: translateX(-50%);
}

.neural-flow__state-progress span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--color-secondary);
    box-shadow: 0 0 10px rgba(54, 132, 139, 0.28);
    transform: scaleX(var(--flow-progress, 0));
    transform-origin: left center;
    transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.neural-flow__next {
    position: absolute;
    z-index: 6;
    bottom: 24px;
    left: 50%;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(54, 132, 139, 0.24);
    border-radius: 50%;
    color: var(--color-secondary);
    background: rgba(250, 253, 253, 0.94);
    box-shadow: 0 10px 24px rgba(0, 61, 79, 0.08);
    cursor: pointer;
    transform: translateX(-50%);
    transition:
        color 240ms ease-out,
        border-color 240ms ease-out,
        background-color 240ms ease-out,
        opacity 240ms ease-out,
        transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.neural-flow__next svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.neural-flow__next.is-complete {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
}

@media (hover: hover) {
    .neural-flow__next:hover {
        color: rgba(250, 253, 253, 0.98);
        border-color: var(--color-secondary);
        background: var(--color-secondary);
        transform: translateX(-50%) translateY(-2px);
    }
}

/* Variante móvil estática del flujo: solo existe en <=768px */
.galen-flow-mobile {
    display: none;
}

@media (max-width: 768px) {
    .galen-workflow {
        padding-top: 64px;
        padding-bottom: 66px;
    }

    /* La versión desktop (sticky de 480vh dirigida por scroll/Lenis) no
       funciona bien en táctil: fuera entera, entra la estática */
    .flow-timeline.neural-flow {
        display: none;
    }

    .galen-flow-mobile {
        display: block;
    }

    .galen-flow-mobile .section-copy {
        margin-bottom: 32px;
        text-align: center;
    }

    .galen-flow-mobile .section-subtitle {
        font-size: 14px;
        line-height: 1.55;
    }

    .galen-flow-mobile__steps {
        display: grid;
        gap: 18px;
        /* Roba el padding del .container (32px): la barra de números queda
           casi al borde y las cards ganan todo ese ancho */
        margin: 0 -30px;
        padding: 0;
        list-style: none;
    }

    .galen-flow-mobile__step {
        position: relative;
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 9px;
    }

    /* Hilo que une los pasos de la línea de tiempo */
    .galen-flow-mobile__step:not(:last-child)::before {
        content: "";
        position: absolute;
        left: 13px;
        top: 34px;
        bottom: -18px;
        width: 2px;
        background: linear-gradient(180deg, rgba(0, 85, 109, 0.24), rgba(0, 85, 109, 0.05));
    }

    /* Cada paso arranca apagado y se ilumina al entrar en pantalla
       (.is-lit la pone un IntersectionObserver, sin Lenis) */
    .galen-flow-mobile__dot {
        display: grid;
        place-items: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        font-family: var(--font-heading);
        font-size: 13px;
        font-weight: 700;
        color: var(--color-primary);
        background: #e6eff1;
        box-shadow: none;
        transition: color 0.55s ease, background 0.55s ease, box-shadow 0.55s ease;
    }

    .galen-flow-mobile__step.is-lit .galen-flow-mobile__dot {
        color: #fff;
        background: linear-gradient(145deg, var(--color-secondary), var(--color-primary));
        box-shadow: 0 8px 18px rgba(0, 61, 79, 0.24);
    }

    .galen-flow-mobile__card {
        min-width: 0;
        padding: 17px 16px 15px;
        border: 1px solid rgba(0, 85, 109, 0.08);
        border-radius: 20px;
        background: #eef2f3;
        box-shadow: none;
        opacity: 0.42;
        filter: saturate(0.15);
        transform: translateY(14px);
        transition:
            opacity 0.6s ease,
            filter 0.6s ease,
            background 0.6s ease,
            box-shadow 0.6s ease,
            transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .galen-flow-mobile__step.is-lit .galen-flow-mobile__card {
        background: linear-gradient(160deg, #ffffff, #f5fafb);
        box-shadow:
            0 20px 40px -14px rgba(0, 61, 79, 0.32),
            0 4px 12px rgba(0, 61, 79, 0.07);
        opacity: 1;
        filter: none;
        transform: none;
    }

    .galen-flow-mobile__card > strong {
        display: block;
        font-family: var(--font-heading);
        font-size: 17px;
        line-height: 1.25;
        color: #073d4d;
    }

    .galen-flow-mobile__card > p {
        margin: 7px 0 0;
        font-size: 13.5px;
        line-height: 1.5;
        color: var(--color-text-secondary);
    }

    /* Microchat: mismas piezas que el desktop pero siempre visibles
       (sin los estados de opacidad que gobierna el scroll) */
    .galen-flow-mobile .flow-microchat {
        margin-top: 14px;
        gap: 8px;
    }

    .galen-flow-mobile .flow-microchat__message {
        min-height: 0;
        gap: 10px;
        padding: 10px 11px;
        opacity: 1;
        transform: none;
        transition: none;
    }

    .galen-flow-mobile .flow-microchat__message--user {
        width: 86%;
        border: 0;
        border-radius: 16px 16px 5px 16px;
        color: rgba(250, 253, 253, 0.99);
        background: rgb(7 111 140);
        box-shadow: none;
    }

    .galen-flow-mobile .flow-microchat__message--user .flow-microchat__avatar {
        display: none;
    }

    .galen-flow-mobile .flow-microchat__message--user .flow-microchat__copy {
        padding-top: 0;
        color: inherit;
    }

    .galen-flow-mobile .flow-microchat__message--galen,
    .galen-flow-mobile .flow-microchat__message--galen.flow-microchat__message--result {
        width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .galen-flow-mobile .flow-microchat__galen {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        border-radius: 0;
        background: transparent;
    }

    .galen-flow-mobile .flow-microchat__galen img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .galen-flow-mobile .flow-microchat__copy {
        font-size: 12px;
        line-height: 1.45;
    }

    .galen-flow-mobile .flow-microchat__message--galen .flow-microchat__copy {
        min-height: 0;
        padding: 10px 38px 10px 13px;
        border-radius: 5px 17px 17px 17px;
        background: rgba(240, 243, 244, 0.96);
    }

    .galen-flow-mobile .flow-microchat__copy strong {
        margin-bottom: 3px;
        font-size: 11.5px;
    }

    .galen-flow-mobile .flow-microchat__message--galen .flow-microchat__status {
        right: 11px;
        bottom: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .galen-flow-mobile__card,
    .galen-flow-mobile__dot {
        transition: none;
        transform: none;
        opacity: 1;
        filter: none;
    }

    .neural-flow {
        height: auto;
        min-height: 560px;
    }

    .neural-flow__sticky {
        position: relative;
        top: auto;
    }

    .neural-flow__next,
    .neural-flow__position,
    .neural-flow__state-progress,
    .neural-flow__network {
        display: none;
    }

    .neural-flow__path--settle {
        animation: none;
    }

    .neural-flow__path--focus {
        animation: none;
    }

    .neural-flow__sticky::before,
    .neural-flow__sticky::after {
        animation: none;
        opacity: 0.22;
        transform: translate(-50%, -50%) scale(1);
    }

    .neural-flow__sticky::after {
        transform: translate(-50%, -50%) scale(0.7);
    }

}
