/* ============================================================
   NUESTRO SISTEMA 2026 — Figma "Cubicup-Web" › "Home New Concept -
   Iteration #1" › "Sistema 20260916" (1440 × 6720). Va sobre home.css.
   ============================================================ */

/* ---------------- CABECERA (912): vídeo + velo 40 %, texto abajo a la izquierda ---------------- */
.sistema-hero {
    position: relative;
    height: 100vh; height: 100svh;
    min-height: 640px; max-height: 912px;
    overflow: hidden; isolation: isolate;
    color: var(--text-inverse);
    background: var(--background-navy);
}
.sistema-hero__bg { position: absolute; inset: 0; z-index: -1; }
.sistema-hero__bg::after { content: ""; position: absolute; inset: 0; background: var(--opacity-dark-40); }
.sistema-hero__video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sistema-hero__inner {
    position: absolute; left: var(--layout-grid-margin); bottom: var(--layout-grid-margin);
    width: 390px; max-width: calc(100% - 2 * var(--layout-grid-margin));
    display: flex; flex-direction: column; align-items: flex-start; gap: var(--base-16);
}
.sistema-hero__title {
    font-size: var(--heading-xxxl-size); line-height: var(--heading-xxxl-line-height);
    letter-spacing: var(--heading-xxxl-tracking); font-weight: var(--font-weight-regular);
    color: var(--text-inverse);
}
.sistema-hero__title .reveal-line {
    display: block;
    animation: line-appear 1s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: calc(.35s + var(--i, 0) * .16s);
}
.sistema-hero__text { font-size: var(--body-base-size); line-height: var(--body-base-line-height); color: var(--text-inverse); animation: line-appear 1s cubic-bezier(.22,.61,.36,1) .8s both; }
.sistema-hero .btn { animation: line-appear 1s cubic-bezier(.22,.61,.36,1) 1s both; }

/* ---------------- CUBO (984, fondo #fbf3e2): fija mientras dura el scroll de los 3 estados ---------------- */
.sistema-cubo { position: relative; height: calc(var(--steps, 3) * 100vh); background: #fbf3e2; }
.sistema-cubo__sticky {
    position: sticky; top: 0;
    height: 100vh; height: 100svh;
    display: flex; align-items: center;
    overflow: hidden;
}
/* Figma "Rectangle 11": 560 × 576 centrado; los vídeos traen el mismo crema de fondo */
.sistema-cubo__media { position: absolute; left: 50%; top: 50%; width: 560px; height: 576px; transform: translate(-50%, -50%); }
.sistema-cubo__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.sistema-cubo__video.is-active { opacity: 1; }
.sistema-cubo__grid {
    position: relative; width: 100%;
    max-width: var(--layout-max); margin: 0 auto; padding: 0 var(--layout-grid-margin); box-sizing: border-box;
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--layout-grid-gutter);
    height: 720px; max-height: 100%;
}
.sistema-cubo__lead,
.sistema-cubo__word {
    font-size: var(--heading-xl-size); line-height: var(--heading-xl-line-height);
    letter-spacing: var(--heading-xl-tracking); font-weight: var(--font-weight-regular);
}
.sistema-cubo__lead { align-self: center; color: var(--text-primary); }
/* columna de 720: franjas de 240 y la activa en la del centro (Figma: V1 lleva 240 arriba) */
.sistema-cubo__words { position: relative; overflow: hidden; }
.sistema-cubo__list {
    margin: 0; padding: 0; list-style: none;
    position: absolute; left: 0; right: 0; top: 50%;
    transform: translateY(calc(-120px - var(--cubo-step, 0) * 240px));
    transition: transform .5s cubic-bezier(.85,0,.15,1); /* easing del Smart Animate del Figma */
}
.sistema-cubo__word { height: 240px; box-sizing: border-box; padding-top: 96px; color: var(--ink-warm-400); transition: color .5s cubic-bezier(.85,0,.15,1); }
.sistema-cubo__word.is-active { color: var(--text-primary); }

/* ---------------- PROPUESTA DE VALOR: columna fija a la izquierda y cinco pasos ---------------- */
.sistema-propuesta { padding: var(--layout-section-padding-y-extended) 0; }
.sistema-propuesta__grid { display: flex; justify-content: space-between; gap: 80px; padding-top: 48px; padding-bottom: 48px; }
.sistema-propuesta__aside {
    flex: 0 0 622px; max-width: 622px;
    position: sticky; top: min(112px, calc(100svh - 864px)); align-self: flex-start;
    display: flex; flex-direction: column; gap: 64px;
}
.sistema-propuesta__intro { display: flex; flex-direction: column; align-items: flex-start; gap: var(--base-24); }
/* Figma: el titular de 52 cabe en una línea de 622 (Saans); con Inter se fuerza */
@media (min-width: 1201px) { .sistema-propuesta__intro .h-title { white-space: nowrap; } }
.sistema-propuesta__desc { font-size: var(--body-base-size); line-height: var(--body-base-line-height); color: var(--text-primary); }
.sistema-propuesta__media { position: relative; aspect-ratio: 622 / 598; border-radius: var(--base-16); overflow: hidden; background: #fcf7f2; }
.sistema-propuesta__strip {
    height: 300%;
    display: flex; flex-direction: column;
    transform: translateY(calc(var(--foto, 0) * -100% / 3));
    transition: transform .9s cubic-bezier(.85,0,.15,1);
}
.sistema-propuesta__strip img { display: block; width: 100%; height: calc(100% / 3); object-fit: cover; }

.sistema-pasos { flex: 0 0 622px; max-width: 622px; margin: 0; padding: 0; list-style: none; }
.sistema-paso { display: flex; gap: var(--base-16); max-width: 448px; }
.sistema-paso__step { flex: 0 0 32px; display: flex; flex-direction: column; align-items: center; gap: var(--base-8); padding-top: 6px; }
.sistema-paso__step::after { content: ""; flex: 1; width: 1px; background: var(--text-primary); }
.sistema-paso__num {
    width: 32px; height: 32px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    border: var(--base-thin) solid var(--text-primary); border-radius: 50%; /* Figma: 0,5 */
    font-size: var(--body-sm-size); line-height: 19px; color: var(--text-primary);
    transition: background-color .4s ease, border-color .4s ease, color .4s ease;
}
.sistema-paso.is-active .sistema-paso__num { background: var(--utility-focus-500); border-color: var(--utility-focus-500); color: #fff; }
.sistema-paso__body { flex: 0 0 400px; max-width: 400px; padding-bottom: 112px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.sistema-paso__title { font-size: var(--heading-lg-size); line-height: var(--heading-lg-line-height); letter-spacing: var(--heading-lg-tracking); font-weight: var(--font-weight-regular); color: var(--text-primary); }
.sistema-paso__text p { margin: 0; font-size: var(--body-base-size); line-height: var(--body-base-line-height); color: var(--text-primary); }
.sistema-paso__text p + p { margin-top: var(--base-16); }
.sistema-paso__cities { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }

/* Figma "Media-tag-hover": cristal oscuro de 30px; al pasar asoma la flecha (6px + 6 de hueco) */
.tag-hover {
    display: inline-flex; align-items: center; height: 30px; box-sizing: border-box; padding: 0 12px;
    border-radius: var(--base-16);
    background: var(--glass-background-default);
    -webkit-backdrop-filter: blur(var(--ui-card-glass-blur)); backdrop-filter: blur(var(--ui-card-glass-blur));
    color: #fff; text-decoration: none;
    font-size: var(--body-sm-size); line-height: 16px;
}
.tag-hover svg { width: 0; height: 10px; margin-left: 0; opacity: 0; transition: width .5s cubic-bezier(.22,.61,.36,1), margin-left .5s cubic-bezier(.22,.61,.36,1), opacity .3s ease; }
.tag-hover:hover, .tag-hover:focus-visible { color: #fff; }
.tag-hover:hover svg, .tag-hover:focus-visible svg { width: 10px; margin-left: 4px; opacity: 1; }

/* Figma "Button animation": el botón sube desde abajo (Pre-Appeared → Appeared) */
.btn-appear { display: inline-block; overflow: hidden; border-radius: 999px; vertical-align: top; }
.has-reveal .btn-appear[data-reveal] { opacity: 1; filter: none; transform: none; }
.has-reveal .btn-appear[data-reveal] > .btn { transform: translateY(100%); transition: transform .5s cubic-bezier(.22,.61,.36,1) .1s; }
.has-reveal .btn-appear[data-reveal].is-inview > .btn { transform: none; }

/* ---------------- PRENSA (Figma: 120 arriba y abajo, logos en 1152) ---------------- */
.sistema-2026 .prensa { padding: var(--layout-section-padding-y-base) var(--layout-grid-margin); }

/* ---------------- FAQS (Figma: 160 arriba y abajo) ---------------- */
.h-section--sistema { padding: var(--layout-section-padding-y-extended) 0; }

/* ---------------- CTA FINAL: círculo de 1175 centrado y texto de 506 ---------------- */
.cta-final--sistema .cta-final__circle { width: 1175px; height: 1175px; transform: translate(-50%, -50%); border-color: rgba(255,255,255,.4); }
.cta-final--sistema .cta-final__text { max-width: 506px; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1200px) {
    .sistema-propuesta__aside, .sistema-pasos { flex-basis: calc(50% - 40px); }
    .sistema-cubo__media { width: min(560px, 40vw); height: auto; aspect-ratio: 560 / 576; }
}
@media (max-width: 900px) {
    .sistema-cubo__grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; min-height: 0; padding-top: 96px; }
    .sistema-cubo__lead { align-self: start; }
    .sistema-cubo__media { top: 58%; width: min(400px, 70vw); }
    .sistema-cubo__words { height: 240px; }
    .sistema-cubo__list { top: 0; transform: translateY(calc(-96px - var(--cubo-step, 0) * 240px)); }
    .sistema-cubo__word { padding-top: 96px; }
    .sistema-cubo__sticky { align-items: flex-start; }

    .sistema-propuesta__grid { flex-direction: column; gap: var(--base-64, 64px); }
    .sistema-propuesta__aside { position: static; max-width: none; gap: var(--base-40, 40px); }
    .sistema-pasos { max-width: none; }
    .sistema-paso { max-width: none; }
    .sistema-paso__body { flex: 1 1 auto; min-width: 0; max-width: none; padding-bottom: 72px; }
    .cta-final--sistema .cta-final__circle { width: 720px; height: 720px; }
}
@media (max-width: 480px) {
    /* botones largos de los pasos: el texto pasa a dos líneas en vez de salirse */
    .sistema-paso .btn-appear { max-width: 100%; border-radius: 22px; }
    .sistema-paso .btn { max-width: 100%; height: auto; min-height: 44px; padding-top: 10px; padding-bottom: 10px; white-space: normal; text-align: left; }
}
