/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
  /* Colores */
  --color-bg: #ffffff;
  --color-surface: #f4f4f4;
  --color-text: #1a1a1a;
  --color-text-muted: #555555;
  --color-neon: #019fcb;
  --color-neon-rgb: 1, 159, 203;
  --color-border: rgba(0, 0, 0, 0.1);

  /* Tipografía — Open Sans */
  --font-heading: "Open Sans", sans-serif;
  --font-body: "Open Sans", sans-serif;

  /* Espaciado */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --spacing-2xl: 6rem;

  /* Carousel */
  --carousel-height: 440px;
  --carousel-height-mobile: 380px;
  --slide-width: 280px;
  --slide-height: 373px;
  --slide-radius: 20px;
  --carousel-perspective: 600px;
}

/* ============================================
   ANIMATED NEON BORDER — @property para animar
   ángulo del conic-gradient (el truco clave)
   ============================================ */
@property --neon-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes neon-spin {
  to {
    --neon-angle: 360deg;
  }
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ============================================
   HEADER SECTION
   ============================================ */
.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 5%;
  z-index: 100;
  background: transparent;
}

.header__logo {
  display: flex;
  align-items: center;
}

.header__logo img {
  height: 20px;
  max-width: none;
  object-fit: contain;
  transform: scale(2.2);
  transform-origin: left center;
}

.header__nav {
  display: flex;
  gap: 2rem;
}

.header__link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  transition: color 0.3s ease;
}

.header__link:hover {
  color: var(--color-neon);
}

.header__btn {
  display: inline-block;
  background: var(--color-neon);
  color: #ffffff;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: none;
}
@media (max-width: 768px) {
  .header__btn {
    display: none;
  }
}

.header__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(var(--color-neon-rgb), 0.4);
}

.header__actions {
  display: flex;
  align-items: center;
}

.header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
  padding: 0;
  margin-left: 1.5rem;
}

.header__hamburger span {
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  transition: all 0.3s ease;
}

/* Responsive Header */
@media (max-width: 768px) {
  .header {
    padding: 2rem 5%;
  }

  .header__hamburger {
    display: flex;
  }

  .header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--color-bg);
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    align-items: center;
  }

  .header__nav.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* Animación hamburger activa */
  .header__hamburger.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .header__hamburger.is-active span:nth-child(2) {
    opacity: 0;
  }
  .header__hamburger.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  width: 100%;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Efecto fade en los bordes laterales cubriendo todo el alto del hero */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  width: 35%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.hero::before {
  left: 0;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 1) 5%,
    rgba(255, 255, 255, 0) 100%
  );
}

.hero::after {
  right: 0;
  background: linear-gradient(
    to left,
    rgba(255, 255, 255, 1) 5%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* ---------- Hero Content (Texto + CTA) ---------- */
.hero__content {
  position: relative;
  z-index: 20; /* Mayor que el z-index 10 del gradient lateral */
  text-align: center;
  padding-inline: var(--spacing-md);
  margin-bottom: var(--spacing-xs);
  margin-top: 12rem; /* Evita que el header pise el título */
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--spacing-xs);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.5vw, 1.05rem);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
}

/* ============================================
   CTA BUTTON CON BORDE NEÓN ANIMADO
   
   Técnica:
   1. Wrapper exterior (.hero__cta-wrapper) tiene el borde gris
      y el gradiente neón giratorio
   2. El link interior (.hero__cta) tiene el fondo oscuro
   3. El neón gira por fuera del borde gris
   ============================================ */
.hero__cta-wrapper {
  position: relative;
  display: inline-block;
}

.hero__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  background: #ffffff;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  z-index: 1;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.2);
}

.hero__cta:active {
  transform: translateY(0);
}

.hero__cta svg {
  transition: transform 0.3s ease;
}

.hero__cta:hover svg {
  transform: translateX(3px);
}

/* ============================================
   3D CAROUSEL
   ============================================ */
.carousel {
  position: relative;
  width: 100%;
  height: var(--carousel-height);
  margin-top: var(--spacing-xs);
  overflow: visible;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
}

/* ============================================
   ESCENARIO Y ANILLO
   ============================================ */
.carousel__stage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: var(--slide-width);
  height: var(--slide-height);
  perspective: var(--carousel-perspective);
  transform-style: preserve-3d;
}

.carousel__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  pointer-events: auto;
  cursor: grab;
}

.carousel__ring.is-dragging {
  cursor: grabbing;
}

/* Transición suave al agarrar (drag) */
.carousel__ring:not(.is-dragging) {
  transition: transform 0.1s ease-out;
}

.carousel__slide {
  position: absolute;
  width: var(--slide-width);
  height: var(--slide-height);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  border-radius: var(--slide-radius);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: opacity 0.4s ease;
}

.carousel__slide img,
.carousel__slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--slide-radius);
  pointer-events: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero::before,
  .hero::after {
    width: 15%;
  }

  .hero__content {
    padding-top: 3rem;
  }

  .hero__subtitle br {
    display: none;
  }

  .carousel {
    height: var(--carousel-height-mobile);
  }

  .carousel__stage {
    perspective: 400px;
  }
}

@media (max-width: 480px) {
  .hero__title br {
    display: none;
  }
}

/* ============================================
   SPLIT TEXT UTILITIES
   ============================================ */
.line {
  overflow: hidden;
  padding-bottom: 0.1em;
}
.char {
  display: inline-block;
  transform-origin: bottom center;
}
