/* =====================================================================
   Qhawaq · Efectos extra: logo, WhatsApp, progreso, parallax fuerte,
   seguimiento del mouse, inclinación 3D, cortinas y foco de luz
   ===================================================================== */

/* Logo con contorno blanco para que no se pierda en el fondo oscuro */
.brand img { filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff) drop-shadow(0 0 3px rgba(255, 255, 255, .55)); transition: transform .4s cubic-bezier(.2, .9, .3, 1.3); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }

/* Menú: subrayado animado y botón Contáctanos */
.menu a:not(.btn) { position: relative; }
.menu a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s ease; }
.menu a:not(.btn):hover::after, .menu a.active::after { transform: scaleX(1); transform-origin: left; }
.menu a.active { box-shadow: none; }
.menu a.btn.active-btn { background: #fff; color: var(--navy-950); }
@media (max-width: 900px) { .menu a:not(.btn)::after { display: none; } }

/* Barra de progreso de lectura */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--accent), #3b82f6, #a855f7); box-shadow: 0 0 10px rgba(34, 211, 238, .7); }

/* Botón flotante de WhatsApp */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 70; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 28px rgba(37, 211, 102, .45); transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), box-shadow .3s ease; animation: wa-in .7s 1.2s cubic-bezier(.2, .9, .3, 1.4) both; }
.wa-float svg { width: 32px; height: 32px; fill: currentColor; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: wa-ring 2.4s 2s ease-out infinite; }
.wa-float:hover { transform: scale(1.1) rotate(-6deg); box-shadow: 0 16px 34px rgba(37, 211, 102, .6); }
.wa-tip { position: absolute; right: 74px; top: 50%; translate: 0 -50%; white-space: nowrap; padding: 9px 14px; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 700; font-size: .9rem; box-shadow: var(--shadow); opacity: 0; transform: translateX(10px); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.wa-tip::after { content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; background: #fff; transform: translateY(-50%) rotate(45deg); }
.wa-float:hover .wa-tip, .wa-float:focus-visible .wa-tip, .wa-float.hint .wa-tip { opacity: 1; transform: none; }
@keyframes wa-in { from { opacity: 0; transform: scale(.3) translateY(40px); } }
@keyframes wa-ring { 0% { transform: scale(1); opacity: .8; } 80%, 100% { transform: scale(1.7); opacity: 0; } }
@media (max-width: 560px) { .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; } .wa-tip { display: none; } }

/* Marcos de imagen con margen para un parallax más marcado */
.pframe { position: relative; aspect-ratio: 16 / 9; }
.pframe img, .hero-media .pframe img { position: absolute; left: 0; top: -25%; width: 100%; height: 150%; max-width: none; object-fit: cover; transform: none; }
.tile.img img { top: -25%; height: 150%; }
.quote-bg { top: -40%; height: 180%; }

/* Capas que siguen al mouse en la cabecera */
.orb, .float { transform: translate3d(var(--mx, 0px), var(--my, 0px), 0); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.hero-media .pframe { transform: perspective(1200px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }

/* Título con brillo que recorre la palabra resaltada */
.hl { background: linear-gradient(90deg, var(--accent), #67e8f9, #fff, #67e8f9, var(--accent)); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 5s linear infinite; }
@keyframes shimmer { to { background-position: -250% 0; } }

/* Fondo de cabecera con rejilla que se desplaza lentamente */
.hero-bg::after { animation: grid-move 24s linear infinite; }
@keyframes grid-move { to { background-position: 44px 44px, 44px 44px; } }

/* Títulos de sección con línea que crece */
.head h2 { position: relative; padding-bottom: 14px; }
.head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--cyan-500), #3b82f6); transform-origin: left; }
.quote-in .head h2::after { left: 50%; translate: -50% 0; }
.motion .head h2::after { transform: scaleX(0); transition: transform .9s .35s cubic-bezier(.2, .7, .2, 1); }
.motion .head.in h2::after { transform: scaleX(1); }

/* Cortina: las imágenes se descubren al entrar */
.motion [data-reveal] .pframe { clip-path: inset(0 100% 0 0 round 20px); transition: clip-path 1.2s .15s cubic-bezier(.7, 0, .2, 1); }
.motion [data-reveal].in .pframe { clip-path: inset(0 0 0 0 round 20px); }
.motion .browser[data-reveal] img { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s .3s cubic-bezier(.7, 0, .2, 1); }
.motion .browser[data-reveal].in img { clip-path: inset(0); }

/* Foco de luz que sigue al cursor en secciones oscuras */
.spot { position: relative; isolation: isolate; }
.spot::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .4s ease; background: radial-gradient(420px circle at var(--sx, 50%) var(--sy, 50%), rgba(34, 211, 238, .16), transparent 65%); }
.spot:hover::before { opacity: 1; }
.cta-band.spot::before, .quote-band.spot::before { z-index: 0; }
.quote-in, .cta-band-in { position: relative; z-index: 1; }

/* Inclinación 3D al pasar el mouse */
.tiltable { transform-style: preserve-3d; will-change: transform; }
.tiltable.tilting { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) !important; transition: transform .12s ease-out !important; box-shadow: 0 24px 50px rgba(7, 29, 64, .18); }
.tiltable::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(300px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .22), transparent 60%); opacity: 0; transition: opacity .3s ease; }
.tiltable.tilting::after { opacity: 1; }
.tile.img.tiltable::after { z-index: 1; }

/* Botones con brillo al pasar */
.btn { position: relative; overflow: hidden; }
.btn::before { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); transition: left .6s ease; }
.btn:hover::before { left: 130%; }

/* Íconos que flotan suavemente dentro de las tarjetas */
.flow-anim li:hover .icon, .tile:hover .icon, .card:hover .icon { animation: icon-bob .9s ease-in-out; }
@keyframes icon-bob { 50% { transform: translateY(-6px) rotate(-6deg); } }

/* Contadores con brillo */
.stat dd { background: linear-gradient(180deg, #fff, #a5f3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (prefers-reduced-motion: reduce) {
  .hl, .hero-bg::after, .wa-float, .wa-float::before { animation: none !important; }
  .motion [data-reveal] .pframe, .motion .browser[data-reveal] img { clip-path: none !important; }
  .orb, .float, .hero-media .pframe { transform: none !important; }
  .tiltable.tilting { transform: none !important; }
}

/* ---------- Barra de desplazamiento: sin flechas y en azul de la marca ---------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-track { background: #04122a; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #123a78, #0b2a5b); border-radius: 999px; border: 2px solid #04122a; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #0891b2, #123a78); }
::-webkit-scrollbar-corner { background: #04122a; }
/* Firefox (no admite ::-webkit-scrollbar) */
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: #123a78 #04122a; scrollbar-width: thin; }
}

/* ---------- Imagen principal más grande y menos recortada ---------- */
.hero-in { grid-template-columns: .95fr 1.15fr; gap: 40px; }
.hero-media .pframe img { top: -7%; height: 114%; }
@media (min-width: 1200px) { .hero .hero-media { margin-right: -40px; } }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; } .hero .hero-media { margin-right: 0; } }
