/* Arreglar PC Salamanca — hoja de estilos única */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --verde: #17332a;
  --verde-medio: #24493c;
  --piedra: #e8ece6;
  --piedra-oscura: #cfd7cd;
  --papel: #ffffff;
  --texto: #1b2a24;
  --texto-suave: #43544b;
  --ambar: #f2b705;
  --ambar-oscuro: #c99700;
  --error: #9b1c1c;

  --f-titulo: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --f-texto: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --ancho: 72rem;
  --margen: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--f-titulo);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  color: var(--verde);
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6.2vw, 4.4rem); font-weight: 760; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-weight: 720; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.005em; }

p { margin: 0 0 1em; max-width: 62ch; }

a { color: var(--verde); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--verde-medio); }

:focus-visible {
  outline: 3px solid var(--ambar);
  outline-offset: 3px;
  border-radius: 2px;
}
.oscuro :focus-visible,
.pie :focus-visible,
.cabecera :focus-visible { outline-color: var(--ambar); }

.contenedor { width: min(100% - 2 * var(--margen), var(--ancho)); margin-inline: auto; }

.salto {
  position: absolute; left: var(--margen); top: -4rem;
  background: var(--ambar); color: var(--verde);
  padding: 0.7rem 1.1rem; font-weight: 700; z-index: 100;
}
.salto:focus { top: 0.75rem; }

/* ---------- Cabecera ---------- */
.cabecera { background: var(--verde); color: var(--papel); }
.cabecera .contenedor {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 0.9rem;
}
.marca {
  display: flex; align-items: center; gap: 0.7rem;
  color: var(--papel); text-decoration: none;
  font-family: var(--f-titulo); font-weight: 720; font-size: 1.2rem; line-height: 1.1;
}
.marca:hover { color: var(--papel); }
.marca svg { width: 2.4rem; height: 2.4rem; flex: none; }
.marca small { display: block; font-family: var(--f-texto); font-weight: 400; font-size: 0.8rem; opacity: 0.8; }

.nav ul { list-style: none; display: flex; gap: 0.2rem; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 0.55rem 0.8rem;
  color: var(--papel); text-decoration: none; font-size: 1rem;
  border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: var(--piedra-oscura); color: var(--papel); }
.nav a[aria-current="page"] { border-bottom-color: var(--ambar); font-weight: 700; }

.boton-menu {
  display: none; background: none; border: 2px solid var(--papel); color: var(--papel);
  font: inherit; font-size: 1rem; padding: 0.45rem 0.9rem; border-radius: 0.3rem; cursor: pointer;
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0.7rem 1.5rem;
  font: inherit; font-weight: 700; font-size: 1.1rem; text-decoration: none; cursor: pointer;
  border: 3px solid var(--verde); border-radius: 0.35rem;
  background: var(--ambar); color: var(--verde);
  transition: background-color 0.15s, transform 0.15s;
}
.boton:hover { background: #ffc81f; color: var(--verde); }
.boton:active { transform: translateY(1px); }
.boton svg { width: 1.3rem; height: 1.3rem; }
.boton.secundario { background: transparent; color: var(--verde); }
.boton.secundario:hover { background: var(--piedra); }
.oscuro .boton { border-color: var(--ambar); }
.oscuro .boton.secundario { color: var(--papel); border-color: var(--papel); }
.oscuro .boton.secundario:hover { background: var(--verde-medio); }

/* ---------- Portada ---------- */
.heroe { background: var(--piedra); padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.heroe .contenedor {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.heroe .intro { font-size: 1.3rem; color: var(--texto-suave); max-width: 34ch; }
.acciones { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }

.telefono-grande {
  display: block; margin-top: 1.5rem;
  font-family: var(--f-titulo); font-weight: 760; font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  color: var(--verde); text-decoration: none; letter-spacing: -0.01em;
}
.telefono-grande:hover { text-decoration: underline; }

/* Parte de trabajo */
.parte {
  position: relative; background: var(--papel); color: var(--texto);
  border: 2px solid var(--verde); border-radius: 0.4rem;
  padding: 1.6rem 1.6rem 1.2rem;
  box-shadow: 0.5rem 0.5rem 0 var(--verde);
  --corte: 0.7rem;
}
.parte h2 { font-size: 1.5rem; margin-bottom: 0.2em; }
.parte .sub { font-size: 0.98rem; color: var(--texto-suave); margin: 0 0 1.2rem; }
.parte dl { margin: 0; border-top: 2px dashed var(--piedra-oscura); }
.parte .fila { padding: 0.85rem 0; border-bottom: 2px dashed var(--piedra-oscura); }
.parte dt { font-weight: 700; color: var(--verde); }
.parte dd { margin: 0.1rem 0 0; color: var(--texto-suave); font-size: 1.02rem; }
.parte dd strong { color: var(--texto); }
.sello {
  position: absolute; right: 1.2rem; bottom: -1.1rem;
  background: var(--papel); color: #1c6b3a; border: 3px solid #1c6b3a; border-radius: 0.3rem;
  font-family: var(--f-titulo); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.04em;
  padding: 0.25rem 0.8rem; transform: rotate(-6deg);
}
@keyframes sellar {
  0% { opacity: 0; transform: rotate(-6deg) scale(1.9); }
  70% { opacity: 1; transform: rotate(-6deg) scale(0.94); }
  100% { opacity: 1; transform: rotate(-6deg) scale(1); }
}
.sello { animation: sellar 0.45s 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) both; }

/* ---------- Secciones ---------- */
.seccion { padding-block: clamp(3rem, 7vw, 5.5rem); }
.seccion.piedra { background: var(--piedra); }
.seccion.oscuro { background: var(--verde); color: var(--papel); }
.seccion.oscuro h2, .seccion.oscuro h3 { color: var(--papel); }
.seccion.oscuro p { color: #dbe6df; }
.seccion.oscuro a:not(.boton) { color: var(--papel); }

.cabecera-seccion { max-width: 40rem; margin-bottom: 2.5rem; }
.cabecera-seccion p { color: var(--texto-suave); font-size: 1.15rem; }

/* Servicios: filas, no tarjetas */
.servicios { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--verde); }
.servicios li { border-bottom: 2px solid var(--verde); }
.servicios a {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto;
  gap: 1rem 2.5rem; align-items: center;
  padding: 1.5rem 0.25rem; text-decoration: none; color: var(--texto);
  transition: background-color 0.15s, padding 0.15s;
}
.servicios a:hover { background: var(--piedra); padding-inline: 1rem; color: var(--texto); }
.servicios .nombre { font-family: var(--f-titulo); font-weight: 720; font-size: 1.5rem; line-height: 1.15; color: var(--verde); }
.servicios .desc { color: var(--texto-suave); margin: 0; max-width: none; }
.servicios .ir { font-weight: 700; color: var(--verde); white-space: nowrap; }
.servicios .ir svg { display: inline; width: 1.2rem; height: 1.2rem; vertical-align: -0.2em; margin-left: 0.3rem; }

/* Pasos: aquí sí hay una secuencia */
.pasos { list-style: none; counter-reset: paso; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.pasos li { counter-increment: paso; border-top: 4px solid var(--ambar); padding-top: 1.1rem; }
.pasos li::before {
  content: counter(paso); display: block; font-family: var(--f-titulo); font-weight: 800;
  font-size: 2.6rem; line-height: 1; color: var(--ambar); margin-bottom: 0.5rem;
}
.pasos h3 { font-size: 1.25rem; }
.pasos p { margin: 0; font-size: 1.02rem; }

/* Llamada final */
.llamada { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.llamada .telefono-grande { color: var(--papel); margin-top: 0; }
.llamada .datos { margin: 0; padding: 0; list-style: none; }
.llamada .datos li { margin-bottom: 0.6rem; }

/* ---------- Páginas interiores ---------- */
.encabezado-pagina { background: var(--piedra); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.encabezado-pagina h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); margin-bottom: 0.4em; }
.encabezado-pagina .intro { font-size: 1.25rem; color: var(--texto-suave); max-width: 44ch; margin: 0; }
.migas { font-size: 0.95rem; margin-bottom: 1.2rem; color: var(--texto-suave); }
.migas ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.migas li + li::before { content: "/"; margin-right: 0.4rem; color: var(--texto-suave); }

.dos-columnas { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }

.dos-columnas > div > h2 { margin-top: 2.6rem; }
.dos-columnas > div > h2:first-child { margin-top: 0; }

.incluye { list-style: none; margin: 0 0 2rem; padding: 0; border-top: 2px solid var(--verde); }
.incluye li {
  padding: 0.85rem 0 0.85rem 2.2rem; border-bottom: 1px solid var(--piedra-oscura); position: relative;
}
.incluye li::before {
  content: ""; position: absolute; left: 0.2rem; top: 1.2rem; width: 0.9rem; height: 0.5rem;
  border-left: 3px solid var(--verde); border-bottom: 3px solid var(--verde); transform: rotate(-45deg);
}

.lateral { background: var(--verde); color: var(--papel); padding: 1.8rem; border-radius: 0.4rem; position: sticky; top: 1.5rem; }
.lateral h2 { color: var(--papel); font-size: 1.5rem; }
.lateral p { color: #dbe6df; }
.lateral .telefono-grande { color: var(--papel); font-size: 1.9rem; margin: 0 0 1.2rem; }
.lateral .boton { width: 100%; border-color: var(--ambar); }
.lateral a:not(.boton) { color: var(--papel); }

details { border-bottom: 1px solid var(--piedra-oscura); }
details:first-of-type { border-top: 2px solid var(--verde); }
summary {
  cursor: pointer; list-style: none; padding: 1rem 2.2rem 1rem 0; position: relative;
  font-family: var(--f-titulo); font-weight: 700; font-size: 1.15rem; color: var(--verde);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0.3rem; top: 0.55rem; font-size: 1.8rem; line-height: 1; font-weight: 600;
}
details[open] summary::after { content: "–"; }
details p { padding-bottom: 0.4rem; color: var(--texto-suave); }

/* ---------- Formulario ---------- */
.formulario { display: grid; gap: 1.4rem; }
.campo label { display: block; font-weight: 700; margin-bottom: 0.4rem; color: var(--verde); }
.campo .ayuda { display: block; font-weight: 400; color: var(--texto-suave); font-size: 0.95rem; }
.campo input[type="text"], .campo input[type="email"], .campo input[type="tel"], .campo textarea {
  width: 100%; font: inherit; color: var(--texto); background: var(--papel);
  border: 2px solid var(--verde); border-radius: 0.3rem; padding: 0.75rem 0.9rem;
}
.campo textarea { min-height: 9rem; resize: vertical; }
.campo input:focus, .campo textarea:focus { outline: 3px solid var(--ambar); outline-offset: 2px; }
.campo.consentimiento { display: flex; gap: 0.8rem; align-items: flex-start; }
.campo.consentimiento input { width: 1.4rem; height: 1.4rem; margin-top: 0.2rem; flex: none; accent-color: var(--verde); }
.campo.consentimiento label { font-weight: 400; margin: 0; color: var(--texto); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.aviso { padding: 1rem 1.2rem; border-radius: 0.3rem; border: 2px solid; margin-bottom: 1.5rem; font-weight: 700; }
.aviso.ok { background: #e6f4ea; border-color: #1c6b3a; color: #124a28; }
.aviso.mal { background: #fbeaea; border-color: var(--error); color: var(--error); }
[hidden] { display: none !important; }

.vias { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--verde); }
.vias li { padding: 1.1rem 0; border-bottom: 1px solid var(--piedra-oscura); }
.vias strong { display: block; font-family: var(--f-titulo); color: var(--verde); font-size: 1.1rem; }
.vias a { font-size: 1.5rem; font-family: var(--f-titulo); font-weight: 700; }

/* ---------- Texto legal ---------- */
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.legal p, .legal li { max-width: 68ch; }
.legal ul { padding-left: 1.3rem; }

/* ---------- Pie ---------- */
.pie { background: var(--verde); color: #dbe6df; padding-block: 3rem 5rem; font-size: 1rem; }
.pie .contenedor { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.pie h2 { font-size: 1rem; color: var(--papel); font-family: var(--f-texto); font-weight: 700; letter-spacing: 0; margin-bottom: 0.7rem; }
.pie ul { list-style: none; margin: 0; padding: 0; }
.pie li { margin-bottom: 0.4rem; }
.pie a { color: var(--papel); }
.pie p { color: #dbe6df; max-width: 34ch; }
.pie .copy { grid-column: 1 / -1; border-top: 1px solid var(--verde-medio); padding-top: 1.5rem; margin: 0; max-width: none; font-size: 0.92rem; }

/* Barra de llamada fija en móvil */
.barra-llamar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--ambar); color: var(--verde); text-align: center; text-decoration: none;
  font-family: var(--f-titulo); font-weight: 800; font-size: 1.2rem; padding: 0.95rem 1rem;
  border-top: 3px solid var(--verde);
}
.barra-llamar:hover { background: #ffc81f; color: var(--verde); }

/* ---------- Adaptación ---------- */
@media (max-width: 62rem) {
  .pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 52rem) {
  .heroe .contenedor, .dos-columnas, .llamada, .pie .contenedor { grid-template-columns: minmax(0, 1fr); }
  .servicios a { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .lateral { position: static; }
  .parte { box-shadow: 0.35rem 0.35rem 0 var(--verde); margin-right: 0.35rem; }
  .barra-llamar { display: block; }
}
@media (max-width: 64rem) {
  .js .boton-menu { display: inline-block; }
  .nav { width: 100%; }
  .cabecera .contenedor { flex-wrap: wrap; }
  .js .nav[data-cerrado="true"] { display: none; }
  .nav ul { flex-direction: column; border-top: 1px solid var(--verde-medio); padding-top: 0.5rem; }
}
@media (max-width: 34rem) {
  body { font-size: 1.06rem; }
  .pasos { grid-template-columns: minmax(0, 1fr); }
  .acciones .boton { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sello { animation: none; }
  * { transition: none !important; }
}

@media print {
  .cabecera, .pie, .barra-llamar, .boton-menu { display: none; }
  body { font-size: 12pt; }
}
