/* ==========================================================================
   AV Diagnostico v4 — Contacto (#contacto)
   Mundo claro/editorial. Todo CUADRADO (radius 0). Teal + blanco + negro;
   el acido solo como punto de 6px en el eyebrow. No redefine .btn.
   Namespaced bajo #contacto.  Fuente: sections/contacto.html · js/contacto.js
   ========================================================================== */

#contacto {
  position: relative;
  z-index: 2;                       /* cubre el sticky-stack de #areas */
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding-block: clamp(72px, 9vw, 128px);
}
#contacto .ct__inner { width: var(--container); margin-inline: auto; }

/* ============================================================ CABECERA */
#contacto .ct__head { margin: 0 0 clamp(38px, 4.5vw, 64px); }

#contacto .ct__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  font-family: var(--mono); font-weight: 500;
  font-size: var(--fs-label); letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim);
}
#contacto .ct__dot { width: 6px; height: 6px; background: var(--acid); flex: none; }  /* unico acido */

#contacto .ct__title {
  margin: 0;
  font-family: var(--serif); font-weight: 460;
  font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 16ch; text-wrap: balance;
}
#contacto .ct__title em { font-family: var(--serif); font-style: italic; font-weight: 420; color: var(--teal-deep); }
#contacto .ct__title--sm { font-size: clamp(1.7rem, 1rem + 2vw, 2.6rem); max-width: 18ch; }

/* ============================================================ GRILLA 2 COL */
#contacto .ct__grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(36px, 5vw, 96px);
  align-items: start;
}

/* ---------------------------------------------------------- IZQUIERDA */
#contacto .ct__intro {
  margin: 0 0 clamp(26px, 3vw, 38px);
  max-width: 42ch;
  font-family: var(--sans); font-size: var(--fs-deck); line-height: 1.6;
  color: var(--ink-2);
}

/* -- direccion grande, linkea a Google Maps -- */
#contacto .ct__addr {
  display: block;
  padding: 22px 0 24px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
#contacto .ct__addr-lab {
  display: inline-flex; align-items: center; gap: 9px;
  margin-bottom: 12px;
  font-family: var(--mono); font-weight: 500;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim);
}
#contacto .ct__ico { width: 15px; height: 15px; flex: none; color: var(--teal-deep); }
#contacto .ct__addr-lab .ct__ico { width: 14px; height: 14px; }

#contacto .ct__addr-line {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-family: var(--serif); font-weight: 460;
  font-size: clamp(1.45rem, 1rem + 1.5vw, 2.15rem);
  line-height: 1.12; letter-spacing: -0.02em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
#contacto .ct__addr-txt {
  position: relative;
  background-image: linear-gradient(var(--teal-deep), var(--teal-deep));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1.5px;
  transition: background-size .42s cubic-bezier(.2,.7,.2,1);
}
#contacto .ct__arw {
  width: 20px; height: 20px; flex: none;
  color: var(--teal-deep);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
#contacto .ct__addr-city {
  display: block; margin-top: 8px;
  font-family: var(--sans); font-size: .95rem; line-height: 1.4;
  color: var(--ink-2);
}
@media (hover: hover) and (pointer: fine) {
  #contacto .ct__addr:hover .ct__addr-txt { background-size: 100% 1.5px; }
  #contacto .ct__addr:hover .ct__arw { transform: translate(4px, -4px); }
}
#contacto .ct__addr:focus-visible .ct__addr-txt { background-size: 100% 1.5px; }

/* -- filas de datos -- */
#contacto .ct__rows { list-style: none; margin: 0; padding: 0; }
#contacto .ct__row {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
#contacto .ct__row-ico { display: flex; align-items: flex-start; padding-top: 2px; }
#contacto .ct__row-txt { display: block; min-width: 0; }

#contacto .ct__k {
  display: block; margin-bottom: 7px;
  font-family: var(--mono); font-weight: 500;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim);
}
#contacto .ct__v {
  display: block;
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.45;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
  overflow-wrap: anywhere;
}
#contacto .ct__sub {
  display: block; margin-top: 4px;
  font-family: var(--sans); font-size: .95rem; line-height: 1.45;
  color: var(--ink-2);
  font-variant-numeric: lining-nums tabular-nums;
}
#contacto .ct__v--pend { color: var(--ink-2); font-family: var(--mono); font-size: .9rem; }

#contacto .ct__link {
  display: inline-block;
  /* el telefono daba 25px de alto: en tactil se agranda el objetivo sin mover
     la linea de base del dato */
  padding-block: 10px;
  margin-block: -10px;
  background-image: linear-gradient(var(--teal-deep), var(--teal-deep));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1.5px;
  transition: background-size .38s cubic-bezier(.2,.7,.2,1), color .25s ease;
}
@media (hover: hover) and (pointer: fine) {
  #contacto .ct__link:hover { color: var(--teal-deep); background-size: 100% 1.5px; }
}
#contacto .ct__link:focus-visible { color: var(--teal-deep); }

/* -- sociales -- */
#contacto .ct__social { margin-top: 26px; }
#contacto .ct__k--social { margin-bottom: 12px; }
#contacto .ct__socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
#contacto .ct__soc {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border: 1px solid var(--rule); border-radius: 0;
  background: var(--bg);
  color: var(--ink-2);
  transition: background-color .28s ease, color .28s ease, border-color .28s ease;
}
#contacto .ct__soc svg { width: 19px; height: 19px; }
@media (hover: hover) and (pointer: fine) {
  #contacto .ct__soc:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; }
}

/* ---------------------------------------------------------- DERECHA · FORM */
#contacto .ct__form {
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--bg-soft);
  padding: clamp(22px, 2.6vw, 38px);
}
#contacto .ct__formhead {
  margin: 0 0 22px; padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-weight: 500;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim);
}

#contacto .ct__field { margin-bottom: 18px; }
#contacto .ct__label {
  display: block; margin-bottom: 8px;
  font-family: var(--mono); font-weight: 500;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2);
}
#contacto .ct__input {
  display: block; width: 100%;
  height: 48px; padding: 0 14px;
  font-family: var(--sans); font-size: 1rem; line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 0;                 /* cuadrado */
  transition: border-color .25s ease, box-shadow .25s ease;
  -webkit-appearance: none; appearance: none;
}
#contacto .ct__textarea {
  height: auto; min-height: 132px; padding: 12px 14px;
  resize: vertical;
}
#contacto .ct__input::placeholder { color: var(--dim); }
#contacto .ct__input:hover { border-color: rgba(14,26,31,.22); }
#contacto .ct__input:focus { border-color: var(--teal-deep); outline: none; }
#contacto .ct__input:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 2px; }
#contacto .ct__input[aria-invalid="true"] { border-color: #A3241B; }

/* -- checkbox cuadrado -- */
#contacto .ct__check {
  display: flex; align-items: flex-start; gap: 12px;
  min-height: 44px; align-items: center;
  padding: 8px 0 4px;
  cursor: pointer;
  font-family: var(--sans); font-size: .9375rem; line-height: 1.45;
  color: var(--ink-2);
}
#contacto .ct__check input {
  /* 20x20 quedaba por debajo del minimo de objetivo tactil */
  width: 24px; height: 24px; flex: none; margin: 0;
  background: #fff;
  border: 1px solid rgba(14,26,31,.30);
  border-radius: 0;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: background-color .22s ease, border-color .22s ease;
}
#contacto .ct__check input:hover { border-color: rgba(14,26,31,.5); }
#contacto .ct__check input:checked {
  background-color: var(--teal-deep);
  border-color: var(--teal-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4.8 10.4 8.4 14 15.2 6.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 14px 14px;
}
#contacto .ct__check input[aria-invalid="true"] { border-color: #A3241B; }

/* -- mensaje accesible (error / confirmacion) -- */
#contacto .ct__msg { margin: 0; }
#contacto .ct__msg:not(:empty) {
  margin: 16px 0 0;
  padding: 11px 13px;
  border-left: 2px solid #A3241B;
  background: rgba(163, 36, 27, .06);
  font-family: var(--sans); font-size: .9rem; line-height: 1.45;
  color: #8E1F17;                    /* 7.1:1 sobre el fondo claro */
}
#contacto .ct__msg.is-ok:not(:empty) {
  border-left-color: var(--teal-deep);
  background: var(--teal-wash);
  color: var(--ink-2);
}

#contacto .ct__submit { width: 100%; justify-content: center; margin-top: 20px; }
#contacto .ct__note {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim);
}

/* ============================================================ CÓMO LLEGAR */
#contacto .ct__find { margin-top: clamp(64px, 8vw, 112px); }
#contacto .ct__findhead { margin: 0 0 clamp(28px, 3.2vw, 44px); }

#contacto .ct__map {
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--bg-soft);
}
/* el mapa va en los COLORES NORMALES de Google Maps: sin filtros */
#contacto .ct__map iframe {
  display: block;
  width: 100%;
  height: clamp(320px, 46vh, 520px);
  border: 0;
}

#contacto .ct__maplink {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 16px;
  padding: 6px 0;
  font-family: var(--mono); font-weight: 500;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-2);
  transition: color .25s ease;
}
#contacto .ct__maplink span {
  background-image: linear-gradient(var(--teal-deep), var(--teal-deep));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1.5px;
  transition: background-size .38s cubic-bezier(.2,.7,.2,1);
}
@media (hover: hover) and (pointer: fine) {
  #contacto .ct__maplink:hover { color: var(--teal-deep); }
  #contacto .ct__maplink:hover span { background-size: 100% 1.5px; }
  #contacto .ct__maplink:hover .ct__arw { transform: translate(4px, -4px); }
}
#contacto .ct__maplink .ct__arw { width: 15px; height: 15px; }

/* -- fila de 3 fotos -- */
#contacto .ct__shots {
  list-style: none; margin: clamp(28px, 3.2vw, 44px) 0 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.6vw, 22px);
}
#contacto .ct__shot {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;               /* cero CLS */
  border: 1px solid var(--rule);
  border-radius: 0;
  background: var(--bg-soft);
}
#contacto .ct__shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.96) contrast(1.02);
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
@media (hover: hover) and (pointer: fine) {
  #contacto .ct__shot:hover img { transform: scale(1.045); }
}

/* ============================================================ RESPONSIVE */
@media (max-width: 900px) {
  #contacto .ct__grid { grid-template-columns: 1fr; gap: 40px; }   /* datos arriba, form abajo */
  #contacto .ct__title { max-width: 18ch; font-size: clamp(1.9rem, 7vw, 2.6rem); }
  #contacto .ct__intro { max-width: none; }
  #contacto .ct__map iframe { height: clamp(300px, 52vh, 420px); }

  #contacto .ct__shots { grid-template-columns: repeat(2, 1fr); }
  #contacto .ct__shots > .ct__shot:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
}

@media (max-width: 560px) {
  #contacto .ct__shots { grid-template-columns: 1fr; }
  #contacto .ct__shots > .ct__shot:last-child { aspect-ratio: 4 / 3; }
  #contacto .ct__addr-line { gap: 10px; }
  #contacto .ct__arw { width: 18px; height: 18px; }
}

@media (max-width: 380px) {
  #contacto .ct__form { padding: 20px 16px; }
  #contacto .ct__row { grid-template-columns: 1fr; gap: 8px; }
  #contacto .ct__row-ico { display: none; }
}

/* ============================================================ REDUCED MOTION
   Nada queda oculto por CSS: el motion vive en GSAP (core.js) y ya lo respeta. */
@media (prefers-reduced-motion: reduce) {
  #contacto .ct__addr-txt,
  #contacto .ct__arw,
  #contacto .ct__link,
  #contacto .ct__soc,
  #contacto .ct__input,
  #contacto .ct__check input,
  #contacto .ct__maplink,
  #contacto .ct__maplink span,
  #contacto .ct__shot img { transition: none; }
  #contacto .ct__shot:hover img { transform: none; }
}


/* ============================================================ PISO DE LECTURA
   Auditoria responsive: estos rotulos estaban entre 10 y 11px. En mono, en
   mayusculas y con letter-spacing abierto, a 320-430px de ancho eso se vuelve
   dificil de leer — y el publico de un laboratorio incluye gente grande.
   El piso se aplica SOLO en telefono: en desktop el rotulo chico y tracked es
   una decision del sistema y se mantiene. */
@media (max-width: 700px) {
  #contacto .ct__k,
  #contacto .ct__label,
  #contacto .ct__formhead,
  #contacto .ct__note { font-size: 12px; letter-spacing: .12em; }
}
