/* =============================================================
   esrenting.co — hoja de estilos  ·  identidad "Expediente"
   El dominio presentado como la ficha de un único activo
   inmobiliario: eyebrows en monoespaciada como campos de un
   registro, filete dorado, y una LÍNEA DE CUMBRERA que dibuja
   un tejado sobre el horizonte al pie del héroe. El sello
   "SE VENDE" es el gesto fuerte; todo lo demás, en voz baja.
   Tipografía: Source Serif 4 (voz) + Instrument Sans (texto)
   + Space Mono (campos y sello). Todo autoalojado, sin CDN.
   ============================================================= */

/* ---------- Fuentes autoalojadas ---------- */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/source-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/source-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/instrument-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/instrument-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/space-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/space-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #fbfaf7; /* blanco cálido — fondo base */
  --paper-2: #f1f0ea; /* gris muy claro cálido — banda de sección */
  --ink: #1e2a28; /* carbón atenuado con verdor — texto principal */
  --ink-soft: #55605c; /* texto secundario (AA sobre --paper) */
  --petrol: #1e4e48; /* azul petróleo — color principal / CTA */
  --petrol-deep: #163a35; /* hover del CTA */
  --sage: #8aa398; /* verde salvia — solo filetes / iconos decorativos */
  --gold: #9a7b3f; /* dorado apagado — SOLO filetes / puntos decorativos */
  --gold-ink: #6f5a1e; /* ocre oscuro — el dorado como TEXTO (contraste AA) */
  --gold-soft: rgba(154, 123, 63, 0.5);
  --line: rgba(30, 42, 40, 0.14); /* filete sobre claro */
  --line-strong: rgba(30, 42, 40, 0.26);
  --sold: #b23124; /* rojo vivo — sello "SE VENDE" (AA sobre --paper) */

  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, "Cascadia Code", Consolas,
    "Liberation Mono", monospace;

  --wrap: 68rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --fs-label: 0.72rem;
  --fs-h1: clamp(2.85rem, 6vw + 1rem, 6rem);
  --fs-h2: clamp(1.85rem, 2.6vw + 1rem, 2.85rem);
  --fs-lead: clamp(1.12rem, 0.6vw + 1rem, 1.4rem);
  --fs-body: 1.0625rem;
}

/* ---------- Reset ligero ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1,
h2,
h3,
p,
dl,
dd,
figure {
  margin: 0;
}
a {
  color: inherit;
}
svg {
  display: block;
}
::selection {
  background: var(--petrol);
  color: var(--paper);
}
:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- Utilidades ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.4rem;
  font-family: var(--mono);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--gold);
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--petrol);
  color: var(--paper);
  padding: 0.6rem 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 1rem;
}

/* ---------- Botón ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  max-width: 100%;
  padding: 0.95rem 1.6rem;
  border-radius: 3px;
  background: var(--petrol);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(30, 42, 40, 0.04);
  transition: transform 0.22s var(--ease), background-color 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}
.btn svg {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}
.btn > span {
  overflow-wrap: anywhere;
}
.btn__arrow {
  transition: transform 0.22s var(--ease);
}
.btn:hover {
  background: var(--petrol-deep);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -18px rgba(22, 58, 53, 0.9);
}
.btn:hover .btn__arrow {
  transform: translateX(3px);
}
.btn:active {
  transform: translateY(0);
}

/* Correo en formato "campo" */
.readout {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.readout a {
  color: var(--petrol);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-soft);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease);
}
.readout a:hover {
  border-bottom-color: var(--petrol);
}

/* ---------- Cabecera ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 40;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand__mark {
  width: 1.55rem;
  height: 1.55rem;
  flex: none;
  color: var(--petrol);
}
.nav-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.5rem 0;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.15rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s var(--ease);
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- Héroe ---------- */
.hero {
  position: relative;
  overflow: clip;
  min-height: 90svh;
  display: flex;
  align-items: center;
  padding: 7rem 0 5rem;
  background: linear-gradient(180deg, var(--paper) 0%, #f7f6f1 100%);
  isolation: isolate;
}
.hero__inner {
  position: relative;
  width: 100%;
}
.hero__title {
  font-family: var(--display);
  font-weight: 360;
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: -0.022em;
  color: var(--ink);
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.12s forwards;
}
.hero__title .tld {
  color: var(--petrol);
}
.hero__sub {
  margin-top: 1.5rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.2vw + 1rem, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--petrol);
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.24s forwards;
}
.hero__lede {
  margin-top: 1.1rem;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.6;
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.36s forwards;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.6rem;
  margin-top: 2.4rem;
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.48s forwards;
}
.hero__eyebrow {
  opacity: 0;
  animation: rise 0.8s var(--ease) 0s forwards;
}

/* --- Línea de cumbrera: la firma tranquila --- */
.ridge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3rem;
  pointer-events: none;
}
.ridge__line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0,
    var(--line-strong) 6%,
    var(--line-strong) 42%,
    transparent 44%,
    transparent 56%,
    var(--line-strong) 58%,
    var(--line-strong) 94%,
    transparent 100%
  );
}
.ridge__gable {
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 5.5rem;
  height: 3rem;
  transform: translateX(-50%);
  color: var(--petrol);
  opacity: 0.55;
}
.scroll-cue {
  position: absolute;
  left: var(--gutter);
  bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  opacity: 0;
  animation: fade 0.8s var(--ease) 1s forwards;
}
.scroll-cue svg {
  width: 0.85rem;
  height: 0.85rem;
  animation: nudge 2.6s var(--ease) infinite;
}
.scroll-cue:hover {
  color: var(--petrol);
}

/* --- Sello "SE VENDE" — timbre en rojo vivo.
   Anclado a la esquina superior derecha del héroe (no al bloque de
   contenido, que va centrado), para no tapar nunca el H1 ni el CTA. --- */
.hero__stamp {
  --rot: -7deg;
  position: absolute;
  top: 5.25rem;
  right: clamp(0.85rem, 5vw, 1.5rem);
  width: clamp(6.25rem, 24vw, 8rem);
  height: auto;
  color: var(--sold);
  opacity: 0.92;
  transform: rotate(var(--rot));
  pointer-events: none;
  animation: stamp-in 0.5s var(--ease) 0.7s backwards;
}
@media (min-width: 40rem) {
  .hero__stamp {
    top: 6rem;
    width: clamp(9rem, 20vw, 11rem);
  }
}
@media (min-width: 56rem) {
  .hero__stamp {
    --rot: -8deg;
    top: 5.5rem;
    right: max(1.25rem, calc((100vw - var(--wrap)) / 2 + 1rem));
    width: clamp(11rem, 18vw, 13rem);
  }
}
.hero__stamp .stamp__frame {
  fill: none;
  stroke: currentColor;
}
.hero__stamp text {
  fill: currentColor;
  text-anchor: middle;
}
.stamp__sm {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 4px;
}
.stamp__lg {
  font-family: var(--display);
  font-weight: 600;
  font-size: 40px;
  letter-spacing: 1px;
}
.stamp__xs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
}

/* ---------- Secciones ---------- */
.section {
  padding-block: clamp(4.5rem, 10vw, 8rem);
}
.section--band {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}
.section__head {
  max-width: 44rem;
}
.section__title {
  font-family: var(--display);
  font-weight: 560;
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 1.5rem;
}
.section__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--petrol);
}
.lede {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: var(--ink);
}
.lede strong {
  font-weight: 600;
}

/* --- Tres pilares con iconos propios --- */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  border-top: 1px solid var(--line);
}
.pillar {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}
.pillar__ico {
  width: 1.7rem;
  height: 1.7rem;
  color: var(--petrol);
}
.pillar__name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.9rem 0 0.4rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.pillar__text {
  color: var(--ink-soft);
  font-size: 0.99rem;
  line-height: 1.6;
  max-width: 30rem;
}
.pillar__text b {
  color: var(--ink);
  font-weight: 600;
}
@media (min-width: 52rem) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 2.5rem;
  }
  .pillar {
    padding: 2.25rem 0 0;
    border-bottom: none;
    border-top: 2px solid var(--petrol);
  }
}

.coda {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  max-width: 32ch;
}
.coda__tag {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.coda p {
  margin-top: 0.9rem;
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.45rem, 2vw + 1rem, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ---------- Contacto ---------- */
.contact {
  padding-block: clamp(4.5rem, 10vw, 8rem);
}
.contact__inner {
  max-width: 44rem;
}
.contact__title {
  font-family: var(--display);
  font-weight: 560;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin: 0 0 1.3rem;
}
.contact__text {
  color: var(--ink-soft);
  font-size: var(--fs-lead);
  line-height: 1.55;
  font-family: var(--display);
  font-weight: 400;
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.6rem;
  margin-top: 2.4rem;
}
.contact__note {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.contact__alt {
  margin-top: 1.5rem;
}

/* ---------- Pie ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding-block: 2.5rem 3rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
}
.site-footer__meta {
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-size: 0.9rem;
}
.site-footer__links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease);
}
.site-footer__links a:hover {
  border-bottom-color: var(--gold);
}

/* ---------- Páginas legales ---------- */
.legal {
  padding: 8rem 0 5rem;
}
.legal__inner {
  max-width: 44rem;
}
.legal h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.1rem, 3vw + 1rem, 3rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}
.legal__updated {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
}
.legal h2 {
  font-family: var(--display);
  font-weight: 560;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 2.6rem 0 0.8rem;
  color: var(--ink);
}
.legal p,
.legal li {
  color: var(--ink-soft);
  line-height: 1.7;
}
.legal p + p {
  margin-top: 1rem;
}
.legal strong {
  color: var(--ink);
  font-weight: 600;
}
.legal ul {
  margin: 1rem 0;
  padding-left: 1.1rem;
}
.legal li + li {
  margin-top: 0.5rem;
}
.legal a {
  color: var(--petrol);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--gold-soft);
}
.legal a:hover {
  text-decoration-color: currentColor;
}
.legal__data {
  margin: 1.4rem 0;
  border-top: 1px solid var(--line);
}
.legal__data div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.legal__data dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.legal__data dd {
  margin: 0;
  color: var(--ink-soft);
}
@media (min-width: 40rem) {
  .legal__data div {
    grid-template-columns: 12rem 1fr;
    gap: 1.5rem;
    align-items: baseline;
  }
}
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 3rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--petrol);
  text-decoration: none;
}
.back-home svg {
  width: 0.9rem;
  height: 0.9rem;
}
.back-home:hover {
  color: var(--ink);
}

/* ---------- Revelado al hacer scroll ---------- */
@media (scripting: enabled) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Animaciones ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade {
  to {
    opacity: 1;
  }
}
@keyframes nudge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}
@keyframes stamp-in {
  from {
    opacity: 0;
    transform: rotate(var(--rot)) scale(1.15);
  }
  to {
    opacity: 0.92;
    transform: rotate(var(--rot)) scale(1);
  }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero__eyebrow,
  .hero__title,
  .hero__sub,
  .hero__lede,
  .hero__actions,
  .scroll-cue {
    opacity: 1;
  }
  .hero__stamp {
    animation: none;
    opacity: 0.92;
    transform: rotate(var(--rot));
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
