.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-cta {
  display: block;
  margin: 18px auto 0 auto;
}
.hero-subtitle-large {
  font-size: 2.8rem;
  line-height: 1.18;
  font-weight: 600;
  margin-top: 38px;
}
/* ===================== Responsive Hero Improvements ===================== */
@media (max-width: 1024px) {
  .hero-model {
    width: 700px;
    height: 480px;
  }
  .hero-carousel img {
    --slide-w: 400px;
    max-height: 300px;
  }
}
@media (max-width: 768px) {
  .hero {
    height: 70vh;
    min-height: 420px;
  }
  .hero-model {
    width: 420px;
    height: 260px;
  }
  .hero-carousel img {
    --slide-w: 260px;
    max-height: 180px;
  }
  .hero-title-badge {
    font-size: 1.2rem;
    padding: 6px 12px;
  }
}
@media (max-width: 480px) {
  .hero {
    height: 56vh;
    min-height: 260px;
  }
  .hero-model {
    width: 220px;
    height: 120px;
  }
  .hero-carousel img {
    --slide-w: 120px;
    max-height: 80px;
  }
  .hero-title-badge {
    font-size: 1rem;
    padding: 4px 8px;
  }
}
/* Hero Section - Premium */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Dark checkerboard background similar to the reference */
  background-color: var(--bg-primary);
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 50%, rgba(163, 230, 53, 0.04) 0%, transparent 60%);
  background-size: 50px 50px, 50px 50px, cover;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, rgba(163, 230, 53, 0.05) 0%, transparent 50%, rgba(163, 230, 53, 0.03) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-3d-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Hero background carousel (behind text) */
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* allow clicks through to CTA */
  overflow: hidden;
}


.hero-carousel .slides {
  display: flex;
  gap: 28px;
  align-items: center;
  will-change: transform;
  padding: 20px 0;
}

/* Small GLB model area placed in front of the carousel */
.hero-model {
  position: absolute;
  left: 50%;
  top: 50%; /* centered vertically */
  transform: translate(-50%, -50%);
  z-index: 3; /* above carousel images, below hero text */
  width: 980px; /* larger */
  height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hero-model canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 1100px;
  background: transparent;
  border-radius: 0;
  /* sombra suave solo en los bordes, sin glow verde */
  filter: drop-shadow(0 40px 90px rgba(0,0,0,0.55));
  box-shadow: 0 0 0 0 transparent;
  will-change: transform;
}

/* style for the moved title (was the welcome badge) */
.hero-title-badge {
  display: inline-block;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  font-weight: 800;
  padding: 8px 18px;
  color: var(--text-primary);
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(163,230,53,0.12);
  border-radius: 40px;
  text-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 28px rgba(163,230,53,0.06);
}

/* ensure hero text sits above the model */
.hero-content { z-index: 4; }

/* Make slides uniform size so each advance moves a full slide */
.hero-carousel img {
  --slide-w: 540px; /* fallback fixed size on desktop */
  width: min(56vw, var(--slide-w));
  height: calc(min(56vw, var(--slide-w)) * 0.58); /* 16:9-ish */
  max-height: 420px;
  border-radius: 12px;
  object-fit: cover;
  filter: grayscale(10%) contrast(0.9) brightness(0.52) saturate(0.7);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 40px rgba(163,230,53,0.03) inset;
  transform: translateZ(0);
}

/* Smooth transitions and active highlighting */
.hero-carousel img {
  transition: transform 900ms cubic-bezier(0.2,0.8,0.2,1), filter 900ms ease, box-shadow 900ms ease, opacity 900ms ease;
  opacity: 0.88;
}

.hero-carousel img.active {
  transform: translateY(-14px) scale(1.06);
  filter: grayscale(0%) brightness(0.98) saturate(1.06) contrast(1);
  box-shadow: 0 40px 120px rgba(0,0,0,0.7), 0 0 48px rgba(163,230,53,0.08) inset;
  opacity: 1;
  z-index: 3;
}

.hero-carousel img:not(.active) {
  transform: translateY(0px) scale(0.98);
  opacity: 0.78;
}

/* give slides container a gentle 3D tilt for depth */
.hero-carousel .slides {
  transform-origin: center center;
  perspective: 1200px;
}

/* subtle parallax animation: slides slowly translate left in a loop via JS */
@media (max-width: 768px) {
  .hero-carousel img { width: 72vw; max-width: 420px; }
  .hero-carousel .slides { gap: 18px; }
}

.hero-3d-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 20;
  display: flex;
  gap: 8px;
}

.zoom-btn {
  background: rgba(0,0,0,0.55);
  color: var(--primary);
  border: 2px solid rgba(163, 230, 53, 0.12);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 20px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  box-shadow: 0 8px 30px rgba(163,230,53,0.06);
}

.zoom-btn:hover {
  transform: translateY(-4px) scale(1.05);
  background: rgba(163, 230, 53, 0.06);
  box-shadow: var(--shadow-glow);
  border-color: rgba(163, 230, 53, 0.35);
}

.zoom-overlay {
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 20;
  background: rgba(0,0,0,0.85);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-family: system-ui, sans-serif;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 30px rgba(163,230,53,0.04);
}

.hero-content {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: var(--spacing-md);
  max-width: 900px;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  line-height: 1.05;
  animation: fadeInUp 0.9s ease;
  /* stronger neon highlight */
  text-shadow: 0 8px 30px rgba(0,0,0,0.6), 0 0 30px rgba(163,230,53,0.06);
}

.hero-title .highlight {
  color: var(--primary);
  text-shadow: 0 0 28px rgba(163,230,53,0.45), 0 0 60px rgba(163,230,53,0.25);
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 1s ease 0.2s backwards;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: rgba(163, 230, 53, 0.12);
  border: 1px solid rgba(163, 230, 53, 0.4);
  border-radius: 50px;
  color: var(--primary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 1s ease 0.1s backwards;
  /* Added subtle backdrop blur */
  backdrop-filter: blur(6px);
  transition: all var(--transition-fast);
}

.hero-badge:hover {
  background: rgba(163, 230, 53, 0.18);
  border-color: rgba(163, 230, 53, 0.6);
  box-shadow: 0 0 20px rgba(163, 230, 53, 0.2);
}

.hero-badge::before {
  content: "✓";
  font-weight: 700;
}

.hero-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--primary);
  color: #000000;
  border-radius: var(--radius-md);
  font-size: var(--font-size-lg);
  font-weight: 700;
  transition: all var(--transition-base);
  animation: fadeInUp 1s ease 0.4s backwards;
  box-shadow: var(--shadow-glow-strong);
  /* Added border for polish */
  border: 2px solid transparent;
}

.hero-cta:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-strong);
  background: var(--primary-dark);
  border-color: var(--primary-light);
}

/* Horizontal ribbon similar to reference (category strip) */
.hero-ribbon {
  position: absolute;
  left: 0;
  right: 0;
  top: 86px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 20px;
  z-index: 15;
  background: linear-gradient(90deg, rgba(163,230,53,0.06), rgba(163,230,53,0.03));
  border-top: 2px solid rgba(163,230,53,0.12);
  border-bottom: 2px solid rgba(163,230,53,0.12);
  overflow: hidden;
}

.hero-ribbon .item {
  color: var(--primary);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(163,230,53,0.08);
  box-shadow: 0 4px 18px rgba(163,230,53,0.03);
}

.hero-ribbon .spacer { width: 10px; }

.scroll-indicator {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-indicator span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-secondary);
  border-radius: 20px;
  position: relative;
}

.scroll-indicator span::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 2px;
  animation: scroll 2s infinite;
}

/* Animations `fadeInUp` and `scroll` are defined centrally in `pages.css` */

@media (max-width: 768px) {
  .hero-title {
    font-size: var(--font-size-2xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-lg);
  }

  .hero-cta {
    padding: 0.875rem 2rem;
    font-size: var(--font-size-base);
  }
}

/* 3D canvas tweaks and accessibility / transitions */
.hero-3d-container canvas,
.hero-3d-container > canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: auto;
  will-change: transform;
}

/* Prevent touch gestures from conflicting with controls */
.hero-3d-container {
  touch-action: none;
}

/* Smooth appearing/disappearing for the zoom overlay */
.zoom-overlay {
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  opacity: 1;
  transform: translateY(0);
}
.zoom-overlay.hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

/* Focus styles for keyboard users */
.zoom-btn:focus {
  outline: 3px solid rgba(163,230,53,0.22);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px rgba(163,230,53,0.06);
}

@media (max-width: 768px) {
  .hero-ribbon { top: 70px; height: 48px; gap: 12px; }
  .hero-3d-controls { top: 12px; left: 12px; gap: 6px; }
  .zoom-btn { width: 40px; height: 40px; font-size: 18px; }
}
