/* ══════════════════════════════════════════════
   PULIDO CONSULTING — style.css
   Dark Navy + Neon Yellow Theme
   ══════════════════════════════════════════════ */

:root {
  --navy-900: #0a0e1a;
  --navy-800: #0f1529;
  --navy-700: #141c36;
  --neon: #d4ff00;
  --neon-dim: #a8cc00;
  --neon-glow: rgba(212, 255, 0, 0.15);
  scroll-behavior: smooth;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: linear-gradient(180deg, var(--navy-900) 0%, #060a14 50%, #050810 100%);
  min-height: 100vh;
}

::selection { background: var(--neon); color: var(--navy-900); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy-900); }
::-webkit-scrollbar-thumb { background: rgba(212, 255, 0, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212, 255, 0, 0.4); }

/* ─── Navbar ─── */
#navbar {
  background: rgba(10, 14, 26, 0);
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 0.5s ease, backdrop-filter 0.5s ease, border-color 0.5s ease;
}

#navbar.scrolled {
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--neon);
  border-radius: 1px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--neon-glow);
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--neon) !important; }

/* ─── Mobile Menu ─── */
.mobile-menu.open { opacity: 1; pointer-events: auto; }
#menuBtn.open .menu-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#menuBtn.open .menu-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
#menuBtn.open .menu-line:nth-child(3) { width: 28px; transform: translateY(-6px) rotate(-45deg); }

/* ─── Frosted Glass ─── */
.frost-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

/* ─── Hero Canvas ─── */
#heroCanvas {
  z-index: 0;
}

/* ─── Glow Text ─── */
.glow-text {
  text-shadow: 0 0 60px rgba(212, 255, 0, 0.25), 0 0 120px rgba(212, 255, 0, 0.08);
}

/* ─── Rotating Phrase System ─── */
.rotating-wrapper {
  display: inline-block;
  position: relative;
  overflow: hidden;
  vertical-align: bottom;
  /* Height matches one line of text — set by JS on init */
}

.rotating-phrase {
  display: block;
  white-space: nowrap;
  transition: transform 1.7s cubic-bezier(0.4, 0, 0.1, 1),
            opacity 1.0s cubic-bezier(0.4, 0, 0.1, 1);
  position: absolute;
  left: 0;
  top: 0;
  width: max-content;
  /* Start below the horizon */
  transform: translateY(110%);
  opacity: 0;
}

.rotating-phrase.is-active {
  position: relative;
  transform: translateY(0);
  opacity: 1;
}

.rotating-phrase.is-exiting {
  position: absolute;
  transform: translateY(-110%);
  opacity: 0;
}

/* ─── Hero Title Character Reveal Animation ─── */
.hero-title .char-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotateX(-40deg);
  animation: charReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes charReveal {
  to { opacity: 1; transform: translateY(0) rotateX(0deg); }
}

/* ─── Service Card Cascade ─── */
.cascade-card {
  opacity: 0;
  transform: translateY(80px) scale(0.95);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.cascade-card.cascaded {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ─── Service Cards ─── */
.service-card {
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 30px rgba(212, 255, 0, 0.05);
}

/* ─── Contact Input Glow ─── */
.contact-input:focus {
  box-shadow: 0 0 0 3px rgba(212, 255, 0, 0.08), 0 0 20px rgba(212, 255, 0, 0.05);
}

/* ─── Float Animation ─── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.animate-float { animation: float 5s ease-in-out infinite; }

/* ─── Slow Bounce ─── */
@keyframes bounceSlow {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
.animate-bounce-slow { animation: bounceSlow 2.5s ease-in-out infinite; }

/* ─── Reveal Animations ─── */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.revealed { opacity: 1; transform: translateY(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.revealed { opacity: 1; transform: scale(1); }

/* ─── Scroll Progress Bar ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--neon);
  z-index: 999;
  box-shadow: 0 0 12px var(--neon-glow), 0 0 4px rgba(212, 255, 0, 0.3);
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .frost-card { backdrop-filter: blur(10px); }
}