/* Custom Styles */

/* Typography - Space Grotesk for headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.hero-bg {
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
}

.gradient-hero {
  background: linear-gradient(180deg, hsl(144, 66%, 5%), hsl(144, 50%, 8%));
}

.text-gradient {
  background: linear-gradient(135deg, hsl(112, 47%, 50%), hsl(77, 80%, 56%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animations */
@keyframes glow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animation-delay-1000 {
  animation-delay: 1s;
}

.fade-up {
  animation: fadeUp 0.6s ease-out forwards;
  opacity: 0;
}

.animation-delay-100 {
  animation-delay: 0.1s;
}

.animation-delay-200 {
  animation-delay: 0.2s;
}

.animation-delay-300 {
  animation-delay: 0.3s;
}

.animation-delay-400 {
  animation-delay: 0.4s;
}

/* Scroll reveal animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Form Styles */
input,
textarea,
select {
  transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  background-color: hsl(144, 66%, 8%);
}

textarea::placeholder,
input::placeholder {
  color: hsl(83, 40%, 65%);
}

/* Remove default select arrow in some browsers */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='hsl(112, 47%25, 50%25)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  appearance: none;
}

/* Checkbox styling */
input[type="checkbox"] {
  cursor: pointer;
  appearance: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid hsl(144, 40%, 15%);
  border-radius: 0.375rem;
  background-color: hsl(144, 66%, 8%);
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="checkbox"]:checked {
  background-color: hsl(112, 47%, 50%);
  border-color: hsl(112, 47%, 50%);
}

input[type="checkbox"]:checked::after {
  content: '✓';
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

/* Typing cursor for hero `.iterar` */
.iterar {
  display: inline-block;
  white-space: nowrap;
}
.iterar::after {
  /* remove previous pseudo-element to avoid duplication (kept for backwards compatibility) */
  content: '';
}

/* Cursor element when created by JS */
.typing-cursor {
  display: inline-block;
  margin-left: 6px;
  color: #ffffff; /* cursor blanco */
  -webkit-text-fill-color: #ffffff; /* fuerza relleno blanco en WebKit (Chrome/Edge) */
  -webkit-text-stroke-color: transparent;
  mix-blend-mode: normal;
  animation: blink 1s step-start infinite;
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Mobile responsive h1 sizing */
@media (max-width: 640px) {
  h1 {
    font-size: 1.875rem !important; /* 30px - reducing from text-5xl (3rem) */
    line-height: 1.2;
  }
}
