/* ═══════════════════════════════════════════
   M BITE — BYTE: FULL SITE INTERACTIVITY CSS
   Every text, character, button — alive.
   ═══════════════════════════════════════════ */

/* ─── SCROLL PROGRESS ─── */
#scroll-progress { will-change: width; }

/* ─── MAGNETIC BUTTONS ─── */
.magnetic-btn { transition: transform 0.2s ease-out; will-change: transform; }

/* ─── RIPPLE CLICK ─── */
.click-ripple {
  position: absolute;
  border-radius: 50%;
  background: hsl(175 100% 50% / 0.25);
  pointer-events: none;
  animation: ripple-expand 0.6s ease-out forwards;
  z-index: 1;
}
@keyframes ripple-expand {
  0% { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(4); opacity: 0; }
}
/* Ensure ripple containers have overflow hidden where needed */
.btn-primary, .btn-secondary, .btn-nexus, .btn-nexus-header,
.work-proof-link, .filter-btn, .hermes-fab { overflow: hidden; }

/* ─── CARD 3D TILT ─── */
.tilt-card {
  transition: transform 0.15s ease-out, box-shadow 0.3s, border-color 0.3s;
  will-change: transform;
  transform-style: preserve-3d;
}
.tilt-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at var(--glow-x, 50%) var(--glow-y, 50%),
    hsl(175 100% 50% / 0.06),
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.tilt-card:hover::after { opacity: 1; }

/* ─── TEXT HOVER GLOW ─── */
.text-hover-glow {
  transition: text-shadow 0.3s ease, color 0.3s ease;
}
.text-hover-glow:hover {
  text-shadow: 0 0 12px hsl(175 100% 50% / 0.3), 0 0 24px hsl(175 100% 50% / 0.1);
  color: var(--fg);
}

/* ─── CHARACTER HOVER HEADINGS ─── */
.char-hover-wrap { display: inline-block; }
.char-word { display: inline-block; }
.char-space { display: inline; }
.char-ch {
  display: inline-block;
  transition: transform 0.15s ease, color 0.2s ease, text-shadow 0.2s ease;
  cursor: default;
}
.char-hover-wrap:hover .char-ch {
  animation: char-bounce 0.4s ease(var(--char-delay, 0s)) both;
}
.char-ch:hover {
  color: var(--primary) !important;
  text-shadow: 0 0 16px hsl(175 100% 50% / 0.6);
  transform: translateY(-4px) scale(1.1) !important;
}
@keyframes char-bounce {
  0% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
  60% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

/* ─── TYPING CURSOR ─── */
.typing-cursor {
  font-weight: 100;
  color: var(--primary);
  margin-left: 2px;
}

/* ─── FAQ ACCORDION ─── */
.faq-item { cursor: pointer; transition: border-color 0.3s, background 0.3s; }
.faq-item:hover { border-color: hsl(175 100% 50% / 0.4) !important; }
.faq-item p {
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}
.faq-item.open p {
  max-height: 500px !important;
  opacity: 1 !important;
}

/* ─── FORM INPUT ANIMATIONS ─── */
.anim-input {
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.anim-input:focus {
  border-color: hsl(175 100% 50% / 0.6) !important;
  box-shadow: 0 0 0 3px hsl(175 100% 50% / 0.1), 0 0 20px hsl(175 100% 50% / 0.05);
  background: hsl(222 47% 7%) !important;
}

/* ─── SECTION LABEL GLITCH ─── */
.label-glitch-active {
  animation: text-glow 0.4s ease-in-out;
}

/* ─── SECTION REVEAL ─── */
.section-reveal-pending {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.section-revealed {
  opacity: 1;
  transform: translateY(0);
}
/* Staggered reveal for children */
.section-revealed .pillar-card:nth-child(1),
.section-revealed .trust-card:nth-child(1),
.section-revealed .proof-card:nth-child(1) { transition-delay: 0.05s; }
.section-revealed .pillar-card:nth-child(2),
.section-revealed .trust-card:nth-child(2),
.section-revealed .proof-card:nth-child(2) { transition-delay: 0.1s; }
.section-revealed .pillar-card:nth-child(3),
.section-revealed .trust-card:nth-child(3),
.section-revealed .proof-card:nth-child(3) { transition-delay: 0.15s; }
.section-revealed .pillar-card:nth-child(4),
.section-revealed .trust-card:nth-child(4),
.section-revealed .proof-card:nth-child(4) { transition-delay: 0.2s; }

/* ─── NAV HOVER PARTICLE ─── */
.nav-hover-active {
  text-shadow: 0 0 12px hsl(175 100% 50% / 0.3);
}
.nav-hover-active .nav-desc {
  color: hsl(215 20% 65% / 0.8) !important;
}

/* ─── CURSOR GLOW (desktop) ─── */
#cursor-glow {
  position: fixed;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(circle, hsl(175 100% 50% / 0.08), transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background 0.3s;
}
#cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(175 100% 50% / 0.6);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}
#cursor-glow.cursor-hover {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, hsl(175 100% 50% / 0.12), transparent 70%);
}
#cursor-dot.cursor-hover {
  width: 10px;
  height: 10px;
  background: hsl(175 100% 50% / 0.8);
}
@media (pointer: coarse) {
  #cursor-glow, #cursor-dot { display: none !important; }
}

/* ─── STATUS PULSE TOGGLE ─── */
[style*="LIVE"]:hover, [style*="DEVELOPMENT"]:hover {
  filter: brightness(1.2);
}

/* ─── GRADIENT TEXT SHIMMER ─── */
.shimmer-active {
  background-size: 200% 100%;
  animation: gradient-shimmer 3s linear infinite;
}
@keyframes gradient-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── ENHANCED BUTTON GLOW ─── */
.btn-primary:hover, .btn-nexus:hover {
  box-shadow: 0 0 24px hsl(175 100% 50% / 0.3), 0 4px 20px hsl(175 100% 50% / 0.1);
}
.btn-secondary:hover {
  box-shadow: 0 0 16px hsl(175 100% 50% / 0.1), inset 0 0 16px hsl(175 100% 50% / 0.03);
}

/* ─── HERMES FAB ENHANCED ─── */
.hermes-fab:hover {
  transform: scale(1.04);
}
.hermes-fab:active {
  transform: scale(0.96);
}

/* ─── FILTER BTN PULSE ─── */
.filter-btn:not(.active):hover {
  animation: glow-pulse 1.5s ease-in-out infinite;
}

/* ─── METRIC NUM PULSE ON VISIBLE ─── */
.metric-num:not(.counted), .stat-card .number:not(.counted) {
  transition: transform 0.3s ease;
}
.metric-num:hover, .stat-card .number:hover {
  transform: scale(1.05);
  text-shadow: 0 0 20px hsl(175 100% 50% / 0.4);
}

/* ─── WORK TECH LI HOVER ─── */
.work-tech li {
  transition: padding-left 0.2s ease, color 0.2s ease;
}
.work-tech li:hover {
  padding-left: 26px !important;
  color: var(--fg) !important;
}
.work-tech li:hover::before {
  text-shadow: 0 0 8px hsl(175 100% 50% / 0.5);
}

/* ─── PROOF CARD ICON AREA ─── */
.proof-num {
  transition: all 0.3s ease;
}
.proof-card:hover .proof-num {
  color: hsl(175 100% 50% / 0.5) !important;
  text-shadow: 0 0 16px hsl(175 100% 50% / 0.3);
}

/* ─── CARD LINK HOVER ─── */
.pillar-card .card-link a {
  transition: all 0.2s ease;
  position: relative;
}
.pillar-card .card-link a::after {
  content: '→';
  position: absolute;
  right: -16px;
  opacity: 0;
  transition: opacity 0.2s, right 0.2s;
}
.pillar-card .card-link a:hover::after {
  right: -20px;
  opacity: 1;
}
.pillar-card .card-link a:hover {
  color: var(--primary) !important;
}

/* ─── TICKER TRACK ENHANCED ─── */
.ticker-track {
  will-change: transform;
}

/* ─── WORK PROOF LINK ENHANCED ─── */
.work-proof-link {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.work-proof-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, hsl(175 100% 50% / 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.work-proof-link:hover::before {
  transform: translateX(100%);
}

/* ─── SECTION LINE ANIMATED ─── */
.section-line {
  animation: line-expand 1.2s ease-out forwards;
  transform-origin: center;
}
@keyframes line-expand {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* ─── SCROLL INDICATOR ENHANCED ─── */
.scroll-indicator {
  cursor: pointer;
  transition: opacity 0.3s;
}
.scroll-indicator:hover {
  opacity: 0.7;
}

/* ─── AI BADGE ENHANCED ─── */
.ai-badge {
  transition: all 0.3s ease;
}
.hermes-header:hover .ai-badge {
  box-shadow: 0 0 8px hsl(175 100% 50% / 0.3);
}

/* ─── CHAT MESSAGE BUBBLE ENHANCED ─── */
.hermes-msg .bubble {
  transition: transform 0.15s ease;
}
.hermes-msg .bubble:hover {
  transform: scale(1.02);
}

/* ─── SMOOTH FADE FOR ALL INTERACTIVE ELEMENTS ─── */
a, button {
  transition: color 0.2s, background-color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

/* ─── SELECTION COLOR ─── */
::selection {
  background: hsl(175 100% 50% / 0.2);
  color: var(--fg);
}

/* ─── PARALLAX ELEMENTS ─── */
.hero-bg img, .hero-content, .cta-section, .work-hero {
  will-change: transform;
  transition: transform 0.1s ease-out;
}

/* ─── RESPONSIVE: Reduce motion for users who prefer it ─── */
@media (prefers-reduced-motion: reduce) {
  .tilt-card, .magnetic-btn, .char-clickable, #cursor-glow, #cursor-dot,
  .section-reveal-pending, .parallax-element {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
  .section-reveal-pending {
    opacity: 1;
    transform: none;
  }
}
