:root {
    --color-white: #ffffff;
    --color-red: #EB0F37;
    --color-dark: #01090F;
    --color-navy: #081C2D;
    --color-light: #F7F8FA;
    --color-light-2: #F0F1F5;
    --color-gray: #E0E3E7;
    --color-white-80: #FFFFFFCC;
    --color-white-45: #FFFFFF73;

    --font-main: 'Inter Tight', system-ui, sans-serif;

    --container: 1280px;
    --gutter: 80px;
    --header-height: 100px;

    --fs-hero: 100px;
    --fs-title: 56px;
    --fs-eyebrow: 20px;
    --fs-paragraph: 18px;
    --fs-btn: 16px;
    --fs-stat-number: 85px;
    --fs-stat-label: 37px;
    --fs-stat-desc: 20px;
    --fs-tabs: 16px;
    --fs-logos-title: 130px;
    --fs-manifesto: 225px;
    --fs-footer-nav: 17px;
    --fs-footer-legal: 14px;
    --fs-footer-big: min(260px, 16vw);
    --w-footer-logos: 500px;
}

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

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html:not(.motion) {
    scroll-behavior: smooth;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

body {
    font-family: var(--font-main);
    color: var(--color-navy);
    background: var(--color-dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
video {
    display: block;
    max-width: 100%;
}

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

ul {
    list-style: none;
}

/* Utilidades */
.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

.text-white { color: var(--color-white); }
.text-red { color: var(--color-red); }
.text-navy { color: var(--color-navy); }
.text-dark { color: var(--color-dark); }
.text-gray { color: var(--color-gray); }

.title {
    font-size: var(--fs-title);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.paragraph {
    font-size: var(--fs-paragraph);
    font-weight: 300;
    line-height: 1.6;
}

/* Bordes superior e inferior con ancho parcial, controlado por --line-width */
.lined {
    --line-width: 100%;
    --line-color: currentColor;
    position: relative;
    display: inline-block;
    padding: 10px 0;
}

.lined::before,
.lined::after {
    content: '';
    position: absolute;
    left: 0;
    width: var(--line-width);
    height: 1px;
    background: var(--line-color);
    transform: scaleX(var(--line-scale, 1));
    transform-origin: left center;
}

.lined::before { top: 0; }
.lined::after { bottom: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: var(--color-red);
    color: var(--color-white);
    font-size: var(--fs-btn);
    font-weight: 600;
    border-radius: 0 0 12px 0;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background: #c50c2e;
}

/* Header */
.header {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
    height: var(--header-height);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 var(--gutter);
}

.header__logo img {
    width: 150px;
    height: auto;
}

.header__nav ul {
    display: flex;
    gap: 48px;
}

.header__nav a {
    position: relative;
    display: inline-block;
    padding: 6px 0;
    color: var(--color-white);
    font-size: 16px;
    font-weight: 600;
    transition: color 0.4s ease;
}

.motion .header {
    position: fixed;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.header.is-hidden {
    transform: translateY(-100%);
}

.header.is-light .header__nav a {
    color: var(--color-navy);
}

.header__nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.35s ease;
}

.header__nav a:hover::after,
.header__nav a:focus-visible::after {
    transform: scaleX(1);
}

/* Sección 1 - Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-dark);
    text-align: center;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: url('../assets/seccion-1/fondo-seccion-1.png') center / cover no-repeat;
    will-change: transform;
}

/* Difuminado inferior: va en la sección y no en .hero__bg porque el zoom del fondo saca su borde fuera de cuadro */
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    z-index: 1;
    height: calc(1% + 1px);
    background: linear-gradient(to bottom, rgba(1, 9, 15, 0) 0%, var(--color-dark) 100%);
    pointer-events: none;
}

.hero__titles {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 var(--gutter);
}

.motion .hero__titles {
    display: grid;
    place-items: center;
}

.motion .hero__title {
    grid-area: 1 / 1;
}

.motion .hero__titles,
.motion .hero__anchor {
    visibility: hidden;
}

/* Recuadros que se pintan desde abajo, en orden aleatorio, al terminar el título 2 */
.hero__boxes {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    grid-template-columns: repeat(var(--box-cols, 5), 1fr);
    grid-auto-rows: var(--box-size, 20vw);
    overflow: hidden;
    pointer-events: none;
}

.motion .hero__boxes {
    display: grid;
}

/* El píxel extra evita líneas finas entre recuadros vecinos */
.hero__boxes span {
    width: calc(100% + 1px);
    height: calc(100% + 1px);
    background: var(--color-dark);
    transform: scaleY(0);
    transform-origin: center bottom;
}

/* Copias de transiciones-negro.svg que se pintan sobre la sección al terminar el título 2 */
.hero__paint {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    grid-template-columns: repeat(var(--paint-cols, 4), 1fr);
    align-content: start;
    overflow: hidden;
    pointer-events: none;
}

.motion .hero__paint {
    display: grid;
}

.hero__paint svg {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 732 / 740;
    overflow: visible;
}

.hero__paint path {
    fill: none;
    stroke: var(--color-dark);
    stroke-width: 63.1;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

.hero__title {
    font-size: var(--fs-hero);
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.hero__title--1 {
    color: var(--color-white);
}

.hero__title--2 {
    color: var(--color-red);
}

.hero__anchor {
    position: absolute;
    z-index: 1;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-white);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* Sección 2 - Nosotros */
.about {
    display: flex;
    align-items: center;
    background: var(--color-dark);
}

.about__inner {
    position: relative;
    z-index: 2;
}

.about__content {
    max-width: 480px;
}

.eyebrow {
    --line-width: 70%;
    font-size: var(--fs-eyebrow);
    font-weight: 800;
    line-height: 1;
}

.about__title {
    margin: 16px 0;
}

.about__text {
    margin-bottom: 32px;
}

/*
 * --person-w: ancho del deportista
 * --line-overlap: cuánto se meten las líneas separadoras detrás del deportista
 * --stat-indent: distancia desde el inicio de la línea hasta el texto de la cifra
 * --stat-col: ancho extra que ocupa la columna de cifras a la derecha del deportista
 */
.about__visual {
    --person-w: 489px;
    --line-overlap: 170px;
    --stat-indent: 200px;
    --stat-col: 340px;
    position: absolute;
    top: 0;
    right: 0;
    width: calc(var(--person-w) + var(--stat-col) + var(--gutter));
    height: 100%;
}

.about__person {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: var(--person-w);
    height: auto;
}

.about__stats {
    position: absolute;
    top: 0;
    right: 0;
    left: calc(var(--person-w) - var(--line-overlap));
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    color: var(--color-white);
}

.stat {
    display: flex;
    flex-direction: column;
    padding: 20px var(--gutter) 20px var(--stat-indent);
}

.stat + .stat {
    border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.stat__number {
    margin-bottom: 14px;
    font-size: var(--fs-stat-number);
    font-weight: 900;
    line-height: 0.9;
}

.stat__label {
    font-size: var(--fs-stat-label);
    font-weight: 800;
    line-height: 1;
}

.stat__desc {
    font-size: var(--fs-stat-desc);
    font-weight: 300;
    line-height: 1.1;
}

/* Sección 3 - Unidades de negocio */
.units {
    display: flex;
    align-items: center;
    background: var(--color-light);
}

.units__inner {
    position: relative;
    z-index: 2;
}

.units__content {
    max-width: 500px;
}

.units__title {
    --line-width: 45%;
    --line-color: var(--color-navy);
    padding: 18px 0;
}

.units__tabs {
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
    margin: 28px 0 32px;
}

.units__tabs li {
    padding: 0 18px;
    color: var(--color-navy);
    font-size: var(--fs-tabs);
    font-weight: 800;
    border-left: 1px solid var(--color-navy);
}

.units__tabs li:first-child {
    padding-left: 0;
    border-left: 0;
}

.units__tabs li.is-active {
    color: var(--color-red);
}

.units__text {
    margin-bottom: 32px;
}

.units__media {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
}

.units__shape {
    position: absolute;
    top: 27%;
    right: 10%;
    height: 76%;
    width: auto;
    max-width: none;
}

.units__people {
    position: absolute;
    bottom: 0;
    right: 12%;
    height: 77%;
    width: auto;
    max-width: none;
}

.units__logo {
    position: absolute;
    bottom: 0;
    left: 8%;
    width: 264px;
    height: auto;
}

/* Secciones 4 y 6 - Clientes / Partners */
.logos {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 80px;
    background: var(--color-light-2);
    text-align: center;
}

.logos__title {
    font-size: var(--fs-logos-title);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
}

.logos__text {
    max-width: 560px;
    margin: 24px auto 0;
}

.slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slider::before,
.slider::after {
    content: '';
    position: absolute;
    top: 0;
    z-index: 2;
    width: 35%;
    height: 100%;
    pointer-events: none;
}

.slider::before {
    left: 0;
    background: linear-gradient(270deg, rgba(240, 241, 245, 0) -202.55%, #F0F1F5 65.07%);
}

.slider::after {
    right: 0;
    background: linear-gradient(90deg, rgba(240, 241, 245, 0) -202.55%, #F0F1F5 65.07%);
}

.slider__track {
    display: flex;
    width: max-content;
    animation: slider-loop 30s linear infinite;
}

.slider__item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 80px;
    padding: 0 30px;
}

.slider__item img {
    max-height: 60px;
    width: auto;
}

@keyframes slider-loop {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Sección 5 - We are FZ Sports */
.manifesto {
    display: flex;
    align-items: center;
    background: url('../assets/seccion-5/fondo-seccion-5.png') center / cover no-repeat;
}

.manifesto__title {
    padding-left: var(--gutter);
    font-size: var(--fs-manifesto);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.06em;
    white-space: nowrap;
}

.manifesto__track {
    display: inline-block;
    will-change: transform;
}

/* Footer */
.footer {
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    color: var(--color-white);
}

.footer__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(1, 9, 15, 0.6);
}

.footer__top,
.footer__bottom,
.footer__divider,
.footer__big {
    position: relative;
    z-index: 2;
}

.footer__top {
    display: flex;
    justify-content: center;
}

.footer__logos {
    width: var(--w-footer-logos);
    height: auto;
}

.footer__divider {
    width: 80%;
    height: 1px;
    margin: 56px auto;
    border: 0;
    background: var(--color-white-45);
}

.footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
}

.footer__nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 48px;
}

.footer__nav a {
    color: var(--color-white-80);
    font-size: var(--fs-footer-nav);
    font-weight: 500;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.footer__nav a:hover {
    color: var(--color-white);
}

.footer__legal {
    color: var(--color-white-80);
    font-size: var(--fs-footer-legal);
    font-weight: 300;
}

/* La altura recorta ~30% inferior de las mayúsculas según las métricas de Inter Tight */
.footer__big {
    height: 0.62em;
    margin-top: 64px;
    overflow: hidden;
    color: var(--color-gray);
    font-size: var(--fs-footer-big);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.footer__big span {
    display: block;
}

/* Animaciones: textos divididos en palabras y letras */
.split-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.06em;
    margin-bottom: -0.06em;
}

.split-word__inner,
.split-char {
    display: inline-block;
    will-change: transform;
}

.motion .logos__title {
    overflow: hidden;
    padding: 0.04em 0;
}

/* Arcos SVG que giran sobre el fondo mientras aparece cada sección, centrados en --wipe-x / --wipe-y */
.wipe {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.motion .wipe {
    display: block;
}

.wipe__arcs {
    position: absolute;
    top: var(--wipe-y);
    left: var(--wipe-x);
    width: 60vmax;
    max-width: none;
    height: auto;
    opacity: 0;
    will-change: transform, opacity;
}

.logos__head,
.logos .slider,
.manifesto__title {
    position: relative;
    z-index: 2;
}

/* Desktop: las secciones se apilan en un escenario fijo y el scroll controla qué escena se ve */
.stage-mode main {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.stage-mode main > .section {
    position: absolute;
    inset: 0;
    min-height: 0;
    height: 100vh;
}

/* Notebook */
@media (max-width: 1440px) {
    :root {
        --fs-hero: 84px;
        --fs-title: 50px;
        --fs-eyebrow: 18px;
        --fs-paragraph: 17px;
        --fs-stat-number: 72px;
        --fs-stat-label: 32px;
        --fs-stat-desc: 18px;
        --fs-logos-title: 110px;
        --fs-manifesto: 190px;
        --w-footer-logos: 440px;
    }

    .about__content {
        max-width: 440px;
    }

    .about__visual {
        --person-w: 400px;
        --line-overlap: 150px;
        --stat-indent: 200px;
        --stat-col: 300px;
    }
}

@media (max-width: 1200px) {
    :root {
        --gutter: 48px;
        --fs-hero: 72px;
        --fs-title: 46px;
        --fs-stat-number: 62px;
        --fs-stat-label: 28px;
        --fs-stat-desc: 16px;
        --fs-logos-title: 96px;
        --fs-manifesto: 160px;
        --w-footer-logos: 400px;
    }

    .header__nav ul {
        gap: 28px;
    }

    .about__content {
        max-width: 380px;
    }

    .about__visual {
        --person-w: 340px;
        --line-overlap: 120px;
        --stat-indent: 160px;
        --stat-col: 260px;
    }

    .stat {
        padding: 28px var(--gutter) 28px var(--stat-indent);
    }
}

/* Tablet */
@media (max-width: 900px) {
    :root {
        --gutter: 32px;
        --header-height: 80px;
        --fs-hero: 56px;
        --fs-title: 44px;
        --fs-eyebrow: 17px;
        --fs-paragraph: 16px;
        --fs-btn: 15px;
        --fs-stat-number: 56px;
        --fs-stat-label: 26px;
        --fs-stat-desc: 15px;
        --fs-tabs: 15px;
        --fs-logos-title: 80px;
        --fs-manifesto: 120px;
        --fs-footer-nav: 16px;
        --w-footer-logos: 360px;
    }

    .header {
        grid-template-columns: auto 1fr;
    }

    .header__logo img {
        width: 120px;
    }

    .header__nav {
        display: none;
    }

    .about,
    .units {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: calc(var(--header-height) + 40px);
    }

    .about__content,
    .units__content {
        max-width: 600px;
    }

    .about__visual {
        position: relative;
        width: 100%;
        height: auto;
    }

    .about__person {
        position: relative;
        width: 70%;
        max-width: 420px;
        margin: 40px auto 0;
    }

    .about__stats {
        position: relative;
        left: auto;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
        height: auto;
        padding: 0 var(--gutter) 48px;
    }

    .stat {
        padding: 24px 16px 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.35);
    }

    .stat + .stat {
        padding-left: 16px;
        border-left: 1px solid rgba(255, 255, 255, 0.35);
    }

    .units__media {
        position: relative;
        width: 100%;
        height: 60vh;
        margin-top: 40px;
    }

    .units__logo {
        width: 150px;
    }

    .logos {
        gap: 56px;
    }

    .footer {
        padding-top: 64px;
    }

    .footer__divider {
        margin: 40px auto;
    }

    .footer__nav ul {
        gap: 14px 32px;
    }

    .footer__big {
        margin-top: 48px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    :root {
        --gutter: 20px;
        --fs-hero: 38px;
        --fs-title: 36px;
        --fs-eyebrow: 16px;
        --fs-paragraph: 15px;
        --fs-stat-number: 52px;
        --fs-stat-label: 26px;
        --fs-stat-desc: 15px;
        --fs-tabs: 14px;
        --fs-logos-title: 52px;
        --fs-manifesto: 80px;
        --fs-footer-nav: 15px;
        --fs-footer-legal: 13px;
        --fs-footer-big: 18vw;
        --w-footer-logos: 260px;
    }

    .hero__titles {
        gap: 16px;
    }

    .hero__anchor {
        bottom: 32px;
        font-size: 13px;
    }

    .about__person {
        width: 85%;
    }

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

    .stat,
    .stat + .stat {
        padding: 24px 0;
        border-left: 0;
    }

    .units__tabs li {
        padding: 0 12px;
    }

    .units__media {
        height: 50vh;
    }

    .units__logo {
        width: 110px;
    }

    .slider__item {
        width: 160px;
        padding: 0 20px;
    }

    .slider__item img {
        max-height: 44px;
    }

    .slider::before,
    .slider::after {
        width: 25%;
    }

    .footer__nav ul {
        flex-direction: column;
        gap: 14px;
    }
}
