/* Fondo vivo */
.bg-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.bg-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; will-change: transform; }
.bg-blob-1 { width: 60vmax; height: 60vmax; left: -18vmax; top: -24vmax; background: radial-gradient(circle, rgba(109, 255, 139, 0.32), transparent 65%); animation: drift-a 26s ease-in-out infinite alternate; }
.bg-blob-2 { width: 52vmax; height: 52vmax; right: -20vmax; top: 18vh; background: radial-gradient(circle, rgba(40, 200, 160, 0.22), transparent 65%); animation: drift-b 32s ease-in-out infinite alternate; }
.bg-blob-3 { width: 46vmax; height: 46vmax; left: 20vw; bottom: -30vmax; background: radial-gradient(circle, rgba(146, 255, 171, 0.16), transparent 65%); animation: drift-c 38s ease-in-out infinite alternate; }
.bg-grid {
  position: absolute; inset: -50% -50% 0; opacity: 0.22;
  background-image: linear-gradient(rgba(109, 255, 139, 0.14) 1px, transparent 1px), linear-gradient(90deg, rgba(109, 255, 139, 0.14) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(700px) rotateX(62deg) translateY(calc(var(--scroll-shift, 0) * 1px));
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, #000 0%, transparent 55%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 55%);
}
.bg-glow { position: absolute; inset: 0; background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 30%), rgba(109, 255, 139, 0.09), transparent 60%); transition: background-position 0.2s; }
.bg-grain {
  position: absolute; inset: -100%; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
body { background: transparent; }
@keyframes drift-a { to { transform: translate(14vw, 18vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-16vw, -10vh) scale(0.9); } }
@keyframes drift-c { to { transform: translate(-12vw, -16vh) scale(1.2); } }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -6%); } 60% { transform: translate(-4%, -3%); } 80% { transform: translate(6%, 5%); } 100% { transform: translate(0, 0); } }

/* Barra de progreso */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: linear-gradient(90deg, var(--accent-soft), var(--accent)); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }

/* Hero «scroll world» */
.world { position: relative; height: 170vh; }
.world-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; perspective: 1100px; perspective-origin: 50% 45%; }
.world-tiles { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.tile {
  position: absolute; left: 50%; top: 50%; width: var(--w, 280px);
  transform: translate(-50%, -50%) translate3d(var(--x), var(--y), var(--z)) rotateY(var(--ry, 0deg));
  border-radius: 14px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0b0f0b; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(109, 255, 139, 0.05);
}
.tile img, .tile video { width: 100%; height: auto; display: block; }
.tile.is-portrait { width: var(--w, 180px); }
.world-copy { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 0 var(--gutter); z-index: 2; }
.world-copy .hero { padding: 0; }
.world-outro { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; z-index: 2; opacity: 0; pointer-events: none; }
.world-outro p { font-size: clamp(34px, 6vw, 80px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; margin: 0; }
.scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; z-index: 2; }
.scroll-hint span { width: 1px; height: 42px; background: linear-gradient(var(--accent), transparent); animation: hint 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }
html:not(.motion-ready) .world { height: auto; }
html:not(.motion-ready) .world-stage { position: relative; height: auto; overflow: visible; perspective: none; }
html:not(.motion-ready) .world-tiles, html:not(.motion-ready) .world-outro, html:not(.motion-ready) .scroll-hint { display: none; }
html:not(.motion-ready) .world-copy { position: relative; }

/* Titulares palabra a palabra */
.split-word { display: inline-block; white-space: pre; }
.split-ready .split-word { opacity: 0; transform: translateY(0.45em) rotate(2deg); transition: opacity 0.6s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i) * 40ms); }
.split-ready.is-in .split-word { opacity: 1; transform: none; }

/* Marquesinas */
.marquee { --gap: 56px; display: flex; overflow: hidden; gap: var(--gap); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; flex: 0 0 auto; align-items: center; gap: var(--gap); min-width: 100%; animation: marquee var(--speed, 40s) linear infinite; }
.marquee.reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }
.logos { padding-block: 40px 8px; }
.logos .marquee-track img { height: 44px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1) brightness(1.6); opacity: 0.55; transition: filter 0.3s, opacity 0.3s; }
.logos .marquee-track img:hover { filter: none; opacity: 1; }
.logos-label { text-align: center; color: var(--muted); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 26px; }
.reviews-marquee { --gap: 16px; }
.reviews-marquee .review { flex: 0 0 auto; }

/* Servicios con medio vivo */
.service { overflow: hidden; isolation: isolate; min-height: 220px; }
.service-media { position: absolute; inset: 0; z-index: -1; opacity: 0.16; transition: opacity 0.5s var(--ease), transform 0.8s var(--ease); transform: scale(1.06); }
.service-media img, .service-media video { width: 100%; height: 100%; object-fit: cover; }
.service-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(2, 2, 2, 0.95) 30%, rgba(2, 2, 2, 0.45)); }
a.service:hover .service-media { opacity: 0.55; transform: scale(1); }
.service-media.gradient { background: conic-gradient(from var(--angle, 0deg) at 70% 50%, rgba(109, 255, 139, 0.5), rgba(20, 120, 90, 0.2), rgba(109, 255, 139, 0.05), rgba(109, 255, 139, 0.5)); animation: spin-angle 9s linear infinite; }

/* Proyectos horizontales */
.showcase { position: relative; }
.showcase-pin { overflow: hidden; }
.showcase-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.showcase-count { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.showcase-track { display: flex; gap: 28px; width: max-content; padding-inline: var(--gutter); will-change: transform; }
.live-card { width: min(62vw, 760px); flex: 0 0 auto; text-decoration: none; display: block; }
.live-frame { border-radius: 18px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12); background: #0b0f0b; box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9); transition: transform 0.6s var(--ease), border-color 0.4s; }
a.live-card:hover .live-frame { transform: translateY(-6px); border-color: rgba(109, 255, 139, 0.45); }
.live-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid var(--line); }
.live-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.live-bar small { margin-left: 12px; color: var(--muted); font-size: 12px; }
.live-screen { aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.live-screen img { width: 100%; height: auto; display: block; will-change: transform; }
.live-card.is-live .live-screen img { animation: site-scroll var(--dur, 14s) ease-in-out infinite alternate; }
a.live-card:hover .live-screen img { animation-duration: calc(var(--dur, 14s) * 0.55); }
@keyframes site-scroll { 0%, 8% { transform: translateY(0); } 92%, 100% { transform: translateY(calc(var(--dist, 0px) * -1)); } }
.live-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 4px 0; }
.live-meta h3 { font-size: clamp(22px, 2.4vw, 30px); }
.live-meta span { color: var(--muted); font-size: 15px; }
.live-badge { display: inline-block; margin-left: 10px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #041006; background: var(--accent); vertical-align: middle; }
@media (max-width: 900px) {
  .showcase-track { overflow-x: auto; scroll-snap-type: x mandatory; width: auto; padding-bottom: 12px; scrollbar-width: none; }
  .showcase-track::-webkit-scrollbar { display: none; }
  .live-card { width: 84vw; scroll-snap-align: center; }
}

/* Banda de reels */
.reels-band { padding-block: var(--section); overflow: hidden; }
.reels-row { display: flex; gap: 16px; width: max-content; will-change: transform; }
.reels-row + .reels-row { margin-top: 16px; }
.reel { width: clamp(150px, 16vw, 230px); aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; flex: 0 0 auto; border: 1px solid rgba(255, 255, 255, 0.1); background: #0b0f0b; position: relative; }
.reel.is-wide { width: clamp(260px, 30vw, 420px); }
.reel video, .reel img { width: 100%; height: 100%; object-fit: cover; }
.reel figcaption { position: absolute; left: 12px; bottom: 12px; right: 12px; font-size: 13px; font-weight: 600; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); }
.reels-head { text-align: center; margin-bottom: 48px; }

/* Precios: borde animado */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.pricing-card-pro { border: 1px solid transparent; background: linear-gradient(#070a07, #070a07) padding-box, conic-gradient(from var(--angle), rgba(109, 255, 139, 0.9), rgba(109, 255, 139, 0.05) 30%, rgba(146, 255, 171, 0.6) 60%, rgba(109, 255, 139, 0.05) 80%, rgba(109, 255, 139, 0.9)) border-box; animation: spin-angle 6s linear infinite; }
@keyframes spin-angle { to { --angle: 360deg; } }

/* Texto que se ilumina con el scroll */
.scrub-text { font-size: clamp(28px, 4.2vw, 54px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; max-width: 980px; }
.scrub-text .split-word { color: rgba(255, 255, 255, 0.5); transition: color 0.2s; }
.scrub-text .split-word.lit { color: var(--text); }
.scrub-text .split-word.lit.accent { color: var(--accent); }

/* FAQ animada */
.faq-item { interpolate-size: allow-keywords; }
.faq-item::details-content { height: 0; overflow: hidden; transition: height 0.45s var(--ease), content-visibility 0.45s allow-discrete; }
.faq-item[open]::details-content { height: auto; }

/* Cursor propio */
.cursor { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 1.5px solid rgba(109, 255, 139, 0.75); background: transparent; transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), background-color 0.3s; display: grid; place-items: center; color: #041006; font-size: 12px; font-weight: 700; }
.cursor.is-hover { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: rgba(109, 255, 139, 0.12); }
.cursor.is-label { width: 76px; height: 76px; margin: -38px 0 0 -38px; border-color: transparent; background: var(--accent); }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* Botón de pausa del movimiento */
.motion-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 70; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(2, 2, 2, 0.75); backdrop-filter: blur(10px); color: var(--muted); font-size: 13px; cursor: pointer; }
.motion-toggle:hover { color: var(--text); }
.footer-bottom .motion-toggle { position: static; min-height: 0; padding: 0; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; font-size: 14px; }
.motion-toggle::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.motion-toggle[aria-pressed="true"]::before { background: var(--muted); box-shadow: none; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }

/* Transición entre páginas */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.35s var(--ease) both; }
::view-transition-new(root) { animation: vt-in 0.5s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(0.985); } }
@keyframes vt-in { from { opacity: 0; transform: scale(1.015); } }

@media (max-width: 900px) {
  .world { height: 140vh; }
  .tile { width: calc(var(--w, 280px) * 0.6); }
  .tile.is-portrait { width: calc(var(--w, 180px) * 0.65); }
  .tile.hide-mobile { display: none; }
  .bg-blob { filter: blur(60px); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-blob, .bg-grain, .marquee-track, .scroll-hint span, .pricing-card-pro, .service-media.gradient { animation: none !important; }
  .split-ready .split-word { opacity: 1; transform: none; filter: none; }
  .marquee { overflow-x: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

html { background: var(--bg); }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s; background: radial-gradient(360px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(109, 255, 139, 0.12), transparent 65%); }
.card:hover::before { opacity: 1; }
.service, .pricing-card, .price-item { transition: transform 0.5s var(--ease), border-color 0.3s, background-color 0.3s; }
.showcase-pin { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: 72px 48px; }
html:not(.motion-ready) .showcase-track { overflow-x: auto; scroll-snap-type: x mandatory; width: auto; padding-bottom: 16px; }
html:not(.motion-ready) .live-card { scroll-snap-align: start; }
.contact-section-glow { position: relative; }
.contact-section-glow::before { content: ""; position: absolute; inset: 10% 20%; z-index: -1; background: radial-gradient(closest-side, rgba(109, 255, 139, 0.16), transparent); filter: blur(30px); animation: drift-b 18s ease-in-out infinite alternate; }
.world-copy::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 42% 36% at 50% 52%, rgba(2, 2, 2, 0.88), rgba(2, 2, 2, 0.55) 55%, transparent 80%); }
.tile .tile-logo { padding: 28px; background: #0b0f0b; aspect-ratio: 16 / 10; object-fit: contain; }
.world-outro::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 46% 34% at 50% 50%, rgba(2, 2, 2, 0.9), transparent 75%); }
@media (max-width: 900px) {
  .showcase-count { display: none; }
  .motion-toggle { min-height: 34px; padding: 0 12px; font-size: 12px; left: 12px; bottom: 12px; }
}

/* Modo ligero: móviles y equipos modestos */
.motion-lite .bg-grain, .motion-lite .bg-glow { display: none; }
.motion-lite .bg-blob { animation: none; filter: blur(50px); }
.motion-lite .pricing-card-pro, .motion-lite .service-media.gradient { animation: none; }
.motion-lite .split-word { transition-duration: 0.45s; }
.showcase-hint { display: none; }
@media (max-width: 900px) {
  .showcase-hint { display: flex; align-items: center; gap: 10px; margin: 18px var(--gutter) 0; color: var(--muted); font-size: 13px; }
  .showcase-hint-bar { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
  .showcase-hint-bar span { display: block; height: 100%; width: var(--carousel, 12%); background: var(--accent); transition: width 0.2s; }
}
.live-cta { aspect-ratio: 16 / 10; display: grid; place-content: center; justify-items: center; gap: 22px; text-align: center; padding: 24px; background: radial-gradient(circle at 50% 40%, rgba(109, 255, 139, 0.18), transparent 60%), #070a07; }
.live-cta p { margin: 0; font-size: clamp(28px, 3.4vw, 46px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.live-card-cta .live-bar { display: none; }
.reels-cta { margin-top: 40px; text-align: center; }
