/* ==========================================================
   Servicios Inmobiliarios y Municipales
   Desarrollado por PresenciaDigital.UY
   ========================================================== */

:root {
  /* Color */
  --ink: #14325c;          /* tinta de plano */
  --ink-deep: #0d2240;
  --celeste: #dbe8f4;      /* celeste claro */
  --celeste-mid: #a9c8e6;
  --paper: #f4f7fa;
  --white: #ffffff;
  --sun: #e3a92b;          /* oro del sol */
  --text: #1b2633;
  --muted: #536173;
  --line: #d3dde8;
  --wa: #128c4a;
  --wa-hover: #0e7a40;

  /* Tipografía */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.35rem);
  --step-4: clamp(2.4rem, 1.5rem + 3.6vw, 4.1rem);

  /* Layout */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 76px;
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.15; color: var(--ink); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -100px;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

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

.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.35rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-sm { padding: .55rem 1rem; font-size: var(--step--1); white-space: nowrap; }
.btn-block { width: 100%; }

.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--ink-deep); }

.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

.btn-wa { background: var(--wa); color: var(--white); }
.btn-wa:hover { background: var(--wa-hover); }

.btn-outline { border-color: currentColor; color: var(--white); background: transparent; }
.btn-outline:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 247, 250, .94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-weight: 700;
  font-stretch: 112%;
  font-size: .98rem;
  letter-spacing: -.005em;
}
.brand-name + .brand-name { font-weight: 400; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav ul { display: flex; gap: 1.35rem; }
.site-nav ul a {
  position: relative;
  display: block;
  padding: .4rem 0;
  font-size: .93rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--sun);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.site-nav ul a:hover::after,
.site-nav ul a[aria-current="true"]::after { transform: scaleX(1); }
.site-nav ul a[aria-current="true"] { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px; height: 2px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
  background:
    linear-gradient(var(--paper), rgba(244,247,250,0) 30%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(20,50,92,.05) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(20,50,92,.05) 39px 40px),
    var(--paper);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 750;
  font-stretch: 112%;
  letter-spacing: -.02em;
  line-height: 1.03;
  max-width: 15ch;
}
.lead {
  margin-top: 1.5rem;
  max-width: 54ch;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}
.hero-sign {
  margin-top: 2.25rem;
  padding-left: .9rem;
  border-left: 3px solid var(--sun);
  font-size: var(--step--1);
  color: var(--muted);
}

.hero-plan {
  margin: 0;
  padding: clamp(.75rem, 2vw, 1.25rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(13, 34, 64, .35);
}
.plan { width: 100%; height: auto; }

.plan-streets line { stroke: var(--celeste-mid); stroke-width: 1.5; stroke-dasharray: 6 6; }
.plan-street-label {
  font-family: var(--font);
  font-size: 13px;
  font-style: italic;
  fill: #8aa6c4;
  letter-spacing: .08em;
}
.plan-lines path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linejoin: round;
}
.plan-lines .plan-block { stroke-width: 3.5; }
.plan-lines .plan-thin { stroke-width: 1; stroke-dasharray: 4 4; }
.plan-nums text {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  fill: #6c7f96;
  text-anchor: middle;
  font-variant-numeric: tabular-nums;
}
.pin-label { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.pin-num { font-family: var(--font); font-size: 17px; font-weight: 700; fill: var(--ink); }
.plan-north text { font-family: var(--font); font-size: 11px; font-weight: 700; fill: var(--ink); }

/* El único momento animado: el plano se dibuja al cargar */
.js .plan-lines path {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
}
.js .plan-lines .plan-thin { stroke-dasharray: 4 4; stroke-dashoffset: 0; }
.js .plan-target,
.js .plan-pin,
.js .plan-nums { opacity: 0; }
.is-drawn .plan-lines path {
  transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .2, 1);
  stroke-dashoffset: 0;
}
.is-drawn .plan-nums { opacity: 1; transition: opacity .6s ease .9s; }
.is-drawn .plan-target { opacity: 1; transition: opacity .5s ease 1.2s; }
.is-drawn .plan-pin { opacity: 1; transition: opacity .4s ease 1.45s; }

/* ---------- Servicios ---------- */
.services {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--white);
  border-top: 1px solid var(--line);
}
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.service-col {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-top: 5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
}
.service-col--muni {
  background: var(--celeste);
  border-color: var(--celeste-mid);
  border-top-color: var(--ink);
}

.col-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1.25rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid var(--line);
}
.service-col--muni .col-head { border-bottom-color: var(--celeste-mid); }
.col-icon { width: 44px; height: 44px; flex: none; color: var(--ink); }
.col-head h2 {
  font-size: var(--step-3);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -.015em;
}
.col-head p { margin-top: .4rem; color: var(--muted); font-size: var(--step-0); }

.svc-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
}
.service-col--muni .svc-list li { border-bottom-color: rgba(20, 50, 92, .14); }
.svc-list li:last-child { border-bottom: 0; }
.svc-list h3 { grid-column: 1; color: var(--text); }
.svc-list p { grid-column: 1; color: var(--muted); }
.svc-ask {
  grid-column: 2;
  grid-row: 1;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  white-space: nowrap;
}
.svc-ask:hover { color: var(--wa); text-decoration-color: var(--wa); }

.svc-list--detailed li { padding-block: 1.2rem; }
.svc-list--detailed h3 {
  font-size: var(--step-1);
  font-weight: 650;
  letter-spacing: -.005em;
}
.svc-list--detailed p { margin-top: .4rem; max-width: 52ch; }

.svc-list--compact li { padding-block: .8rem; }
.svc-list--compact h3 {
  font-size: var(--step-0);
  font-weight: 550;
  line-height: 1.35;
}
.svc-list--compact p { margin-top: .25rem; font-size: .95rem; }

/* Complementarios */
.complementary {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.complementary::before {
  /* franjas de la bandera, discretas */
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: 38%;
  height: 100%;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.045) 0 22px, transparent 22px 44px);
  pointer-events: none;
}
.comp-head { position: relative; max-width: 60ch; }
.comp-head h2 {
  color: var(--white);
  font-size: var(--step-3);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -.015em;
}
.comp-head p { margin-top: .5rem; color: #c3d4e8; }

.comp-list {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.75rem;
}
.comp-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
}
.comp-icon { width: 40px; height: 40px; color: var(--sun); }
.comp-list h3 { color: var(--white); font-size: var(--step-1); font-weight: 650; }
.comp-list p { margin-top: .2rem; color: #c3d4e8; font-size: .95rem; }

/* ---------- Contacto ---------- */
.contact {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.contact-copy h2 {
  font-size: var(--step-3);
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -.015em;
  max-width: 18ch;
}
.contact-copy > p { margin-top: 1rem; max-width: 46ch; color: var(--muted); }

.contact-phone {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1.75rem;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  font-weight: 750;
  font-stretch: 115%;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.contact-phone .icon { width: .85em; height: .85em; color: var(--wa); }
.contact-phone:hover { color: var(--wa); }

.social { margin-top: 1.75rem; display: grid; gap: .6rem; }
.social a {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.social a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.social .icon { color: var(--ink); }

.wa-form {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.wa-form h3 { font-size: var(--step-1); font-weight: 650; margin-bottom: 1.25rem; }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: var(--step--1); font-weight: 600; color: var(--text); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .75rem .85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--paper);
  border: 1px solid #b9c6d4;
  border-radius: var(--radius);
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(227, 169, 43, .45);
  background: var(--white);
}
.field [aria-invalid="true"] { border-color: #b3261e; }
.form-error { margin-bottom: 1rem; color: #b3261e; font-size: var(--step--1); font-weight: 600; }
.form-note { margin-top: .75rem; font-size: var(--step--1); color: var(--muted); text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 2.75rem;
  background: var(--ink-deep);
  color: #b9cbe0;
  font-size: var(--step--1);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.footer-brand { color: var(--white); font-weight: 700; font-stretch: 110%; font-size: 1rem; margin-bottom: .35rem; }
.footer-links { display: grid; gap: .4rem; }
.footer-links a,
.footer-credit a { color: #dfe8f3; text-decoration: none; }
.footer-links a:hover,
.footer-credit a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.footer-credit p + p { margin-top: .35rem; }
.footer-credit a { font-weight: 600; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 60;
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--wa);
  color: var(--white);
  box-shadow: 0 10px 24px -8px rgba(13, 34, 64, .5);
  transition: background-color .15s ease, transform .15s ease;
}
.wa-float .icon { width: 30px; height: 30px; }
.wa-float:hover { background: var(--wa-hover); transform: scale(1.05); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .site-nav ul { gap: 1rem; }
  .site-nav ul a { font-size: .88rem; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -20px rgba(13, 34, 64, .35);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { padding: .85rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .site-nav ul a::after { display: none; }
  .site-nav .btn { align-self: flex-start; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .hero-plan { max-width: 560px; }

  .services-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-credit { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .comp-list { grid-template-columns: 1fr; }
  .comp-list li { grid-template-columns: auto 1fr; }
  .comp-list .btn { grid-column: 1 / -1; justify-self: start; }
  .complementary::before { width: 60%; }
  .footer-inner { grid-template-columns: 1fr; }
  .brand-name { font-size: .9rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .service-col { padding: 1.25rem 1.1rem; }
  .col-head { gap: .75rem; }
  .col-icon { width: 36px; height: 36px; }
  .svc-list li { grid-template-columns: 1fr; }
  .svc-ask { grid-column: 1; grid-row: auto; justify-self: start; margin-top: .45rem; }
  .svc-list--compact li { grid-template-columns: 1fr auto; }
  .svc-list--compact .svc-ask { grid-column: 2; grid-row: 1; margin-top: 0; }
  .hero-plan { padding: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
