/* ================================
   Variables y base
=================================== */
:root {
  --bg: #0f0f12;
  --panel: #ffffff;
  --text: #101114;
  --muted: #6b7280;
  --primary: #194e5d; /* morado */
  --accent: #fc7d3e; /* naranja */
  --border: #e5e7eb;
  --focus: #9ca3af;
  --hero-ratio: 0.68;
}

* {
  box-sizing: border-box;
}
.hidden {
  display: none !important;
}

html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial,
    sans-serif;
  overflow: hidden; /* <- bloquea scroll global en desktop */
}

hr {
  border: 0;
  border-top: 2px solid var(--focus);
  margin: 32px 0;
  opacity: 0.8;
}

/* ================================
   Layout 2 columnas
=================================== */
.shell {
  display: grid;
  /* Columna 1: ancho = altoViewport * proporciónImagen */
  grid-template-columns: calc(100dvh * var(--hero-ratio)) minmax(320px, 1fr);
  height: 100dvh;
}

/* Columna izquierda (Hero fijo) */
.hero {
  position: sticky;
  top: 0;
  height: 100%;
  min-height: 100%;
  padding: 0px;
  background: url("/images/hero.png") top right/cover no-repeat;
  background-color: white;
  z-index: 20;
}

/* Columna derecha (scroll interno) */
.panel {
  background: var(--panel);
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

header.panel__head {
  padding: 28px clamp(20px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
}
header .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(64, 50, 124, 0.1);
  color: var(--primary);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
header h1 {
  margin: 12px 0 4px;
  font-size: clamp(22px, 2.3vw, 30px);
  color: var(--primary);
}
header a {
  text-decoration: none !important;
}
h2 {
  color: var(--primary);
}
header p {
  margin: 0;
  color: var(--muted);
}

/* Contenedor scrolleable del formulario */
.scroll {
  overflow-y: auto; /* <- aquí ocurre el scroll */
  overflow-x: hidden;
  flex: 1;
  padding: 28px clamp(20px, 4vw, 40px) 120px; /* espacio para barra de envío */
}

/* ================================
   Formulario
=================================== */
form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  max-width: 980px;
}
.full {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.req::after {
  content: " *";
  color: var(--accent);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(64, 50, 124, 0.12);
}

/* ================================
   Barra de envío fija
=================================== */
.submitBar {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 35%);
  padding: 22px clamp(20px, 4vw, 40px);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
}
.btn.primary {
  background: var(--primary);
  color: #fff;
}
.btn.primary:hover {
  filter: brightness(1.05);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

/* ================================
   Footer con redes
=================================== */
footer.site {
  padding: 18px clamp(20px, 4vw, 40px);
  border-top: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--primary);
}
.brand a {
  color: var(--primary);
}
.social {
  display: flex;
  gap: 12px;
}
.social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 18px;
}
.social img {
  width: 70%;
}
.social a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ================================
   Responsivo
   En mobile se vuelve 1 columna y
   el body recupera el scroll global.
=================================== */
@media (max-width: 980px) {
  body {
    overflow: auto;
  }
  .shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100dvh;
    width: 100%;
  }
  .hero {
    position: relative;
    width: 100%;
    aspect-ratio: 3.5 / 1; /* 🡐 fuerza la proporción */
    background: url("/images/hero-mobile.png") center/contain no-repeat;
  }
  .scroll {
    padding-bottom: 140px;
    min-height: 80vh;
    width: 100%;
  }
  form {
    grid-template-columns: 1fr;
  }
}

/*gracias banner*/
.gracias-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
}

/* === Checkbox elegante y accesible === */
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  line-height: 1.35;
  margin-top: 1rem;
}
.check span {
  margin-top: 2px;
} /* alinea texto con la cajita */

/* Base */
.check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px; /* cuadradito con esquinas suaves */
  background: #fff;
  display: grid;
  place-items: center;
  margin: 0; /* evita salto raro en algunos navegadores */
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

/* Hover/Focus */
.check input[type="checkbox"]:hover {
  border-color: var(--focus);
}
.check input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(64, 50, 124, 0.14); /* aro de enfoque accesible */
}

/* Checkmark (SVG como máscara) */
.check input[type="checkbox"]::before {
  content: "";
  width: 12px;
  height: 12px;
  transform: scale(0);
  transition: transform 0.12s ease-in-out;
  background: #fff; /* color del ✔ */
  /* Soporte cross-browser para máscara SVG inline */
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M6.173 12.414L2.293 8.536l1.414-1.414 2.466 2.465 5.12-5.12 1.414 1.415z"/></svg>')
    center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M6.173 12.414L2.293 8.536l1.414-1.414 2.466 2.465 5.12-5.12 1.414 1.415z"/></svg>')
    center / contain no-repeat;
  position: relative;
  right: 4px;
  bottom: 4px;
}

/* Estado marcado */
.check input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}
.check input[type="checkbox"]:checked::before {
  transform: scale(2.5);
}

/* Deshabilitado */
.check input[type="checkbox"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.home-banner {
  display: flex;
  flex-wrap: wrap;
  column-gap: 4rem;
  row-gap: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back,
.home-banner a {
  color: var(--primary);
  margin-top: 16px;
  display: inline-block;
  text-decoration: underline !important;
}
.home-banner a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  row-gap: 1rem;
  text-align: center;
  width: 45%;
}
.home-banner a img {
  width: 100%;
}

@media (max-width: 980px) {
  .home-banner a {
    width: 41%;
  }
  .home-banner {
    justify-content: center;
    row-gap: 4rem;
    column-gap: 2rem;
  }
}
