header {
  background-color: #050505;
  position: relative;
  overflow: hidden;
  height: 100vh;  
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

#scrollDownPc,
#scrollDownMovil {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#scrollDownMovil {
  bottom: 0 !important;
  margin-bottom: 0 !important;
  line-height: 0;
  transform: translateX(-50%) translateY(18px) !important;
  transform-origin: center bottom;
  z-index: 3;
}

#scrollDownMovil img {
  width: 100vw;
  height: auto;
  display: block;
}

.scroll-visible {
  opacity: 1 !important;
  pointer-events: auto;
}

#scrollDownMovil.scroll-visible {
  transform: translateX(-50%) translateY(0) !important;
}

#ss {
  background-color: #050505;
}

.gradient-row {
  width: 100%;
  height: 120px;
  opacity: 0;
  margin-top: -1px;
  background:
    linear-gradient(180deg,
      rgb(255, 255, 255) 0%,
      rgba(242, 245, 241, 0.7) 18%,
      rgba(131, 131, 131, 0.38) 52%,
      rgba(5, 5, 5, 1) 100%);
  transform: translateY(-18px);
  transform-origin: top center;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.gradient-row.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .gradient-row {
    display: none;
  }
}

section {
  background-color: #050505;
  width: 100%;
}

#proceso {
  background-color: #050505;
  position: relative;
  padding-bottom: 100vh;
}

.process-intro {
  padding-top: 3rem;
}

.process-kicker {
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.34rem;
  font-size: 0.78rem;
}

.process-heading {
  text-wrap: balance;
  max-width: 12ch;
  margin: 0 auto;
}

/* Animated line styling */
.animated-line-container {
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  z-index: 2;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 8px rgba(121, 121, 121, 0.6)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.3));
}

@keyframes scrollCuePulse {
  0%, 100% {
    opacity: 1;
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0.18));
  }
  50% {
    opacity: 0.82;
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.28));
  }
}

#scrollDownMovil.scroll-visible img,
.gradient-row.visible {
  animation: scrollCuePulse 2.6s ease-in-out infinite;
}

/* 🔥 IMPORTANTE: quitamos animación */
.coin-logo, .coin-1, .coin-2, .coin-3 {
  width: 180px;
  height: 180px;
  max-width: 40%;
  max-height: 180px;
  will-change: transform, opacity;
  object-fit: cover;
  flex-shrink: 0;
}

.process-step {
  position: relative;
}

.process-copy h2,
.process-copy p,
.process-intro h2,
.process-intro p {
  will-change: transform, opacity;
}

.process-coin-wrap,
.dynamic-card {
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

@media (max-width: 992px) {
  .coin-logo, .coin-1, .coin-2, .coin-3 {
    width: 140px;
    height: 140px;
    max-width: 40%;
  }
}

@media (max-width: 768px) {
  .coin-logo, .coin-1, .coin-2, .coin-3 {
    width: 110px;
    height: 110px;
    max-width: 45%;
  }
}

/* textos */
.text-light {
  color: rgba(255, 255, 255, 0.9);
}

/* Logo final section - centered like animated line */
.logo-final-section {
  padding: 40px 20px;
}

.logo-final-frame {
  min-height: 250px;
  align-items: center;
}

.logo-final {
  width: 250px;
  height: 250px;
  max-width: 90%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  will-change: transform, opacity;
}

.logo-final.is-alt-logo {
  transform: scale(0.58);
}

@media (max-width: 768px) {
  .logo-final-section {
    padding: 30px 15px;
  }

  .logo-final-frame {
    min-height: 180px;
  }

  .logo-final {
    width: 180px;
    height: 180px;
  }

  #ss {
    margin-top: -26px;
    padding-top: 26px;
  }

  .gradient-row {
    height: 126px;
  }

  .process-intro {
    padding-top: 2.2rem;
  }

  .process-kicker {
    letter-spacing: 0.24rem;
    font-size: 0.72rem;
  }
}

/* espacios */
.espacio-grande {
  height: 50vh;
}

.espacio-inferior {
  height: 20vh;
}

@media (max-width: 768px) {
  .espacio-grande {
    height: 30vh;
  }
}

.espacio-grande-inicial {
  height: 24vh;
}

/* inputs */
.custom-input {
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 0.8rem 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-input:focus {
  background-color: rgba(0, 0, 0, 0.8);
  border-color: #e0e0e0;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
  color: white;
  outline: none;
}

/* ===== BOTONES ===== */
.btn-metallic {
  background-color: transparent;
  color: #ffffff !important;
  border: 2px solid #c0c0c0 !important;
  padding: 12px;
  border-radius: 8px;
  letter-spacing: 1px;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.btn-metallic:focus {
  background-color: transparent;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  outline: none;
}

.btn-metallic:hover {
  background-color: #e0e0e0;
  color: #050505;
  border-color: #e0e0e0;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* ===== REFERIDOS - TARJETAS ===== */
.referidos-section {
  background-color: #050505;
}

.referidos-section .card {
  height: auto;
  min-height: 60vh;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.referidos-section .card:hover {
  box-shadow: 0 10px 40px rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

.referidos-card-image {
  position: relative;
  width: 100%;
  height: 60vh;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.referidos-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  pointer-events: none;
  z-index: 1;
}

.referidos-card-image picture,
.referidos-card-image img {
  display: none;
}

#referidos1 .card,
#referidos2 .card {
  border-radius: 1rem;
}

#referidos1 .card:hover,
#referidos2 .card:hover {
  box-shadow: 0 10px 40px rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

/* ===== CONTACTO ===== */
#contacto {
  background-color: #050505;
}

#contacto .card {
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.8), rgba(20, 20, 20, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease;
}

#contacto .card:hover {
  box-shadow: 0 15px 50px rgba(255, 255, 255, 0.1);
}

/* ===== FOOTER ===== */
#footer {
  background-color: #050505;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

#footer .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

#footer .social-link:hover {
  color: #e0e0e0;
  border-color: #e0e0e0;
  background-color: rgba(224, 224, 224, 0.1);
  transform: translateY(-3px);
}

#footer .footer-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.3s ease;
}

#footer .footer-link:hover {
  color: #e0e0e0;
}

/* ===== LOGO FINAL SECTION ===== */
.logo-section {
  margin-bottom: 2rem;
}

.logo-section + .row h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.95);
}

.logo-section + .row p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
  .logo-section + .row h2 {
    font-size: 1.4rem;
  }

  .logo-section + .row p {
    font-size: 0.95rem;
  }
}

.btn-flotante-directo {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #e0e0e0, #ffffff);
  color: #050505;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 25px rgba(255, 255, 255, 0.3), inset 0 2px 5px rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.2);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
}

.btn-flotante-directo.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.btn-flotante-content {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transform-origin: center center;
}

.btn-flotante-content.is-tilting {
  animation: contactTiltBurst 1.4s ease-in-out;
}

.btn-flotante-directo:hover {
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.34), inset 0 2px 5px rgba(255, 255, 255, 0.5);
}

.btn-flotante-directo:hover .btn-flotante-content {
  animation-play-state: paused;
}

@keyframes contactTiltBurst {
  0%, 18%, 46%, 64%, 100% {
    transform: rotate(0deg);
  }
  8% {
    transform: rotate(-5deg);
  }
  14% {
    transform: rotate(4deg);
  }
  22% {
    transform: rotate(-3deg);
  }
  28% {
    transform: rotate(2deg);
  }
  54% {
    transform: rotate(-5deg);
  }
  60% {
    transform: rotate(4deg);
  }
  68% {
    transform: rotate(-3deg);
  }
  74% {
    transform: rotate(2deg);
  }
}

@media (max-width: 768px) {
  .btn-flotante-directo {
    right: 18px;
    bottom: 18px;
    padding: 12px 20px;
  }
}
