/* ============================================================
   CYNTEK — hero.css
   Hero a pantalla completa con máquina protagonista (CX1000).
   Imagen de fondo + overlay + contenido + etiqueta lateral
   + indicador de scroll.
   ============================================================ */

/* ------------------------------------------------------------
   1. HERO — CONTENEDOR PRINCIPAL
   ------------------------------------------------------------ */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh; /* mejora en móviles con barra dinámica */

  display: flex;
  align-items: flex-end;

  background-color: var(--surface-0);
  color: #FFFFFF;
  overflow: hidden;
  isolation: isolate;
}

/* ------------------------------------------------------------
   2. IMAGEN DE FONDO DE LA MÁQUINA
   ------------------------------------------------------------ */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  /* Por defecto el hero es oscuro: usamos un ligero realce */
  filter: contrast(1.02) saturate(1.02);
}

/* Variante donde la máquina va a la derecha y el texto a la izquierda */
.hero__media--right img {
  object-position: 75% center;
}

/* ------------------------------------------------------------
   3. OVERLAY (degradado cinematográfico)
   ------------------------------------------------------------ */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;

  /* Capa 1: degradado vertical para garantizar contraste del texto */
  background:
    linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.55) 0%,
      rgba(10, 10, 10, 0.35) 35%,
      rgba(10, 10, 10, 0.75) 75%,
      rgba(10, 10, 10, 0.95) 100%
    );
}

/* Capa 2: viñeta lateral izquierda más oscura para el bloque de texto */
.hero__overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 80% at 15% 60%,
      rgba(10, 10, 10, 0.55) 0%,
      rgba(10, 10, 10, 0) 70%
    );
}

/* Capa 3: línea sutil de grid técnico muy tenue */
.hero__overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 90%);
}

/* ------------------------------------------------------------
   4. CONTENIDO DEL HERO
   ------------------------------------------------------------ */
.hero__container {
  position: relative;
  z-index: 3;

  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);

  padding-top: calc(var(--header-h) + var(--sp-8));
  padding-bottom: clamp(6rem, 12vh, 10rem);

  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  align-items: flex-start;
}

.hero__content {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

/* ------------------------------------------------------------
   5. EYEBROW DEL HERO
   ------------------------------------------------------------ */
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);

  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--cyntek-orange);

  line-height: 1;
}

.hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 2px;
  background: var(--cyntek-orange);
}

/* ------------------------------------------------------------
   6. TÍTULO DEL HERO
   ------------------------------------------------------------ */
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: var(--fw-black);
  line-height: 0.95;
  letter-spacing: var(--ls-tighter);
  text-transform: uppercase;
  color: #FFFFFF;
  margin: 0;
  text-wrap: balance;
}

.hero__title em {
  font-style: normal;
  color: var(--cyntek-orange);
}

/* ------------------------------------------------------------
   7. TEXTO DEL HERO
   ------------------------------------------------------------ */
.hero__text {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: var(--lh-relaxed);
  color: rgba(255, 255, 255, 0.78);
  max-width: 55ch;
  margin: 0;
}

/* ------------------------------------------------------------
   8. ACCIONES (botones)
   ------------------------------------------------------------ */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-3);
}

/* Forzamos legibilidad sobre imagen oscura */
.hero .btn--outline {
  --btn-fg: #FFFFFF;
  --btn-border: rgba(255, 255, 255, 0.35);
  --btn-bg-hover: #FFFFFF;
  --btn-fg-hover: var(--surface-0);
  --btn-border-hover: #FFFFFF;
}

/* ------------------------------------------------------------
   9. ETIQUETA LATERAL (CX1000 — RIDE-ON SCRUBBER)
   ------------------------------------------------------------ */
.hero__side {
  position: absolute;
  right: var(--container-px);
  bottom: 8rem;
  z-index: 4;

  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-3);

  writing-mode: vertical-rl;
  transform: rotate(180deg);

  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);

  pointer-events: none;
}

.hero__side-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyntek-orange);
  box-shadow: 0 0 12px rgba(255, 95, 69, 0.9);
  transform: rotate(90deg);
}

.hero__side-line {
  display: inline-block;
  width: 1px;
  height: 60px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(90deg);
}

/* ------------------------------------------------------------
   10. SCROLL HINT
   ------------------------------------------------------------ */
.hero__scroll {
  position: absolute;
  left: var(--container-px);
  bottom: 2.5rem;
  z-index: 4;

  display: inline-flex;
  align-items: center;
  gap: var(--sp-4);

  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);

  text-decoration: none;
  pointer-events: auto;

  transition: color var(--dur-base) var(--ease-soft);
}

.hero__scroll:hover {
  color: var(--cyntek-orange);
}

.hero__scroll-line {
  display: inline-block;
  width: 48px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: var(--cyntek-orange);
  animation: hero-scroll-slide 2.2s var(--ease-inout) infinite;
}

@keyframes hero-scroll-slide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(300%); }
}

/* ------------------------------------------------------------
   11. APARICIÓN INICIAL DEL HERO
   ------------------------------------------------------------ */
.hero__content > * {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-enter 900ms var(--ease-out) forwards;
}

.hero__content > *:nth-child(1) { animation-delay: 200ms; }
.hero__content > *:nth-child(2) { animation-delay: 320ms; }
.hero__content > *:nth-child(3) { animation-delay: 440ms; }
.hero__content > *:nth-child(4) { animation-delay: 560ms; }

.hero__side,
.hero__scroll {
  opacity: 0;
  animation: hero-fade 900ms var(--ease-out) forwards;
  animation-delay: 800ms;
}

@keyframes hero-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-fade {
  to { opacity: 1; }
}

/* ------------------------------------------------------------
   12. RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 1024px) {

  .hero__side {
    display: none;
  }

  .hero__title {
    font-size: clamp(2.25rem, 8vw, 4rem);
  }

  .hero__content {
    max-width: 100%;
  }
}

@media (max-width: 640px) {

  .hero {
    min-height: 92vh;
    min-height: 92svh;
  }

  .hero__container {
    padding-top: calc(var(--header-h-mobile) + var(--sp-6));
    padding-bottom: 6rem;
  }

  .hero__title {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1;
  }

  .hero__text {
    font-size: var(--fs-base);
  }

  .hero__actions {
    width: 100%;
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__scroll {
    bottom: 1.5rem;
  }

  .hero__scroll-line {
    width: 32px;
  }
}

/* ------------------------------------------------------------
   13. MOVIMIENTO REDUCIDO
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {

  .hero__content > *,
  .hero__side,
  .hero__scroll {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hero__scroll-line::after {
    animation: none;
  }
}