/* ═══════════════════════════════════════════════════════════════
   LBTN Site — Design System Enhancements  (21st.dev-inspired)
   Scroll reveal · Spotlight cards · Animated hero · Counters
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reveal base ──────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  will-change: opacity, transform;
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-up    { transform: translateY(40px); }
.reveal-down  { transform: translateY(-24px); }
.reveal-left  { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-scale { transform: scale(0.93); }
.reveal-fade  { transform: none; }

.reveal.is-visible {
  opacity: 1;
  transform: none !important;
}

/* stagger grid children */
.reveal-stagger > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.09s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.18s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.27s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.36s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.44s; }
.reveal-stagger > *:nth-child(n+7) { transition-delay: 0.50s; }

.delay-1 { transition-delay: 0.10s !important; }
.delay-2 { transition-delay: 0.20s !important; }
.delay-3 { transition-delay: 0.30s !important; }
.delay-4 { transition-delay: 0.40s !important; }

/* ═══════════════════════════════════════════════════════════════
   HERO — Animated background mesh + floating orbs
   ═══════════════════════════════════════════════════════════════ */

/* Animated floating orbs injected by JS as .hero-orb */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  pointer-events: none;
  animation: orbFloat 12s ease-in-out infinite alternate;
}
.hero-orb.orb-teal {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(29,88,88,0.45) 0%, transparent 70%);
  top: -10%; right: -5%;
  animation-duration: 14s;
  animation-delay: 0s;
  opacity: 0;
  animation-fill-mode: forwards;
}
.hero-orb.orb-orange {
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(245,134,52,0.18) 0%, transparent 70%);
  bottom: 5%; left: -5%;
  animation-duration: 18s;
  animation-delay: 1.5s;
  opacity: 0;
  animation-fill-mode: forwards;
}
.hero-orb.orb-navy {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,189,66,0.1) 0%, transparent 70%);
  top: 50%; left: 30%;
  animation-duration: 22s;
  animation-delay: 3s;
  opacity: 0;
  animation-fill-mode: forwards;
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1);     opacity: 0.9; }
  33%  { transform: translate(30px, -20px) scale(1.06); }
  66%  { transform: translate(-20px, 15px) scale(0.96); }
  100% { transform: translate(15px, -10px) scale(1.03); opacity: 0.7; }
}

/* Fade-in orbs on load */
@keyframes orbAppear {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.hero-orb { animation: orbAppear 2s ease forwards, orbFloat 14s 2s ease-in-out infinite alternate; }
.hero-orb.orb-orange { animation: orbAppear 2s 0.5s ease forwards, orbFloat 18s 2.5s ease-in-out infinite alternate; }
.hero-orb.orb-navy   { animation: orbAppear 2s 1s ease forwards, orbFloat 22s 3s ease-in-out infinite alternate; }

/* Dot-grid overlay on hero */
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

/* Gradient text on hero h1 em */
.hero h1 em,
.hero-title-accent {
  background: linear-gradient(135deg, var(--orange, #F58634) 0%, #FFBD42 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
}

/* Hero card — glow border */
.hero-card {
  position: relative;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 20px;
  backdrop-filter: blur(16px) !important;
  box-shadow:
    0 0 0 1px rgba(245,134,52,0.08),
    0 24px 64px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.08) !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.hero-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  background: linear-gradient(135deg,
    rgba(245,134,52,0.25) 0%,
    rgba(29,88,88,0.15) 50%,
    transparent 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}
.hero-card:hover { transform: translateY(-4px); }
.hero-card:hover::before { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   CARDS — Spotlight mouse-follow glow effect
   ═══════════════════════════════════════════════════════════════ */

.mvv-card,
.pilar-card,
.step-card,
.participe-card,
.team-card,
.platform-card,
.resource-card,
.eco-card,
.livro-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Spotlight pseudo-element — position driven by JS via CSS vars */
.mvv-card::after,
.pilar-card::after,
.step-card::after,
.participe-card::after,
.platform-card::after,
.eco-card::after,
.livro-card::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  background: radial-gradient(
    circle closest-side,
    rgba(245,134,52,0.10) 0%,
    transparent 100%
  );
  left: var(--spotlight-x, -9999px);
  top:  var(--spotlight-y, -9999px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity 0.2s ease;
  border-radius: 50%;
  z-index: 0;
}
/* White spotlight for dark section cards */
.pilar-card::after {
  background: radial-gradient(
    circle closest-side,
    rgba(255,255,255,0.08) 0%,
    transparent 100%
  );
  width: 280px; height: 280px;
}

/* Card lift hovers */
.mvv-card:hover,
.eco-card:hover,
.resource-card:hover,
.livro-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 52px rgba(0,0,0,0.12) !important;
}
.participe-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.15) !important;
}
.team-card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: 0 16px 44px rgba(0,0,0,0.13) !important;
}
.platform-card:hover,
.step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 44px rgba(0,0,0,0.11) !important;
}
.pilar-card:hover {
  background: rgba(255,255,255,0.1) !important;
  transform: translateY(-5px);
  box-shadow: 0 20px 52px rgba(0,0,0,0.25) !important;
}

/* ═══════════════════════════════════════════════════════════════
   STATS — Animated counter
   ═══════════════════════════════════════════════════════════════ */

.hero-stat-num,
[data-counter] {
  font-variant-numeric: tabular-nums;
  transition: transform 0.2s ease;
}

/* Subtle scale pulse when counting finishes */
@keyframes counterPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.counter-done {
  animation: counterPop 0.35s ease;
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR — Enhanced glassmorphism + hamburger → X
   ═══════════════════════════════════════════════════════════════ */

.navbar {
  background: rgba(14, 28, 36, 0.82) !important;
  backdrop-filter: blur(20px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
  transition: background 0.3s ease, box-shadow 0.3s ease !important;
}
.navbar.scrolled {
  background: rgba(14, 28, 36, 0.96) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 4px 24px rgba(0,0,0,0.4) !important;
}

/* Nav link underline slide */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--orange, #F58634);
  border-radius: 2px;
  transition: width 0.22s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-dropdown > a::after { display: none !important; }

/* Dropdown smooth reveal */
.nav-dropdown-menu {
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  display: block !important;        /* override inline display:none */
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
  transform-origin: top left;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Hamburger → X animation */
.nav-hamburger span {
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
  position: relative;
}
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu slide */
.nav-mobile {
  transform-origin: top right;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1) !important;
}
.nav-mobile.lbtn-hidden {
  opacity: 0 !important;
  transform: scale(0.95) translateY(-10px) !important;
  pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   MISC POLISH
   ═══════════════════════════════════════════════════════════════ */

/* Team bio link */
.team-bio-link {
  display: inline-block;
  transition: transform 0.18s ease, color 0.18s ease !important;
}
.team-bio-link:hover { transform: translateX(4px); }

/* Buttons */
.btn {
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.2s cubic-bezier(0.22,1,0.36,1),
    box-shadow 0.2s ease !important;
}
.btn:active { transform: scale(0.97) translateY(1px) !important; }

/* Footer links */
.footer a {
  transition: color 0.15s ease, opacity 0.15s ease;
}
.footer a:hover { opacity: 0.8; }

/* Shimmer on orange top-border cards */
.mvv-card::before {
  background: linear-gradient(90deg, var(--orange, #F58634), #FFBD42, var(--orange, #F58634)) !important;
  background-size: 200% 100% !important;
  animation: shimmerBorder 3s ease infinite;
}
@keyframes shimmerBorder {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-up, .reveal-down, .reveal-left,
  .reveal-right, .reveal-scale, .reveal-fade {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .hero-orb, .hero-grid-overlay { display: none !important; }
  .mvv-card, .pilar-card, .step-card, .participe-card,
  .team-card, .platform-card, .resource-card, .eco-card,
  .livro-card, .btn { transition: none !important; }
  @keyframes orbFloat  { to {} }
  @keyframes orbAppear { to {} }
  @keyframes shimmerBorder { to {} }
  @keyframes counterPop    { to {} }
}
