/* ═══════════════════════════════════════════════════════════════════
   SiteWave — styles.css
   Ultra-premium dark theme · Fixed video bg · Glassmorphism · GSAP
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #0a0a0f;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Custom Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar             { width: 3px; }
::-webkit-scrollbar-track       { background: #0a0a0f; }
::-webkit-scrollbar-thumb       { background: rgba(124,58,237,.45); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,.75); }
::selection                     { background: rgba(167,139,250,.3); color: #fff; }

/* ══════════════════════════════════════════════════════════════════
   VIDEO BACKGROUND — position: fixed · full-viewport · object-fit: cover
   Fits the 1440×1440 source perfectly to any screen ratio.
   z-index: -1 keeps it behind all content layers at all times.
   ══════════════════════════════════════════════════════════════════ */
#scroll-video {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: -1;
  object-fit: cover;          /* fills viewport, no black bars, no distortion */
  object-position: center center;
  opacity: 0;                 /* GSAP fades in on load */
  will-change: opacity;
  pointer-events: none;
  display: block;
}

/* ── Global vignette overlay — sits above video, below all content ─ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 50% at 50% -5%,  rgba(124,58,237,.22) 0%, transparent 65%),
    radial-gradient(ellipse 55% 40% at 90% 90%,  rgba(6,182,212,.10)  0%, transparent 55%),
    linear-gradient(to bottom,
      rgba(10,10,15,.60)  0%,
      rgba(10,10,15,.20) 35%,
      rgba(10,10,15,.55) 78%,
      rgba(10,10,15,.95) 100%
    );
}

/* ══════════════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════════════ */
#navbar {
  transition: padding .4s ease, background .4s ease, box-shadow .4s ease;
}

#navbar.scrolled {
  padding-top:    .75rem !important;
  padding-bottom: .75rem !important;
  background: rgba(10,10,15,.88) !important;
  box-shadow: 0 8px 40px rgba(0,0,0,.55);
}

/* Language toggle buttons */
.lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.35);
  font-family: inherit;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color .2s, background .2s;
}
.lang-btn:hover  { color: #a78bfa; }
.lang-btn.active { color: #a78bfa; background: rgba(124,58,237,.15); }

/* ══════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent; /* video shows through */
}

/* All hero direct children above the body::before overlay */
#hero > * { position: relative; z-index: 1; }

/* Eyebrow badge soft pulse */
.hero-eyebrow { animation: badge-pulse 3.2s ease-in-out infinite; }
@keyframes badge-pulse {
  0%,100% { box-shadow: 0 0  0   0   rgba(167,139,250,.0); }
  50%      { box-shadow: 0 0 18px 4px rgba(167,139,250,.22); }
}

/* Scroll indicator bounce */
@keyframes scroll-bounce {
  0%,100% { opacity:.35; transform:translateX(-50%) translateY(0); }
  50%      { opacity:.75; transform:translateX(-50%) translateY(8px); }
}
.animate-bounce { animation: scroll-bounce 2.4s ease-in-out infinite; }

/* ══════════════════════════════════════════════════════════════════
   SECTION BACKGROUNDS
   Semi-transparent so the fixed video glows through subtly
   ══════════════════════════════════════════════════════════════════ */
#servicios,
#testimonios,
#contacto {
  position: relative;
  z-index: 1;
  background: rgba(10,10,15,.80);
}

/* Top hairline divider for services section */
#servicios::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(124,58,237,.40) 30%,
    rgba(6,182,212,.30)  70%,
    transparent
  );
}

/* ══════════════════════════════════════════════════════════════════
   GLASSMORPHISM — SERVICE CARDS
   backdrop-filter: blur(16px) saturate(160%)
   bg-white/10 equivalent → rgba(255,255,255,.10)
   ══════════════════════════════════════════════════════════════════ */
.service-card {
  background:        rgba(255,255,255,.07);
  backdrop-filter:   blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border:            1px solid rgba(255,255,255,.10);
  border-radius:     1.25rem;

  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
  transition:
    transform         .38s cubic-bezier(.22,.61,.36,1),
    border-color      .38s ease,
    box-shadow        .38s ease,
    background        .38s ease;

  /* Initial state — GSAP animates to visible */
  opacity: 0;
  transform: translateY(55px);
}

/* Glowing top-edge line revealed on hover */
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(124,58,237,.65) 35%,
    rgba(6,182,212,.55)  65%,
    transparent
  );
  opacity: 0;
  transition: opacity .38s ease;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,.11);
  border-color: rgba(124,58,237,.38);
  box-shadow:
    0 22px 60px rgba(0,0,0,.45),
    0  0  28px rgba(124,58,237,.12);
}
.service-card:hover::before { opacity: 1; }

/* ══════════════════════════════════════════════════════════════════
   GLASSMORPHISM — TESTIMONIAL CARDS
   Stronger blur (20px) + higher white alpha for the frosted look
   ══════════════════════════════════════════════════════════════════ */
.testimonial-card {
  background:        rgba(255,255,255,.06);
  backdrop-filter:   blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border:            1px solid rgba(255,255,255,.10);
  border-radius:     1.25rem;

  position: relative;
  overflow: hidden;
  will-change: transform, box-shadow;
  transition:
    transform     .38s cubic-bezier(.22,.61,.36,1),
    border-color  .38s ease,
    background    .38s ease,
    box-shadow    .38s ease;

  /* Initial state — GSAP animates to visible */
  opacity: 0;
  transform: translateY(65px);
}

/* Inner gradient shimmer on hover */
.testimonial-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(167,139,250,.07) 0%,
    transparent           50%,
    rgba(6,182,212,.05)  100%
  );
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
  border-radius: inherit;
}

/* Decorative oversized quote mark */
.testimonial-card::after {
  content: '\201C';
  position: absolute;
  top: -24px; right: 14px;
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  color: rgba(124,58,237,.07);
  pointer-events: none;
  user-select: none;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.20);
  box-shadow:
    0 26px 68px rgba(0,0,0,.50),
    0  0  26px rgba(124,58,237,.09);
}
.testimonial-card:hover::before { opacity: 1; }

/* ══════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════ */
footer {
  position: relative;
  z-index: 1;
  background: rgba(10,10,15,.95);
}

/* ══════════════════════════════════════════════════════════════════
   AMBIENT GLOW ORBS — pure CSS atmospheric detail
   ══════════════════════════════════════════════════════════════════ */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: orb-drift 14s ease-in-out infinite alternate;
}
.glow-orb-purple {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(124,58,237,.18) 0%, transparent 70%);
  animation-delay: 0s;
}
.glow-orb-cyan {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(6,182,212,.12) 0%, transparent 70%);
  animation-delay: -7s;
}
@keyframes orb-drift {
  from { transform: translate(0, 0)       scale(1);    }
  to   { transform: translate(30px, 22px) scale(1.08); }
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* video already covers thanks to object-fit: cover */
  #scroll-video { object-position: center top; }

  .service-card,
  .testimonial-card { transform: translateY(40px); }
}

/* ── Respect reduced-motion preference ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:        .01ms !important;
    animation-iteration-count: 1     !important;
    transition-duration:       .01ms !important;
  }
  html { scroll-behavior: auto; }
  #scroll-video { opacity: .4 !important; }
}
