@font-face { font-family: "Prata"; src: url("fonts/prata-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url("fonts/karla-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Karla"; src: url("fonts/karla-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --zaguan: #1b1630;      /* noche de zaguán: fondos oscuros y texto */
  --revoque: #f3efe8;     /* revoque a la cal: fondo */
  --revoque-sombra: #e8e1d6;
  --ciruela: #6b2d5c;     /* vitral ciruela: acento, texto y botones sobre claro (8,3:1) */
  --vitral: #e9a0c8;      /* vitral rosa sobre zaguán (7,7:1) */
  --bronce: #b08d4f;      /* picaporte de bronce: solo decorativo */
  --ambar: #f0c98a;       /* luz del zaguán: solo decorativo */
  --texto-suave: #4a4458;
  --radio: 4px;
  --display: "Prata", "Didot", Georgia, serif;
  --texto: "Karla", system-ui, sans-serif;
  --px: clamp(1rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--revoque); color: var(--zaguan); font: 400 1.0625rem/1.6 var(--texto); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0 0 .6em; }
h2 { font-size: clamp(1.9rem, 5vw, 3.2rem); max-width: 18ch; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ciruela); outline-offset: 3px; }
.contenedor { max-width: 1200px; margin: 0 auto; padding: 0 var(--px); }
.kicker { font-weight: 600; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ciruela); }

.franja { position: fixed; inset: 0 0 auto; z-index: 60; margin: 0; padding: .45rem var(--px); background: var(--zaguan); color: var(--revoque); font-size: .78rem; text-align: center; line-height: 1.35; }
.barra { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; padding: 3.4rem var(--px) .8rem; background: color-mix(in srgb, var(--revoque) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--revoque-sombra); }
.marca { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--display); font-size: 1.15rem; line-height: 1.1; }
.marca small { display: block; font: 600 .7rem/1 var(--texto); letter-spacing: .16em; text-transform: uppercase; color: var(--ciruela); }
.marca-ico { width: 34px; height: 34px; fill: none; stroke: var(--ciruela); stroke-width: 2; }
.barra ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.barra nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .7rem; text-decoration: none; font-weight: 600; font-size: .95rem; }
.barra nav a:hover { color: var(--ciruela); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .75rem 1.4rem; border-radius: var(--radio); border: 2px solid var(--ciruela); font: 600 1rem/1.2 var(--texto); text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.btn-principal { background: var(--ciruela); color: #fff; }
.btn-principal:hover { background: var(--zaguan); border-color: var(--zaguan); }
.btn-sec { background: transparent; color: var(--ciruela); }
.btn-sec:hover { background: var(--ciruela); color: #fff; }

/* HERO: la puerta de zaguán */
.hero { display: grid; gap: 2rem; align-items: center; padding: 2.5rem var(--px) 4rem; max-width: 1280px; margin: 0 auto; min-height: calc(100svh - 7rem); }
.titulo { font-size: clamp(3.2rem, 14vw, 8.5rem); letter-spacing: -.01em; color: var(--zaguan); perspective: 600px; margin-bottom: .25em; }
.titulo .letra { display: inline-block; transform-origin: 50% 100%; }
.bajada { font-size: clamp(1.1rem, 2.4vw, 1.3rem); max-width: 34ch; color: var(--texto-suave); }
.hero-acciones { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1.2rem; }
.matricula-hero { font-size: .85rem; color: var(--texto-suave); border-left: 2px solid var(--bronce); padding-left: .75rem; max-width: 40ch; }

.portal { --px-o: 50%; --py-o: 40%; perspective: 1100px; perspective-origin: var(--px-o) var(--py-o); width: min(100%, 440px); margin: 0 auto; }
.escena { position: relative; aspect-ratio: 3 / 5; transform-style: preserve-3d; }
.zaguan { position: absolute; inset: 22% 6% 0; background: linear-gradient(var(--zaguan), #2b2347); overflow: hidden; }
.luz { position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 30%, var(--ambar), transparent 70%); opacity: .55; }
.baldosas { position: absolute; inset: 62% 0 0; background: repeating-conic-gradient(#d9cdb8 0 25%, #8c3f6e 0 50%) 0 0 / 28px 28px; transform: perspective(300px) rotateX(55deg); transform-origin: top; opacity: .8; }
.abanico { position: absolute; left: 6%; right: 6%; top: 0; width: 88%; height: auto; overflow: visible; }
.abanico .trazo { fill: none; stroke: var(--zaguan); stroke-width: 4; stroke-linecap: round; }
.abanico .vidrio { fill: var(--vitral); opacity: .55; }
.abanico .v2 { fill: var(--ambar); }
.hoja { position: absolute; top: 22%; bottom: 0; width: 44%; transform-style: preserve-3d; }
.hoja-izq { left: 6%; transform-origin: 0 50%; }
.hoja-der { right: 6%; transform-origin: 100% 50%; }
.capa { position: absolute; inset: 0; display: block; }
.marco { background: #2a2140; border: 3px solid #3a2f55; }
.tablero { inset: 4% 8%; background: #3a2f55; transform: translateZ(4px); }
.vitral { inset: 7% 14% 40%; background: linear-gradient(160deg, var(--vitral), var(--ciruela) 70%); opacity: .85; transform: translateZ(6px); }
.reja { width: 100%; height: 100%; fill: none; stroke: var(--bronce); stroke-width: 2.2; transform: translateZ(12px); }
.picaporte { inset: auto; top: 58%; width: 10px; height: 26px; border-radius: 5px; background: var(--bronce); transform: translateZ(18px); }
.hoja-izq .picaporte { right: 8%; }
.hoja-der .picaporte { left: 8%; }
.umbral { position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: var(--bronce); }

/* Secciones */
.seccion { padding: clamp(4rem, 10vw, 7rem) 0; }
.dos-col { display: grid; gap: 2rem; }
.texto-largo { font-size: 1.15rem; max-width: 52ch; }
.nosotros, .diferenciales { background: var(--revoque-sombra); }

.buscador { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1.5rem 0 1rem; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
select, input, textarea { width: 100%; min-height: 48px; padding: .6rem .8rem; border: 1.5px solid #8a8197; border-radius: var(--radio); background: #fff; color: var(--zaguan); font: 400 1rem var(--texto); }
.resultados { font-weight: 600; color: var(--ciruela); }
.res-num { font-family: var(--display); font-size: 1.6rem; }

.fichas, .servicios-lista, .dif-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.tilt { transform-style: preserve-3d; transition: transform .25s ease-out; }
.ficha { background: #fff; border: 1px solid var(--revoque-sombra); border-radius: var(--radio); }
.ficha[hidden] { display: none; }
.ficha-ilu { position: relative; padding: 1.2rem; background: var(--zaguan); transform-style: preserve-3d; }
.ficha-ilu svg { display: block; width: 100%; height: auto; transform: translateZ(40px); }
.ficha-ilu .trazo, .ico .trazo, .mapa .trazo { fill: none; stroke: var(--vitral); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.codigo { position: absolute; top: .7rem; right: .7rem; padding: .2rem .55rem; background: var(--vitral); color: var(--zaguan); font-weight: 600; font-size: .8rem; transform: translateZ(55px); }
.ejemplo .codigo { background: var(--revoque); }
.ficha-cuerpo { padding: 1.2rem; }
.ficha-tipo { font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-suave); margin-bottom: .4rem; }
.precio { font-family: var(--display); font-size: 1.7rem; color: var(--ciruela); margin-bottom: .2rem; }
.ficha-nota { color: var(--texto-suave); }
.btn-wa { width: 100%; background: #146c43; border-color: #146c43; color: #fff; }
.btn-wa:hover { background: var(--zaguan); border-color: var(--zaguan); }
.ficha-mini { font-size: .8rem; color: var(--texto-suave); margin: .6rem 0 0; }

.servicio { position: relative; padding: 1.6rem; background: var(--zaguan); color: var(--revoque); border-radius: var(--radio); }
.servicio .num { position: absolute; top: 1rem; right: 1.2rem; font-family: var(--display); font-size: 2.4rem; color: var(--vitral); transform: translateZ(50px); }
.servicio .ico { transform: translateZ(40px); }
.ico { width: 52px; height: 52px; margin-bottom: 1rem; }
.dif-lista .ico .trazo { stroke: var(--ciruela); }
.dif-lista li { padding-top: 1.2rem; border-top: 2px solid var(--bronce); }

.tasacion { background: var(--zaguan); color: var(--revoque); }
.tasacion .kicker { color: var(--vitral); }
.form { display: grid; gap: .9rem; padding: 1.5rem; background: var(--revoque); color: var(--zaguan); border-radius: var(--radio); }
.form-demo { justify-self: start; margin: 0; padding: .2rem .6rem; background: var(--revoque-sombra); color: var(--ciruela); font-weight: 600; font-size: .8rem; }
.form-estado { margin: 0; font-weight: 600; color: var(--ciruela); min-height: 1.6em; }

.datos { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.datos span { display: block; font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ciruela); }
.datos a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 1rem; font-weight: 600; }
.mapa { display: block; background: var(--zaguan); border-radius: var(--radio); padding: 1rem; text-decoration: none; color: var(--revoque); }
.mapa svg { width: 100%; height: auto; }
.mapa .calle { fill: none; stroke: #3a2f55; stroke-width: 14; }
.mapa text { fill: var(--revoque); font: 600 12px var(--texto); }
.mapa .pin path { fill: var(--vitral); }
.mapa .pin circle { fill: var(--zaguan); }
.mapa .pin-txt { fill: var(--vitral); font-size: 16px; }
.mapa-txt { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; text-decoration: underline; }

.pie { padding: 3rem 0; background: var(--zaguan); color: var(--revoque); font-size: .9rem; }
.pie-marca { font-family: var(--display); font-size: 1.5rem; }
.pie-leomak { color: var(--vitral); font-weight: 600; margin: 1.5rem 0 0; }

.cursor { display: none; }

@media (min-width: 720px) {
  .buscador { grid-template-columns: repeat(4, 1fr); }
  .fichas, .servicios-lista, .dif-lista { grid-template-columns: repeat(3, 1fr); }
  .dos-col { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
  .franja { font-size: .85rem; }
  .barra { padding-top: 2.8rem; }
}
@media (min-width: 980px) {
  .hero { grid-template-columns: 1.1fr .9fr; }
}

/* Movimiento: solo sin reduced-motion */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: subir linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
    .escena { animation: entrar linear both; animation-timeline: scroll(root); animation-range: 0 80vh; }
  }
  .cursor-on, .cursor-on a, .cursor-on button, .cursor-on select, .cursor-on input { cursor: none; }
  .cursor-on .cursor { display: block; position: fixed; top: 0; left: 0; z-index: 70; pointer-events: none; }
  .cursor span { display: block; width: 18px; height: 28px; margin: -14px 0 0 -9px; background: var(--ciruela); clip-path: path("M9 0a7 7 0 0 1 4 12.7L17 28H1l4-15.3A7 7 0 0 1 9 0z"); transition: width .25s, height .25s, margin .25s, clip-path .25s, border-radius .25s, background .25s; }
  .cursor.en-link span { width: 44px; height: 44px; margin: -22px 0 0 -22px; clip-path: none; border-radius: 50%; background: color-mix(in srgb, var(--vitral) 55%, transparent); }
}
@keyframes subir { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: none; } }
@keyframes entrar { to { transform: translateZ(260px) translateY(6%); } }

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