/* Casas en Tornquist — concepto "Postales de la comarca" (Leomak.Soft) */
@font-face { font-family: "Calistoga"; src: url("fonts/calistoga-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Kumbh Sans"; src: url("fonts/kumbh-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Kumbh Sans"; src: url("fonts/kumbh-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --postal: #f5ecda;
  --carton: #e9dcc0;
  --azul: #23497a;
  --azul-2: #2f5d97;
  --rojo: #b13a2e;
  --serrano: #4f6b3a;
  --tinta: #1e1b16;
  --suave: #574f42;
  --borde: #d6c6a4;
  --display: "Calistoga", Georgia, serif;
  --cuerpo: "Kumbh Sans", system-ui, sans-serif;
  --ancho: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section { scroll-margin-top: 5rem; }
body { margin: 0; background: var(--carton); color: var(--tinta); font: 400 1.0625rem/1.6 var(--cuerpo); }
svg { display: block; }
a { color: var(--azul); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.franja { margin: 0; padding: .55rem 1rem; background: var(--tinta); color: #f2eadb; font-size: .8125rem; text-align: center; }
.cabecera { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem clamp(1rem, 4vw, 2.5rem); background: var(--postal); border-bottom: 3px double var(--azul); }
.marca { display: grid; font: 400 1.45rem/1 var(--display); color: var(--azul); text-decoration: none; }
.marca small { font: 600 .72rem var(--cuerpo); letter-spacing: .14em; text-transform: uppercase; color: var(--rojo); margin-top: .3rem; }
.cabecera nav ul { display: none; list-style: none; margin: 0; padding: 0; gap: 1.6rem; }
.cabecera nav a { color: var(--azul); text-decoration: none; font-weight: 600; display: inline-block; padding: .8rem 0; }
.cabecera nav a:hover { color: var(--rojo); }
@media (min-width: 820px) { .cabecera nav ul { display: flex; } }

.kicker { font: 600 .8rem/1.4 var(--cuerpo); letter-spacing: .16em; text-transform: uppercase; color: var(--rojo); margin: 0 0 .7rem; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; color: var(--azul); }
h1 { font-size: clamp(2.4rem, 7.5vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
h3 { font-size: 1.4rem; }
.palabra { display: inline-block; white-space: nowrap; perspective: 600px; }
.letra { display: inline-block; transform-origin: 50% 100%; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .8rem 1.5rem; border-radius: 4px; font: 600 1rem var(--cuerpo); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background-color .2s; }
.btn-azul { background: var(--azul); color: #fff; }
.btn-azul:hover { background: var(--azul-2); }
.btn-wa { background: var(--serrano); color: #fff; }
.btn-wa:hover { background: #3f5a2d; }

.hero { max-width: var(--ancho); margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 4vw, 2.5rem) 2.5rem; display: grid; gap: 3rem; align-items: center; }
.bajada { font-size: clamp(1.05rem, 2.2vw, 1.22rem); color: var(--suave); max-width: 33rem; margin: 1.2rem 0 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
@media (min-width: 960px) { .hero { grid-template-columns: 1fr 1fr; min-height: calc(100svh - 120px); } }

/* Mazo de postales: se abren en abanico al cargar. */
.mazo { position: relative; height: clamp(240px, 62vw, 380px); max-width: 480px; width: 100%; justify-self: center; }
.postal {
  --r: 0deg;
  position: absolute; left: 50%; top: 50%; width: min(78%, 330px); aspect-ratio: 3 / 2; margin: 0; padding: 1rem 1.2rem;
  translate: -50% -50%; rotate: var(--r); background: var(--postal); border: 1px solid var(--borde);
  box-shadow: 0 14px 30px rgba(30, 27, 22, .22); display: flex; flex-direction: column; justify-content: flex-end;
  background-image: linear-gradient(90deg, transparent 58%, var(--borde) 58%, var(--borde) calc(58% + 1px), transparent calc(58% + 1px));
}
.p1 { --r: -9deg; } .p2 { --r: 6deg; } .p3 { --r: -1deg; }
.p-saludo { margin: 0; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--suave); }
.p-lugar { margin: 0; font: 400 clamp(1.5rem, 5vw, 2.1rem)/1.1 var(--display); color: var(--azul); }
.estampilla { position: absolute; top: .8rem; right: .8rem; width: 58px; height: 68px; padding: 6px; background: #fff; border: 3px dotted var(--carton); outline: 1px solid var(--borde); }
.estampilla svg { width: 100%; height: 100%; background: var(--azul); fill: none; stroke: #fdf6e6; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.matasello { position: absolute; top: 2.2rem; right: 3.6rem; width: 74px; height: 74px; display: grid; place-items: center; border: 2px solid var(--rojo); border-radius: 50%; color: var(--rojo); font: 600 .62rem/1.3 var(--cuerpo); letter-spacing: .1em; text-align: center; rotate: -14deg; opacity: .85; }

.buscar { max-width: var(--ancho); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
.buscador { display: grid; gap: .9rem; padding: 1.2rem; background: var(--postal); border: 1px solid var(--borde); border-radius: 4px; box-shadow: 0 12px 30px rgba(30, 27, 22, .12); }
label { display: grid; gap: .35rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--suave); }
select, input { min-height: 48px; width: 100%; padding: .6rem .8rem; font: 400 1rem var(--cuerpo); color: var(--tinta); background: #fffdf7; border: 1px solid #c2b08a; border-radius: 4px; }
@media (min-width: 720px) { .buscador { grid-template-columns: repeat(3, 1fr) auto; align-items: end; } }

.seccion { max-width: var(--ancho); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem) 0; }
.seccion-cab { max-width: 44rem; margin-bottom: 2rem; }
.seccion-cab p:not(.kicker) { color: var(--suave); }
#n-fichas { font-weight: 600; color: var(--rojo); }

.fichas { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.ficha { position: relative; padding: 1.3rem 1.3rem 1.2rem; min-height: 230px; display: flex; flex-direction: column; background: var(--postal); border: 1px solid var(--borde); box-shadow: 0 6px 16px rgba(30, 27, 22, .1); transition: transform .25s ease-out, box-shadow .25s; }
.ficha:nth-child(odd) { rotate: -.6deg; } .ficha:nth-child(even) { rotate: .6deg; }
.ficha:hover { box-shadow: 0 18px 34px rgba(30, 27, 22, .2); }
.ficha .estampilla { width: 52px; height: 60px; }
.ficha-loc { margin: 0 4.4rem .4rem 0; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rojo); }
.ficha h3 { margin-right: 4rem; }
.precio { margin: .7rem 0 1rem; font: 400 1.6rem var(--display); color: var(--tinta); }
.wa { margin-top: auto; display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 4px; background: var(--serrano); color: #fff; font-weight: 600; text-decoration: none; }
.wa:hover { background: #3f5a2d; }
.vacio { margin-top: 1rem; font-style: italic; }

.pilares { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.pilares li { padding: 1.6rem; background: var(--azul); color: #e3e9f2; border-radius: 4px; transition: transform .25s ease-out; }
.pilares svg { width: 48px; height: 48px; fill: none; stroke: #f5d9a8; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pilares h3 { color: #fff; margin: .8rem 0 .3rem; }
.pilares p { margin: 0; }
@media (min-width: 820px) { .pilares { grid-template-columns: repeat(3, 1fr); } }

.form-tas { display: grid; gap: 1rem; padding: 1.4rem; background: var(--postal); border: 1px solid var(--borde); border-radius: 4px; }
.demo-aviso { margin: 0; font-size: .8rem; font-weight: 600; color: var(--rojo); }
.aviso { margin: 0; font-weight: 600; color: var(--azul); }
@media (min-width: 720px) { .form-tas { grid-template-columns: 1fr 1fr; } .form-tas .btn, .form-tas p { grid-column: 1 / -1; justify-self: start; } }

/* Contacto como un sobre de correo con el ribete de franjas. */
.sobre { padding: clamp(1.6rem, 5vw, 3rem); background: var(--postal); border: 10px solid transparent; border-image: repeating-linear-gradient(45deg, var(--rojo) 0 14px, var(--postal) 14px 28px, var(--azul) 28px 42px, var(--postal) 42px 56px) 10; }
.datos { list-style: none; margin: 1.2rem 0 1.4rem; padding: 0; }
.datos li { display: grid; padding: .7rem 0; border-bottom: 1px dashed var(--borde); }
.datos span { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--suave); }
.datos a { font: 400 1.4rem var(--display); padding: .2rem 0; }

.wa-fijo { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; display: flex; align-items: center; min-height: 52px; padding: 0 1.4rem; border-radius: 999px; background: var(--serrano); color: #fff; font-weight: 600; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.pie { margin-top: 5rem; padding: 2rem clamp(1rem, 4vw, 2.5rem) 6rem; background: var(--tinta); color: #d4cab6; font-size: .9rem; }
.pie p { max-width: var(--ancho); margin: .3rem auto; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .revela { animation: subir linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
}
@keyframes subir { from { opacity: 0; translate: 0 32px; scale: .96; } to { opacity: 1; translate: 0 0; scale: 1; } }
.anim [data-entra], .anim .postal, .anim .matasello { opacity: 0; }

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