/* ============================================================
   RVOLUCION — PROPUESTA: Viaje horizontal por la evolución web
   ============================================================ */
.grad-text { background: var(--grad-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- SCROLL HIJACK ---------- */
.journey { position: relative; background: var(--ink); }
.journey-track { position: sticky; top: 0; height: 100vh; display: flex; flex-wrap: nowrap; width: max-content; will-change: transform; }
.scene { position: relative; width: 100vw; height: 100vh; flex: 0 0 100vw; overflow: hidden; display: flex; align-items: center; }
.scene-inner { position: relative; z-index: 5; max-width: 620px; padding: 0 clamp(1.5rem, 6vw, 7rem); }
.scene-inner.align-left { margin-right: auto; }
.scene-inner.align-right { margin-left: auto; text-align: right; }
.scene-inner.center { margin: 0 auto; text-align: center; max-width: 800px; }

/* ---------- TIPOGRAFÍA ---------- */
.scene-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--cyan); margin-bottom: 1.5rem; }
.scene-period { display: inline-block; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.15em; color: var(--cyan); text-transform: uppercase; margin-bottom: 1rem; padding: 0.3rem 0.9rem; border: 1px solid rgba(44,232,245,0.3); border-radius: 50px; }
.scene-period.now { color: var(--lime); border-color: rgba(198,242,78,0.35); }
.scene-h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1.1; letter-spacing: -0.02em; color: var(--white); margin-bottom: 1.5rem; }
.scene-h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1.05; letter-spacing: -0.02em; color: var(--white); margin-bottom: 1.2rem; }
.scene-h2.big { font-size: clamp(2rem, 5.5vw, 4.2rem); }
.scene-lead, .scene-text { font-size: clamp(1rem, 1.7vw, 1.25rem); line-height: 1.7; color: var(--gray); }
.scene-text.center-text { max-width: 620px; margin: 0 auto; }
.scene-tags { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.6rem; }
.scene-inner.align-right .scene-tags { justify-content: flex-end; }
.scene-tags span { font-family: var(--font-mono); font-size: 0.74rem; padding: 0.35rem 0.8rem; border-radius: 50px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--gray); }

/* ---------- DECORACIONES ---------- */
.scene-glow { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 1; }
.scene-glow.g-fire { width: 480px; height: 480px; background: rgba(255,87,34,0.28); top: -100px; right: 5%; }
.scene-glow.g-fire.big { width: 640px; height: 640px; opacity: 0.8; }
.scene-glow.g-cyan { width: 440px; height: 440px; background: rgba(44,232,245,0.2); bottom: -120px; left: 8%; }
.scene-bg-grid { position: absolute; inset: 0; z-index: 0; background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); }
.scene-era-watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%, calc(-50% + 60px)); font-family: var(--font-display); font-weight: 700; font-size: clamp(18rem, 40vw, 40rem); line-height: 1; color: rgba(255,255,255,0.025); z-index: 0; pointer-events: none; user-select: none; opacity: 0; transition: opacity 1s ease 0.5s, transform 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s; }
.scene-era-watermark.wm-ia { color: rgba(255,87,34,0.06); }
.scene.in-view .scene-era-watermark { opacity: 1; transform: translate(-50%, -50%); }
.scene-intro { background: radial-gradient(ellipse at 30% 40%, #0b0e16, var(--ink)); }
.scene-web1 { background: linear-gradient(120deg, #0a0c12, #0d0f17); }
.scene-web2 { background: linear-gradient(120deg, #0c0a14, #0b0e16); }
.scene-web3 { background: linear-gradient(120deg, #080d12, #0a0e15); }
.scene-ia { background: radial-gradient(ellipse at 70% 50%, #12100c, var(--ink)); }
.scene-sand { background: linear-gradient(180deg, #0a0c12, #0e0a08); }
.scene-final { background: radial-gradient(ellipse at 50% 50%, #100a0a, var(--ink)); }

/* ---------- NAV DE ERAS ---------- */
.journey-nav { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; gap: 0.5rem; padding: 0.6rem 0.9rem; background: rgba(11,14,22,0.7); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 50px; }
.jn-dot { position: relative; width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.18); border: none; cursor: pointer; transition: all 0.3s; }
.jn-dot:hover { background: rgba(255,255,255,0.4); }
.jn-dot.active { width: 32px; border-radius: 50px; background: var(--grad-fire); }
.jn-label { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 0.7rem; white-space: nowrap; color: var(--white); background: var(--ink-3); padding: 0.25rem 0.6rem; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.jn-dot:hover .jn-label { opacity: 1; }

/* ---------- HINT ---------- */
.journey-hint { position: fixed; bottom: 2rem; right: 2rem; z-index: 90; display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--gray); transition: opacity 0.4s; }
.journey-hint svg { width: 18px; height: 18px; animation: hintArrow 1.4s ease-in-out infinite; }
@keyframes hintArrow { 0%,100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
.journey-hint.hidden { opacity: 0; }

/* ---------- PROGRESO ---------- */
.journey-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,0.06); z-index: 90; }
.journey-progress-fill { height: 100%; width: 0%; background: var(--grad-main); transition: width 0.1s linear; }

/* ---------- ILUSTRACIONES ---------- */
.scene-art { position: absolute; z-index: 2; }
/* Web 1.0 */
.art-web1 { right: 8%; top: 50%; transform: translateY(-50%); width: 360px; }
.w1-window { background: #12151d; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.w1-bar { display: flex; gap: 6px; padding: 10px 14px; background: #1a1e28; border-bottom: 1px solid var(--line); }
.w1-bar span { width: 10px; height: 10px; border-radius: 50%; background: #3a3f4d; }
.w1-bar span:first-child { background: #ff5722; }
.w1-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.w1-line { height: 10px; border-radius: 4px; background: rgba(255,255,255,0.08); }
.w1-line.w1-title { height: 16px; width: 60%; background: rgba(255,255,255,0.18); }
.w1-line.short { width: 40%; }
.w1-img { height: 90px; border-radius: 6px; background: repeating-linear-gradient(45deg, rgba(255,255,255,0.04), rgba(255,255,255,0.04) 10px, rgba(255,255,255,0.07) 10px, rgba(255,255,255,0.07) 20px); }
/* Web 2.0 */
.art-web2 { left: 10%; top: 50%; transform: translateY(-50%); width: 340px; height: 340px; }
.w2-network { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(44,232,245,0.2); }
.w2-bubble { position: absolute; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: linear-gradient(135deg, rgba(255,87,34,0.15), rgba(44,232,245,0.12)); border: 1px solid var(--line); border-radius: 18px; backdrop-filter: blur(6px); animation: floatB 5s ease-in-out infinite; }
.w2-bubble svg { width: 28px; height: 28px; }
.w2-bubble.b5 { font-family: var(--font-display); font-weight: 700; color: var(--cyan); }
.w2-bubble.b1 { top: 0; left: 40%; animation-delay: 0s; }
.w2-bubble.b2 { top: 30%; left: 0; animation-delay: 0.6s; }
.w2-bubble.b3 { top: 25%; right: 0; animation-delay: 1.2s; }
.w2-bubble.b4 { bottom: 10%; left: 20%; animation-delay: 1.8s; }
.w2-bubble.b5 { bottom: 0; right: 25%; animation-delay: 2.4s; }
@keyframes floatB { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
/* Web 3.0 */
.art-web3 { right: 10%; top: 50%; transform: translateY(-50%); width: 300px; height: 300px; }
.w3-nodes { position: relative; width: 100%; height: 100%; }
.w3-links { position: absolute; inset: 0; width: 100%; height: 100%; }
.w3-links line { stroke: rgba(44,232,245,0.35); stroke-width: 1.5; }
.node { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--grad-fire); box-shadow: 0 0 16px rgba(255,87,34,0.5); animation: nodePulse 3s ease-in-out infinite; }
.node.n1 { top: 52px; left: 52px; } .node.n2 { top: 112px; left: 142px; background: var(--grad-cyan); }
.node.n3 { top: 62px; right: 52px; } .node.n4 { bottom: 70px; left: 82px; background: var(--grad-cyan); }
.node.n5 { bottom: 80px; right: 62px; } .node.n6 { top: 40%; left: 30%; }
@keyframes nodePulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: 0.7; } }
/* Era IA */
.art-ia { left: 9%; top: 50%; transform: translateY(-50%); width: 360px; height: 360px; }
.ia-core { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 90px; height: 90px; }
.ia-core-dot { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 46px; height: 46px; border-radius: 50%; background: var(--grad-fire); box-shadow: 0 0 40px rgba(255,87,34,0.6); }
.ia-core-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(44,232,245,0.4); }
.ia-core-ring.r1 { animation: spin 8s linear infinite; }
.ia-core-ring.r2 { inset: -22px; border-color: rgba(255,87,34,0.3); animation: spin 12s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.ia-orbit { position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px; display: flex; align-items: center; justify-content: center; color: var(--cyan); background: var(--ink-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 0 20px rgba(44,232,245,0.08); transition: border-color 0.3s, box-shadow 0.3s; }
.ia-orbit svg { width: 24px; height: 24px; }
.ia-orbit:hover { border-color: rgba(44,232,245,0.4); box-shadow: 0 0 24px rgba(44,232,245,0.2); }
.ia-orbit.o1 { transform: translate(-150px, -60px); }
.ia-orbit.o2 { transform: translate(120px, -90px); }
.ia-orbit.o3 { transform: translate(-120px, 90px); }
.ia-orbit.o4 { transform: translate(140px, 70px); }
/* Grano de arena */
.sand-dunes { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 80% 50% at 50% 120%, rgba(255,87,34,0.12), transparent), radial-gradient(ellipse 60% 40% at 20% 110%, rgba(255,122,24,0.1), transparent); }
/* Final */
.final-logo { height: 60px; width: auto; margin: 0 auto 1.8rem; display: block; }
.final-logo-text { font-family: var(--font-display); font-weight: 900; font-size: 2.4rem; color: var(--white); display: block; margin-bottom: 1.8rem; }
.final-logo-text .rmark { color: var(--fire); }
.final-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- ENTRADA ESCENAS ---------- */
.scene [data-depth] { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.scene.in-view [data-depth] { opacity: 1; transform: translateY(0); }
.scene.in-view .scene-inner > *:nth-child(1) { transition-delay: 0.1s; }
.scene.in-view .scene-inner > *:nth-child(2) { transition-delay: 0.2s; }
.scene.in-view .scene-inner > *:nth-child(3) { transition-delay: 0.3s; }
.scene.in-view .scene-inner > *:nth-child(4) { transition-delay: 0.4s; }
.scene-bg-grid[data-depth], .scene-glow[data-depth], .sand-dunes[data-depth] { opacity: 1 !important; transform: none !important; transition: none; }

/* ---------- MÓVIL: scroll vertical apilado ---------- */
@media (max-width: 900px) {
    .journey-track { position: relative; flex-direction: column; width: 100%; height: auto; }
    .scene { width: 100%; height: auto; min-height: 90vh; flex: none; padding: 5rem 0; }
    .scene-inner, .scene-inner.align-right, .scene-inner.center { margin: 0 auto; text-align: center; max-width: 90%; }
    .scene-inner.align-right .scene-tags, .scene-tags { justify-content: center; }
    .scene-art { position: relative; right: auto; left: auto; top: auto; transform: none; margin: 2.5rem auto 0; }
    .journey-hint { display: none; }
    .scene [data-depth] { opacity: 1; transform: none; }
}

/* ---------- VIDEO DE FONDO POR ÉPOCA (fade en cascada izq→der) ---------- */
.scene-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.20;
    /* fade en cascada: se revela de izquierda a derecha */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 100%);
    pointer-events: none;
    filter: saturate(0.85) contrast(1.05);
}
/* overlay oscuro para mantener legibilidad del texto */
.scene-video-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, var(--ink) 0%, rgba(6,8,13,0.55) 35%, rgba(6,8,13,0.65) 100%);
    pointer-events: none;
}
/* En escenas con texto a la derecha, oscurecer ese lado para legibilidad */
.scene-web2 .scene-video-overlay,
.scene-ia .scene-video-overlay {
    background: linear-gradient(270deg, var(--ink) 0%, rgba(6,8,13,0.55) 35%, rgba(6,8,13,0.65) 100%);
}

/* Fix titular escena IA: "automatización" es la palabra más larga del sitio.
   Damos más ancho y evitamos que se desborde por la derecha. */
.scene-ia .scene-inner { max-width: 860px; }
.scene-ia .scene-h2 {
    font-size: clamp(2rem, 4.6vw, 4.2rem);
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
}

/* ============================================================
   PROPUESTA CLARA — quiebre fondo claro tras el viaje
   ============================================================ */
.prop-offer {
    position: relative;
    background: #f7f5f0; /* crema */
    color: #14110e;
    padding: clamp(4rem, 9vw, 8rem) 0;
    overflow: hidden;
}
.prop-offer .wrap { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 3rem); }
/* franja de acento naranja superior */
.prop-offer-accent { position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--grad-fire); z-index: 3; }

/* Manifiesto */
.offer-manifesto { display: flex; flex-direction: column; align-items: center; max-width: 880px; margin: 0 auto clamp(3rem, 6vw, 5rem); text-align: center; }
.offer-isotipo { display: block; width: 64px; height: 64px; object-fit: contain; border-radius: 14px; margin-bottom: 1.5rem; }
.offer-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ff5722;
    margin-bottom: 1.2rem;
    padding: 0.35rem 1rem;
    border: 1px solid rgba(255,87,34,0.3);
    border-radius: 50px;
}
.offer-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 4.5vw, 3.2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #14110e;
    margin-bottom: 1.5rem;
}
.offer-hl { color: #ff5722; }
.offer-lead { font-size: clamp(1rem, 1.7vw, 1.2rem); line-height: 1.7; color: #4a443d; max-width: 760px; margin: 0 auto 1rem; }
.offer-lead-strong { color: #14110e; }
.offer-lead-strong strong { color: #ff5722; font-weight: 700; }

/* Grilla de ventajas */
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.offer-card {
    background: #ffffff;
    border: 1px solid #ece8e0;
    border-radius: 18px;
    padding: 2rem 1.8rem;
    transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
}
.offer-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(255,87,34,0.12); border-color: rgba(255,87,34,0.3); }
.offer-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--grad-fire);
    border-radius: 12px;
    margin-bottom: 1.2rem;
}
.offer-card h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: #14110e; margin-bottom: 0.7rem; }
.offer-card p { color: #5a534b; line-height: 1.65; font-size: 0.96rem; }

/* Cierre + CTA */
.offer-close { text-align: center; max-width: 720px; margin: 0 auto; }
.offer-logo { height: 48px; width: auto; margin-bottom: 1.8rem; }
.offer-close-title { font-family: var(--font-display); font-size: clamp(1.5rem, 3.5vw, 2.4rem); font-weight: 700; color: #14110e; line-height: 1.2; margin-bottom: 0.8rem; }
.offer-close-text { font-size: clamp(1rem, 1.8vw, 1.2rem); color: #4a443d; margin-bottom: 2rem; }
.offer-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-offer {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.95rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}
.btn-offer-main { background: var(--grad-fire); color: #fff; }
.btn-offer-main:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255,87,34,0.35); }
.btn-offer-ghost { background: transparent; color: #14110e; border: 1.5px solid #14110e; }
.btn-offer-ghost:hover { background: #14110e; color: #fff; }

/* Reveal local (la página usa scroll horizontal, esta sección es vertical normal) */
.prop-offer .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.prop-offer .reveal.in { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
    .offer-grid { grid-template-columns: 1fr; }
}
