/* =========================================================
   APJ & Asociados — Estudio Jurídico Integral
   ========================================================= */

:root {
  /* Paleta — derivada del logo (#070468 / #00B2E4) y del sitio original */
  /* Navy de marca (#02183D) + bronce (#AD7A50), de la nueva identidad */
  --navy-950: #010e25;
  --navy-900: #02183d;
  --navy-800: #06234f;
  --navy-700: #0c2f63;
  --navy-line: rgba(255, 255, 255, .1);
  --brand:    #02183d;
  --bronze:      #ad7a50;
  --bronze-dark: #8e5f3a;
  --bronze-soft: #d6ab82;
  --cream:       #f6f1ea;
  --ivory:    #f3efe7;
  --ivory-70: rgba(243, 239, 231, .72);
  --ivory-50: rgba(243, 239, 231, .5);
  --ivory-30: rgba(243, 239, 231, .3);
  --hair:     rgba(243, 239, 231, .12);
  --hair-2:   rgba(243, 239, 231, .07);

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans:  "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out:  cubic-bezier(.22, 1, .36, 1);
  --ease-io:   cubic-bezier(.76, 0, .24, 1);

  --gutter: clamp(20px, 6vw, 112px);
  --topbar-h: 40px;
  --main-h: 92px;
  --header-h: calc(var(--topbar-h) + var(--main-h));
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

/* Grano sutil, da textura "papel" sobre los planos oscuros */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 200;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 1px solid var(--bronze); outline-offset: 4px; }

/* =========================================================
   Botones / links
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color .5s var(--ease-out), border-color .5s var(--ease-out);
}
.btn svg { width: 16px; height: 10px; transition: transform .5s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }

/* Relleno que sube desde abajo */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateY(101%);
  transition: transform .6s var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }

/* Botón principal: marfil plano con texto navy; el bronce aparece solo en el hover */
.btn--solid {
  padding: 20px 32px;
  color: var(--navy-900);
  background: var(--cream);
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .55);
  transition: color .5s var(--ease-out), box-shadow .6s var(--ease-out);
}
.btn--solid::before { inset: -1px; background: var(--bronze); }
.btn--solid:hover { box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .65); }

/* CTA principal: ícono de WhatsApp + halo bronce que "respira" */
.btn--cta { padding: 20px 30px 20px 26px; }
.btn .btn__wa { width: 19px; height: 19px; flex: none; transition: transform .6s var(--ease-out); }
.btn--cta:hover .btn__wa { transform: rotate(-8deg) scale(1.06); }
.btn--cta {
  box-shadow:
    0 16px 34px -18px rgba(0, 0, 0, .55),
    0 0 36px -8px rgba(214, 171, 130, .35);
  animation: cta-pulse 3.6s var(--ease-out) 1.5s infinite;
}
.btn--cta:hover {
  animation: none;
  box-shadow:
    0 20px 40px -18px rgba(0, 0, 0, .65),
    0 0 46px -6px rgba(214, 171, 130, .55);
}
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .55), 0 0 30px -10px rgba(214, 171, 130, .35); }
  50%      { box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .55), 0 0 46px -6px rgba(214, 171, 130, .55); }
}


.btn--line {
  padding: 12px 22px;
  border: 1px solid var(--ivory-30);
}
.btn--line::before { background: var(--ivory); }
.btn--line:hover { color: var(--navy-950); border-color: var(--ivory); }

.link-arrow {
  position: relative;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(243, 239, 231, .88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 18px rgba(1, 14, 37, .6);
  padding: 6px 0;
  transition: color .4s;
}
.link-arrow::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(.35);
  transition: transform .6s var(--ease-out);
}
.link-arrow:hover { color: var(--ivory); }
.link-arrow:hover::after { transform-origin: left; transform: scaleX(1); }

/* =========================================================
   PRELOADER
   ========================================================= */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  /* Failsafe: si el JS no carga, se retira solo */
  animation: preloader-failsafe 0s 7s forwards;
}
.preloader.is-managed { animation: none; }
@keyframes preloader-failsafe { to { visibility: hidden; } }

.preloader__panel { position: absolute; inset: 0; }
.preloader__panel--back { background: var(--bronze); }
.preloader__panel--front {
  background:
    radial-gradient(60% 55% at 50% 48%, rgba(18, 56, 110, .55), transparent 72%),
    var(--navy-950);
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Listones verticales — eco del revestimiento de madera de la recepción */
.preloader__slats {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--gutter);
}
.preloader__slats i {
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--hair-2) 20%, var(--hair-2) 80%, transparent);
  transform-origin: top;
  transform: scaleY(0);
}

.preloader__center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preloader__logo {
  width: min(560px, 78vw);
  height: auto;
  overflow: visible;
}

.lg__stroke {
  fill: none;
  stroke: var(--ivory);
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.lg__fill { fill: var(--ivory); fill-opacity: 0; }
.lg-bar { fill: var(--bronze); }

.preloader__rule {
  position: relative;
  width: min(220px, 40vw);
  height: 1px;
  margin-top: 44px;
  background: var(--hair);
  overflow: hidden;
}
.preloader__rule span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--bronze) 35%, var(--bronze-soft) 100%);
  transform-origin: left;
  transform: scaleX(0);
}

.preloader__tagline {
  margin: 22px 0 0;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--bronze-soft);
  opacity: 0;
}

.preloader__meta {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(24px, 5vh, 48px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 10.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ivory-30);
  opacity: 0;
}
.preloader__count b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: .08em;
  color: var(--ivory-50);
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: transform .7s var(--ease-out);
}
/* Al scrollear, la barra superior se esconde y queda solo la principal */
.header.is-scrolled { transform: translateY(calc(-1 * var(--topbar-h))); }
.header.is-hidden   { transform: translateY(-100%); }
.header.is-hidden .header__main { box-shadow: none !important; }

/* Barra superior — la "firma" del sitio anterior */
.topbar {
  height: var(--topbar-h);
  background: var(--navy-900);
  border-bottom: 1px solid var(--navy-line);
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(246, 241, 234, .78);
}
.topbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
}
.topbar__contact { display: flex; align-items: center; gap: 32px; }
.topbar__contact a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: color .3s;
}
.topbar__contact a:hover { color: #fff; }
.topbar__contact svg { width: 15px; height: 15px; color: var(--bronze-soft); }
.topbar__addr {
  padding-left: 32px;
  border-left: 1px solid var(--navy-line);
  color: rgba(246, 241, 234, .5);
}
.topbar__social { display: flex; height: 100%; }
.topbar__social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 100%;
  border-left: 1px solid var(--navy-line);
  transition: background-color .3s, color .3s;
}
.topbar__social a:last-child { border-right: 1px solid var(--navy-line); }
.topbar__social a:hover { background: var(--bronze); color: #fff; }
.topbar__social svg { width: 15px; height: 15px; }

/* Barra principal */
.header__main {
  position: relative;
  height: var(--main-h);
  border-bottom: 1px solid transparent;
  transition: height .6s var(--ease-out), background-color .6s var(--ease-out), border-color .6s;
}
.header__main::before {
  content: "";
  position: absolute;
  inset: 0 0 -50px;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(1, 14, 37, .6), transparent);
  pointer-events: none;
  transition: opacity .6s;
}
.is-scrolled .header__main {
  --main-h: 76px;
  background: rgba(2, 24, 61, .86);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom-color: var(--navy-line);
}
.is-scrolled .header__main::before { opacity: 0; }

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 var(--gutter);
}

.header__brand { flex: none; display: block; }
.logo {
  width: clamp(230px, 18vw, 320px);
  height: auto;
  transition: width .6s var(--ease-out);
}
.is-scrolled .logo { width: clamp(210px, 15.5vw, 270px); }
.logo-word { fill: var(--ivory); }
.logo-bar  { fill: var(--bronze); }

/* Nav — mismas secciones y desplegables que el sitio anterior */
.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 34px); }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ivory-70);
  transition: color .4s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 1px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .6s var(--ease-out);
}
.nav__link:hover,
.nav__link.is-active { color: var(--ivory); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__trigger svg { width: 9px; height: 6px; opacity: .7; transition: transform .5s var(--ease-out); }

/* Desplegables */
.nav__item--has-menu { position: relative; }
.nav__menu {
  position: absolute;
  top: calc(100% + 18px);
  left: -24px;
  min-width: 270px;
  padding: 10px 0;
  background: rgba(2, 24, 61, .97);
  border: 1px solid var(--navy-line);
  border-top: 2px solid var(--bronze);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .4s var(--ease-out), transform .55s var(--ease-out), visibility 0s .4s;
}
.nav__menu::before {
  /* puente invisible para no perder el hover */
  content: "";
  position: absolute;
  left: 0; right: 0; top: -22px;
  height: 22px;
}
.nav__item--has-menu:hover .nav__menu,
.nav__item--has-menu.is-open .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.nav__item--has-menu:hover .nav__trigger svg,
.nav__item--has-menu.is-open .nav__trigger svg { transform: rotate(180deg); }

.nav__menu a {
  position: relative;
  display: block;
  padding: 13px 24px;
  font-size: 13px;
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--ivory-70);
  transition: color .3s, background-color .3s, padding-left .45s var(--ease-out);
}
.nav__menu a + a { border-top: 1px solid var(--navy-line); }
.nav__menu a::before {
  content: "";
  position: absolute;
  left: 24px; top: 50%;
  width: 0; height: 1px;
  background: var(--bronze);
  transition: width .45s var(--ease-out);
}
.nav__menu a:hover { color: #fff; background: rgba(173, 122, 80, .14); padding-left: 44px; }
.nav__menu a:hover::before { width: 12px; }

.header__actions { display: flex; align-items: center; gap: 24px; flex: none; }

/* Burger */
.burger {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
}
.burger span {
  position: absolute;
  left: 10px; right: 10px;
  height: 1px;
  background: var(--ivory);
  transition: transform .6s var(--ease-out), top .6s var(--ease-out);
}
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 25px; left: 18px; }
.menu-open .burger span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { top: 22px; left: 10px; transform: rotate(-45deg); }

/* ---------------------------------------------------------
   Variante clara (header blanco, como el sitio anterior)
   Quitar la clase .header--light para volver al header oscuro
   --------------------------------------------------------- */
.header--light .header__main {
  background: #fff;
  border-bottom-color: rgba(2, 24, 61, .08);
}
.header--light .header__main::before { display: none; }
.header--light.is-scrolled .header__main {
  background: rgba(255, 255, 255, .94);
  border-bottom-color: rgba(2, 24, 61, .1);
  box-shadow: 0 18px 40px -24px rgba(2, 24, 61, .35);
}

/* Logo con sus colores originales */
.header--light .logo-word { fill: var(--brand); }

/* La nav ocupa todo el alto para que la barra de hover toque el borde superior */
.header--light .nav,
.header--light .nav__list,
.header--light .nav__list > li { height: 100%; }
.header--light .nav__list > li { display: flex; align-items: stretch; }
.header--light .nav__link {
  height: 100%;
  padding: 0 2px;
  color: rgba(2, 24, 61, .74);
  font-weight: 700;
}
.header--light .nav__link:hover,
.header--light .nav__link.is-active,
.header--light .nav__item--has-menu.is-open .nav__link,
.header--light .nav__item--has-menu:hover .nav__link { color: var(--navy-900); }

/* Barra celeste superior — el gesto del sitio viejo, más fino y animado desde el centro */
.header--light .nav__link::after {
  top: 0;
  bottom: auto;
  left: -10px; right: -10px;
  height: 3px;
  background: var(--bronze);
  transform-origin: center;
  transform: scaleX(0);
}
.header--light .nav__link:hover::after,
.header--light .nav__link.is-active::after,
.header--light .nav__item--has-menu:hover .nav__link::after,
.header--light .nav__item--has-menu.is-open .nav__link::after { transform: scaleX(1); transform-origin: center; }
/* Barra inferior: acompaña a la superior con un leve retraso */
.header--light .nav__link::before {
  content: "";
  position: absolute;
  left: -10px; right: -10px;
  bottom: -1px;
  height: 3px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .6s var(--ease-out) .06s;
}
.header--light .nav__link:hover::before,
.header--light .nav__link.is-active::before,
.header--light .nav__item--has-menu:hover .nav__link::before,
.header--light .nav__item--has-menu.is-open .nav__link::before { transform: scaleX(1); }

/* Barras en bronce, tanto en hover como en la sección activa */
.header--light .nav__link::after,
.header--light .nav__link::before { background: var(--bronze); }

/* Desplegable blanco, pegado al borde inferior del header */
.header--light .nav__menu {
  top: 100%;
  left: -10px;
  padding: 6px 0;
  background: #fff;
  border: 1px solid rgba(2, 24, 61, .08);
  border-top: 3px solid var(--bronze);
  box-shadow: 0 28px 50px -22px rgba(2, 24, 61, .4);
  transform: translateY(8px);
}
.header--light .nav__menu::before { display: none; }
.header--light .nav__item--has-menu:hover .nav__menu,
.header--light .nav__item--has-menu.is-open .nav__menu { transform: none; }
.header--light .nav__menu a {
  color: var(--navy-900);
  font-size: 13.5px;
}
.nav__menu small {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  letter-spacing: .01em;
  color: var(--ivory-50);
}
.header--light .nav__menu small { color: rgba(2, 24, 61, .5); }
.header--light .nav__menu a:hover small { color: var(--bronze); }
.header--light .nav__menu a + a { border-top-color: rgba(2, 24, 61, .07); }
.header--light .nav__menu a:hover { color: var(--navy-900); background: var(--cream); }

/* Botón y burger en oscuro */
.header--light .btn--line { border-color: rgba(2, 24, 61, .22); color: var(--navy-900); }
.header--light .btn--line::before { background: var(--bronze); }
.header--light .btn--line:hover { color: #fff; border-color: var(--bronze); }
.header--light .burger span { background: var(--navy-900); }
.header--light ~ .mobile-menu { background: var(--navy-900); }

/* Menú mobile */
.mobile-menu {
  overflow-y: auto;
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 5vh) var(--gutter) 40px;
  background: var(--navy-950);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .9s var(--ease-io);
  visibility: hidden;
}
.menu-open .mobile-menu { clip-path: inset(0 0 0 0); visibility: visible; }
.mobile-menu__nav > a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair-2);
  font-family: var(--serif);
  font-size: clamp(28px, 7vw, 46px);
  line-height: 1.1;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease-out), transform .8s var(--ease-out);
}
.mobile-menu__nav > a span {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--bronze-soft);
}
.mobile-menu__sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 12px 0 16px 32px;
  border-bottom: 1px solid var(--hair-2);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease-out), transform .8s var(--ease-out);
}
.mobile-menu__sub a {
  font-size: 13px;
  color: var(--ivory-70);
}
.mobile-menu__nav > a:has(+ .mobile-menu__sub) { border-bottom: 0; }
.menu-open .mobile-menu__nav > * { opacity: 1; transform: none; }
.menu-open .mobile-menu__nav > :nth-child(1) { transition-delay: .25s; }
.menu-open .mobile-menu__nav > :nth-child(2) { transition-delay: .31s; }
.menu-open .mobile-menu__nav > :nth-child(3) { transition-delay: .37s; }
.menu-open .mobile-menu__nav > :nth-child(4) { transition-delay: .41s; }
.menu-open .mobile-menu__nav > :nth-child(5) { transition-delay: .47s; }
.menu-open .mobile-menu__nav > :nth-child(6) { transition-delay: .51s; }
.menu-open .mobile-menu__nav > :nth-child(7) { transition-delay: .57s; }
.mobile-menu__foot {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--ivory-50);
}
.mobile-menu__foot p { margin: 10px 0 0; line-height: 1.6; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  background:
    radial-gradient(70% 85% at 8% 42%, rgba(18, 56, 110, .55), transparent 70%),
    radial-gradient(45% 55% at 40% 100%, rgba(173, 122, 80, .14), transparent 70%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
@supports (min-height: 100svh) { .hero { min-height: max(100svh, 680px); } }

.hero__media {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 60%;
  z-index: -1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.3) 22%, rgba(0,0,0,.8) 48%, #000 66%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.3) 22%, rgba(0,0,0,.8) 48%, #000 66%);
}
.hero__img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
/* Sutil tinte de marca sobre la foto */
.hero__img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--navy-900);
  mix-blend-mode: color;
  opacity: .22;
  pointer-events: none;
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 28% 45%;
  filter: brightness(.9) saturate(.95) contrast(1.04);
  transform-origin: 30% 50%;
  will-change: transform;
}
.hero__fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(1, 14, 37, .75) 0%, rgba(1, 14, 37, 0) 34%),
    linear-gradient(180deg, rgba(2, 24, 61, .45) 0%, rgba(2, 24, 61, 0) 26%),
    /* velo navy que se intensifica hacia el borde derecho: la foto nunca queda al 100% */
    linear-gradient(90deg, rgba(2, 24, 61, .12) 0%, rgba(2, 24, 61, .22) 55%, rgba(1, 14, 37, .5) 100%),
    /* + 20% de navy parejo sobre toda la foto */
    linear-gradient(rgba(2, 24, 61, .2), rgba(2, 24, 61, .2));
}

.hero__caption {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(28px, 5vh, 52px);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ivory-70);
}
.hero__caption-line { width: 36px; height: 1px; background: var(--ivory-50); }
.hero__coords {
  margin-right: 10px;
  padding-right: 12px;
  border-right: 1px solid var(--ivory-30);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--bronze-soft);
}

/* Grilla arquitectónica de fondo */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.hero__grid i { width: 1px; background: linear-gradient(to bottom, transparent, var(--hair-2) 25%, var(--hair-2) 75%, transparent); }
.hero__grid i:not(:first-child) { display: none; }

.hero__content {
  position: relative;
  width: 100%;
  max-width: calc(var(--gutter) + 980px);
  padding: calc(var(--header-h) + 3vh) 0 clamp(48px, 8vh, 96px) var(--gutter);
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 clamp(22px, 4vh, 34px);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ivory-70);
}
.hero__eyebrow-line {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--bronze), rgba(173, 122, 80, .15));
}

.hero__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.1vw, 70px);
  line-height: 1.06;
  letter-spacing: .015em;
  text-transform: uppercase;
  color: var(--ivory);
}
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: .08em;
  margin-bottom: -.08em;
}
.hero__title .line > span { display: inline-block; will-change: transform; }
.hero__title em {
  font-style: normal;
  font-weight: 600;
  color: var(--bronze-soft);
  text-shadow:
    0 1px 1px rgba(20, 10, 2, .45),
    0 4px 18px rgba(1, 10, 28, .55);
}
/* Terminada la intro, las líneas dejan de recortar para no cortar la sombra */
.hero.is-in .hero__title .line { overflow: visible; }

.hero__lead {
  max-width: 460px;
  margin: clamp(20px, 3.6vh, 32px) 0 0;
  font-size: clamp(15px, 1.1vw, 17px);
  font-weight: 300;
  line-height: 1.75;
  color: var(--ivory-70);
  text-wrap: pretty;
}
.hero__lead strong { font-weight: 500; color: var(--ivory); }

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px 36px;
  margin-top: clamp(26px, 4.6vh, 44px);
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 0;
  margin: clamp(32px, 6.5vh, 64px) 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  max-width: 600px;
}
.hero__facts div { padding-right: clamp(20px, 3vw, 44px); }
.hero__facts div + div { padding-left: clamp(20px, 3vw, 44px); border-left: 1px solid var(--hair-2); }
.hero__facts dt {
  font-family: var(--serif);
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 1;
  white-space: nowrap;
  color: var(--ivory);
}
.hero__facts dt i { font-style: italic; color: var(--bronze-soft); }
.hero__facts dd {
  margin: 10px 0 0;
  white-space: nowrap;
  font-size: 11.5px;
  line-height: 1.55;
  letter-spacing: .04em;
  color: var(--ivory-50);
}



/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1360px) {
  .topbar__addr { display: none; }
}

@media (max-width: 1200px) {
  .nav, .header__actions .btn { display: none; }
  .burger { display: block; }
}

@media (max-width: 760px) {
  :root { --topbar-h: 0px; }
  .topbar { display: none; }
}

@media (max-width: 1024px) {
  :root { --main-h: 80px; }
  .logo { width: 190px; }

  .hero { align-items: flex-end; }
  .hero__media {
    width: 100%;
    bottom: auto;
    height: min(64vh, 640px);
    -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
  }
  .hero__img { object-position: 30% 35%; }
  .hero__fade {
    background: linear-gradient(180deg, rgba(2, 24, 61, .55) 0%, rgba(2, 24, 61, 0) 26%, rgba(2, 24, 61, .25) 70%, rgba(2, 24, 61, .6) 100%);
  }
  .hero__grid, .hero__caption { display: none; }
  .hero__content { padding: calc(min(64vh, 640px) - 150px) var(--gutter) 56px; max-width: 760px; }
  .hero__eyebrow { margin-bottom: 24px; }
  .hero__lead { margin-top: 24px; }
  .hero__ctas { margin-top: 32px; }
  .hero__facts { margin-top: 44px; }
}

@media (max-width: 560px) {
  .hide-sm { display: none; }
  .btn--solid { width: 100%; justify-content: center; }
  .hero__media { height: 58vh; }
  .hero__content { padding-top: calc(58vh - 110px); }
  .hero__title { font-size: clamp(30px, 8.6vw, 42px); }
  .hero__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 22px; }
  .hero__facts div { padding-right: 12px; }
  .hero__facts div + div { padding-left: 12px; }
  .hero__facts dt { font-size: 21px; white-space: normal; }
  .hero__facts dd { font-size: 10.5px; }
}

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

/* El logo vectorial es ~10 % más chato que el cartel real: se estira en vertical */
.logo,
.preloader__logo { aspect-ratio: 1764 / 185; height: auto; }

/* ---------------------------------------------------------
   Desplegables: cada área despliega sus localidades
   --------------------------------------------------------- */
.nav__menu { min-width: 350px; }
.nav__area + .nav__area { border-top: 1px solid rgba(2, 24, 61, .07); }
.nav__zonas {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease-out);
}
.nav__zonas > div {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
  padding: 0 24px;
  transition: padding .45s var(--ease-out);
}
.nav__area:hover .nav__zonas,
.nav__area:focus-within .nav__zonas { grid-template-rows: 1fr; }
.nav__area:hover .nav__zonas > div,
.nav__area:focus-within .nav__zonas > div { padding: 2px 24px 16px; }
.nav__area:hover .nav__area-link,
.nav__area:focus-within .nav__area-link { color: var(--navy-900); background: var(--cream); padding-left: 44px; }
.nav__area:hover .nav__area-link::before,
.nav__area:focus-within .nav__area-link::before { width: 12px; }
.nav__area:hover,
.nav__area:focus-within { background: var(--cream); }

.nav__menu .nav__zonas a,
.header--light .nav__menu .nav__zonas a {
  display: inline-block;
  padding: 6px 11px;
  border: 1px solid rgba(173, 122, 80, .45);
  border-top: 1px solid rgba(173, 122, 80, .45);
  border-radius: 999px;
  background: #fff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--bronze-dark);
  transition: background-color .25s, color .25s, border-color .25s;
}
.nav__menu .nav__zonas a::before { display: none; }
.nav__menu .nav__zonas a:hover,
.header--light .nav__menu .nav__zonas a:hover { padding-left: 11px; background: var(--bronze); border-color: var(--bronze); color: #fff; }

/* En pantallas táctiles las localidades se ven siempre */
@media (hover: none) {
  .nav__zonas { grid-template-rows: 1fr; }
  .nav__zonas > div { padding: 2px 24px 16px; }
}

/* ---------------------------------------------------------
   Hero: foto nítida + localidades en mono (mismo lenguaje que el resto)
   --------------------------------------------------------- */
.hero__img { object-position: 36% 55%; }
.hero__zones {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(28px, 5vh, 52px);
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--ivory-70);
}
.hero__zones-line { width: 36px; height: 1px; background: var(--ivory-50); }
.hero__zones-label { color: var(--bronze-soft); margin-right: 4px; }
.hero__zones i { font-style: normal; color: var(--ivory-30); }
.hero__zones a { position: relative; transition: color .3s; }
.hero__zones a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--bronze-soft); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out);
}
.hero__zones a:hover { color: var(--ivory); }
.hero__zones a:hover::after { transform: scaleX(1); }
@media (max-width: 1024px) {
  .hero { flex-wrap: wrap; align-content: flex-end; }
  .hero__zones { position: static; width: 100%; padding: 0 var(--gutter) 40px; }
  .hero__content { padding-bottom: 28px; }
}

/* =========================================================
   CTA "Consultá tu caso": bloque de ícono + texto, con marco
   bronce desplazado (esquinas siempre visibles; al hover el
   trazo dibuja el marco completo, como "Ver más")
   ========================================================= */
.btn--wa {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: visible;
  background: var(--cream);
  color: var(--navy-900);
  letter-spacing: 0;
  isolation: isolate;
}
.btn--wa::before { display: none; }
/* Esquinas del marco */
.btn--wa::after {
  content: "";
  position: absolute;
  inset: -8px;
  pointer-events: none;
  --c: rgba(214, 171, 130, .75);
  background:
    linear-gradient(var(--c), var(--c)) top left / 12px 1px,
    linear-gradient(var(--c), var(--c)) top left / 1px 12px,
    linear-gradient(var(--c), var(--c)) top right / 12px 1px,
    linear-gradient(var(--c), var(--c)) top right / 1px 12px,
    linear-gradient(var(--c), var(--c)) bottom left / 12px 1px,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 12px,
    linear-gradient(var(--c), var(--c)) bottom right / 12px 1px,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 12px;
  background-repeat: no-repeat;
  transition: inset .5s var(--ease-out), opacity .4s;
}
.btn .btn__frame {
  position: absolute;
  left: -8px; top: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  max-width: none;
  overflow: visible;
  pointer-events: none;
}
.btn__frame rect {
  x: .5px; y: .5px;
  width: calc(100% - 1px);
  height: calc(100% - 1px);
  fill: none;
  stroke: var(--bronze-soft);
  stroke-width: 1px;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .5s cubic-bezier(.65, 0, .35, 1);
}
.btn--wa:hover .btn__frame rect,
.btn--wa:focus-visible .btn__frame rect { stroke-dashoffset: 0; }
.btn--wa:hover::after { opacity: 0; }

.btn__ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  overflow: hidden;
  background: var(--navy-950);
  color: var(--bronze-soft);
}
.btn__ico::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bronze);
  transform: translateY(101%);
  transition: transform .5s var(--ease-out);
}
.btn .btn__ico .btn__wa { position: relative; width: 22px; height: 22px; transition: transform .6s var(--ease-out), color .3s; }
.btn__ico .btn__wa path { fill: currentColor; }
.btn--wa:hover .btn__ico::before { transform: none; }
.btn--wa:hover .btn__ico { color: var(--navy-950); }
.btn--wa:hover .btn__ico .btn__wa { transform: rotate(-10deg) scale(1.08); }

.btn__txt {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 15px 28px 15px 22px;
  text-align: left;
}
.btn__txt b {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: transform .5s var(--ease-out);
}
.btn__txt small {
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bronze-dark);
}
.btn--wa:hover .btn__txt b { transform: translateX(3px); }

/* Link secundario con flecha en círculo */
.link-arrow--go { display: inline-flex; align-items: center; gap: 14px; }
.link-arrow--go::after { right: 52px; }
.link-arrow__go {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ivory-30);
  border-radius: 50%;
  transition: background-color .4s var(--ease-out), border-color .4s;
}
.link-arrow__go svg { width: 14px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.3; transition: transform .45s var(--ease-out); }
.link-arrow--go:hover .link-arrow__go { background: var(--bronze-soft); border-color: var(--bronze-soft); color: var(--navy-950); }
.link-arrow--go:hover .link-arrow__go svg { transform: translateX(3px); }

@media (max-width: 560px) {
  .btn--wa { width: 100%; }
  .btn__txt { flex: 1; }
}
.btn:hover .btn__frame { transform: none; }

/* Menos es más: el link con círculo no lleva subrayado; CTA en una línea */
.link-arrow--go::after { display: none; }
.btn--wa .btn__txt { padding: 21px 32px 21px 26px; }

/* Mobile: el CTA tiene que entrar en la primera pantalla (Safari con barras incluidas) */
@media (max-width: 560px) {
  .hero { min-height: 100vh; min-height: 100svh; }
  .hero__media { height: 42vh; height: 42svh; }
  .hero__content { padding-top: calc(42vh - 64px); padding-top: calc(42svh - 64px); padding-bottom: 18px; }
  .hero__eyebrow { margin-bottom: 14px; }
  .hero__title { font-size: clamp(28px, 8vw, 38px); line-height: 1.04; }
  .hero__lead { margin-top: 14px; font-size: 14.5px; line-height: 1.6; }
  .hero__ctas { margin-top: 22px; gap: 16px 28px; }
  .btn--wa .btn__txt { padding: 18px 24px; }
}
.nav__trigger svg { flex: none; }
/* Con Propiedad Horizontal sumado, la nav necesita un poco menos de aire en notebooks */
@media (max-width: 1500px) {
  .nav__list { gap: clamp(12px, 1.3vw, 22px); }
  .nav__link { letter-spacing: .07em; }
}


/* =========================================================
   Cursor y barra de scroll a medida
   ========================================================= */
@media (hover: hover) and (pointer: fine) {
  html, body { cursor: url("../img/cursor.svg") 4 3, auto; }
  a, button, summary, label, select, [role="button"], [data-magnetic], .card, .wa-float {
    cursor: url("../img/cursor-mano.svg") 11 4, pointer;
  }
  input, textarea, [contenteditable] { cursor: text; }
}

html { scrollbar-width: thin; scrollbar-color: var(--navy-900) var(--cream); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb {
  background: var(--navy-900);
  border: 3px solid var(--cream);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--bronze); }
::selection { background: var(--bronze); color: #fff; }
@media (min-width: 1201px) { .header__actions:empty, .header__actions:not(:has(*:not(.burger))) { display: none; } }

/* "Estudio en Pilar" dentro del bloque del hero: siempre visible de entrada */
.hero__zones { position: static; margin-top: clamp(28px, 5vh, 48px); padding: 0; }
.hero__content { padding-bottom: clamp(36px, 7vh, 80px); }
@media (max-width: 1024px) { .hero__zones { width: auto; padding: 0; } }
