/* ======================
   Accesibilidad
   ====================== */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .supersection { transition: none; }
  .animate-in { animation: none !important; opacity: 1; transform: none; }
  .production-card,
  .repo-card,
  .showcase-card,
  .service-close-pack,
  .contact-link,
  .cta-button,
  .supernav-button,
  .tabbar-btn,
  .supernav-button::before { transition: none; }
  .availability-dot { animation: none; }
}

/* ======================
   Secciones generales
   ====================== */
.supersection {
  display: none;
  opacity: 0;
  min-height: 80vh;
  transition: opacity 0.3s ease;
}

.supersection.active {
  display: block;
}

.supersection > .supercontainer {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.supersection h2 {
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Transiciones de sección */
.fade-out { opacity: 0; }
.fade-in  { opacity: 1; }

/* ======================
   Animaciones de entrada
   ====================== */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  transform: translateY(24px);
}

.supersection.fade-in .animate-in {
  animation: fadeSlideUp 0.5s ease forwards;
}

.supersection.fade-in .animate-in:nth-child(1) { animation-delay: 0s; }
.supersection.fade-in .animate-in:nth-child(2) { animation-delay: 0.08s; }
.supersection.fade-in .animate-in:nth-child(3) { animation-delay: 0.16s; }
.supersection.fade-in .animate-in:nth-child(4) { animation-delay: 0.24s; }
.supersection.fade-in .animate-in:nth-child(5) { animation-delay: 0.32s; }
.supersection.fade-in .animate-in:nth-child(6) { animation-delay: 0.4s; }

/* ======================
   Inicio / About Me
   ====================== */
.about-me {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.about-me-text {
  flex: 1 1 400px;
  max-width: 600px;
}

.about-me-text h1 {
  margin-bottom: 0.25rem;
  font-size: 2.2rem;
  color: var(--text-heading);
}

.about-me-text p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.about-me-radar {
  flex: 0 0 auto;
  width: min(300px, 90vw);
}

.about-me-radar svg {
  width: 100%;
  height: auto;
}

.about-me-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background-color: var(--bg-tag);
  color: var(--color-accent);
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.tag:hover {
  background-color: var(--bg-tag-hover);
  transform: translateY(-1px);
}

/* ======================
   En producción
   ====================== */
.production-title {
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

.production-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.production-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-alt) 100%);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.production-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-primary-lg);
}

.production-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.production-card h3 {
  color: var(--color-accent);
  font-size: 1.1rem;
}

.production-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.production-stat {
  color: var(--color-success);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: auto;
}

/* ======================
   Trust Strip
   ====================== */
.trust-strip {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  margin: 2rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.trust-item {
  text-align: center;
  min-width: 120px;
}

.trust-number {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-accent);
  font-family: "Poppins", sans-serif;
}

.trust-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ======================
   Services Preview (landing)
   ====================== */
.services-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.service-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.3s ease, transform 0.2s ease;
}

.service-preview-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.service-preview-card svg {
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.service-preview-card h3 {
  color: var(--text-heading);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.service-preview-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.service-preview-price {
  color: var(--color-success);
  font-weight: 600;
  font-size: 0.9rem;
}

.services-preview-cta {
  text-align: center;
  margin-bottom: 2.5rem;
}

/* ======================
   Testimonios
   ====================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.testimonial-stars {
  color: var(--color-gold);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.testimonial-quote {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  font-style: italic;
  flex: 1;
  margin: 0;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-primary-subtle);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.testimonial-name {
  display: block;
  color: var(--text-heading);
  font-weight: 600;
  font-size: 0.9rem;
  font-style: normal;
}

.testimonial-role {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ======================
   Showcase clientes
   ====================== */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.showcase-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-alt) 100%);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.showcase-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-primary-lg);
}

.showcase-image {
  aspect-ratio: 16 / 9;
  background: var(--bg-primary-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.showcase-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-image-placeholder {
  color: var(--text-subtle);
}

.showcase-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.showcase-card h3 {
  color: var(--color-accent);
  font-size: 1.1rem;
}

.showcase-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.showcase-tags .tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
}

.showcase-result {
  color: var(--color-success);
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: auto;
}

/* ======================
   Tablet (721px - 1024px)
   ====================== */
@media screen and (min-width: 721px) and (max-width: 1024px) {
  .about-me-text h1 {
    font-size: 2rem;
  }

  .production-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ======================
   Mobile (max 720px)
   ====================== */
@media screen and (max-width: 720px) {
  .supersection > .supercontainer {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .about-me {
    gap: 2rem;
    margin-bottom: 2rem;
  }

  .about-me-text h1 {
    font-size: 1.8rem;
  }

  .about-me-radar {
    width: 260px;
  }

  .production-grid {
    grid-template-columns: 1fr;
  }
}
