/* Intro de entrada + movimiento adicional. Todo depende de html.js-anim (solo si no hay "reducir movimiento"). */

/* ---------- intro: cortinas que se abren ---------- */
.intro { display: none; position: fixed; inset: 0; z-index: 200; place-items: center; overflow: hidden; cursor: pointer; }
.has-intro .intro { display: grid; }
html.has-intro, html.has-intro body { overflow: hidden; }
.intro-curtain { position: absolute; top: 0; bottom: 0; width: 50.6%; background: var(--navy-900); transition: transform 1.05s cubic-bezier(.77, 0, .18, 1); }
.intro-curtain::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 500px at 50% 50%, color-mix(in srgb, var(--blue) 22%, transparent), transparent 70%); }
.intro-curtain::after { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--blue); box-shadow: 0 0 24px 2px var(--blue); }
.intro-curtain.l { left: 0; } .intro-curtain.l::after { right: 0; }
.intro-curtain.r { right: 0; } .intro-curtain.r::after { left: 0; }
.intro.open .intro-curtain.l { transform: translateX(-101%); }
.intro.open .intro-curtain.r { transform: translateX(101%); }
.intro-center { position: relative; display: grid; justify-items: center; gap: 18px; color: #fff; transition: opacity .5s, transform .9s var(--ease); }
.intro.open .intro-center { opacity: 0; transform: scale(1.18); }
.intro-svg { position: absolute; width: min(560px, 90vw); aspect-ratio: 1; left: 50%; top: 50%; translate: -50% -50%; opacity: .55; animation: spinSlow 30s linear infinite; }
.intro-svg circle, .intro-svg line { fill: none; stroke: var(--blue); stroke-width: 1.4; stroke-dasharray: 800; stroke-dashoffset: 800; animation: draw 2s .1s var(--ease) forwards; }
.intro-svg circle.d { fill: var(--blue); stroke: none; stroke-dasharray: 0; animation: fadeIn .6s 1.2s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes spinSlow { to { rotate: 360deg; } }
.intro-logo { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.8rem, 10vw, 5.6rem); letter-spacing: -.03em; display: flex; gap: .26em; overflow: hidden; line-height: 1.15; padding: 0 .1em; }
.intro-logo span, .intro-logo b { display: inline-block; animation: logoIn 1s .15s var(--ease) both; }
.intro-logo b { color: var(--blue); animation-delay: .32s; }
@keyframes logoIn { from { translate: 0 115%; rotate: 8deg; opacity: 0; } }
.intro-sub { letter-spacing: .34em; text-transform: uppercase; font-size: .72rem; color: #9fb8d8; animation: fadeIn .8s .75s both; text-align: center; padding: 0 20px; }
.intro-bar { width: min(260px, 60vw); height: 3px; background: rgba(255,255,255,.14); border-radius: 3px; overflow: hidden; animation: fadeIn .5s .6s both; }
.intro-bar i { display: block; height: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 14px var(--blue); }
.intro-count { font-family: var(--font-display); font-variant-numeric: tabular-nums; color: #9fb8d8; font-size: .9rem; animation: fadeIn .5s .6s both, pctUp 1.75s cubic-bezier(.3,.7,.2,1) .25s both; counter-reset: pct var(--pct); min-width: 3ch; text-align: center; }
.intro-count::after { content: counter(pct); }
@property --pct { syntax: '<integer>'; inherits: false; initial-value: 0; }
@keyframes pctUp { from { --pct: 0; } to { --pct: 100; } }
.intro-bar i { animation: barUp 1.75s cubic-bezier(.3,.7,.2,1) .25s both; will-change: transform; }
@keyframes barUp { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.intro-curtain, .intro-center { will-change: transform; }
.intro-skip { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: #6f87aa; animation: fadeIn .6s 1.2s both; }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- entrada del hero (tras la intro) ---------- */
.js-anim:not(.ready) .hero-reveal, .js-anim:not(.ready) .hero .hero-title .ch, .js-anim:not(.ready) .float, .js-anim:not(.ready) .scroll-hint { opacity: 0; }
.ready .hero-reveal { animation: heroIn .95s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes heroIn { from { opacity: 0; translate: 0 32px; } }
.ready .hero .hero-title .ch { animation: chIn 1s var(--ease) both; animation-delay: calc(var(--ci, 0) * 34ms + .1s); }
@keyframes chIn { from { opacity: 0; translate: 0 .75em; rotate: 7deg; } }
.ready .float { animation: floatIn 1.2s var(--ease) both, breathe 7s ease-in-out 2s infinite; animation-delay: var(--fd, .9s), var(--fd2, 2s); }
.float.f1 { --fd: .9s; --fd2: 2s; } .float.f2 { --fd: 1.1s; --fd2: 3.2s; } .float.f3 { --fd: 1.3s; --fd2: 4.4s; }
@keyframes floatIn { from { opacity: 0; translate: 0 90px; } }
@keyframes breathe { 50% { scale: 1.045; } }
.js-anim:not(.ready) .site-header { translate: 0 -110%; }
.site-header { transition: background .3s, box-shadow .3s, padding .3s, translate 1s var(--ease) .25s; }
.scroll-hint::after { content: ""; display: block; width: 1px; height: 36px; margin: 10px auto 0; background: linear-gradient(var(--blue), transparent); animation: scrollLine 2.2s var(--ease) infinite; }
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- titulares palabra a palabra ---------- */
.wm { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.wi { display: inline-block; translate: 0 112%; rotate: 4deg; transition: translate .95s var(--ease) calc(var(--wi) * 65ms), rotate .95s var(--ease) calc(var(--wi) * 65ms); }
h2.in .wi { translate: 0 0; rotate: 0deg; }

/* ---------- cintas ---------- */
.marquee-track.js-driven { animation: none !important; will-change: transform; }
.marquee { position: relative; }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--navy-800), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--navy-800), transparent); }
.marquee.outline { background: transparent; padding: 34px 0; }
.marquee.outline::before { background: linear-gradient(90deg, #fff, transparent); }
.marquee.outline::after { background: linear-gradient(270deg, #fff, transparent); }
.marquee.outline .marquee-track { font-size: clamp(2.4rem, 7vw, 5.2rem); letter-spacing: -.02em; text-transform: none; gap: 44px; color: transparent; }
.marquee.outline .marquee-track span { -webkit-text-stroke: 1.5px var(--navy-800); transition: color .3s; }
.marquee.outline .marquee-track span:hover { color: var(--blue); -webkit-text-stroke-color: var(--blue); }
.marquee.outline .marquee-track i { width: 16px; height: 16px; border-radius: 0; transform: rotate(45deg); background: var(--blue); }

/* ---------- línea de pasos que se dibuja con el scroll ---------- */
.steps { position: relative; }
.steps::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--blue); transform: scaleX(var(--sp, 0)); transform-origin: left; box-shadow: 0 0 12px var(--blue); }
.step::before { transition: transform .5s var(--ease); display: inline-block; }
.step:hover::before { transform: translateX(8px) scale(1.06); }

/* ---------- visuales y decoración ---------- */
.profile-visual { animation: clipIn 1.1s var(--ease) both; }
@keyframes clipIn { from { clip-path: inset(100% 0 0 0 round 28px); } to { clip-path: inset(0 0 0 0 round 28px); } }
.profile-visual::before { background-size: 80px 100%; animation: lines 6s linear infinite; }
@keyframes lines { to { background-position: 80px 0; } }
.profile-visual::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--blue) 55%, transparent), transparent 70%); animation: orbit 9s ease-in-out infinite; pointer-events: none; }
@keyframes orbit { 0%, 100% { translate: -60% -40%; } 50% { translate: 60% 40%; } }
.profile-visual .big { z-index: 1; }
.why > .wrap, .contact > .wrap { position: relative; z-index: 1; }
.why::before { content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--blue) 24%, transparent), transparent 70%); top: -180px; right: -140px; animation: drift 16s ease-in-out infinite; pointer-events: none; }
.contact { position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; right: -180px; top: -180px; width: 520px; height: 520px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--blue) 40%, transparent); box-shadow: 0 0 0 60px color-mix(in srgb, var(--blue) 8%, transparent), 0 0 0 120px color-mix(in srgb, var(--blue) 5%, transparent); animation: spinSlow 50s linear infinite; pointer-events: none; }
.quote { position: relative; overflow: hidden; }
.quote::before { content: ""; position: absolute; left: -120px; bottom: -160px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--blue) 20%, transparent), transparent 70%); animation: drift 15s ease-in-out infinite reverse; pointer-events: none; }
.quote > .wrap { position: relative; z-index: 1; }
.tilt .ic { transition: transform .5s var(--ease), background .3s; }
.tilt:hover .ic { transform: translateY(-6px) rotate(-8deg) scale(1.1); background: var(--blue); color: #00182e; }
.tilt.star { overflow: hidden; }
.tilt.star::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.14) 50%, transparent 65%); transform: translateX(-120%); animation: sheen 5s ease-in-out 2s infinite; pointer-events: none; }
@keyframes sheen { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg); transition: left .75s var(--ease); pointer-events: none; }
.btn:hover::after { left: 150%; }
.why-item .n { display: inline-block; transition: transform .4s var(--ease); }
.why-item:hover .n { transform: translateX(10px); }
.why-item h3 { transition: color .3s; } .why-item:hover h3 { color: var(--blue-600); }
.quote-box { transition: box-shadow .5s, transform .5s var(--ease); }
.quote-box:hover { box-shadow: 0 50px 90px -40px rgba(0,34,79,.35); }
#wizard > * { animation: fadeIn .35s ease both; }
.chip span { transition: transform .25s var(--ease), border-color .2s, background .2s; }
.chip:hover span { transform: translateY(-3px); }
details[open] > p { animation: fadeUp .5s var(--ease); }

/* ---------- cursor con etiqueta ---------- */
.cursor-ring { display: grid; place-items: center; font: 700 .68rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: #00182e; }
.cursor-ring.label { width: 86px; height: 86px; margin: -43px 0 0 -43px; background: var(--blue); }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
  html.has-intro, html.has-intro body { overflow: auto; }
  .wi { translate: 0 0; rotate: 0deg; transition: none; }
}
@media (max-width: 560px) {
  .marquee::before, .marquee::after { width: 40px; }
}
.intro-svg, .intro-skip { transition: opacity .45s; }
.intro.open .intro-svg, .intro.open .intro-skip { opacity: 0 !important; animation-play-state: paused; }
