@font-face { font-family: "DM Serif Display"; src: url("fonts/dm-serif-display-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mulish"; src: url("fonts/mulish-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mulish"; src: url("fonts/mulish-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --tablero: #152326;      /* fondos oscuros y texto */
  --manila: #f3ead6;       /* fondo: el cartón de las etiquetas de llave */
  --manila-sombra: #e8dcc2;
  --petroleo: #0f5c63;     /* acento sobre manila (6,2:1), texto blanco encima (7,4:1) */
  --agua: #8fd3cf;         /* acento sobre tablero (9,4:1) */
  --laton: #c39a4a;        /* metálico del rubro: solo decorativo */
  --hilo: #c23b2a;         /* hilo de la etiqueta: solo decorativo */
  --wa: #146c43;
  --display: "DM Serif Display", Georgia, serif;
  --texto: "Mulish", system-ui, sans-serif;
  --franja: 2.5rem;
  --radio: 4px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--franja) + 4.5rem); }
body { margin: 0; background: var(--manila); color: var(--tablero); font: 400 1rem/1.6 var(--texto); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--petroleo); outline-offset: 3px; }

.franja { position: fixed; inset: 0 0 auto; z-index: 50; margin: 0; min-height: var(--franja); display: grid; place-items: center; padding: .4rem 1rem; background: var(--tablero); color: var(--manila); font-size: .8rem; text-align: center; }
.saltar { position: absolute; left: 1rem; top: -4rem; z-index: 60; background: var(--petroleo); color: #fff; padding: .7rem 1rem; }
.saltar:focus { top: calc(var(--franja) + .5rem); }

.cabecera { position: sticky; top: var(--franja); z-index: 40; margin-top: var(--franja); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding: .7rem clamp(1rem, 4vw, 3rem); background: color-mix(in srgb, var(--manila) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--manila-sombra); }
.marca { font-family: var(--display); font-size: 1.6rem; text-decoration: none; line-height: 1; }
.marca span { display: block; font: 600 .68rem/1.4 var(--texto); letter-spacing: .22em; text-transform: uppercase; color: var(--petroleo); }
.cabecera ul { display: flex; flex-wrap: wrap; gap: 0 1.1rem; }
.cabecera nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .95rem; text-decoration: none; }
.cabecera nav a:hover { color: var(--petroleo); text-decoration: underline; text-underline-offset: 4px; }

.antetitulo { font-weight: 600; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--petroleo); }

.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.4rem; border: 2px solid transparent; border-radius: var(--radio); font: 600 1rem/1.2 var(--texto); text-decoration: none; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease); }
.boton-primario { background: var(--petroleo); color: #fff; }
.boton-primario:hover { background: var(--tablero); }
.boton-secundario { border-color: currentColor; }
.boton-secundario:hover { background: var(--tablero); color: var(--manila); }
.boton-wa { background: var(--wa); color: #fff; }
.boton-wa:hover { background: #0e5233; }

/* HERO: el tablero de llaves */
.hero { position: relative; padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 4vw, 3rem) 3rem; background: var(--tablero); color: var(--manila); overflow: hidden; }
.hero .antetitulo { color: var(--agua); }
.hero-texto { max-width: 46rem; margin-inline: auto; text-align: center; position: relative; z-index: 2; }
.hero-titulo { font-size: clamp(3.6rem, 15vw, 9.5rem); letter-spacing: -.01em; margin-bottom: .2em; perspective: 600px; }
.hero-titulo .letra { display: inline-block; transform-origin: 50% 100%; }
.bajada { font-size: clamp(1.05rem, 2.2vw, 1.25rem); max-width: 36rem; margin-inline: auto; }
.hero-acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 1.6rem; }
.hero .boton-primario { background: var(--agua); color: var(--tablero); }
.hero .boton-primario:hover { background: var(--manila); }
.hero .boton-secundario { color: var(--manila); }
.hero .boton-secundario:hover { background: var(--manila); color: var(--tablero); }

.escena { perspective: 1100px; margin: 2.5rem auto 0; max-width: 64rem; }
.tablero { --rx: 8deg; --ry: 0deg; position: relative; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); padding: 1.4rem clamp(.5rem, 3vw, 2rem) 2rem; border-radius: 6px; background: repeating-linear-gradient(90deg, #1d3034 0 3px, #1a2c30 3px 9px), #1b2d31; box-shadow: inset 0 0 0 1px #2c4247, 0 30px 60px -30px #000; }
.tablero-barra { position: absolute; left: 4%; right: 4%; top: 1.4rem; height: 6px; border-radius: 3px; background: var(--laton); transform: translateZ(10px); }
.llaves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem .5rem; transform-style: preserve-3d; }
.llave { display: flex; justify-content: center; transform-style: preserve-3d; transform: translateZ(18px); }
.llave:nth-child(-n+3) { padding-top: .2rem; }
.llave-cuerpo { position: relative; transform-origin: 50% 6%; transform-style: preserve-3d; }
.llave-svg { display: block; width: clamp(34px, 6vw, 46px); height: auto; }
.argolla { fill: none; stroke: var(--laton); stroke-width: 3; }
.ojo, .cana { fill: var(--laton); }
.ojo-hueco { fill: #1b2d31; }
.etiqueta { position: absolute; left: 62%; top: 30%; transform: translateZ(28px) rotate(-6deg); display: block; width: max-content; max-width: 8.5rem; padding: .35rem .55rem .35rem 1rem; background: var(--manila); color: var(--tablero); border-radius: 2px 10px 10px 2px; font-size: .72rem; line-height: 1.25; box-shadow: 0 6px 12px -6px #000; }
.etiqueta::before { content: ""; position: absolute; left: .35rem; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--tablero); box-shadow: 0 0 0 2px var(--hilo); }
.etiqueta b { display: block; font: 400 1rem/1.1 var(--display); color: var(--petroleo); }

.contadores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-width: 46rem; margin: 2.5rem auto 0; text-align: center; }
.contadores div { border-top: 1px solid #2c4247; padding-top: .8rem; }
.contadores dt { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; order: 2; }
.contadores div { display: flex; flex-direction: column-reverse; }
.contadores dd { margin: 0; font: 400 clamp(2.4rem, 6vw, 3.4rem)/1 var(--display); color: var(--agua); }
.contadores-nota { text-align: center; font-size: .8rem; opacity: .85; margin-top: 1rem; }

/* PROPIEDADES */
.propiedades, .servicios, .porque, .tasacion, .contacto, .sobre { padding: clamp(3.5rem, 9vw, 6.5rem) clamp(1rem, 4vw, 3rem); }
.seccion-cabeza { max-width: 44rem; margin-bottom: 2rem; }
.buscador { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; padding: 1rem; margin-bottom: 2rem; background: var(--tablero); color: var(--manila); border-radius: 6px; }
.buscador label { display: grid; gap: .3rem; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
select, input { width: 100%; min-height: 48px; padding: .6rem .7rem; border: 2px solid #5b6f73; border-radius: var(--radio); background: var(--manila); color: var(--tablero); font: 400 1rem var(--texto); }
.buscador select { border-color: transparent; }
.resultados { grid-column: 1 / -1; margin: .2rem 0 0; font-size: 1rem; }
.resultados-n { font: 400 2rem/1 var(--display); color: var(--agua); }

.fichas { display: grid; gap: 1.2rem; }
.ficha { display: grid; grid-template-rows: auto 1fr; background: #fbf6ea; border: 1px solid var(--manila-sombra); border-radius: 6px; transform-style: preserve-3d; transition: box-shadow .3s var(--ease); }
.ficha:hover { box-shadow: 0 24px 40px -24px rgb(21 35 38 / .45); }
.ficha[hidden] { display: none; }
.ficha-ilustra { position: relative; display: grid; place-items: center; padding: 1rem; background: var(--manila-sombra); border-radius: 6px 6px 0 0; transform: translateZ(30px); }
.trazo { width: 100%; max-width: 160px; height: auto; fill: none; stroke: var(--petroleo); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ficha-codigo { position: absolute; top: .7rem; right: .8rem; padding: .1rem .5rem; background: var(--manila); border-radius: 2px 8px 8px 2px; font: 400 .95rem var(--display); color: var(--petroleo); }
.ficha-texto { padding: 1.1rem 1.1rem 1.3rem; display: flex; flex-direction: column; }
.ficha-op { margin: 0 0 .3rem; font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--petroleo); }
.ficha-dato { font-size: .95rem; }
.ficha-precio { font: 400 1.6rem/1 var(--display); margin-top: auto; }
.ficha-precio-consultar { font-size: 1.3rem; color: var(--petroleo); }
.ficha .boton-wa { width: 100%; }
.sin-resultados { padding: 1.5rem; border: 2px dashed var(--petroleo); border-radius: 6px; }

/* SOBRE */
.sobre { background: var(--manila-sombra); }
.sobre-grid { display: grid; gap: 1.5rem; max-width: 64rem; margin-inline: auto; }
.sobre p { font-size: 1.15rem; max-width: 38rem; }

/* SERVICIOS */
.servicios-lista { display: grid; gap: 1.2rem; perspective: 900px; }
.servicio { position: relative; padding: 1.6rem 1.4rem; background: var(--tablero); color: var(--manila); border-radius: 6px; transform-style: preserve-3d; }
.servicio-num { display: block; font: 400 2.6rem/1 var(--display); color: var(--agua); transform: translateZ(36px); margin-bottom: .6rem; }
.servicio:nth-child(2) { background: var(--petroleo); }
.servicio:nth-child(2) .servicio-num { color: var(--manila); }

/* POR QUÉ */
.porque { max-width: 70rem; margin-inline: auto; }
.porque-lista { display: grid; gap: 2rem; }
.icono { width: 56px; height: 56px; margin-bottom: .6rem; }

/* TASACIÓN */
.tasacion { display: grid; gap: 2rem; background: var(--tablero); color: var(--manila); }
.tasacion .antetitulo { color: var(--agua); }
.formulario { display: grid; gap: 1rem; padding: 1.4rem; background: var(--manila); color: var(--tablero); border-radius: 6px; }
.formulario label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.aviso-demo { justify-self: start; margin: 0; padding: .2rem .6rem; border: 1px solid var(--petroleo); border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--petroleo); }
.form-estado { margin: 0; font-weight: 600; color: var(--petroleo); }

/* CONTACTO */
.contacto-grid { display: grid; gap: 1.5rem; }
.contacto-tel { font: 400 clamp(2rem, 7vw, 3.4rem)/1.1 var(--display); }
.contacto-tel a { text-decoration: none; }
.boton-grande { width: 100%; min-height: 56px; font-size: 1.05rem; }
.pendiente { padding: 1.3rem; border: 2px dashed var(--petroleo); border-radius: 6px; }

.pie { padding: 2.5rem clamp(1rem, 4vw, 3rem) 3rem; background: var(--tablero); color: var(--manila); font-size: .95rem; }
.pie-marca { font: 400 1.8rem var(--display); }
.pie-credito { margin-top: 1.5rem; color: var(--agua); }

/* Cursor: argolla de llavero */
.cursor { position: fixed; left: 0; top: 0; z-index: 70; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid var(--laton); border-radius: 50%; pointer-events: none; transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background .25s var(--ease); }
.cursor::after { content: ""; position: absolute; left: 50%; top: 100%; width: 10px; height: 14px; margin-left: -5px; background: var(--laton); border-radius: 2px 2px 6px 6px; transform-origin: 50% 0; transform: rotate(var(--ladeo, 0deg)); transition: opacity .2s; }
.cursor.sobre-link { width: 40px; height: 40px; margin: -20px 0 0 -20px; background: color-mix(in srgb, var(--laton) 40%, transparent); }
.cursor.sobre-link::after { opacity: 0; }
.con-cursor, .con-cursor a, .con-cursor button, .con-cursor select, .con-cursor label { cursor: none; }

@media (min-width: 640px) {
  .buscador { grid-template-columns: repeat(4, 1fr) auto; align-items: end; }
  .resultados { grid-column: auto; margin: 0; text-align: right; }
  .fichas { grid-template-columns: repeat(2, 1fr); }
  .contadores { grid-template-columns: repeat(4, 1fr); }
  .llaves { grid-template-columns: repeat(6, 1fr); }
  .llave:nth-child(even) { padding-top: 1.2rem; }
}
@media (min-width: 960px) {
  .fichas { grid-template-columns: repeat(3, 1fr); }
  .servicios-lista, .porque-lista { grid-template-columns: repeat(3, 1fr); }
  .servicio:nth-child(2) { margin-top: 2rem; }
  .sobre-grid { grid-template-columns: 1.1fr 1fr; align-items: end; }
  .tasacion { grid-template-columns: 1fr 1.2fr; align-items: start; }
  .contacto-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* Movimiento: solo si el usuario lo acepta */
@media (prefers-reduced-motion: no-preference) {
  .js .llave, .js .hero-titulo .letra { opacity: 0; }
  .js .trazo path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  @supports (animation-timeline: view()) {
    .revelar { animation: subir linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    .escena { animation: recostar linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  }
}
@keyframes subir { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes recostar { to { transform: rotateX(38deg) translateZ(-160px) translateY(40px); opacity: .4; } }

@media (prefers-reduced-motion: reduce) {
  .tablero { transform: none; }
  .etiqueta, .ficha-ilustra, .servicio-num, .llave { transform: none; }
  .etiqueta { transform: rotate(-6deg); }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
