/* Reset & base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  background: #0f0231;
  color: #2b1746;
}

/* Screens */
.screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease;
}
.screen.active {
  opacity: 1;
  pointer-events: auto;
}
/* Fade helpers (used for quick JS class toggles) */
.screen.fade-out { opacity: 0; }
.screen.fade-in { opacity: 1; }

/* Overlay content to align buttons / form irrespective of background */
.overlay {
  width: min(92vw, 720px);
  display: grid;
  gap: 20px;
  justify-items: center;
  padding: clamp(16px, 3.5vw, 32px);
  border-radius: 24px;
  background: rgba(255,255,255,0.0); /* transparent; backgrounds already designed */
}

/* Row layout for Yes/No */
.row {
  grid-auto-flow: column;
  gap: clamp(16px, 4vw, 40px);
}

/* Buttons */
.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 28px;
  font-weight: 800;
  font-size: clamp(18px, 4vw, 28px);
  cursor: pointer;
  transform: translateZ(0);
  transition: filter .2s ease, transform .05s ease;
  letter-spacing: .3px;
}
.btn:active { transform: scale(.98); }

.btn-primary {
  color: white;
  background: #f75000; /* naranja */
  box-shadow: 0 8px 24px rgba(255,106,0,.35);
}
.btn-dark {
  color: white;
  background: #2b0a57; /* violeta oscuro */
  box-shadow: 0 8px 24px rgba(43,10,87,.35);
}

.form-card {
  width: min(92vw, 680px);
  align-self: start;
  margin-top: 14vh; /* roughly where the white card sits in the design */
  background: rgba(255,255,255,0.85);
  border-radius: 28px;
  backdrop-filter: blur(4px);
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
}
form {
  width: 100%;
  display: grid;
  gap: 16px;
}
.field { display: grid; gap: 6px; }
label { font-weight: 600; }
input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid #e6e1f2;
  font-size: 18px;
  outline: none;
}
input[type="text"]:focus { border-color: #6c4dbb; box-shadow: 0 0 0 4px rgba(108,77,187,.15); }

.checkbox { display:flex; align-items:center; gap: 10px; font-weight:600; }
.checkbox input { width: 20px; height: 20px; }

.error { color: #b00020; min-height: 1.1em; font-size: .9rem; }
.msg { min-height: 1.1em; font-size: 1rem; font-weight: 600; }

/* Accessibility helper for headings that shouldn't be visible */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.header {
  position: fixed;        /* se queda siempre visible */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;          /* por encima de todo */
  background: #fff;
  padding: clamp(16px, 2vw, 20px) 5vw;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* opcional, da un leve relieve */
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: clamp(24px, 5vw, 48px);
  width: auto;
  object-fit: contain;
}

.logo.naranja {
  margin-right: auto;
}

.logo.visa {
  margin-left: auto;
}

@media (max-width: 480px) {
  .header-inner {
    justify-content: space-between;
  }

  .logo {
    height: clamp(22px, 8vw, 40px);
  }
}


/* --- SCREEN 1 --- */
.screen-1 {
  position: fixed;
  inset: 0;
  background: #2b0a57; /* violeta oscuro */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

/* Contenedor blanco con forma */
.content-card {
  background: #fff;
  color: #2b0a57;
  padding: clamp(32px, 5vw, 64px);
  border-radius: 0 32px 32px 0;
  width: min(80%, 500px);
  max-width: 540px;
  min-height: 60%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%);
}

/* Texto */
.texto-intro {
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1.3;
  text-align: left;
  font-weight: 500;
}

.texto-intro strong {
  font-weight: 800;
}

/* Logo */
.logo-naranja {
  width: clamp(180px, 40vw, 300px);
  height: auto;
}

/* Botón */
.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 36px;
  font-size: clamp(16px, 3vw, 22px);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  align-self: start;
}

.btn-naranja {
  background: #f75000;
  color: white;
  box-shadow: 0 6px 20px rgba(255, 106, 0, 0.4);
  align-self: start !important;
}

.btn-naranja:hover {
  filter: brightness(1.1);
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .content-card {
    width: 90%;
    clip-path: polygon(0 0, 94% 0, 100% 50%, 94% 100%, 0 100%);
    padding: 40px 28px;
  }
  .btn {
    align-self: center;
  }
}

/* --- SCREEN 2 --- */
.screen-2 {
  position: fixed;
  inset: 0;
  background: #f75000; /* naranja corporativo */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

/* Contenedor central */
.card-naranja {
  background: transparent;
  border: 2px solid #fff;
  border-radius: 40px;
  padding: clamp(32px, 6vw, 64px);
  width: min(90%, 480px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  box-sizing: border-box;
}

/* Texto principal */
.pregunta {
  font-size: clamp(32px, 6vw, 42px);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: clamp(32px, 6vh, 60px);
}

.pregunta span {
  /*display: block;*/
  font-size: clamp(50px, 8vw, 60px);
  font-weight: 800;
}

/* Botones */
.botones {
  display: flex;
  gap: 32px;
  justify-content: center;
}

.btn-violeta {
  background: #2b0a57;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 36px;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease;
  align-self: center !important;
}

.btn-violeta:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
}

/* Adaptación móvil */
@media (max-width: 480px) {
  .card-naranja {
    width: 90%;
    padding: 40px 20px;
  }

  .botones {
    flex-direction: row;
    gap: 20px;
  }
/*
  .btn-violeta {
    width: 70%;
  }*/
}

/* --- SCREEN 4 --- */
.screen-4 {
  position: fixed;
  inset: 0;
  background: #f75000;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 4;
  color: #2b0a57;
}

.card-descarga {
  max-width: 600px;
  padding: clamp(32px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.texto-descarga {
  color: #fff;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 500;
  line-height: 1.4;
}

.texto-descarga strong {
  color: #fff;
  font-weight: 800;
}

.store-link img {
  width: clamp(180px, 40vw, 260px);
  height: auto;
  transition: transform 0.2s ease;
}

.store-link img:hover {
  transform: scale(1.05);
}
