/* Reset básico */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { 
  margin: 0; 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
  color: #ffffff; 
  background: #000; 
}

/* Contenedor de video de fondo */
.video-bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: #000; }

.video-bg__media {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.video-bg__overlay { 
  position: absolute; 
  inset: 0; 
  background: rgba(0,0,0,0.15); 
  z-index: 1; 
  opacity: 0;
  transition: all 1.5s ease;
}

.video-bg__overlay.is-active {
  opacity: 1;
  background: rgba(0,0,0,0.4);
}

/* Contenido principal por encima del video */
.content { 
  position: relative; 
  z-index: 0; 
  min-height: 100vh; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center; 
  padding: 2rem; 
}

/* Logo pequeño siempre visible */
.logo-small {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 25;
  opacity: 0;
  transform: scale(0.8);
  transition: all 1s ease;
}

.logo-small.is-visible {
  opacity: 1;
  transform: scale(1);
}

.logo-small img {
  width: min(120px, 15vw);
  height: auto;
  filter: brightness(1.1);
}

/* Hero card con STOP REPEATING y formulario */
.hero-card {
  width: min(600px, 85vw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.2s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-card.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.hero {
  margin-bottom: 2rem;
  text-align: center;
}

.hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.02em;
}

/* Descripción del hero */
.hero-description {
  margin: 0 0 2rem;
  text-align: center;
  max-width: 500px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease;
}

.hero-description.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-description p {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  margin: 0 0 1rem;
  line-height: 1.6;
  font-weight: 400;
}

.hero-description p:last-child {
  margin-bottom: 0;
  font-weight: 500;
  color: #ffffff;
}

/* Caja de registro */
.signup-box {
  margin-top: 1.5rem;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.7s ease;
}

.signup-box.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.signup-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.signup-input {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  width: 100%;
  max-width: 100%;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  font-family: inherit;
  position: relative;
  z-index: 25;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.signup-input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
  z-index: 30;
}

.signup-input::placeholder {
  color: rgba(255,255,255,0.7);
}

.signup-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.signup-button {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.signup-button:hover { 
  background: #f0f0f0;
  transform: translateY(-1px);
}

/* Mensajes typewriter */
.typewriter-messages {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.typewriter-container {
  width: min(720px, 90vw);
  padding: 2.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  font-size: 1rem;
  color: #ffffff;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.message.typing {
  border-right: 2px solid #ffffff;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { border-color: #ffffff; }
  51%, 100% { border-color: transparent; }
}

/* Intro con logo */
.intro {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
  z-index: 10;
  animation: intro-hold 0.7s ease-in-out 0s 1 both;
}

.intro__logo {
  width: min(50vw, 320px);
  height: auto;
  opacity: 0;
  transform: scale(0.92);
  animation:
    logo-fade-in 1.2s ease-out 0.1s forwards,
    logo-fade-out 0.8s ease-in 6s forwards;
}

@keyframes logo-fade-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes logo-fade-out {
  to { opacity: 0; transform: scale(1.03); }
}

@keyframes intro-hold {
  from { opacity: 1; }
  to { opacity: 1; }
}

@keyframes logo-appear {
  to { opacity: 1; }
}

.is-hidden { opacity: 0; }
.is-visible { opacity: 1; transition: opacity 1.2s ease; }

/* Caja descriptiva larga */
.description-card {
  width: min(800px, 90vw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.2s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
}

.description-card.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.description-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.description-line {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.7;
  font-weight: 400;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  min-height: 1.7em;
  text-align: center;
}

.description-line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.description-line.typing {
  border-right: 2px solid #ffffff;
  animation: blink 1s infinite;
}

.description-line:last-child {
  font-weight: 500;
  color: #ffffff;
}

@keyframes blink {
  0%, 50% { border-color: #ffffff; }
  51%, 100% { border-color: transparent; }
}

/* Caja de email compacta */
.email-card {
  width: min(500px, 80vw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.2s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
}

.email-card.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* Descripción del hero */
.hero-description {
  margin: 0;
  text-align: center;
  max-width: 600px;
}

.hero-description p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  margin: 0 0 1.5rem;
  line-height: 1.7;
  font-weight: 400;
}

.hero-description p:last-child {
  margin-bottom: 0;
  font-weight: 500;
  color: #ffffff;
}

/* Efecto typewriter para texto descriptivo */
.typewriter-text {
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid transparent;
}

.typewriter-text.is-typing {
  opacity: 1;
  border-right: 2px solid #ffffff;
  animation: blink 1s infinite;
}

.typewriter-text.is-complete {
  opacity: 1;
  border-right: none;
  white-space: normal;
}

@keyframes blink {
  0%, 50% { border-color: #ffffff; }
  51%, 100% { border-color: transparent; }
}

.hero {
  margin-bottom: 2rem;
  text-align: center;
}

.hero__title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Segundo formulario de registro */
.signup-box-2 {
  margin-top: 1.5rem;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.7s ease;
  position: relative;
  z-index: 25;
}

.signup-box-2.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.signup-form-2 {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
  position: relative;
  z-index: 25;
}

.signup-input-2 {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  width: 100%;
  max-width: 100%;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  font-family: inherit;
  position: relative;
  z-index: 25;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  outline: none;
}

.signup-input-2:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
  z-index: 30;
}

.signup-input-2::placeholder {
  color: rgba(255,255,255,0.7);
}

.signup-button-2 {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.signup-button-2:hover { 
  background: #f0f0f0;
  transform: translateY(-1px);
}

/* Caja de email compacta */
.email-card {
  width: min(500px, 80vw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.2s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
}

.email-card.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* Caja principal que cambia contenido */
.main-card {
  width: min(600px, 85vw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.2s ease;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
}

.main-card.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* Contenido de la caja */
.card-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s ease;
}

.card-content.is-hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* Contenido descriptivo */
.description-content {
  text-align: center;
}

/* Contenido hero */
.hero-content {
  text-align: center;
}

.hero {
  margin-bottom: 2rem;
  text-align: center;
}

.hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.02em;
}

/* Descripción del hero */
.hero-description {
  margin: 0;
  text-align: center;
  max-width: 500px;
}

.hero-description p {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  margin: 0 0 1rem;
  line-height: 1.6;
  font-weight: 400;
}

.hero-description p:last-child {
  margin-bottom: 0;
  font-weight: 500;
  color: #ffffff;
}

.email-form-container {
  width: 100%;
  max-width: 520px;
}

.email-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  align-items: center;
}

.email-input {
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  width: 100%;
  max-width: 100%;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  outline: none;
  z-index: 25;
  position: relative;
}

.name-input {
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  width: 100%;
  max-width: 100%;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  outline: none;
  z-index: 25;
  position: relative;
  grid-column: 1 / -1;
}

.name-input:focus, .email-input:focus {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.22);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
}

.email-button {
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff, #eaeaea);
  color: #000000;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  z-index: 25;
  position: relative;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.email-button:hover { 
  background: linear-gradient(180deg, #f7f7f7, #e5e5e5);
  transform: translateY(-1px);
}

.email-button:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

.email-input:focus {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.2);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.email-input::placeholder {
  color: rgba(255,255,255,0.6);
}

.email-button {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  background: #ffffff;
  color: #000000;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  z-index: 25;
  position: relative;
}

.email-button:hover { 
  background: #f0f0f0;
  transform: translateY(-1px);
}

/* Consentimiento privacidad */
.consent {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
}

.consent input[type="checkbox"] {
  margin-top: 2px;
}

.privacy-link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Mobile layout for email form */
@media (max-width: 480px) {
  .email-form {
    grid-template-columns: 1fr;
  }

  .email-button {
    width: 100%;
  }

  .email-input {
    font-size: 16px; /* prevent iOS zoom */
  }

  .name-input {
    font-size: 16px; /* prevent iOS zoom */
  }

  .email-form-container { max-width: 92vw; }
}

@media (min-width: 481px) and (max-width: 768px) {
  .email-form-container { max-width: 560px; }
  .email-form { grid-template-columns: 1fr auto; }
}