/* ═══════════════════════════════════════════════════
   PHANTEX CONSULTING — styles.css
═══════════════════════════════════════════════════ */

/* ── Root Variables ──────────────────────────────── */
:root {
  --navy-950: #040912;
  --navy-900: #080F1E;
  --navy-800: #0C1728;
  --blue-accent: #3A8EFF;
  --blue-light: #6AAEFF;
  --white: #ffffff;
}

/* ── Base ─────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--navy-900);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Selection ───────────────────────────────────── */
::selection {
  background: rgba(58, 142, 255, 0.3);
  color: #fff;
}

/* ── Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--navy-900);
}
::-webkit-scrollbar-thumb {
  background: var(--blue-accent);
  border-radius: 2px;
}

/* ── Text Gradient ───────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #3A8EFF 0%, #6AAEFF 50%, #3A8EFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* static gradient — no animation to keep compositor happy */
}

/* ── Background Grid ─────────────────────────────── */
.grid-bg {
  background-image:
    linear-gradient(rgba(58, 142, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 142, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center center;
}

/* ── Navbar ──────────────────────────────────────── */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(8, 15, 30, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Hamburger animation ─────────────────────────── */
#menuBtn.open .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#menuBtn.open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-8px);
}
#menuBtn.open .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  width: 24px;
}

/* ── Reveal Animation ────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--delay, 0s);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Service Cards ───────────────────────────────── */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(58,142,255,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.service-card:hover::before {
  opacity: 1;
}

/* ── Industry chips ──────────────────────────────── */
.industry-chip {
  transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.industry-chip:hover {
  transform: translateY(-4px);
}

/* ── Scroll line animation ───────────────────────── */
.scroll-line {
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

/* ── Form inputs ─────────────────────────────────── */
input, textarea {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus {
  box-shadow: 0 0 0 2px rgba(58, 142, 255, 0.15);
}

/* ── Primary button hover glow ───────────────────── */
.primary-btn {
  position: relative;
  overflow: hidden;
}

.primary-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.primary-btn:hover::after {
  transform: translateX(100%);
}

/* ── Number counter animation ────────────────────── */
.stat-number {
  animation: countUp 2s ease forwards;
}

/* ── Pulse glow animation — uses opacity (GPU composited, no paint) ── */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.45; }
}

.animate-pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
  will-change: opacity;
}

/* ── Float ───────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .grid-bg {
    background-size: 40px 40px;
  }
}

/* ── Focus visible (accessibility) ──────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue-accent);
  outline-offset: 3px;
}
