:root {
  --bg: #0b0b0d;
  --accent: #f5a623;
  --accent-dark: #cf8916;
  --text: #f4efe6;
  --muted: rgba(244, 239, 230, 0.72);
  --option-bg: rgba(10, 10, 10, 0.55);
  --option-border: rgba(255, 255, 255, 0.35);
  --option-selected: var(--accent);
  --error: #ff6b6b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: "Nunito Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: #000;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-photo {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: url("/recursos/fondo-personas-desktop.png") center / cover no-repeat;
  filter: grayscale(1) contrast(0.85) brightness(2) blur(5px);
}

@media (max-width: 640px) {
  .bg-photo {
    background-image: url("/recursos/fondo-personas-mobile.png");
  }
}

.rotate-overlay {
  display: none;
}

/* Móviles/tablets táctiles en horizontal: el formulario está pensado para vertical */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-height: 600px) {
  .rotate-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: #000;
    color: var(--text);
    text-align: center;
    padding: 24px;
  }

  .rotate-overlay svg {
    width: 56px;
    height: 56px;
    animation: rotate-hint 1.6s ease-in-out infinite;
  }

  .rotate-overlay p {
    max-width: 320px;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
  }
}

@keyframes rotate-hint {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-90deg); }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.28) 55%, rgba(0, 0, 0, 0.48) 100%);
  pointer-events: none;
  z-index: 0;
}

.intro-step {
  text-align: center;
}

.intro-step .actions {
  justify-content: center;
}

.step.intro-step {
  max-width: 900px;
}

.intro-hero-title {
  margin: 0 0 clamp(20px, 4vw, 36px);
  font-family: "Poppins", "Nunito Sans", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(32px, 7vw, 84px);
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: rgba(26, 26, 26, 0.82);
  text-shadow: none;
}

.intro-hero-title .hero-lines {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}

.intro-hero-title .hero-mobile {
  display: none;
}

.intro-hero-title .line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.18em;
}

.intro-hero-title .bar {
  display: block;
  height: 0.6em;
  flex: none;
  background: rgba(26, 26, 26, 0.72);
  animation: bar-chase 4s steps(1, end) infinite;
}

.intro-hero-title .bar2 {
  animation-delay: 0.2s;
}

.intro-hero-title .bar3 {
  animation-delay: 0.4s;
}

.hero-desktop .bar1 {
  width: 2.6em;
}

.hero-desktop .bar2 {
  width: 4.2em;
}

.hero-desktop .bar3 {
  width: 1.5em;
}

@keyframes bar-chase {
  0% { background-color: rgba(26, 26, 26, 0.72); }
  50% { background-color: rgba(26, 26, 26, 0.72); }
  50.01% { background-color: rgba(245, 166, 35, 0.9); }
  55% { background-color: rgba(245, 166, 35, 0.9); }
  55.01% { background-color: rgba(26, 26, 26, 0.72); }
  100% { background-color: rgba(26, 26, 26, 0.72); }
}

.intro-hero-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(12px, 2.4vw, 26px);
  margin: 0 0 26px;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: clamp(12px, 1.6vw, 18px);
  color: rgba(26, 26, 26, 0.82);
}

.intro-hero-footer span:not(.footer-line) {
  animation: footer-blink 4s steps(1, end) infinite;
}

@keyframes footer-blink {
  0% { color: rgba(26, 26, 26, 0.82); }
  70% { color: rgba(26, 26, 26, 0.82); }
  70.01% { color: #fff; }
  82.5% { color: #fff; }
  82.51% { color: rgba(26, 26, 26, 0.82); }
  87.5% { color: rgba(26, 26, 26, 0.82); }
  87.51% { color: #fff; }
  100% { color: #fff; }
}

.intro-hero-footer .footer-line {
  flex: 1 1 50px;
  min-width: 40px;
  height: 2px;
  background: var(--accent);
}

@media (max-width: 640px) {
  .intro-hero-title .hero-desktop {
    display: none;
  }

  .intro-hero-title .hero-mobile {
    display: flex;
    align-items: flex-start;
    font-size: clamp(38px, 15vw, 88px);
  }

  .intro-hero-title .hero-mobile .line {
    justify-content: flex-start;
    width: 100%;
  }

  .hero-mobile .word-justify {
    display: flex;
    flex: 1 1 auto;
    justify-content: space-between;
  }

  .hero-mobile .bar1,
  .hero-mobile .bar3 {
    width: 16vw;
    height: 0.5em;
  }

  .hero-mobile .bar2 {
    width: 46vw;
    height: 0.5em;
  }

  .step.intro-step {
    text-align: left;
  }

  .step.intro-step .intro-hero-footer {
    justify-content: flex-start;
    text-align: left;
  }

  .step.intro-step .actions {
    justify-content: center;
    margin-top: 34px;
  }

  .intro-hero-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .intro-hero-footer .footer-line {
    width: 100%;
    flex: none;
  }
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 10;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 300ms ease;
}

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 0 0;
}

.brand .logo {
  height: 34px;
  width: auto;
}

@media (max-width: 640px) {
  .brand {
    /* Margen fijo de seguridad para cámara/notch + el inset real del
       dispositivo si el navegador lo reporta (env devuelve 0 si no). */
    padding-top: calc(70px + env(safe-area-inset-top, 0px));
  }

  .brand .logo {
    height: 22px;
  }
}

.step-container {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 8vw 100px;
}

.step {
  width: 100%;
  max-width: 640px;
}

.step-enter {
  opacity: 0;
  transform: translateY(28px);
}

.step-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 380ms ease, transform 380ms ease;
}

.step-exit {
  opacity: 1;
  transform: translateY(0);
}

.step-exit-active {
  opacity: 0;
  transform: translateY(-28px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  color: #111;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
}

h1,
h2 {
  font-family: "Poppins", "Nunito Sans", sans-serif;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 2px 14px rgba(0, 0, 0, 0.35);
}

h1 {
  font-size: clamp(24px, 3vw, 34px);
}

h2 {
  font-size: clamp(20px, 2.4vw, 28px);
}

.step-hint {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 26px;
}

.step-subtext {
  color: var(--muted);
  font-size: 14px;
  margin: -14px 0 22px;
}

.field {
  margin-bottom: 26px;
}

.field label {
  display: block;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 2px 12px rgba(0, 0, 0, 0.3);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="date"],
.field select {
  width: 100%;
  background: rgba(10, 10, 10, 0.35);
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--text);
  font-size: 20px;
  padding: 8px 10px;
  border-radius: 4px 4px 0 0;
  font-family: inherit;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

.field select option {
  background: #1a1a1c;
  color: var(--text);
}

.field input[type="date"] {
  color-scheme: dark;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.field input::placeholder {
  color: rgba(244, 239, 230, 0.4);
}

.options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.options.single-column {
  grid-template-columns: 1fr;
  max-width: 460px;
}

.option {
  background: var(--option-bg);
  border: 1px solid var(--option-border);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease;
}

.option:hover {
  border-color: rgba(245, 166, 35, 0.6);
}

.option.selected {
  border-color: var(--option-selected);
  background: rgba(245, 166, 35, 0.12);
}

.select-hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

button.primary,
a.primary {
  display: inline-block;
  background: var(--accent);
  color: #1a1200;
  border: none;
  border-radius: 6px;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  transition: background 150ms ease, transform 150ms ease;
}

button.primary:hover,
a.primary:hover {
  background: var(--accent-dark);
}

button.primary:active,
a.primary:active {
  transform: scale(0.98);
}

button.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.secondary,
a.secondary {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 6px;
  padding: 10px 26px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

button.secondary:hover,
a.secondary:hover {
  background: var(--accent);
  color: #1a1200;
}

button.secondary:active,
a.secondary:active {
  transform: scale(0.98);
}

.error-text {
  color: var(--error);
  font-size: 13px;
  margin-top: 4px;
}

/* Formulario de lista de espera ("aforo completo"): caja blanca translúcida
   sobre la foto de fondo, para que el texto y los campos se lean bien. */
.waitlist-box {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.waitlist-box .badge {
  background: #1a1a1a;
  color: #fff;
}

.waitlist-box h1 {
  color: #1a1a1a;
  text-shadow: none;
}

.waitlist-box .step-subtext {
  color: rgba(26, 26, 26, 0.65);
}

.waitlist-box .field label {
  color: #1a1a1a;
  text-shadow: none;
}

.waitlist-box .field input {
  background: rgba(10, 10, 10, 0.06);
  border-bottom: 1px solid rgba(26, 26, 26, 0.3);
  color: #1a1a1a;
}

/* Página de confirmación de asistencia: más texto que el resto de páginas de
   .waitlist-box, así que usa párrafos propios en vez de .step-subtext (que
   lleva un margen negativo pensado para ir pegado a un h1, no para
   apilarse). */
.gracias-texto {
  color: rgba(26, 26, 26, 0.8);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.gracias-destacado {
  color: var(--accent-dark);
  font-weight: 700;
}

.gracias-lista {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gracias-lista li {
  color: rgba(26, 26, 26, 0.8);
  font-size: 15px;
  line-height: 1.5;
}

.gracias-lista .credito {
  color: rgba(26, 26, 26, 0.5);
  font-size: 13px;
  font-weight: 700;
}

.waitlist-box .field input::placeholder {
  color: rgba(26, 26, 26, 0.35);
}

.waitlist-box .error-text {
  color: #c62828;
}

.nav-arrows {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.nav-arrows button {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  border: 1px solid rgba(245, 166, 35, 0.4);
  border-radius: 6px;
  cursor: pointer;
}

.nav-arrows button svg {
  display: block;
}

.nav-arrows button:hover {
  border-color: var(--accent);
  background: rgba(245, 166, 35, 0.12);
}

.nav-arrows button:disabled {
  opacity: 0.3;
  cursor: default;
}

.quote-mark {
  color: var(--accent);
  font-size: 32px;
  line-height: 1;
}

.mensaje-step {
  text-align: center;
}

.mensaje-step h1 {
  font-size: clamp(22px, 3.4vw, 32px);
}

.checkbox-field {
  margin-bottom: 26px;
}

.checkbox-field label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.checkbox-field input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

@media (max-width: 640px) {
  .step-container {
    padding: 32px 6vw 40px;
  }

  /* En móvil se solapaban con los campos al hacer scroll; el botón
     "Aceptar" de cada paso ya permite avanzar sin ellas. */
  .nav-arrows {
    display: none;
  }
}
