@keyframes animationIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flowDash {
  to {
    stroke-dashoffset: -24;
  }
}

.animate-flow {
  animation: flowDash 1s linear infinite;
}

@keyframes flowDashSlow {
  to {
    stroke-dashoffset: -24;
  }
}

.animate-flow-slow {
  animation: flowDashSlow 1.5s linear infinite;
}

@keyframes drop {
  0% { top: -50px; opacity: 0; }
  10% { opacity: 1; }
  80% { top: 100%; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.drop-animation {
  animation: drop 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes whatsappPulse {
  0% { transform: scale(1); box-shadow: 0 20px 40px rgba(37,211,102,0.35), 0 0 0 0 rgba(37,211,102,0.45); }
  50% { transform: scale(1.08); box-shadow: 0 24px 46px rgba(37,211,102,0.4), 0 0 0 18px rgba(37,211,102,0); }
  100% { transform: scale(1); box-shadow: 0 20px 40px rgba(37,211,102,0.35), 0 0 0 0 rgba(37,211,102,0); }
}

.animate-on-scroll {
  animation-play-state: paused !important;
}

.animate-on-scroll.animate {
  animation-play-state: running !important;
}

html {
  scroll-behavior: smooth;
}

.section-offset {
  scroll-margin-top: 120px;
}

.glass-panel {
  background:
    linear-gradient(to bottom, rgba(30, 58, 138, 0.16), rgba(5, 5, 5, 0.52)),
    rgba(5, 5, 5, 0.42);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.glass-panel-strong {
  background:
    linear-gradient(to bottom, rgba(23, 37, 84, 0.32), rgba(5, 5, 5, 0.6)),
    rgba(5, 5, 5, 0.5);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(96, 165, 250, 0.16);
  box-shadow: 0 0 30px -10px rgba(37, 99, 235, 0.16), 0 18px 50px rgba(0, 0, 0, 0.32);
}

#nav-backdrop-probe {
  position: fixed;
  inset: 0 0 auto 0;
  height: 180px;
  z-index: 55;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 50%, rgba(96, 165, 250, 0.28), transparent 22%),
    radial-gradient(circle at 78% 35%, rgba(59, 130, 246, 0.22), transparent 20%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 22px),
    linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.32));
  opacity: 0.85;
  mask-image: linear-gradient(to bottom, black 0%, black 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 72%, transparent 100%);
}

#nav-container {
  position: relative;
  transition: all 0.5s ease;
  will-change: backdrop-filter, background-color;
}

#nav-wrapper.scrolled #nav-container {
  background: rgba(0, 0, 0, 0.82) !important;
  -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
  backdrop-filter: blur(32px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

#nav-wrapper.scrolled {
  padding-top: 12px !important;
}

#nav-wrapper.scrolled #brand-text {
  opacity: 0.96;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

#brand-text {
  color: #ffffff;
  white-space: nowrap;
}

#nav-container {
  flex-wrap: nowrap;
}

.mix-blend-overlay {
  mask-image: linear-gradient(to bottom, transparent 0, black 140px, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 140px, black 100%);
}

/* Utility for accessibility toggle input when Tailwind not available early */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.step-number {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  background: linear-gradient(to bottom, rgba(59,130,246,0.34), rgba(30,64,175,0.16));
  border: 1px solid rgba(59,130,246,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

#lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
}

#lang-select option {
  background: #0b1020;
  color: #fff;
}

.portfolio-link-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

#whatsapp-fab.is-pulsing {
  animation: whatsappPulse 1.6s ease-in-out;
}

@media (max-width: 1279px) {
  #nav-container {
    gap: 14px;
  }
}
