/* =========================================================
   Verónica Maceira — Landing
   Dirección «Catastro», versión minimalista
   ========================================================= */

/* =========================================================
   Fuentes auto-alojadas (subconjunto latin)
   Sin llamadas a Google: ni IP a terceros, ni consentimiento.
   Archivos en ./fonts/  ·  ver also <head> de index.html
   ========================================================= */
@font-face {
  font-family: "Fraunces";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/fraunces-400.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/fraunces-500.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/plexsans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/plexsans-500.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/plexsans-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/plexmono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/plexmono-500.woff2") format("woff2");
}

:root {
  /* Paleta campo */
  --ink:        #1E211A;  /* texto principal / casi negro verdoso */
  --olive:      #3A4A2F;  /* tinta oliva */
  --field:      #5E6C41;  /* verde campo (oscurecido p/ contraste AA en texto) */
  --ochre:      #B5762F;  /* acento tierra (uso muy puntual) */
  --paper:      #F4F1E7;  /* fondo papel */
  --paper-2:    #ECE8DA;  /* papel alterno */
  --line:       #D6D1C0;  /* hairline */
  --line-soft:  #E2DDCD;
  --muted:      #67685D;  /* texto secundario (oscurecido p/ contraste AA) */

  --maxw: 1120px;
  --pad: clamp(1.25rem, 5vw, 4rem);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Fondo del lienzo = color del footer, para que el "rebote" al final del
     scroll (móvil) no deje ver un color distinto por debajo del footer. */
  background: var(--ink);
  /* Evita el rebote elástico que revelaba ese corte de color. */
  overscroll-behavior-y: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }

/* Cuerpo de texto justificado, con guionado en español (html lang="es").
   Solo prosa; titulares, etiquetas mono y datos quedan sin justificar. */
.hero-lead,
.col-main p,
.card-text,
.ambito-note,
.contacto-lead {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  top: 0.5rem;
  background: var(--olive);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: 2px;
  z-index: 100;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
  border-radius: 1px;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line-soft);
  box-shadow: 0 1px 16px -8px color-mix(in srgb, var(--ink) 35%, transparent);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}
/* Logotipo: alineado al borde de la rejilla (sin sangría) */
.brand {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  text-decoration: none;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.005em;
  color: var(--olive);
}
.brand-role {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.2vw, 2rem);
}
.nav-link {
  position: relative;
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  padding-block: 0.4rem;
  transition: color 0.18s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1.5px;
  background: var(--ochre);
  transition: right 0.25s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after,
.nav-link.is-active::after { right: 0; }
.nav-link.is-active { color: var(--ink); }
.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--olive) !important;
  text-decoration: none;
}
.nav-phone svg { width: 15px; height: 15px; color: var(--field); }
.nav-phone:hover { color: var(--ink) !important; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--olive);
  color: var(--paper) !important;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border-radius: 2px;
  border: 1.5px solid var(--olive);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav-cta:hover { background: var(--ink); border-color: var(--ink); }
/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 12vw, 9rem) clamp(4rem, 10vw, 7.5rem);
  border-bottom: 1px solid var(--line-soft);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-areas:
    "copy media"
    "cta  media";
  align-items: start;
  column-gap: clamp(2rem, 6vw, 5rem);
  row-gap: 0;
}
.hero-copy { grid-area: copy; max-width: 40rem; }
.hero-cta  { grid-area: cta; }
.hero-media {
  grid-area: media;
  position: relative;
  margin: 0;
  padding: clamp(1rem, 2.5vw, 2rem);
  justify-self: end;
  width: 100%;
  max-width: 28rem;
}
.hero-media img {
  display: block;
  width: 100%;
  height: auto;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--field);
  margin: 0 0 1.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.2rem, 11vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--olive);
  margin: 0 0 1.75rem;
}
.hero-lead {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.6;
  max-width: 36ch;
  color: var(--ink);
  margin: 0 0 2.5rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.75rem;
}
.hero-direct {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.85rem;
  margin: 0 0 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}
.hero-direct-key {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--field);
}
.hero-direct a {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--olive);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.hero-direct a:hover { color: var(--ochre); border-bottom-color: var(--ochre); }
.hero-direct-sep { color: var(--line); }
.hero-coord {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}


/* ---------- Botones ---------- */
.btn {
  --b: var(--olive);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  text-decoration: none;
  border: 1.5px solid var(--b);
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
              transform 0.2s var(--ease);
}
.btn-primary {
  background: var(--olive);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--olive);
}
.btn-ghost:hover {
  background: color-mix(in srgb, var(--olive) 8%, transparent);
  transform: translateY(-2px);
}

/* ---------- Ticks de parcela (firma catastral) ---------- */
.plot-tick {
  position: absolute;
  width: 16px; height: 16px;
  z-index: 1;
  pointer-events: none;
  color: var(--ochre);
}
.plot-tick::before, .plot-tick::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.plot-tick::before { width: 16px; height: 1.5px; top: 0; }
.plot-tick::after  { width: 1.5px; height: 16px; left: 0; }
.tick-tl { top: clamp(1rem, 3vw, 2rem); left: clamp(1rem, 3vw, 2rem); }
.tick-tr { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.tick-tr::before { left: auto; right: 0; }
.tick-tr::after  { left: auto; right: 0; }
.tick-bl { bottom: clamp(1rem, 3vw, 2rem); left: clamp(1rem, 3vw, 2rem); }
.tick-bl::before { top: auto; bottom: 0; }
.tick-br { bottom: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.tick-br::before { top: auto; bottom: 0; left: auto; right: 0; }
.tick-br::after  { left: auto; right: 0; }

/* =========================================================
   Secciones genéricas
   ========================================================= */
.section {
  padding-block: clamp(4rem, 9vw, 7rem);
}
.section-ref {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--ochre);
  margin: 0 0 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--olive);
  margin: 0.5rem 0 0;
  max-width: 22ch;
}
.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ---------- Sobre mí ---------- */
.sobre { background: var(--paper-2); border-block: 1px solid var(--line-soft); }
.two-col {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.col-aside .eyebrow { margin: 0.5rem 0 0; color: var(--field); }
.col-main p {
  max-width: 60ch;
  margin: 1.25rem 0;
  color: var(--ink);
}
.col-main .section-title { max-width: 18ch; }
.creds {
  list-style: none;
  margin: 2rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
}
.creds li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.creds li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 8px; height: 8px;
  border: 1.5px solid var(--field);
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- Servicios grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: var(--paper);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  transition: background 0.25s var(--ease);
}
.card:hover { background: var(--paper-2); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.card-ref {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.card-icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  color: var(--field);
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card-icon svg { width: 22px; height: 22px; }
.card:hover .card-icon { color: var(--olive); border-color: var(--field); }
.card-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--olive);
  margin: 0 0 0.75rem;
}
.card-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
}

/* ---------- Ámbito / confianza ---------- */
.ambito { background: var(--olive); color: var(--paper); }
.ambito .section-ref { color: var(--ochre); }
.ambito .eyebrow { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.ambito .section-title { color: var(--paper); }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: color-mix(in srgb, var(--paper) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--paper) 20%, transparent);
  margin: 0 0 2.5rem;
}
.stat {
  background: var(--olive);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  line-height: 1;
  color: var(--paper);
  margin: 0 0 0.5rem;
}
.stat-label {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--paper) 78%, transparent);
}
.ambito-note {
  max-width: 60ch;
  margin: 0;
  color: color-mix(in srgb, var(--paper) 85%, transparent);
}
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Contacto ---------- */
.contacto { position: relative; padding-block: clamp(5rem, 11vw, 8rem); }
.contacto-inner { max-width: 720px; }
.contacto-title { max-width: 20ch; }
.contacto-lead {
  font-size: 1.15rem;
  max-width: 46ch;
  color: var(--ink);
  margin: 1.5rem 0 2.75rem;
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.contact-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: baseline;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-key {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--field);
}
.contact-val {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1rem + 1.4vw, 1.85rem);
  color: var(--olive);
  text-decoration: none;
  transition: color 0.18s var(--ease);
  word-break: break-word;
}
a.contact-val:hover { color: var(--ochre); }
@media (max-width: 520px) {
  .contact-list li { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: color-mix(in srgb, var(--paper) 70%, transparent);
  padding-block: 2.75rem;
}
.footer-inner { display: grid; gap: 0.4rem; }
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--paper);
  margin: 0;
}
.footer-meta, .footer-legal {
  font-size: 0.85rem;
  margin: 0;
}
.footer-legal { color: color-mix(in srgb, var(--paper) 45%, transparent); margin-top: 0.5rem; }
.footer-phone {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ochre) 70%, transparent);
  transition: color 0.18s var(--ease);
}
.footer-phone:hover { color: var(--ochre); }

/* =========================================================
   Microinteracciones — reveal on scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Responsive — cabecera y hero (colapso a una columna)
   Estos bloques van DESPUÉS de la base para que sus reglas
   prevalezcan (a igual especificidad gana la última).
   ========================================================= */
@media (max-width: 820px) {
  .nav-phone span { display: none; }
  /* Una columna: el logo va entre la descripción y los botones */
  .hero-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "media"
      "cta";
    text-align: center;
  }
  .hero-media {
    justify-self: center;
    max-width: 10rem;
    padding: 0;
    margin: 0 auto 1.75rem;
  }
  .hero-media .plot-tick { display: none; }
  /* Bloques de texto centrados y con anchura cómoda */
  .hero-copy {
    max-width: 34rem;
    margin-inline: auto;
  }
  .hero-lead { margin-inline: auto; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-direct { justify-content: center; }
}
@media (max-width: 620px) {
  .nav a:not(.nav-cta):not(.nav-phone) { display: none; }
  .brand-role { display: none; }
  .header-inner { gap: 0.75rem; min-height: 62px; }
  .nav { gap: 0.5rem; }
  .brand-name { font-size: 1.1rem; }
  /* Icono de teléfono: área de toque cómoda (≈44px) */
  .nav-phone {
    padding: 0.55rem;
    margin-right: -0.3rem;
  }
  .nav-phone svg { width: 20px; height: 20px; }
  /* Botón Contacto: altura de toque cómoda */
  .nav-cta { padding: 0.6rem 1rem; }
}

/* =========================================================
   Ajuste fino para teléfonos
   ========================================================= */
@media (max-width: 480px) {
  /* Hero: un poco menos de aire arriba para no empujar el contenido */
  .hero {
    padding-block: clamp(3rem, 9vw, 4.5rem) clamp(3rem, 9vw, 4rem);
  }
  .hero-lead { margin-bottom: 2rem; }

  /* Botones del hero: apilados y a todo el ancho (más fáciles de tocar) */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 2.25rem;
  }
  .hero-actions .btn { width: 100%; padding-block: 0.95rem; }

  /* "Trato directo": etiqueta, teléfono y correo apilados y alineados */
  .hero-direct {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
  }
  .hero-direct-sep { display: none; }

  /* Tarjetas y secciones: un punto más compactas */
  .section { padding-block: clamp(3.25rem, 11vw, 4.5rem); }
  .section-head { margin-bottom: 2rem; }
  .card { padding: 1.6rem 1.4rem; }

  /* Contacto: respiración del bloque */
  .contacto-lead { margin-bottom: 2rem; }
}

/* Pantallas muy estrechas (≈320px): evitar que los stats aprieten */
@media (max-width: 360px) {
  .stats { grid-template-columns: 1fr; }
}
