/* Para otra web (p. ej. Maresme) basta con cambiar estos tokens y site.config.json */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113;
}

:root {
  --navy: #142B45;
  --teal: #176B78;
  --white: #FFFFFF;
  --grey: #F4F6F8;
  --ink: #303943;
  --wa: #25D366;
  --pale: #DCE6EC;

  /* Tema oscuro, el predeterminado */
  color-scheme: dark;
  --bg: #0A0D11;
  --bg-alt: #12181F;
  --text: #D5DCE3;
  --heading: #FFFFFF;
  --accent: #5CC6D3;
  --land: #1F3B5C;
  --action-bg: #FFFFFF;
  --action-fg: #142B45;
  --action-hover: #C9D6E0;
  --mark-a: #FFFFFF;
  --mark-b: #3FB6C4;

  --gutter: clamp(20px, 3vw, 48px);
  --head: 76px;
  --hero-head: 76px;
  --bar: 0px;
  --pad-y: clamp(24px, 5svh, 64px);

  --t-hero: clamp(1.8rem, 4.4vw, 5.5rem);
  --t-title: clamp(1.75rem, 3.3vw, 3.25rem);
  --t-sub: clamp(1.25rem, 1.6vw, 1.5rem);
  --t-body: clamp(1.0625rem, 1.25vw, 1.1875rem);
  --t-small: 0.9375rem;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-alt: #F4F6F8;
  --text: #303943;
  --heading: #142B45;
  --accent: #176B78;
  --land: #142B45;
  --action-bg: #142B45;
  --action-fg: #FFFFFF;
  --action-hover: #176B78;
  --mark-a: #142B45;
  --mark-b: #176B78;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--head);
}
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2 {
  color: var(--heading);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}
h2 { font-size: var(--t-title); }
h3 {
  color: var(--heading);
  font-size: var(--t-sub);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
p { text-wrap: pretty; }
a { color: inherit; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
mark { background: #FFE9A8; color: var(--navy); padding: 0 .25em; }

.defs { position: absolute; }
.mark-a { fill: var(--mark-a); }
.mark-b { fill: var(--mark-b); }
.shielded { clip-path: url(#shield); object-fit: cover; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 30;
  padding: 12px 18px;
  background: var(--navy);
  color: var(--white);
}
.skip:focus { top: 8px; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 24px;
  border: 0;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 120ms var(--ease), background-color 160ms;
}
.btn svg { flex: none; }
.btn:active { transform: scale(.97); }
.btn-call { background: var(--action-bg); color: var(--action-fg); }
.btn-wa { background: var(--wa); color: var(--navy); }
.btn-send { background: var(--navy); color: var(--white); width: 100%; }

/* Cabecera */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding: 12px var(--gutter);
  background: var(--bg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--heading);
  text-decoration: none;
}
.brand-name { display: grid; line-height: 1.12; font-size: .9375rem; font-weight: 700; }
.brand-name strong { font-size: 1.3125rem; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; }
.site-nav { display: flex; gap: clamp(16px, 2.4vw, 36px); margin-left: auto; font-weight: 600; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--heading);
  text-decoration: none;
  transition: color 160ms;
}
.site-nav a:active { color: var(--accent); }

/* Interruptor de tema; sin JavaScript no se muestra */
.theme-switch {
  display: none;
  align-items: center;
  width: 60px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--action-fg);
  cursor: pointer;
  touch-action: manipulation;
}
.theme-js .theme-switch { display: inline-flex; }
.theme-track { display: block; width: 100%; padding: 3px; background: var(--land); }
.theme-thumb {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--action-bg);
  transition: transform 180ms var(--ease);
}
[aria-checked="true"] .theme-thumb { transform: translateX(28px); }
.theme-thumb svg { grid-area: 1 / 1; }
.theme-sun, [aria-checked="true"] .theme-moon { visibility: hidden; }
[aria-checked="true"] .theme-sun { visibility: visible; }
.head-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  background: var(--action-bg);
  color: var(--action-fg);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 120ms var(--ease), background-color 160ms;
}
.head-call:active { transform: scale(.97); }

/* Cada bloque ocupa una pantalla; si no cabe (móvil muy bajo) crece sin recortar */
.view {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - var(--head) - var(--bar));
  padding: var(--pad-y) var(--gutter);
}

/* Portada */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--hero-head) - var(--bar));
  padding: clamp(32px, 5vw, 64px) var(--gutter) clamp(48px, 6vw, 96px);
  overflow: hidden;
}
.hero-copy { position: relative; z-index: 2; width: 49vw; }
.hero h1 { font-size: var(--t-hero); }
.hero-claim {
  margin-top: 16px;
  color: var(--accent);
  font-size: clamp(1.375rem, 2.2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.hero-text { max-width: 36em; margin-top: 24px; font-size: var(--t-sub); line-height: 1.45; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  margin-top: 28px;
  color: var(--heading);
  font-size: clamp(1.625rem, 3.4vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}
.hero-phone svg { flex: none; width: 0.72em; height: 0.72em; color: var(--accent); }
.hero-phone + .actions { margin-top: 24px; }
/* Móviles bajos: el teléfono manda sobre el texto, y sigue viéndose la foto */
@media (max-width: 899px) and (max-height: 700px) {
  .hero-text { display: none; }
}
.hero-logo {
  position: absolute;
  top: 50%;
  right: calc(var(--gutter) + 3vw);
  width: min(36vw, 38rem, 62svh);
  aspect-ratio: 560 / 650;
  transform: translateY(-50%);
}
.hero-logo svg { display: block; width: 100%; height: 100%; }

/* Servicios */
.services { background: var(--bg-alt); }
.services-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(24px, 5svh, 56px);
}
.services-head p { max-width: 34em; }
.service-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 5svh, 56px) clamp(24px, 3vw, 48px);
}
.service {
  display: grid;
  grid-template-columns: clamp(84px, 8vw, 128px) minmax(0, 1fr);
  gap: clamp(16px, 1.6vw, 28px);
  align-items: start;
}
.service img { width: 100%; aspect-ratio: 523 / 630; }
.service p { margin-top: 8px; }
.service a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  transition: color 160ms;
}
.service a:active { color: var(--heading); }

/* Incidencias */
.incidents {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .8fr);
  gap: 32px clamp(32px, 4vw, 72px);
  align-content: center;
  align-items: center;
  overflow: hidden;
  background: var(--navy);
  color: var(--pale);
}
.incidents h2, .incidents h3 { color: var(--white); }
.incidents h2 { font-size: clamp(1.625rem, 2.6vw, 2.75rem); }
.incidents-main p { max-width: 34em; margin-top: 24px; }
.incidents-main .btn { margin-top: 32px; }
.incidents-photo { width: 100%; aspect-ratio: 523 / 630; }
.incidents-side { display: grid; align-content: start; gap: clamp(20px, 4svh, 40px); }
.incidents-side p { margin-top: 12px; }

/* Confianza */
.trust {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-content: center;
  align-items: center;
  overflow: hidden;
}
.trust-photo { margin-left: calc(var(--gutter) * -1 - 6vw); }
.trust-photo img {
  width: auto;
  max-width: none;
  height: min(calc(100svh - var(--head) - 2 * var(--pad-y)), 52vw);
  aspect-ratio: 523 / 630;
  margin-left: auto;
}
.trust-lead { max-width: 36em; margin-top: 20px; }
.points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 4svh, 40px) clamp(28px, 3.4vw, 56px);
  margin-top: clamp(20px, 4svh, 48px);
}
.points h3 { display: flex; align-items: baseline; gap: 10px; }
.points h3 svg { flex: none; fill: var(--accent); transform: translateY(1px); }
.points p { margin-top: 8px; }

/* Zona */
.zone {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 32px clamp(32px, 5vw, 80px);
  align-content: center;
  align-items: center;
  background: var(--bg-alt);
}
.zone-copy p { max-width: 34em; margin-top: 16px; }
.zone-copy .btn { margin-top: 20px; }
.zone-map { position: relative; }
.fade-shield {
  position: absolute;
  top: 0;
  right: 0;
  width: 25%;
  aspect-ratio: 523 / 630;
  overflow: hidden;
  clip-path: url(#shield);
  background: var(--navy);
}
.fade-shield img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: fade 21s linear infinite;
}
.fade-shield img:nth-child(1) { animation-delay: 0s; }
.fade-shield img:nth-child(2) { animation-delay: 7s; }
.fade-shield img:nth-child(3) { animation-delay: 14s; }
@keyframes fade {
  0%, 26% { opacity: 1; }
  33.5%, 92% { opacity: 0; }
  100% { opacity: 1; }
}
.map { width: 100%; height: auto; max-height: calc(100svh - var(--head) - 2 * var(--pad-y)); overflow: visible; }
.map-land { fill: var(--land); }
.pin { cursor: pointer; }
.pin-hit { fill: transparent; }
.pin-dot { fill: var(--white); transition: fill 160ms; }
.pin-label {
  fill: var(--white);
  font-size: 21px;
  font-weight: 700;
  paint-order: stroke;
  stroke: var(--land);
  stroke-width: 7px;
  stroke-linejoin: round;
  pointer-events: none;
}
.pin.is-on .pin-dot { fill: var(--wa); }
.map-selected {
  fill: var(--white);
  font-size: 26px;
  font-weight: 800;
  paint-order: stroke;
  stroke: var(--land);
  stroke-width: 8px;
  pointer-events: none;
}
.map.has-selected .pin-label { opacity: .0; }
.towns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 16px;
  margin-top: clamp(16px, 3svh, 32px);
}
.town {
  width: 100%;
  min-height: 36px;
  padding: 4px 8px 4px 0;
  border: 0;
  background: none;
  color: var(--heading);
  font: inherit;
  font-size: var(--t-small);
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 160ms, color 160ms, padding 160ms var(--ease);
}
.town:active { color: var(--accent); }
.town[aria-pressed="true"] { padding-left: 8px; background: var(--action-bg); color: var(--action-fg); }

/* Contacto */
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px clamp(32px, 5vw, 80px);
  padding: clamp(24px, 5svh, 56px) clamp(24px, 4vw, 64px);
  background: var(--teal);
  color: var(--white);
}
.contact-info h2 { color: var(--white); }
.contact-info p { margin-top: 16px; }
.contact-info dl { display: grid; gap: clamp(12px, 2.4svh, 20px); margin-top: clamp(20px, 4svh, 40px); }
.contact-info dt { font-size: var(--t-small); font-weight: 600; }
.contact-info dd { font-size: var(--t-sub); font-weight: 800; overflow-wrap: anywhere; }
.contact-info dd a { display: inline-block; padding: 4px 0; text-underline-offset: 4px; }
.contact-info dd mark { font-size: var(--t-body); font-weight: 700; }
.contact-form { display: grid; gap: 12px; }
.contact-direct { display: grid; gap: 12px; align-content: center; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--t-small); font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  color-scheme: light;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field textarea { resize: vertical; }
.field-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.contact :focus-visible { outline-color: var(--white); }
.consent { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; font-size: var(--t-small); }
.consent input { color-scheme: light; flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--navy); }
.form-status:empty { display: none; }
.form-status { padding: 12px 14px; background: var(--navy); font-weight: 700; }

/* Pie */
.site-foot { padding: clamp(56px, 7vw, 112px) var(--gutter) clamp(24px, 3vw, 40px); background: var(--navy); color: var(--pale); }
.site-foot { --mark-a: #FFFFFF; --mark-b: #3FB6C4; }
.foot-mark { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px clamp(24px, 4vw, 64px); }
.foot-mark svg { width: clamp(120px, 15vw, 220px); height: auto; aspect-ratio: 560 / 650; }
.foot-name { color: var(--white); font-size: clamp(2rem, 6.6vw, 7rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.foot-name strong { display: block; font-weight: 800; }
.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 64px);
  margin-top: clamp(48px, 5vw, 80px);
}
.foot-cols h2 { color: var(--white); font-size: var(--t-sub); font-weight: 700; letter-spacing: -0.01em; }
.foot-cols ul { display: grid; gap: 4px; margin-top: 12px; }
.foot-cols li { display: flex; align-items: center; min-height: 36px; }
.credits { margin-top: clamp(32px, 4vw, 56px); font-size: var(--t-small); }
.credits summary { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; cursor: pointer; }
.credits p { margin: 8px 0 12px; }
.credits ul { display: grid; gap: 6px; }
.copyright { margin-top: 24px; font-size: var(--t-small); }

/* Barra fija de contacto en móvil */
.call-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 25;
  display: none;
  grid-template-columns: 1fr 1fr;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--navy);
}

/* Entrada de cada bloque, solo si hay JS */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 620ms var(--ease) var(--delay, 0ms), transform 620ms var(--ease) var(--delay, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (hover: hover) and (pointer: fine) {
  .btn-call:hover, .head-call:hover { background: var(--action-hover); }
  .btn-wa:hover { background: #1FBF5B; }
  .btn-send:hover { background: #0C1D30; }
  .site-nav a:hover { color: var(--accent); }
  .service a:hover { color: var(--heading); }
  .town:hover { color: var(--accent); }
  .town[aria-pressed="true"]:hover { color: var(--action-fg); }
  .pin:hover .pin-dot { fill: var(--wa); }
}

@media (max-width: 1100px) {
  .site-nav { margin-left: 0; order: 3; width: 100%; justify-content: space-between; }
  .site-head { position: static; }
  :root { --head: 0px; --hero-head: 128px; }
  .theme-switch { margin-left: auto; }
  .incidents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .incidents-photo { display: none; }
  .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  :root {
    --t-hero: min(8vw, 3.25rem);
    --t-title: clamp(1.625rem, 6.4vw, 2.75rem);
    --bar: calc(56px + env(safe-area-inset-bottom, 0px));
    --hero-head: 124px;
    --pad-y: 16px;
  }
  body { padding-bottom: var(--bar); }
  .call-bar { display: grid; }
  .head-call { display: none; }
  .view { font-size: 1rem; }

  /* La foto rellena lo que queda de pantalla bajo los botones */
  .hero { flex-direction: column; align-items: stretch; gap: 20px; padding-top: 16px; padding-bottom: 20px; }
  .hero-copy { width: auto; }
  .hero-text { margin-top: 12px; }
  .hero-phone { margin-top: 16px; font-size: min(8.4vw, 2.5rem); }
  .hero-phone + .actions { margin-top: 14px; }
  .actions { margin-top: 20px; }
  .actions .btn { flex: 1 1 100%; }
  /* El logo ocupa el alto que deja el texto */
  .hero-logo {
    position: relative;
    top: auto;
    right: auto;
    flex: 1 1 96px;
    width: auto;
    min-height: 96px;
    max-height: 340px;
    margin: auto 0;
    aspect-ratio: auto;
    transform: none;
  }
  .hero-logo svg { position: absolute; inset: 0; }

  /* Servicios: filas compactas, toda la fila es el enlace */
  .services-head { display: block; margin-bottom: 14px; }
  .services-head p { display: none; }
  .service-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .service { position: relative; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; }
  .service h3 { font-size: 1.0625rem; }
  .service p { margin-top: 0; font-size: var(--t-small); line-height: 1.3; }
  .service a { position: static; display: block; min-height: 0; margin: 0; font-size: 0; }
  .service a::after { content: ""; position: absolute; inset: 0; }
  .service h3::after { content: " ›"; color: var(--accent); font-weight: 800; }

  .incidents { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
  .incidents-main p { margin-top: 10px; font-size: var(--t-small); line-height: 1.4; }
  .incidents-main .btn { width: 100%; margin-top: 14px; }
  .incidents-side { margin-top: 16px; gap: 12px; }
  .incidents-side h3 { font-size: 1.125rem; }
  .incidents-side p { margin-top: 0; font-size: var(--t-small); line-height: 1.35; }
  .incidents-photo { display: none; }

  .trust { grid-template-columns: minmax(0, 1fr); gap: 0; align-items: start; }
  .trust-photo { grid-area: 1 / 1; justify-self: end; width: 30vw; margin: 68px -8vw 0 0; }
  .trust-copy { grid-area: 1 / 1; position: relative; }
  .trust-photo img { width: 100%; height: auto; }
  .trust-lead { padding-right: 24vw; }
  .trust-lead { margin-top: 8px; font-size: var(--t-small); line-height: 1.35; }
  .points { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 16px; }
  .points h3 { font-size: 1.125rem; }
  .points p { margin-top: 0; font-size: var(--t-small); line-height: 1.35; }

  /* Zona: mapa acotado y municipios en tira lateral */
  .zone { display: flex; flex-direction: column; gap: 0; align-items: stretch; }
  .zone-copy { display: contents; }
  .zone-copy p { margin-top: 8px; font-size: var(--t-small); line-height: 1.35; }
  .zone-map { order: 1; display: flex; justify-content: center; margin-top: 12px; }
  .map { max-height: 30svh; }
  .towns {
    order: 2;
    grid-template-columns: none;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 0 20px;
    margin: 8px 0 0;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .towns::-webkit-scrollbar { display: none; }
  .town { min-height: 44px; font-size: 1rem; white-space: nowrap; padding-right: 8px; }
  .zone-copy .btn { order: 3; margin-top: 10px; }
  .fade-shield { display: none; }
  .pin-label { display: none; }
  .map-selected { font-size: 40px; stroke-width: 10px; }
  .pin-dot { r: 9px; }

  .contact { padding-right: 12px; padding-left: 12px; }
  .contact-card { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
  .contact-info p { display: none; }
  .contact-info dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin-top: 8px; }
  .contact-info dl > div:nth-child(2) { display: none; }
  .contact-info dl > div:nth-child(3) { grid-column: 1 / -1; order: 1; }
  .contact-info dd { font-size: 1.0625rem; }
  .contact-info dd mark { font-size: var(--t-small); }
  .contact-form { gap: 8px; }
  .field { gap: 2px; }
  .field textarea { min-height: 64px; height: 64px; }
  /* Sin formulario: la barra fija ya lleva los botones y los datos ocupan el bloque */
  .contact-direct { display: none; }
  .is-direct { align-content: center; padding: 32px 24px; }
  .is-direct .contact-info p { display: block; }
  .is-direct .contact-info dl { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 32px; }
  .is-direct .contact-info dl > div:nth-child(2) { display: block; }
  .is-direct .contact-info dl > div:nth-child(3) { order: 0; }
  .is-direct .contact-info dd { font-size: var(--t-sub); }
  .btn-send { min-height: 48px; }

  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-cols > div:last-child { grid-column: 1 / -1; }
}

/* Tablet vertical: hay altura de sobra, cada bloque mide lo que su contenido */
@media (min-width: 600px) and (max-width: 899px) {
  :root { --pad-y: 56px; }
  .view { min-height: 0; font-size: 1.0625rem; }
  .services-head { margin-bottom: 32px; }
  .services-head p { display: block; margin-top: 12px; }
  .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .service { grid-template-columns: 72px minmax(0, 1fr); align-items: start; }
  .service p, .incidents-main p, .incidents-side p, .trust-lead, .points p, .zone-copy p { font-size: 1.0625rem; line-height: 1.5; }
  .incidents-side, .incidents-main .btn { margin-top: 28px; }
  .incidents-side { gap: 24px; }
  .trust-photo { width: 20vw; margin: 4px -2vw 0 0; }
  .trust-lead { padding-right: 20vw; }
  .zone { padding-top: 36px; padding-bottom: 36px; }
  .points { gap: 24px; margin-top: 32px; }
  .zone-map { margin-top: 28px; }
  .map { max-height: 30svh; }
  .towns { grid-template-rows: none; grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; margin-top: 20px; overflow: visible; }
  .town { min-height: 36px; font-size: var(--t-small); white-space: normal; }
  .zone-copy .btn { margin-top: 24px; }
}

@media (max-width: 380px) {
  .site-nav { gap: 8px; font-size: var(--t-small); }
}

/* Portátiles de poca altura */
@media (min-width: 900px) and (max-height: 720px) {
  :root { --t-title: clamp(1.625rem, 2.6vw, 2.25rem); --pad-y: 16px; }
  .services-head { margin-bottom: 16px; }
  .service-list { row-gap: 16px; }
  .service p, .zone-copy p, .contact-info p { font-size: var(--t-small); line-height: 1.4; }
  .service a { min-height: 32px; margin-top: 0; }
  .towns { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
  .town { min-height: 28px; padding-top: 2px; padding-bottom: 2px; }
  .zone-copy .btn { min-height: 44px; margin-top: 10px; padding-top: 8px; padding-bottom: 8px; }
  .contact-card { padding-top: 16px; padding-bottom: 16px; }
  .contact-form { gap: 8px; }
  .field { gap: 2px; }
  .field input, .field select, .field textarea { min-height: 42px; padding-top: 8px; padding-bottom: 8px; }
  .field textarea { height: 56px; min-height: 56px; }
  .btn-send { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-shield img { animation: none; }
  .fade-shield img:first-child { opacity: 1; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .head-call, .town, .theme-thumb { transition: none; }
}
