/* ConsultorIA · estilos comunes
   Diseño tomado de la web anterior (copia_anterior/css/styles.css).
   Paleta: cambie estas variables para ajustar toda la web. */

/* Space Grotesk servida desde la propia web (subconjunto latino) */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin-700.woff2") format("woff2");
}

:root {
  --fondo: #0c0d0c;
  --superficie: #151715;
  --linea: #2a2d2a;
  --borde-campo: #4a4e48;
  --texto: #f1f2ec;
  --texto-suave: #a9ada4;
  --acento: #dffdb0;        /* verde lima de la marca */
  --acento-claro: #ecffcc;
  --tinta-acento: #0c0d0c;  /* texto sobre el verde */
  --error: #ffb4a8;

  --fuente: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --col: 680px;
  --ancho: 820px;
  --margen: 20px;
  --espacio: clamp(72px, 11vw, 136px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
@media (min-width: 768px) {
  body { font-size: 20px; }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.contenedor {
  width: 100%;
  max-width: calc(var(--ancho) + var(--margen) * 2);
  margin: 0 auto;
  padding: 0 var(--margen);
}

/* Enlace para saltar al contenido */
.saltar {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  background: var(--acento);
  color: var(--tinta-acento);
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 700;
}
.saltar:focus {
  top: 12px;
}

/* Tipografía */
h1, h2, h3 {
  margin: 0 0 0.5em;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.4rem, 6.4vw, 4.4rem); max-width: 19ch; }
h2 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); }
h3 { font-size: 1.2em; letter-spacing: -0.01em; }

p {
  margin: 0 0 1em;
}
main p,
main ul,
main ol {
  max-width: var(--col);
}

a {
  color: var(--acento);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--acento);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Cabecera */
.cabecera .contenedor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.marca {
  flex-shrink: 0;
}
.marca img {
  width: 160px;
}
@media (min-width: 768px) {
  .marca img { width: 193px; }
}
.cabecera nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cabecera nav a {
  display: inline-block;
  padding: 8px 0;
  color: var(--texto);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid var(--acento);
  white-space: nowrap;
}
.cabecera nav a:hover,
.cabecera nav a[aria-current="page"] {
  color: var(--acento);
}
@media (max-width: 520px) {
  .cabecera nav { width: 100%; }
}

/* Secciones: la primera hace de portada */
main > section {
  padding: var(--espacio) 0;
  border-top: 1px solid var(--linea);
}
main > section:first-child {
  padding-top: clamp(64px, 12vw, 150px);
  border-top: 0;
}
.subtitulo {
  font-size: 1.15em;
  color: var(--texto-suave);
  margin-bottom: 1.6em;
}

.aviso {
  max-width: var(--col);
  margin: 0 0 1em;
  padding: 16px 20px;
  border: 1.5px solid var(--linea);
  border-radius: 10px;
  color: var(--acento);
  font-size: max(17px, 0.85em);
}
.aviso p {
  margin: 0;
}

/* Precio */
.precio {
  margin: 0 0 1.2em;
  font-size: clamp(2rem, 4.6vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.precio__desde {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--acento);
}
.precio__iva {
  font-size: 0.5em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--texto-suave);
}

/* Tarjetas de servicio */
.servicio {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: 20px;
}
.servicio h3 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}
.servicio .precio {
  padding-top: 1.2em;
  border-top: 1px solid var(--linea);
}
.servicio .boton {
  align-self: flex-start;
}

.destacado {
  font-weight: 700;
}

/* Botones: un único estilo en toda la web */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 30px;
  background: var(--acento);
  color: var(--tinta-acento);
  border: 0;
  border-radius: 999px;
  font: 700 1rem/1.2 var(--fuente);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.boton:hover {
  background: var(--acento-claro);
  color: var(--tinta-acento);
  transform: translateY(-1px);
}
.boton:active {
  transform: none;
}
.boton:focus-visible {
  outline-offset: 4px;
  border-radius: 999px;
}
.boton:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* Listas con guion verde */
main ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}
main ul li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 0.55em;
}
main ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 0.7em;
  height: 2px;
  background: var(--acento);
}
main ul.enlaces-contacto li {
  padding-left: 0;
}
main ul.enlaces-contacto li::before {
  content: none;
}
.enlaces-contacto a {
  display: inline-block;
  padding: 6px 0;
}

/* Pasos numerados en círculo */
main ol {
  list-style: none;
  counter-reset: paso;
  padding: 0;
  margin: 40px 0 0;
}
main ol li {
  counter-increment: paso;
  position: relative;
  min-height: 48px;
  padding: 6px 0 30px 72px;
}
main ol li:last-child {
  padding-bottom: 0;
}
main ol li::before {
  content: counter(paso);
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--acento);
  display: grid;
  place-items: center;
  color: var(--acento);
  font-weight: 700;
}

/* Preguntas frecuentes */
details {
  max-width: var(--col);
  border-bottom: 1px solid var(--linea);
}
h2 + details {
  margin-top: 32px;
  border-top: 1px solid var(--linea);
}
summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 22px 40px 22px 0;
  font-weight: 500;
  font-size: 1.05em;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5em;
  line-height: 1;
  color: var(--acento);
}
details[open] summary::after {
  content: "–";
}
summary:focus-visible {
  outline-offset: -3px;
}
details p {
  color: var(--texto-suave);
  margin-bottom: 0.7em;
}
details p:last-child {
  padding-bottom: 14px;
}

/* Formulario: banda con fondo de superficie a todo el ancho */
section#contacto {
  background: var(--superficie);
  box-shadow: 0 0 0 100vmax var(--superficie);
  clip-path: inset(0 -100vmax);
}
form {
  max-width: var(--col);
  margin-top: 32px;
}
.campo {
  margin-bottom: 22px;
}
.campo label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}
.opcional {
  font-weight: 400;
  color: var(--texto-suave);
}
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 13px 16px;
  background: var(--fondo);
  color: var(--texto);
  border: 1.5px solid var(--borde-campo);
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
}
@media (min-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea { font-size: 1.05rem; }
}
textarea {
  min-height: 120px;
  resize: vertical;
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--acento) 50%),
    linear-gradient(135deg, var(--acento) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--acento);
  outline-offset: 1px;
  border-color: var(--acento);
  border-radius: 10px;
}

/* Preguntas Sí / No en forma de píldora */
fieldset {
  border: 0;
  margin: 0 0 26px;
  padding: 0;
  min-width: 0;
}
fieldset legend {
  margin-bottom: 10px;
  padding: 0;
  font-weight: 500;
}
.opciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.opciones label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px;
  border: 1.5px solid var(--borde-campo);
  border-radius: 999px;
  background: var(--fondo);
  font-size: 1rem;
  cursor: pointer;
}
.opciones label:hover {
  border-color: var(--texto-suave);
}
.opciones label:has(input:checked) {
  border-color: var(--acento);
  color: var(--acento);
}
.opciones label:has(input:focus-visible) {
  outline: 3px solid var(--acento);
  outline-offset: 2px;
}
.opciones input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--acento);
}
.opciones input:focus-visible {
  outline: none;
}

/* Casillas */
.casilla {
  margin-bottom: 22px;
}
.casilla label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
}
.casilla input {
  width: 24px;
  height: 24px;
  margin: 3px 0 0;
  accent-color: var(--acento);
}

/* Campo trampa: fuera de pantalla */
.trampa {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Mensaje tras enviar */
.respuesta {
  max-width: var(--col);
  margin-top: 20px;
  padding: 16px 20px;
  border: 1.5px solid var(--acento);
  border-radius: 10px;
  color: var(--acento);
}
.respuesta.es-error {
  border-color: var(--error);
  color: var(--error);
}
.respuesta:focus {
  outline: none;
}
.respuesta[hidden] {
  display: none;
}

/* Pie */
.pie {
  border-top: 1px solid var(--linea);
  font-size: 0.9em;
}
.pie .contenedor {
  padding-top: 56px;
  padding-bottom: 64px;
}
.pie p {
  margin-bottom: 8px;
}
.pie a {
  display: inline-block;
  padding: 4px 0;
  color: var(--texto);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.pie a:hover {
  color: var(--acento);
  text-decoration: underline;
}

/* Páginas legales: título suelto y secciones más juntas */
main > h1:first-child {
  margin-top: clamp(64px, 12vw, 150px);
}
main > h1:first-child ~ section {
  padding: 40px 0;
}

/* Frase bajo las tarjetas de precio */
.nota-precio {
  margin-top: 32px;
  font-weight: 500;
  color: var(--acento);
}

/* Subtítulo dentro de una sección */
main h3 {
  margin-top: 1.6em;
}
.servicio h3 {
  margin-top: 0;
}

/* Filtro de inicio: una pantalla por paso */
.pantalla {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 82px);
  min-height: calc(100svh - 82px);
}
main > .pantalla,
main > .pantalla:first-child {
  padding: 48px 0;
  border-top: 0;
}
/* Sin JavaScript, «Otra cosa» muestra su pantalla con el ancla */
.pantalla[hidden]:not(:target) {
  display: none;
}
main:has(.pantalla:target) #paso-1:not(:target) {
  display: none;
}
.pantalla h1,
.pantalla h2 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  max-width: 22ch;
}
.pantalla h1:focus,
.pantalla h2:focus {
  outline: none;
}
.opciones-filtro {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 32px 0 0;
}
@media (min-width: 640px) {
  .opciones-filtro {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
.boton--grande {
  min-height: 64px;
  padding: 18px 34px;
  font-size: 1.15rem;
}
.opciones-filtro .boton--grande:only-child {
  align-self: flex-start;
}

/* Pantallas de error */
.error-codigo {
  margin: 0 0 0.15em;
  font-size: clamp(4.5rem, 18vw, 11rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--acento);
}
.pantalla--error h2 {
  font-size: clamp(1.9rem, 4.4vw, 2.8rem);
}
.error-texto {
  color: var(--texto-suave);
}
.volver {
  align-self: flex-start;
  margin-top: 8px;
  padding: 8px 0;
  font-size: max(17px, 0.85em);
}

/* Línea de bienvenida en las páginas de sector */
.enhorabuena {
  color: var(--acento);
  font-weight: 500;
  margin-bottom: 1em;
}

/* Línea de garantía bajo el precio */
.garantia-precio {
  font-weight: 500;
}

/* Datos del socio o colaborador */
.socio {
  margin: 0 0 26px;
  padding: 20px 20px 4px;
  border-left: 2px solid var(--acento);
}

/* Botón de reserva en la confirmación */
.respuesta .boton {
  display: flex;
  width: fit-content;
  margin-top: 16px;
}

/* Aviso bajo un campo que no es válido */
.campo-error {
  margin: 8px 0 0;
  color: var(--error);
}
