/* HERO LAYOUT */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0 10%;
  background: #1a1f22; /* Tono más oscuro y neutro */
  color: #fff;
  overflow: hidden;
  gap: 100px;
}

/* VISUAL */
.hero-visual {
  flex: 0 0 400px;
  display: flex;
  justify-content: center;
  animation: fadeLeft 1s ease;
  position: relative;
  perspective: 1000px; /* Para profundidad en fragmentos */
}

/* FRAGMENTOS DE CÓDIGO FLOTANTES */
.code-fragment {
  position: absolute;
  color: #00c2a8;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  font-size: 18px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
  text-shadow: 0 0 10px rgba(0, 194, 168, 0.5);
  animation: floatCode 6s ease-in-out infinite;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease; /* Transición suave para evaporación */
}

/* CLASE PARA EL EFECTO DE EVAPORACIÓN */
.code-fragment.evaporate {
  animation: codeEvaporate 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
  pointer-events: none;
}

@keyframes codeEvaporate {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
    filter: blur(0px);
    opacity: 0.3;
  }
  30% {
    opacity: 0.6;
    filter: blur(2px);
    transform: translateY(-50px) scale(1.1) rotate(5deg);
  }
  100% {
    transform: translateY(-400px) scale(1.6) rotate(30deg);
    filter: blur(15px);
    opacity: 0;
  }
}

@keyframes floatCode {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

/* TEXTO */
.hero-content {
  flex: 1.2; /* Aumentamos ligeramente el espacio para el texto */
  max-width: 700px; /* Aumentamos el ancho máximo de 550px a 700px */
  animation: fadeRight 1s ease;
  text-align: left;
  z-index: 1;
  position: relative;
}

/* EFECTO GLITCH PARA EL TÍTULO */
.hero-content h1 {
  font-size: 52px; /* Reducimos ligeramente de 56px para que quepa mejor en 2-3 líneas */
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.2; /* Aumentamos el interlineado para mayor claridad */
  position: relative;
}

.hero-content h1::before,
.hero-content h1::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  display: none; /* Se activa con hover o animación */
}

.hero-content h1:hover::before {
  display: block;
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.hero-content h1:hover::after {
  display: block;
  left: -2px;
  text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
  animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(31px, 9999px, 94px, 0); }
  20% { clip: rect(62px, 9999px, 42px, 0); }
  40% { clip: rect(16px, 9999px, 78px, 0); }
  60% { clip: rect(87px, 9999px, 11px, 0); }
  80% { clip: rect(54px, 9999px, 23px, 0); }
  100% { clip: rect(2px, 9999px, 98px, 0); }
}

@keyframes glitch-anim2 {
  0% { clip: rect(65px, 9999px, 100px, 0); }
  20% { clip: rect(12px, 9999px, 56px, 0); }
  40% { clip: rect(98px, 9999px, 12px, 0); }
  60% { clip: rect(43px, 9999px, 87px, 0); }
  80% { clip: rect(11px, 9999px, 45px, 0); }
  100% { clip: rect(76px, 9999px, 23px, 0); }
}

.hero-content h1 span {
  color: #00c2a8;
  text-shadow: 0 0 20px rgba(0, 194, 168, 0.3); /* Sutil resplandor en el acento */
}

.hero-content p {
  font-size: 16px; /* Ligeramente más grande */
  font-weight: 400; /* Más cuerpo */
  opacity: 1; /* Totalmente nítido */
  margin-bottom: 30px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

/* BOTONES */
.hero-buttons a {
  text-decoration: none;
  padding: 14px 28px;
  margin-right: 15px;
  border-radius: 12px;
  font-weight: 600;
  transition: 0.3s;
  display: inline-block;
}

.btn-primary {
  background: #00c2a8;
  color: #fff;
}

.btn-primary:hover {
  background: #00a892;
}

.btn-secondary {
  border: 1px solid #fff;
  color: #fff;
}

.btn-secondary:hover {
  background: #fff;
  color: #000;
}

/* ANIMACIONES */
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-40px);}
  to { opacity: 1; transform: translateX(0);}
}

@keyframes fadeRight {
  from { opacity: 0; transform: translateX(40px);}
  to { opacity: 1; transform: translateX(0);}
}



body {
  background: #1a1f22;
  font-family: 'Poppins', sans-serif;

  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
}

#container {
  position: relative;
  /* animation: fadeIn 0.8s cubic-bezier(.22,1,.36,1); */
  animation: fadeIn 1.5s ease, floatCup 4s ease-in-out infinite;
}

#container::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,194,168,0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
}

#container:hover::before {
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.5s ease-in, opacity 0.4s ease;
}



 
/* .steam {
  position: absolute;
  height: 150px;
  width: 150px;
  border-radius: 50%;
  background-color: #fff;
  margin-top: -75px;
  margin-left: 75px;
  z-index: 0;
  filter: blur(12px);
  opacity: 0.3;
  animation-timing-function: cubic-bezier(.4,0,.2,1);
} */

.steam {
  position: absolute;
    top: -60px;   /* altura del borde */
  left: 100px;  /* centro de la taza */

  width: 120px;
  height: 120px;

  border-radius: 50%;
  background: var(--steam-static-color, #fff);
  transition: background 0.8s ease;

  filter: blur(12px);
  opacity: 0.3;
  
  top: -40px;
  transform: translateX(-50%);
  left: 50%;
}

#cup:hover .steam {
  --steam-static-color: #00c2a8;
  transition-delay: 1.5s; /* Espera a que los símbolos se eleven para cambiar a verde */
}

#steam1 {
  -webkit-animation: steam1 4s ease-out infinite;
  animation: steam1 4s ease-out infinite;
}

#steam3 {
  -webkit-animation: steam1 4s ease-out 1s infinite;
  animation: steam1 4s ease-out 1s infinite;
}

@-webkit-keyframes steam1 {
  0% {transform: translateY(0) translateX(0) scale(0.25); opacity: 0.2;}
  100% {transform: translateY(-200px) translateX(-20px) scale(1); opacity: 0;}
}

@keyframes steam1 {
  0% {transform: translateY(0) translateX(-50%) scale(0.25); opacity: 0.2;}
  100% {transform: translateY(-200px) translateX(calc(-50% - 20px)) scale(1); opacity: 0;}
}

#steam2 {
  -webkit-animation: steam2 4s ease-out 0.5s infinite;
  animation: steam2 4s ease-out 0.5s infinite;
}

#steam4 {
  -webkit-animation: steam2 4s ease-out 1.5s infinite;
  animation: steam2 4s ease-out 1.5s infinite;
}

@keyframes steam2 {
  0% {transform: translateY(0) translateX(-50%) scale(0.25); opacity: 0.2;}
  100% {transform: translateY(-200px) translateX(calc(-50% + 20px)) scale(1); opacity: 0;}
}
@keyframes logoIn {
  from { opacity: 0; transform: scale(0.8);}
  to { opacity: 1; transform: scale(1);}
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatCup {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}



#cup {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
  width: 300px;
  height: 200px;
  margin: 0 auto;
}

#cup-body {
  position: absolute;
  height: 200px;
  width: 300px;
  border-radius: 0 0 150px 150px;
  background: linear-gradient(145deg, #111, #222);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  margin: auto;
  display: inline-block;
  overflow: hidden;
  z-index: 1;
}

#cup-shade {
  position: relative;
  height: 300px;
  width: 200px;
  background-color: #222;
  display: inline-block;
  margin-left: 42%;
  margin-top: -3px;
  transform: rotate(50deg);
  z-index: 1;
}

#cup-handle {
  position: relative;
  height: 75px;
  width: 80px;
  border-radius: 0 150px 150px 0;
  border: 15px solid #222;
  margin-bottom: 95px;
  margin-left: 250px;
  display: inline-block;
  z-index: 0;
}

#saucer {
  position: absolute;
  height: 30px;
  width: 300px;  
  border-radius: 0 0 100px 100px;
  background-color: #212121;
  margin-top: -32px;
  margin-left: 5px;
  z-index: 2;
}

#shadow {
  height: 10px;
  width: 300px;
  border-radius: 50%;
  margin-top: -5px;
  margin-left: 6px;
  background-color: #0d0f11;
}

.img-container{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  perspective: 500px; /* Profundidad para la curvatura */
}
.img-container img{
  max-height: 95px; /* Un poco más pequeño para que la curva sea más natural */
  max-width: 95px;
  object-fit: contain;
  
  /* EFECTOS DE ADHERENCIA */
  opacity: 0.85; /* Sutil transparencia para integrar */
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); /* Sombra proyectada en la taza */
  transform: rotateY(-10deg) rotateX(2deg); /* Simula la curvatura del cilindro */
  
  /* Mezcla de colores con el fondo de la taza */
  mix-blend-mode: screen; 

  animation: logoIn 1.5s ease;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#cup:hover .img-container img {
  opacity: 1;
  transform: rotateY(0deg) rotateX(0deg) scale(1.05); /* Se endereza un poco al hover */
}


#cup:hover {
  transform: scale(1.05);
  transition: 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px);}
  to { opacity: 1; transform: translateY(0);}
}


@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 50px;
    background: radial-gradient(circle at 50% 30%, rgba(0,194,168,0.15), transparent 50%),
                #2b373d;
  }

  .hero-visual {
    justify-content: center;
    min-width: 100%;
    margin-bottom: 20px;
  }

  .hero-content {
    text-align: center;
    padding-left: 0;
  }

  #cup {
    transform: scale(0.65);
  }
}



.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  width: 20px;
  height: 35px;
  border: 2px solid #fff;
  border-radius: 20px;
  opacity: 0.6;
}


.extra {
  opacity: 0;
}
#cup:hover .extra {
  animation: steam1 3s ease-out infinite;
  opacity: 0.4;
}
.extra:nth-child(1) {
  animation-delay: 0.2s;
}
.extra:nth-child(2) {
  animation-delay: 0.6s;
}
.extra:nth-child(3) {
  animation-delay: 1s;
}

.steam-dynamic {
  position: absolute;
  top: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, var(--steam-color, rgba(255,255,255,0.7)) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  opacity: 0;
  filter: blur(18px); /* Mayor desenfoque para realismo */
  z-index: 0;
  pointer-events: none;
  transform: translateX(-50%);

  animation: steamRise linear forwards;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00c2a8;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
}

.steam-dynamic.green {
  --steam-color: rgba(0, 194, 168, 0.6);
}

.steam-dynamic.code-part {
  filter: blur(2px); /* Mucho más nítido para que el símbolo sea el protagonista */
  text-shadow: 0 0 20px rgba(0, 194, 168, 1), 0 0 5px #fff;
  font-size: 28px;
  opacity: 0.8;
  animation: steamRise linear forwards, codeFlicker 2s infinite alternate;
}

@keyframes codeFlicker {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); text-shadow: 0 0 30px rgba(0, 194, 168, 1); }
}

/* TRAYECTORIA CURVA EN 'S' CON EFECTO DE CALOR */
@keyframes steamRise {
  0% {
    transform: translateX(-50%) translateY(0) scale(0.2) skewX(0deg);
    opacity: 0;
    filter: blur(12px) brightness(1.2);
  }
  10% {
    opacity: 0.6;
  }
  25% {
    /* Curva hacia la derecha y ligera distorsión */
    transform: translateX(calc(-50% + 25px)) translateY(-60px) scale(0.5) skewX(5deg);
    filter: blur(15px) brightness(1.1);
  }
  50% {
    /* Curva hacia el centro y máxima distorsión de calor */
    transform: translateX(-50%) translateY(-130px) scale(0.9) skewX(-5deg);
    opacity: 0.4;
    filter: blur(18px) contrast(1.2);
  }
  75% {
    /* Curva hacia la izquierda */
    transform: translateX(calc(-50% - 25px)) translateY(-200px) scale(1.3) skewX(5deg);
    filter: blur(22px) brightness(1);
  }
  100% {
    /* Desvanecimiento final */
    transform: translateX(-50%) translateY(-280px) scale(1.8) skewX(0deg);
    opacity: 0;
    filter: blur(25px);
  }
}

/* EFECTO DE DISTORSIÓN DE CALOR SOBRE LA TAZA */
.heat-haze {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 100px;
  background: rgba(255, 255, 255, 0.02);
  filter: blur(8px);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  animation: heatWobble 2s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#cup:hover .heat-haze {
  opacity: 1;
  background: rgba(0, 194, 168, 0.05); /* Sutil tinte verde */
}

@keyframes heatWobble {
  0%, 100% { transform: translateX(-50%) scaleY(1) skewX(0deg); }
  50% { transform: translateX(-50%) scaleY(1.1) skewX(2deg); filter: blur(10px); }
}

.mouse-particle {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: #00c2a8;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 0 10px rgba(0, 194, 168, 0.8);
  animation: particleFadeOut 1s ease-out forwards;
}

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

@media (max-width: 768px) {
  .mouse-particle {
    display: none; /* Deshabilitar en móviles para ahorrar recursos */
  }
}
