/* Punto Digital — custom styles */

html {
  scroll-behavior: smooth;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0B1220;
}
::-webkit-scrollbar-thumb {
  background: #0EA5E9;
  border-radius: 3px;
}

/* WhatsApp pulse ring */
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}
.whatsapp-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  animation: pulse-ring 2s ease-out infinite;
  z-index: -1;
}

/* Fade-in on scroll */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Nav glass on scroll */
.nav-scrolled {
  background: rgba(15,23,42,0.92) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

/* Gradient hero bg — slow drifting glow */
.hero-bg {
  background-image:
    radial-gradient(ellipse 80% 60% at center, rgba(14,165,233,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at center, rgba(249,115,22,0.05) 0%, transparent 60%);
  background-repeat: no-repeat;
  background-size: 140% 140%, 100% 100%;
  background-position: 60% 40%, 90% 80%;
  animation: hero-glow-drift 28s ease-in-out infinite;
}
@keyframes hero-glow-drift {
  0%   { background-position: 60% 40%, 90% 80%; }
  50%  { background-position: 45% 55%, 75% 65%; }
  100% { background-position: 60% 40%, 90% 80%; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Step connector line */
.step-line {
  position: absolute;
  top: 40px;
  left: calc(50% + 40px);
  right: calc(-50% + 40px);
  height: 2px;
  background: linear-gradient(90deg, #0EA5E940, #0EA5E920);
}

/* Card hover */
.service-card, .client-card, .testimonial-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover, .client-card:hover, .testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(14,165,233,0.12);
  border-color: rgba(14,165,233,0.4);
}

/* Portfolio slider */
.portfolio-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 1rem;
}
.portfolio-track::-webkit-scrollbar {
  display: none;
}
.portfolio-card {
  scroll-snap-align: start;
  flex: 0 0 340px;
  min-width: 340px;
}
@media (max-width: 640px) {
  .portfolio-card {
    flex: 0 0 290px;
    min-width: 290px;
  }
}

/* Marquee ticker */
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-track {
  animation: marquee-scroll 34s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}
/* Touch devices: swap the auto-scroll for a manually swipeable strip */
@media (hover: none), (pointer: coarse) {
  .marquee-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .marquee-wrap::-webkit-scrollbar {
    display: none;
  }
  .marquee-track {
    animation: none;
  }
}

.marquee-logo {
  filter: grayscale(1) brightness(1.5) opacity(0.4);
  transition: filter 0.25s ease;
}
.marquee-logo:hover {
  filter: grayscale(0) opacity(1);
}

/* Marcas locales: two opposite rows, pause on hover, swipe on touch */
.brands-row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.brands-track {
  display: flex;
  width: max-content;
  animation: brands-scroll 60s linear infinite;
}
.brands-track > div { margin-right: 2.5rem; flex-shrink: 0; }
.brands-row-reverse .brands-track { animation-direction: reverse; }
.brands-row:hover .brands-track { animation-play-state: paused; }
@keyframes brands-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-25%); }
}
.brand-item { width: 130px; }
.brand-tile {
  width: 130px;
  height: 130px;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-item:hover .brand-tile {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.25);
}
.brand-tile-mono {
  background: linear-gradient(135deg, #172033, #0B1220);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
@media (min-width: 1024px) {
  .brand-item { width: 170px; }
  .brand-tile { width: 170px; height: 170px; }
  .brands-track > div { margin-right: 3rem; }
}
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .brands-row {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .brands-row::-webkit-scrollbar { display: none; }
  .brands-track { animation: none; }
}

/* Client logo monogram fallback */
.client-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: -0.02em;
}
