/* Concepto: plano de loteo. Retícula de 12 columnas con una columna de anotación a la
   izquierda; la raya del logo, siempre desplazada y nunca desde el margen, ordena títulos
   y separadores; los rangos de ticket se dibujan como cotas. */
:root {
  --grafito: #423a3a;      /* color del logo: texto y trazos */
  --grafito-900: #2a2425;  /* fondos oscuros */
  --tiza: #f4f3f0;         /* fondo general */
  --hormigon: #e3e1dc;     /* bandas alternas */
  --niebla: #c4bfb9;       /* líneas finas sobre claro */
  --suave: #6a6161;        /* texto secundario sobre claro */
  --lapis: #22468c;        /* acento: lapislázuli */
  --lapis-claro: #9db3e0;  /* acento sobre oscuro */
  --blanco: #fdfdfc;       /* paneles */

  --marca: "Jost", "Futura", "Century Gothic", "Avenir Next", sans-serif;
  --dato: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --margen: max(20px, 4vw);
  --ancho: 1320px;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 112px;
}

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

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--tiza);
  color: var(--grafito);
  font-family: var(--marca);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

h1, h2, h3, h4 { margin: 0; font-weight: 300; line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; }

p { margin: 0; }

:focus-visible { outline: 2px solid var(--lapis); outline-offset: 3px; }

[hidden] { display: none !important; }

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

.rejilla {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--s3);
}

.col-nota { grid-column: 1 / span 4; min-width: 0; }

.col-cuerpo { grid-column: 6 / -1; min-width: 0; }

.etiqueta {
  font-family: var(--dato);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--suave);
}

.seccion { padding-block: var(--s6); scroll-margin-top: 72px; }

/* Botones y enlaces */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s3);
  border: 1px solid var(--grafito);
  background: var(--grafito);
  color: var(--tiza);
  font: 500 15px/1 var(--marca);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.boton:hover { background: var(--lapis); border-color: var(--lapis); }

.boton:disabled { opacity: 0.55; cursor: wait; }

.boton-borde { background: transparent; color: var(--grafito); min-height: 40px; padding: 0 var(--s2); }

.boton-borde:hover { background: var(--grafito); border-color: var(--grafito); color: var(--tiza); }

.enlace {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.enlace::after { content: "→"; font-family: var(--dato); transition: transform 0.2s; }

.enlace:hover { color: var(--lapis); }

.enlace:hover::after { transform: translateX(4px); }

/* Barra superior con la UF */
.barra-uf { background: var(--grafito-900); color: var(--tiza); font-family: var(--dato); font-size: 12px; letter-spacing: 0.04em; }

.barra-uf-fila { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); min-height: 34px; }

.barra-uf b { font-weight: 500; color: var(--lapis-claro); font-variant-numeric: tabular-nums; }

.barra-uf a { text-decoration: none; }

.barra-uf a:hover { text-decoration: underline; }

/* Cabecera */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--tiza) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.cabecera.con-borde { border-bottom-color: var(--niebla); }

.cabecera-fila { display: flex; align-items: center; gap: var(--s4); min-height: 76px; }

.cabecera-logo img { width: 104px; height: auto; }

.menu { display: flex; gap: var(--s4); margin-left: auto; font-size: 15px; }

.menu a { text-decoration: none; padding-block: 6px; border-bottom: 1px solid transparent; transition: border-color 0.2s; }

.menu a:hover { border-bottom-color: var(--grafito); }

/* Portada: el titular repite la composición del logo */
.portada { --titular: clamp(64px, 11.5vw, 172px); padding-block: var(--s5); }

.titular {
  margin-top: var(--s2);
  font-size: var(--titular);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 300;
}

.titular span { display: block; }

.titular-raya {
  height: max(3px, 0.045em);
  margin: 0.16em calc(-1 * var(--margen) - 50vw) 0.2em 1.9em;
  background: var(--lapis);
  transform-origin: left center;
}

.titular-2 { margin-left: 2.6em; }

/* Lo que sigue al titular arranca donde arranca la raya, como CAPITAL bajo Flow */
.portada-pie {
  display: grid;
  gap: var(--s4);
  justify-items: start;
  margin-top: var(--s5);
  padding-left: calc(var(--titular) * 1.9);
}

/* Conexiones: quién se conecta con quién en cada servicio, unidos por una cota */
.conexiones { display: grid; gap: var(--s2); width: 100%; max-width: 960px; }

.conexiones ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--grafito); }

.conexion {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) 88px minmax(0, 1fr);
  align-items: center;
  column-gap: var(--s3);
  padding-block: 16px;
  border-bottom: 1px solid var(--niebla);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.25;
}

.conexion-servicio { font-family: var(--dato); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--suave); }

.conexion-a { text-align: right; }

.conexion-linea { position: relative; height: 1px; background: var(--lapis); transform-origin: left center; }

.conexion-linea::before,
.conexion-linea::after { content: ""; position: absolute; top: -6px; width: 1px; height: 13px; background: var(--lapis); }

.conexion-linea::before { left: 0; }

.conexion-linea::after { right: 0; }

.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .titular-1, .titular-2 { animation: subir 0.9s cubic-bezier(0.2, 0.7, 0, 1) both; }
  .titular-2 { animation-delay: 0.18s; }
  .titular-raya { animation: trazar 1.2s 0.3s cubic-bezier(0.6, 0, 0.1, 1) both; }
  .conexion-linea { animation: trazar 0.8s cubic-bezier(0.6, 0, 0.1, 1) both; }
  .conexion:nth-child(1) .conexion-linea { animation-delay: 0.9s; }
  .conexion:nth-child(2) .conexion-linea { animation-delay: 1.02s; }
  .conexion:nth-child(3) .conexion-linea { animation-delay: 1.14s; }
}

@keyframes subir { from { opacity: 0; transform: translateY(0.12em); } }

@keyframes trazar { from { transform: scaleX(0); } }

/* Foto a todo el ancho */
.vista { position: relative; margin: 0; background: var(--grafito-900); }

.vista img { width: 100%; height: clamp(300px, 44vw, 640px); object-fit: cover; object-position: 50% 42%; }

.vista figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  padding-block: var(--s2);
  font-family: var(--dato);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tiza);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

/* Tickets */
.tickets { background: var(--grafito-900); color: var(--tiza); }

.tickets-fila { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ticket { padding: var(--s4) var(--s3) var(--s5); display: grid; gap: var(--s2); align-content: start; border-left: 1px solid rgba(244, 243, 240, 0.16); }

.ticket:first-child { border-left: 0; padding-left: 0; }

.tickets .etiqueta { color: var(--lapis-claro); }

.ticket-monto { font-size: clamp(28px, 2.9vw, 42px); font-weight: 300; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

.ticket-lista { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: clamp(20px, 1.8vw, 26px); font-weight: 300; line-height: 1.25; }

.ticket-clp { min-height: 1.6em; font-family: var(--dato); font-size: 13px; color: rgba(244, 243, 240, 0.72); }

/* Servicios: encabezado a todo el ancho y una fila por servicio, separadas por línea */
.servicios-cabeza { display: grid; gap: var(--s3); margin-bottom: var(--s5); }

.servicios-titulo { font-size: clamp(34px, 4.4vw, 64px); line-height: 1.08; max-width: 20em; }

.servicio-fila { row-gap: var(--s3); padding-block: var(--s5); border-top: 1px solid var(--grafito); }

.servicio:last-child .servicio-fila { border-bottom: 1px solid var(--grafito); }

.servicio-cabeza { display: grid; gap: var(--s3); align-content: start; justify-items: start; }

.servicio-nombre { font-size: clamp(30px, 3vw, 44px); max-width: 12em; }

.servicio-cuerpo { display: grid; gap: var(--s3); align-content: start; justify-items: start; max-width: 62ch; }

.servicio-cuerpo > p { font-size: 19px; line-height: 1.55; }

/* Cota: rango de ticket dibujado como línea de cota de un plano */
.cota {
  display: grid;
  grid-template-columns: auto minmax(48px, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(100%, 520px);
  font-family: var(--dato);
  font-size: 14px;
  font-weight: 500;
  color: var(--lapis);
  font-variant-numeric: tabular-nums;
}

.cota-abierta { grid-template-columns: auto minmax(48px, 1fr); }

.cota-linea { position: relative; height: 1px; background: currentColor; }

.cota-linea::before,
.cota-linea::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 1px;
  height: 13px;
  background: currentColor;
}

.cota-linea::before { left: 0; }

.cota-linea::after { right: 0; }

.cota-abierta .cota-linea::after {
  top: -4px;
  width: 9px;
  height: 9px;
  background: none;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  transform-origin: center;
  right: 1px;
}

/* Ficha técnica, como un term sheet */
.ficha { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--s3); width: 100%; }

.ficha div { display: grid; gap: 4px; align-content: start; padding-top: var(--s1); border-top: 1px solid var(--niebla); }

.ficha dt { font-family: var(--dato); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--suave); }

.ficha dd { margin: 0; font-size: 16px; line-height: 1.45; }

.ficha-vertical { grid-template-columns: 1fr; gap: var(--s2); }

/* Manifiesto con el plano de loteo */
.manifiesto {
  position: relative;
  overflow: hidden;
  background: var(--grafito-900);
  color: var(--tiza);
  padding-block: clamp(96px, 12vw, 176px);
}

.plano {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(68%, 980px);
  height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
}

.manifiesto-texto { position: relative; display: grid; gap: var(--s4); }

.manifiesto h2 { font-size: clamp(40px, 5.6vw, 84px); line-height: 1.02; max-width: 13ch; letter-spacing: -0.03em; }

.manifiesto .etiqueta { color: var(--lapis-claro); }

/* Agenda */
.agenda-info { position: sticky; top: 108px; align-self: start; display: grid; gap: var(--s3); }

.agenda-info h2, .contacto-info h2 { font-size: clamp(34px, 3.6vw, 52px); }

.nota { font-size: 14px; color: var(--suave); }

.agenda-marco { background: var(--blanco); border: 1px solid var(--niebla); }

/* El calendario de Bookings mide hasta ~2.280 px con un día lleno de horas: con este alto no muestra barra propia */
.agenda-marco iframe { display: block; width: 100%; height: 2320px; border: 0; }

/* Contacto */
.contacto { background: var(--hormigon); }

.contacto .etiqueta, .contacto .ficha dt, .contacto .nota { color: #5e5656; }

.contacto .ficha div { border-top-color: #b3ada6; }

.contacto-info { display: grid; gap: var(--s3); align-content: start; }

.contacto-info a { text-decoration: none; }

.contacto-info a:hover { text-decoration: underline; }

.formulario { display: grid; gap: var(--s4); }

.formulario-par { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }

.campo { display: grid; gap: 6px; }

.campo span { font-family: var(--dato); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: #5e5656; }

.campo small { text-transform: none; letter-spacing: 0; font-weight: 400; }

.campo input,
.campo textarea {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--grafito);
  border-radius: 0;
  background: transparent;
  color: var(--grafito);
  font: 400 19px/1.4 var(--marca);
}

.campo textarea { resize: vertical; min-height: 120px; }

.campo input:focus,
.campo textarea:focus { outline: none; border-bottom: 2px solid var(--lapis); padding-bottom: 9px; }

.trampa { position: absolute; left: -9999px; }

.formulario-envio { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }

.formulario-estado { font-size: 15px; }

/* Pie */
.pie { background: var(--grafito-900); color: var(--tiza); padding-block: var(--s6) var(--s4); }

.pie-logo { position: relative; width: clamp(200px, 26vw, 340px); }

.pie-logo img { width: 100%; }

/* La raya del logo sigue hasta el borde de la pantalla */
.pie-raya {
  position: absolute;
  left: 77.4%;
  top: 58.67%;
  height: 2.67%;
  width: 100vw;
  background: var(--tiza);
}

.pie-filas {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: var(--s5);
  padding-top: var(--s3);
  border-top: 1px solid rgba(244, 243, 240, 0.16);
  font-size: 15px;
}

.pie-menu { display: flex; flex-wrap: wrap; gap: var(--s4); }

.pie a { text-decoration: none; }

.pie a:hover { text-decoration: underline; }

.pie-legal { margin-top: var(--s4); font-family: var(--dato); font-size: 12px; color: rgba(244, 243, 240, 0.6); }

/* Bajo 1180px la sangría deja muy angosta la tabla de conexiones */
@media (max-width: 1180px) {
  .portada-pie { padding-left: 0; }
}

/* Tablet */
@media (max-width: 1024px) {
  .col-nota, .col-cuerpo { grid-column: 1 / -1; }
  .agenda-info { position: static; margin-bottom: var(--s4); }
  .contacto-info { margin-bottom: var(--s5); }
}

/* Móvil */
@media (max-width: 720px) {
  :root { --s6: 80px; }
  body { font-size: 16px; }
  .barra-lugar, .barra-correo { display: none; }
  .barra-uf-fila { justify-content: center; }
  .menu { display: none; }
  .cabecera-fila { justify-content: space-between; min-height: 64px; }
  .cabecera-logo img { width: 88px; }
  .seccion { scroll-margin-top: 64px; }
  .portada { --titular: clamp(54px, 17vw, 96px); }
  .titular-raya { margin-left: 1.2em; }
  .titular-2 { margin-left: 1.1em; }
  /* En celular: servicio, primera parte y, debajo, la cota corta que lleva a la segunda */
  .conexion {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas: "servicio servicio" "a a" "linea b";
    column-gap: 12px;
    row-gap: 4px;
    padding-block: 14px;
    font-size: 19px;
  }
  .conexion-servicio { grid-area: servicio; margin-bottom: 4px; }
  .conexion-a { grid-area: a; text-align: left; }
  .conexion-linea { grid-area: linea; }
  .conexion-b { grid-area: b; }
  .vista figcaption { flex-direction: column; gap: 2px; font-size: 11px; }
  .tickets-fila { grid-template-columns: 1fr; }
  .ticket, .ticket:first-child { padding: var(--s3) 0; border-left: 0; border-top: 1px solid rgba(244, 243, 240, 0.16); }
  .ticket:first-child { border-top: 0; padding-top: var(--s4); }
  .ticket:last-child { padding-bottom: var(--s4); }
  .ficha { grid-template-columns: 1fr; gap: var(--s2); }
  .servicio-fila { padding-block: var(--s4); }
  .servicio-cuerpo > p { font-size: 17px; }
  .plano { width: 100%; opacity: 0.55; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 60%); mask-image: linear-gradient(180deg, transparent 0%, #000 60%); }
  .formulario-par { grid-template-columns: 1fr; }
  .pie-raya { display: none; }
  .pie-menu { gap: var(--s3); }
}
