/* ===== Capa 3: espectaculo ===== */
#scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 60; background: linear-gradient(90deg,#F97316,#fdba74); transform-origin: 0 50%; transform: scaleX(var(--p,0)); }
#cursor-glow { position: fixed; z-index: 1; width: 520px; height: 520px; left: 0; top: 0; margin: -260px 0 0 -260px; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(249,115,22,.16), transparent); opacity: 0; transition: opacity .4s; mix-blend-mode: multiply; }
.dark #cursor-glow { mix-blend-mode: screen; background: radial-gradient(closest-side, rgba(249,115,22,.14), transparent); }
@media (pointer: coarse) { #cursor-glow { display: none; } }

/* Borde giratorio en el panel del hero */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.hero-figure { position: relative; z-index: 2; isolation: isolate; }
.hero-figure::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; z-index: -1; padding: 2px;
  background: conic-gradient(from var(--ang), transparent 0 70%, #F97316 85%, #fdba74 92%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin-ang 5s linear infinite; }
@keyframes spin-ang { to { --ang: 360deg; } }

/* Capturas flotantes tras el panel */
.float-shot { position: absolute; z-index: 0; width: 15rem; border-radius: .5rem; border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 30px 50px -20px rgba(0,0,0,.6); opacity: .9; }
.fs-1 { top: -3.5rem; right: -3rem; --r: 7deg; animation: floaty 7s ease-in-out infinite; }
.fs-2 { bottom: -4rem; left: -5rem; width: 16rem; --r: -8deg; animation: floaty 8s -2s ease-in-out infinite; }
.fs-3 { top: 38%; right: -5.5rem; width: 12rem; --r: 5deg; animation: floaty 6s -4s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: rotate(var(--r)) translateY(0); } 50% { transform: rotate(calc(var(--r) * .6)) translateY(-16px); } }
[data-parallax] { translate: 0 var(--py, 0px); will-change: translate; }

/* Palabras que suben enmascaradas */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.w > span { display: inline-block; transform: translateY(115%); transition: transform .9s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--i) * 55ms + var(--base, 0ms)); }
.words-in .w > span { transform: none; }

/* Cinta de servicios */
.ticker { position: relative; z-index: 3; transform: rotate(-1.2deg) scale(1.03); margin: -1.1rem 0; box-shadow: 0 10px 30px -12px rgba(0,0,0,.45); }
.ticker .marquee-track > span { font-family: var(--font-manrope); font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.4rem); letter-spacing: -.02em; text-transform: uppercase; padding: .55rem 0; white-space: nowrap; }
.ticker .marquee-track > i { width: .9rem; height: .9rem; background: #00152a; transform: rotate(45deg); margin: 0 1.8rem; align-self: center; }

/* Marquee base */
.marquee-track { display: flex; width: max-content; animation: marquee var(--dur, 40s) linear infinite; will-change: transform; }
.marquee-track > * { flex: none; }
.marquee-row .marquee-track > * { margin-right: 1.5rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-row[data-pause]:hover .marquee-track { animation-play-state: paused; }
.marquee-row { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); padding: 1.5rem 0; }

/* Obras */
.work { display: block; width: min(78vw, 460px); transform-style: preserve-3d; transition: transform .25s ease-out; will-change: transform; }
.work-frame { border-radius: .5rem; overflow: hidden; background: #0b2238; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 40px 60px -30px rgba(0,0,0,.7); transition: border-color .3s; }
.work-bar { height: 2rem; display: flex; align-items: center; padding: 0 .9rem; background: #0e2a45; border-bottom: 1px solid rgba(255,255,255,.1); }
.work-bar::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: #F97316; box-shadow: 1rem 0 0 #80d5cb, 2rem 0 0 #b0c9e8; margin-right: 3.2rem; flex: none; }
.work-bar span { font-size: .7rem; letter-spacing: .06em; color: #7a92b0; background: rgba(255,255,255,.06); padding: .15rem .7rem; border-radius: 999px; }
.work-frame img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top; transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.work:hover .work-frame img { transform: scale(1.06); }
.work:hover .work-frame { border-color: #F97316; }
.work-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1rem .25rem 0; color: #eaf1ff; }
.work-meta b { font-family: var(--font-manrope); font-size: 1.15rem; letter-spacing: -.01em; }
.work-meta em { font-style: normal; font-size: .8rem; color: #7a92b0; text-align: right; }

/* Contadores */
.stat { display: flex; flex-direction: column; gap: .5rem; padding: 2rem 1.25rem 0 0; border-right: 1px solid rgba(255,255,255,.08); }
.stat:last-child { border-right: 0; }
.stat-num { font-family: var(--font-manrope); font-weight: 800; font-size: clamp(3rem, 7vw, 6rem); line-height: .95; letter-spacing: -.045em; color: #f6f3ec; font-variant-numeric: tabular-nums; }
.stat:nth-child(odd) .stat-num { color: #F97316; }
.stat-label { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #7a92b0; }

/* Orbes de luz */
.orb { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(60px); opacity: .55; }
.orb-a { width: 34rem; height: 34rem; right: -10rem; top: -8rem; background: radial-gradient(closest-side, rgba(249,115,22,.5), transparent); animation: drift 14s ease-in-out infinite; }
.orb-b { width: 28rem; height: 28rem; left: -8rem; bottom: -6rem; background: radial-gradient(closest-side, rgba(15,118,110,.55), transparent); animation: drift 18s -6s ease-in-out infinite reverse; }
@keyframes drift { 50% { transform: translate(40px, -30px) scale(1.12); } }

/* Brillo en botones principales */
a[class*="bg-secondary-container"] { position: relative; overflow: hidden; }
a[class*="bg-secondary-container"]::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); transition: transform .8s cubic-bezier(.16,1,.3,1); pointer-events: none; }
a[class*="bg-secondary-container"]:hover::after { transform: translateX(120%); }

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .float-shot, .orb, .hero-figure::before { animation: none; }
  .w > span { transform: none; transition: none; }
  [data-parallax] { translate: none; }
}

/* Panel de leads: solo visible con ?admin=1 */
html:not(.is-admin) .open-leads-portal-btn, html:not(.is-admin) li:has(> .open-leads-portal-btn) { display: none !important; }
