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

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

html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial,
    sans-serif;
  overflow: hidden; /* scroll solo dentro del panel derecho en desktop */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ================================
   Layout 2 columnas
=================================== */
.shell {
  display: grid;
  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);
}
p,
.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Contenedor scrolleable del formulario */
.scroll {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  padding: 28px clamp(20px, 4vw, 40px) 120px;
}

.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 img {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  row-gap: 1rem;
  text-align: center;
  width: 45%;
}
.button-row {
  display: flex;
  align-items: center;
  justify-content: center;
}
.button-row.is-hero {
  margin-top: 3rem;
}
.button-row.left {
  justify-content: flex-start;
}
/* .home-banner a img {
  width: 100%;
} */
@media (max-width: 980px) {
  .home-banner img {
    width: 41%;
  }
  .home-banner {
    justify-content: center;
    row-gap: 4rem;
    column-gap: 2rem;
  }
}

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

/* ================================
   Formulario (1 columna)
=================================== */
form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto; /* centra en desktop */
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: clamp(14px, 1.6vw, 15px);
  color: var(--primary);
  margin-bottom: 0px;
}
.req::after {
  content: " *";
  color: var(--accent);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  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);
}

fieldset,
input,
select,
textarea {
  margin-bottom: 16px;
}

/* Mostrar rojo solo si el usuario interactuó */
:where(input, textarea):user-invalid {
  border-color: var(--danger);
}
:where(input, textarea):user-valid {
  border-color: var(--success);
}

/* Fieldsets (radios/checkbox) */
fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
legend {
  font-weight: 700;
  color: var(--primary);
  font-size: 14px;
}
.fieldrow {
  display: flex;
  flex-direction: column;
  gap: 12px 18px;
  margin-top: 8px;
}
.fieldrow label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 500;
}
input[type="radio"],
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin-bottom: 0px !important;
}

/* ================================
   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;
  transition: transform 0.06s ease, filter 0.2s;
  text-decoration: none !important;
}
.btn:active {
  transform: translateY(1px);
}
.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
=================================== */
@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;
    background: url("/images/hero-mobile.png") center/contain no-repeat;
  }
  .scroll {
    padding-bottom: 140px;
    min-height: 80vh;
    width: 100%;
  }
  form {
    max-width: 100%;
  }
}

/* ==== Alineación vertical fina radios/checkbox ==== */

/* Asegura que el label y el control compartan centro vertical */
.fieldrow label,
fieldset label {
  display: inline-flex;
  align-items: center; /* clave */
  gap: 10px;
  line-height: 1.35; /* evita que el texto “empuje” hacia abajo */
  margin: 0;
}

/* Tamaño fijo del control y alineación con el texto */
fieldset input[type="radio"],
fieldset input[type="checkbox"] {
  inline-size: 18px; /* width */
  block-size: 18px; /* height */
  margin: 0 !important;
  vertical-align: middle;
  flex: 0 0 auto;
  transform: translateY(1px); /* micro-ajuste óptico para la línea base */
}

/* Safari/iOS tiende a dejarlos un pelín más arriba: dale 1px extra */
@supports (-webkit-touch-callout: none) {
  fieldset input[type="radio"],
  fieldset input[type="checkbox"] {
    transform: translateY(2px);
  }
}

/* === Espaciado proporcional en fieldsets === */
fieldset {
  padding: 16px 18px; /* más aire dentro del recuadro */
  margin-bottom: 20px; /* separa fieldsets entre sí */
}

/* Radios: Sí / No (y similares) */
#fs-placa label,
#fs-origen label {
  margin-right: 28px; /* distancia pareja entre opciones */
}

/* Checkboxes de experiencia: Perro / Gato en fila; "Otros" abajo */
#fs-experiencia {
  --chip-gap-x: 24px;
  --chip-gap-y: 14px;
}
#fs-experiencia > label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 var(--chip-gap-x) var(--chip-gap-y) 0;
}
/* "Otros" con su input en nueva línea, alineado y con ancho cómodo */
#fs-experiencia > label:last-of-type {
  display: block;
  margin: 6px 0 0 0; /* separa de los chips de arriba */
}
#fs-experiencia > label:last-of-type input[type="text"] {
  display: block;
  margin-top: 8px;
  margin-left: 0px; /* alinea con el texto "Otros" */
  width: 100%; /* ancho visualmente balanceado */
}

/* Micro-ajuste vertical del control vs texto (Safari/otros) */
fieldset input[type="radio"],
fieldset input[type="checkbox"] {
  inline-size: 18px;
  block-size: 18px;
  margin: 0;
  transform: translateY(1px);
}
@supports (-webkit-touch-callout: none) {
  fieldset input[type="radio"],
  fieldset input[type="checkbox"] {
    transform: translateY(2px);
  }
}

/* Un poquito más de aire entre bloques del formulario */
form {
  gap: 16px;
} /* antes tenías 8px */
