/* ===== FACTURASCRIPTS ===== */
.page-fs {
    --fs-blue: #1667f2;
    --fs-blue-dark: #0b47b3;
    --fs-red: #c1121f;
    --fs-ink: #0f172a;
    --fs-muted: #5b6475;
    --fs-line: #e6eaf2;
    --fs-bg: #f5f7fb;
    --fs-ease: cubic-bezier(0.22, 1, 0.36, 1);
    background: #ffffff;
}

.page-fs .main-content {
    padding: 0;
    overflow-x: clip;
    background: #ffffff;
}

.page-fs .site-footer {
    margin-top: 0;
}

/* Animaciones fuera de pantalla en pausa (clase puesta por facturascripts.js) */
.page-fs .is-offscreen,
.page-fs .is-offscreen *,
.page-fs .is-offscreen *::before,
.page-fs .is-offscreen *::after {
    animation-play-state: paused !important;
}

.page-fs .fs-reveal {
    opacity: 0;
    translate: 0 28px;
    transition: opacity 0.8s ease, translate 0.8s var(--fs-ease);
}

.page-fs .fs-reveal.is-in {
    opacity: 1;
    translate: none;
}

/* Botones */
.fs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.fs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 50px;
    padding: 0.8rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.fs-btn--primary {
    color: #ffffff;
    background: linear-gradient(135deg, #2f7bff, var(--fs-blue-dark));
    box-shadow: 0 14px 34px rgba(22, 103, 242, 0.4);
}

.fs-btn--primary:hover {
    box-shadow: 0 18px 42px rgba(22, 103, 242, 0.55);
}

.fs-btn--ghost {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    background: rgba(5, 10, 20, 0.35);
}

.fs-btn--ghost:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.fs-btn--light {
    color: var(--fs-blue-dark);
    background: #ffffff;
}

.fs-btn--light:hover {
    background: #e8f0ff;
}

.fs-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* Encabezados */
.fs-section {
    max-width: 1220px;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}

.fs-heading {
    max-width: 780px;
    margin-bottom: 2.4rem;
}

.fs-heading--center {
    margin-inline: auto;
    text-align: center;
}

.fs-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    color: var(--fs-blue);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.fs-kicker::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.fs-kicker--light {
    color: #9ec2ff;
}

.fs-heading h2,
.fs-cta h2 {
    margin-bottom: 0.9rem;
    color: var(--fs-ink);
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.fs-heading p {
    color: var(--fs-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

/* ===== HERO ===== */
.page-fs .fs-hero {
    position: relative;
    display: flex;
    align-items: center;
    aspect-ratio: 16 / 9;
    min-height: 620px;
    max-height: 92svh;
    padding-top: 5rem;
    overflow: hidden;
    isolation: isolate;
    color: #ffffff;
    background: #06080f;
}

.fs-hero-img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: fs-hero-zoom 14s ease-out both;
}

.fs-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(4, 8, 18, 0.88) 0%, rgba(4, 8, 18, 0.6) 40%, rgba(4, 8, 18, 0.1) 75%),
        linear-gradient(0deg, rgba(4, 8, 18, 0.5), transparent 40%);
}

.fs-hero-content {
    position: relative;
    z-index: 2;
    width: min(640px, calc(100% - 2.5rem));
    margin: 0 0 4rem clamp(1.25rem, 7vw, 7rem);
}

.fs-hero-content > * {
    animation: fs-rise 0.9s var(--fs-ease) both;
}

.fs-hero-content > :nth-child(2) { animation-delay: 0.08s; }
.fs-hero-content > :nth-child(3) { animation-delay: 0.16s; }
.fs-hero-content > :nth-child(4) { animation-delay: 0.24s; }
.fs-hero-content > :nth-child(5) { animation-delay: 0.32s; }

.fs-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.2rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(5, 10, 20, 0.5);
    font-size: 0.8rem;
    font-weight: 600;
}

.fs-pill i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4d8dff;
    box-shadow: 0 0 10px #4d8dff;
}

.fs-hero h1 {
    margin-bottom: 0.4rem;
    font-size: clamp(2.8rem, 6.2vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

/* Palabras que van "cayendo" una tras otra */
.fs-falling {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.6rem;
    margin-bottom: 1.2rem;
    font-size: clamp(1.6rem, 3.4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.fs-falling-label {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
}

.fs-falling-words {
    display: inline-grid;
    overflow: hidden;
    padding: 0.05em 0;
}

.fs-falling-words b {
    grid-area: 1 / 1;
    color: transparent;
    background: linear-gradient(100deg, #ffffff, #8fb8ff 60%, #4d8dff);
    background-clip: text;
    -webkit-background-clip: text;
    opacity: 0;
    transform: translateY(-110%);
}

.fs-falling-words b.is-active {
    opacity: 1;
    transform: none;
    animation: fs-fall-in 0.75s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.fs-falling-words b.is-leaving {
    animation: fs-fall-out 0.55s cubic-bezier(0.55, 0, 0.8, 0.4) both;
}

.fs-hero-lead {
    max-width: 540px;
    margin-bottom: 1.8rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 1.35vw, 1.15rem);
    line-height: 1.65;
}

.fs-hero-fade {
    position: absolute;
    left: 0;
    right: 0;
    /* -2px: evita una línea fina en el borde inferior con escalados no enteros */
    bottom: -2px;
    z-index: 1;
    height: 20%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff);
    pointer-events: none;
}

/* ===== QUÉ ES ===== */
.fs-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 0 0 4.5rem;
    padding: 0;
    list-style: none;
}

.fs-features li {
    --glow-x: 50%;
    --glow-y: 50%;
    padding: 1.5rem;
    border: 1px solid var(--fs-line);
    border-radius: 22px;
    background:
        radial-gradient(circle 200px at var(--glow-x) var(--glow-y), rgba(22, 103, 242, 0.08), transparent 70%),
        var(--fs-bg);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.fs-features li:hover {
    border-color: rgba(22, 103, 242, 0.3);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}

.fs-feature-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #2f7bff, var(--fs-blue-dark));
    box-shadow: 0 10px 22px rgba(22, 103, 242, 0.3);
}

.fs-feature-icon svg,
.fs-node svg,
.fs-packet svg,
.fs-business-icon svg,
.fs-business-chips svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fs-feature-icon svg {
    width: 22px;
    height: 22px;
    color: #ffffff;
}

.fs-features h3 {
    margin-bottom: 0.45rem;
    color: var(--fs-ink);
    font-size: 1.05rem;
}

.fs-features p {
    color: var(--fs-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Selector de negocios */
.fs-business {
    padding: clamp(1.4rem, 3vw, 2.4rem);
    border: 1px solid var(--fs-line);
    border-radius: 30px;
    background:
        radial-gradient(circle at 95% 0%, rgba(22, 103, 242, 0.08), transparent 35%),
        var(--fs-bg);
}

.fs-business-head {
    max-width: 640px;
    margin-bottom: 1.4rem;
}

.fs-business-head h3 {
    margin-bottom: 0.4rem;
    color: var(--fs-ink);
    font-size: clamp(1.5rem, 2.8vw, 2.1rem);
    letter-spacing: -0.02em;
}

.fs-business-head p {
    color: var(--fs-muted);
}

.fs-business-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.6rem;
}

.fs-business-chips button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--fs-line);
    border-radius: 999px;
    color: #334155;
    background: #ffffff;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.fs-business-chips svg {
    width: 18px;
    height: 18px;
}

.fs-business-chips button:hover {
    border-color: var(--fs-blue);
    color: var(--fs-blue);
}

.fs-business-chips button[aria-selected="true"] {
    border-color: var(--fs-blue);
    color: #ffffff;
    background: var(--fs-blue);
}

.fs-business-chips button:focus-visible {
    outline: 2px solid var(--fs-blue);
    outline-offset: 2px;
}

.fs-business-stage {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}

.fs-business-copy.is-switching > *,
.fs-app.is-switching .fs-app-body > * {
    animation: fs-rise 0.5s var(--fs-ease) both;
}

.fs-app.is-switching .fs-app-body > :nth-child(2) { animation-delay: 0.06s; }
.fs-app.is-switching .fs-app-body > :nth-child(3) { animation-delay: 0.12s; }

.fs-business-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 1rem;
    border-radius: 16px;
    color: var(--fs-blue);
    background: #e8f0ff;
}

.fs-business-icon svg {
    width: 28px;
    height: 28px;
}

.fs-business-copy h4 {
    margin-bottom: 0.6rem;
    color: var(--fs-ink);
    font-size: 1.5rem;
}

.fs-business-copy > p {
    margin-bottom: 1rem;
    color: var(--fs-muted);
    line-height: 1.7;
}

.fs-business-uses {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0;
    list-style: none;
}

.fs-business-uses li {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    color: var(--fs-blue-dark);
    background: #e8f0ff;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Maqueta de la aplicación (estilo FacturaScripts) */
.fs-app {
    overflow: hidden;
    border: 1px solid #d9e1ee;
    border-radius: 18px;
    background: #f7f8fa;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.14);
}

.fs-app-bar {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    color: #ffffff;
    background: #1667f2;
}

.fs-app-logo {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #1667f2;
    background: #ffffff;
    font-size: 0.8rem;
    font-weight: 900;
}

.fs-app-bar strong {
    overflow: hidden;
    font-size: 0.92rem;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.fs-app-menu {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.74rem;
    white-space: nowrap;
}

.fs-app-body {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
}

.fs-app-create,
.fs-app-kpis > div,
.fs-app-list {
    padding: 0.8rem;
    border: 1px solid #dee3eb;
    border-radius: 10px;
    background: #ffffff;
}

.fs-app-create > span,
.fs-app-list > small {
    display: block;
    margin-bottom: 0.55rem;
    color: #1f2937;
    font-size: 0.86rem;
    font-weight: 700;
}

.fs-app-create div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.fs-app-create em {
    padding: 0.35rem 0.6rem;
    border: 1px solid #1667f2;
    border-radius: 6px;
    color: #1667f2;
    font-size: 0.76rem;
    font-style: normal;
}

.fs-app-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.fs-app-kpis > div {
    border-top: 3px solid #198754;
}

.fs-app-kpis > div + div {
    border-top-color: #0dcaf0;
}

.fs-app-kpis small {
    display: block;
    color: #6b7280;
    font-size: 0.74rem;
}

.fs-app-kpis b {
    color: #111827;
    font-size: 1.3rem;
    font-variant-numeric: tabular-nums;
}

.fs-app-list ul {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fs-app-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    background: #f7f8fa;
    font-size: 0.8rem;
}

.fs-app-list li span {
    overflow: hidden;
    color: #374151;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fs-app-list li i {
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    color: #ffffff;
    background: #1667f2;
    font-size: 0.66rem;
    font-style: normal;
    font-weight: 700;
}

.fs-app-list li i[data-type="Presupuesto"] { background: #6f42c1; }
.fs-app-list li i[data-type="Albarán"] { background: #fd7e14; }
.fs-app-list li i[data-type="Pedido"] { background: #20c997; }
.fs-app-list li i[data-type="Compra"] { background: #dc3545; }

.fs-app-list li b {
    color: #111827;
    font-variant-numeric: tabular-nums;
}

.fs-note {
    margin-top: 1rem;
    color: #8a94a6;
    font-size: 0.76rem;
}

/* Esquema de la nube y captura */
.fs-cloud-overview {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    margin-top: 4.5rem;
}

.fs-scheme {
    display: grid;
    grid-template-columns: auto 70px minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
}

.fs-scheme-devices {
    display: grid;
    gap: 0.6rem;
}

.fs-node {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--fs-line);
    border-radius: 14px;
    color: var(--fs-ink);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    font-size: 0.88rem;
    font-weight: 700;
}

.fs-node svg {
    width: 20px;
    height: 20px;
    color: var(--fs-blue);
}

.fs-scheme-link {
    position: relative;
    height: 4px;
    border-radius: 4px;
    background: repeating-linear-gradient(90deg, #c9d6ee 0 8px, transparent 8px 14px);
}

.fs-scheme-link i {
    position: absolute;
    top: -3px;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fs-blue);
    animation: fs-dot 2.4s linear infinite;
}

.fs-scheme-link i:nth-child(2) { animation-delay: -0.8s; }
.fs-scheme-link i:nth-child(3) { animation-delay: -1.6s; background: var(--fs-red); animation-direction: reverse; }

.fs-scheme-cloud {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.4rem;
    padding: 1.6rem 1.2rem 1.4rem;
    border-radius: 26px;
    color: #ffffff;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
        linear-gradient(145deg, #d0101f, #6f000c);
    box-shadow: 0 24px 50px rgba(193, 18, 31, 0.3);
}

.fs-cloud-shape {
    width: 70px;
    fill: rgba(255, 255, 255, 0.95);
}

.fs-scheme-cloud strong {
    font-size: 1.2rem;
}

.fs-scheme-app {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    color: var(--fs-blue-dark);
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
}

.fs-scheme-cloud ul {
    display: grid;
    gap: 0.2rem;
    margin-top: 0.4rem;
    padding: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    list-style: none;
}

.fs-scheme-cloud li::before {
    content: "✓ ";
}

.fs-shot {
    margin: 0;
    overflow: hidden;
    border: 1px solid #d9e1ee;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.15);
}

.fs-shot-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid #e5e9f0;
    background: #f1f4f9;
}

.fs-shot-bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f87171;
}

.fs-shot-bar i:nth-child(2) { background: #fbbf24; }
.fs-shot-bar i:nth-child(3) { background: #34d399; }

.fs-shot-bar span {
    flex: 1;
    margin-left: 0.6rem;
    padding: 0.25rem 0.7rem;
    border-radius: 8px;
    color: #64748b;
    background: #ffffff;
    font-size: 0.74rem;
}

.fs-shot img {
    display: block;
    width: 100%;
    height: auto;
}

.fs-shot figcaption {
    padding: 0.8rem 1rem;
    border-top: 1px solid #eef1f6;
    color: var(--fs-muted);
    font-size: 0.82rem;
}

/* ===== INTEGRACIÓN CON TPV ===== */
.fs-integration {
    position: relative;
    max-width: none;
    color: #ffffff;
    background:
        radial-gradient(circle 520px at 12% 20%, rgba(22, 103, 242, 0.28), transparent 70%),
        radial-gradient(circle 520px at 88% 90%, rgba(193, 18, 31, 0.28), transparent 70%),
        #0a0f1d;
}

.fs-integration .fs-heading h2 {
    color: #ffffff;
}

.fs-integration .fs-heading p {
    color: #aeb9cd;
}

.fs-integration .fs-kicker {
    color: #8fb8ff;
}

.fs-pipeline {
    --travel: 6s;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(60px, 0.8fr) minmax(150px, 1fr) minmax(60px, 0.8fr) minmax(180px, 1.1fr);
    align-items: center;
    gap: 0.8rem;
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(1.5rem, 3vw, 2.4rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
}

.fs-stage {
    display: grid;
    justify-items: center;
    gap: 0.2rem;
    text-align: center;
}

.fs-stage > strong {
    margin-top: 0.7rem;
    font-size: 1.02rem;
}

.fs-stage > small {
    color: #93a1b8;
    font-size: 0.8rem;
}

/* TPV */
.fs-tpv {
    display: grid;
    justify-items: center;
}

.fs-tpv-screen {
    display: grid;
    gap: 0.1rem;
    width: 150px;
    padding: 0.8rem;
    border: 6px solid #1f2937;
    border-radius: 14px;
    color: #0f172a;
    background: linear-gradient(160deg, #ffffff, #e9eef7);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.fs-tpv-screen small {
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fs-tpv-screen span {
    color: #475569;
    font-size: 0.74rem;
}

.fs-tpv-screen b {
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
}

.fs-tpv-ok {
    color: #15803d;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 700;
    opacity: 0;
}

.fs-pipeline.is-sale .fs-tpv-ok {
    animation: fs-blink-in 1.2s ease both;
}

.fs-tpv-stand {
    width: 54px;
    height: 26px;
    background: linear-gradient(#374151, #1f2937);
    clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}

/* Recorrido del archivo */
.fs-track {
    position: relative;
    height: 44px;
}

.fs-track-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 3px;
    border-radius: 3px;
    background: repeating-linear-gradient(90deg, rgba(143, 184, 255, 0.45) 0 8px, transparent 8px 14px);
    transform: translateY(-50%);
}

.fs-packet {
    position: absolute;
    top: 50%;
    left: 0;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #2f7bff, var(--fs-blue-dark));
    box-shadow: 0 10px 24px rgba(22, 103, 242, 0.45);
    opacity: 0;
    will-change: transform, opacity;
}

.fs-packet svg {
    width: 22px;
    height: 22px;
}

.fs-packet--ready {
    background: linear-gradient(135deg, #22c55e, #15803d);
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.4);
}

/* Cada tramo se recorre en su turno dentro del mismo ciclo */
.fs-pipeline.is-running .fs-track:nth-of-type(2) .fs-packet {
    animation: fs-travel-1 var(--travel) var(--fs-ease) infinite;
}

.fs-pipeline.is-running .fs-track:nth-of-type(4) .fs-packet {
    animation: fs-travel-2 var(--travel) var(--fs-ease) infinite;
}

/* Nube de Inosca */
.fs-cloud {
    position: relative;
    display: grid;
    place-items: center;
    width: 150px;
}

.fs-cloud svg {
    width: 100%;
    fill: #c1121f;
}

.fs-cloud-logo {
    position: absolute;
    top: 52%;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    transform: translateY(-50%);
}

.fs-cloud-ring {
    position: absolute;
    inset: 8% 10%;
    border: 2px solid rgba(255, 107, 107, 0.7);
    border-radius: 50%;
    opacity: 0;
}

.fs-pipeline.is-running .fs-cloud-ring {
    animation: fs-cloud-ping var(--travel) ease-out infinite;
}

.fs-pipeline.is-running .fs-cloud svg {
    animation: fs-cloud-pulse var(--travel) ease-in-out infinite;
    transform-origin: center;
}

/* FacturaScripts */
.fs-mini-app {
    width: 190px;
    overflow: hidden;
    border-radius: 12px;
    background: #f7f8fa;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    text-align: left;
}

.fs-mini-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.7rem;
    color: #ffffff;
    background: #1667f2;
    font-size: 0.74rem;
    font-weight: 700;
}

.fs-mini-bar span {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: #1667f2;
    background: #ffffff;
    font-size: 0.62rem;
    font-weight: 900;
}

.fs-mini-app ul {
    display: grid;
    gap: 0.3rem;
    height: 112px;
    margin: 0;
    padding: 0.5rem;
    overflow: hidden;
    list-style: none;
}

.fs-mini-app li {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.55rem;
    border-radius: 7px;
    color: #374151;
    background: #ffffff;
    font-size: 0.72rem;
}

.fs-mini-app li b {
    color: #111827;
    font-variant-numeric: tabular-nums;
}

.fs-mini-app li.is-new {
    animation: fs-row-in 0.6s var(--fs-ease) both;
    box-shadow: inset 3px 0 0 #22c55e;
}

/* Pasos explicados */
.fs-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 1120px;
    margin: 2rem auto 0;
    padding: 0;
    list-style: none;
}

.fs-steps li {
    padding: 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
}

.fs-steps b {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-bottom: 0.8rem;
    border-radius: 50%;
    color: #ffffff;
    background: var(--fs-blue);
}

.fs-steps h3 {
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}

.fs-steps p {
    color: #aeb9cd;
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ===== CONTACTO ===== */
.fs-cta {
    padding: 6rem 1.5rem;
    color: #ffffff;
    text-align: center;
    background:
        radial-gradient(circle 520px at 85% 10%, rgba(255, 255, 255, 0.16), transparent 70%),
        linear-gradient(135deg, #1667f2, #0a3a96);
}

.fs-cta-inner {
    max-width: 760px;
    margin: 0 auto;
}

.fs-cta h2 {
    color: #ffffff;
}

.fs-cta-inner > p {
    max-width: 580px;
    margin: 0 auto 2rem;
    color: #dbe7ff;
    font-size: 1.05rem;
    line-height: 1.7;
}

.fs-cta .fs-actions {
    justify-content: center;
}

/* ===== ANIMACIONES ===== */
@keyframes fs-rise {
    from { opacity: 0; transform: translateY(18px); }
}

@keyframes fs-hero-zoom {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

@keyframes fs-fall-in {
    0% { opacity: 0; transform: translateY(-110%) rotate(-4deg); }
    60% { opacity: 1; }
    100% { opacity: 1; transform: none; }
}

@keyframes fs-fall-out {
    to { opacity: 0; transform: translateY(105%) rotate(3deg); }
}

@keyframes fs-dot {
    0% { left: 0; opacity: 0; }
    15%, 85% { opacity: 1; }
    100% { left: calc(100% - 10px); opacity: 0; }
}

@keyframes fs-travel-1 {
    0% { opacity: 0; transform: translateX(0) scale(0.6); }
    6% { opacity: 1; transform: translateX(0) scale(1); }
    38% { opacity: 1; transform: translateX(var(--track-w, 100px)) scale(1); }
    44%, 100% { opacity: 0; transform: translateX(var(--track-w, 100px)) scale(0.5); }
}

@keyframes fs-travel-2 {
    0%, 52% { opacity: 0; transform: translateX(0) scale(0.5); }
    58% { opacity: 1; transform: translateX(0) scale(1); }
    88% { opacity: 1; transform: translateX(var(--track-w, 100px)) scale(1); }
    94%, 100% { opacity: 0; transform: translateX(var(--track-w, 100px)) scale(0.5); }
}

@keyframes fs-cloud-ping {
    0%, 38% { opacity: 0; transform: scale(0.8); }
    42% { opacity: 1; }
    56% { opacity: 0; transform: scale(1.35); }
    100% { opacity: 0; }
}

@keyframes fs-cloud-pulse {
    0%, 38%, 56%, 100% { transform: scale(1); }
    46% { transform: scale(1.06); }
}

@keyframes fs-blink-in {
    0% { opacity: 0; }
    20%, 80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes fs-row-in {
    from { opacity: 0; transform: translateY(-12px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .fs-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fs-business-stage,
    .fs-cloud-overview {
        grid-template-columns: minmax(0, 1fr);
    }

    .fs-pipeline {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 0.4rem;
    }

    /* En vertical, el archivo baja de una etapa a la siguiente */
    .fs-track {
        width: 44px;
        height: 70px;
    }

    .fs-track-line {
        left: 50%;
        right: auto;
        top: 0;
        bottom: 0;
        width: 3px;
        height: auto;
        background: repeating-linear-gradient(180deg, rgba(143, 184, 255, 0.45) 0 8px, transparent 8px 14px);
        transform: translateX(-50%);
    }

    .fs-packet {
        top: 0;
        left: 50%;
        margin: 0 0 0 -20px;
    }

    .fs-pipeline.is-running .fs-track:nth-of-type(2) .fs-packet {
        animation-name: fs-travel-1-v;
    }

    .fs-pipeline.is-running .fs-track:nth-of-type(4) .fs-packet {
        animation-name: fs-travel-2-v;
    }

    .fs-steps {
        grid-template-columns: minmax(0, 1fr);
    }
}

@keyframes fs-travel-1-v {
    0% { opacity: 0; transform: translateY(0) scale(0.6); }
    6% { opacity: 1; transform: translateY(0) scale(1); }
    38% { opacity: 1; transform: translateY(var(--track-h, 30px)) scale(1); }
    44%, 100% { opacity: 0; transform: translateY(var(--track-h, 30px)) scale(0.5); }
}

@keyframes fs-travel-2-v {
    0%, 52% { opacity: 0; transform: translateY(0) scale(0.5); }
    58% { opacity: 1; transform: translateY(0) scale(1); }
    88% { opacity: 1; transform: translateY(var(--track-h, 30px)) scale(1); }
    94%, 100% { opacity: 0; transform: translateY(var(--track-h, 30px)) scale(0.5); }
}

@media (max-width: 700px) {
    .page-fs .fs-hero {
        align-items: flex-end;
        min-height: 660px;
        max-height: none;
    }

    .fs-hero::before {
        background: linear-gradient(0deg, rgba(4, 8, 18, 0.95) 0%, rgba(4, 8, 18, 0.72) 55%, rgba(4, 8, 18, 0.55) 100%);
    }

    .fs-hero-content {
        margin: 0 1.25rem 5rem;
    }

    .fs-section {
        padding: 3.5rem 1.1rem;
    }

    .fs-features {
        grid-template-columns: minmax(0, 1fr);
    }

    .fs-business-chips {
        flex-wrap: nowrap;
        margin: 0 -1.4rem 1.4rem;
        padding: 0 1.4rem 0.3rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .fs-business-chips::-webkit-scrollbar {
        display: none;
    }

    .fs-business-chips button {
        flex: 0 0 auto;
    }

    .fs-app-menu {
        display: none;
    }

    .fs-scheme {
        grid-template-columns: minmax(0, 1fr);
        justify-items: stretch;
    }

    .fs-scheme-devices {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .fs-node {
        flex-direction: column;
        font-size: 0.8rem;
    }

    .fs-scheme-link {
        width: 4px;
        height: 50px;
        justify-self: center;
        background: repeating-linear-gradient(180deg, #c9d6ee 0 8px, transparent 8px 14px);
    }

    .fs-scheme-link i {
        display: none;
    }

    .fs-cta {
        padding: 4.5rem 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-fs *,
    .page-fs *::before,
    .page-fs *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .page-fs .fs-reveal {
        opacity: 1;
        translate: none;
    }

    .fs-packet {
        opacity: 1;
    }
}
