/* ==================================================
   Real State — estilos propios de la plantilla (hero: plano vivo)
   Barra, botones, secciones comunes, similares, CTA y WhatsApp vienen de themes/_kit/am-kit.css
   re.js dibuja en .re-cv la foto, el plano (calculado desde la foto), el lente de rayos X y el render por bloques
   ================================================== */

.re-hero {
	--orange: #ffa035;
	--cyan: #7fe0ff;
	--foot-h: 92px;
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100vh;
	height: 100svh;
	min-height: 720px;
	padding-top: 68px;
	overflow: hidden;
	color: #fff;
	/* papel de plano mientras carga (la primera casa se dibuja sobre él) */
	background: linear-gradient(rgba(190, 225, 255, .07) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(190, 225, 255, .07) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(#12407f, #082659);
	touch-action: pan-y;
}
.re-cv { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.re-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(6, 10, 20, .8) 0%, rgba(6, 10, 20, .5) 28%, rgba(6, 10, 20, 0) 48%), linear-gradient(0deg, rgba(6, 10, 20, .45) 0%, rgba(6, 10, 20, 0) 22%); }
@media (hover: hover) and (pointer: fine) {
	.re-hero.is-lens { cursor: crosshair; }
}

/* ---------- Puntos de la fachada ---------- */
.re-pins { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.ak-page .re-pin { position: absolute; left: 0; top: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px; padding: 0; background: none; border: 0; border-radius: 50%; cursor: pointer; pointer-events: auto; transition: opacity .3s ease; }
.re-hero:not(.is-ready) .re-pin, .re-hero.is-busy .re-pin { opacity: 0; pointer-events: none; }
.re-pin__dot { position: absolute; inset: 9px; border-radius: 50%; background: var(--orange); border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.re-pin__dot::before { content: ''; position: absolute; inset: -11px; border-radius: 50%; border: 2px solid var(--orange); opacity: 0; animation: re-ping 2.2s ease-out infinite; }
.ak-page .re-pin:hover .re-pin__dot, .ak-page .re-pin:focus-visible .re-pin__dot, .re-pin.is-open .re-pin__dot { background: #fff; border-color: var(--orange); }
.ak-page .re-pin:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.re-pin__card { position: absolute; left: 50%; bottom: calc(100% + 12px); width: 230px; padding: 6px 6px 8px; text-align: left; background: #0c0c0c; border: 2px solid #0c0c0c; box-shadow: 6px 6px 0 var(--orange); opacity: 0; visibility: hidden; transform: translate(-50%, 10px) scale(.96); transform-origin: 50% 100%; transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s; pointer-events: none; }
.re-pin__card img { display: block; width: 100%; max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.re-pin__t { display: block; margin: 7px 2px 0; font-family: 'Archivo', sans-serif; font-size: 15px; font-weight: 800; color: #fff; }
.ak-page .re-pin:hover .re-pin__card, .ak-page .re-pin:focus-visible .re-pin__card, .re-pin.is-open .re-pin__card { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); transition-delay: 0s; }
.re-pin.is-low .re-pin__card { bottom: auto; top: calc(100% + 12px); transform-origin: 50% 0; }
.re-read { position: absolute; z-index: 3; left: 0; top: 0; margin: 0; padding: 4px 8px; font-family: 'Space Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; color: #0a1a33; background: var(--cyan); pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.re-read.is-on { opacity: 1; }
@keyframes re-ping { 0% { opacity: .9; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.5); } }

/* ---------- Ficha ---------- */
.re-copy { position: absolute; z-index: 5; left: var(--gutter); top: calc(68px + 8vh); width: min(500px, 36vw); pointer-events: none; }
.re-copy a { pointer-events: auto; }
.re-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.re-tag { display: inline-block; padding: 6px 12px; font-family: 'Space Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #0c0c0c; background: #fff; }
.re-tag--type { color: #0c0c0c; background: var(--orange); }
.re-page .re-title { margin: 0 0 14px; font-family: 'Archivo', sans-serif; font-size: clamp(32px, 3.5vw, 58px); font-weight: 800; line-height: 1.02; letter-spacing: -.02em; text-align: left; text-transform: none; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, .45); }
.re-price { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.re-price__v { font-family: 'Archivo', sans-serif; font-size: clamp(38px, 4.2vw, 68px); font-weight: 900; line-height: 1; letter-spacing: -.03em; color: var(--orange); font-variant-numeric: tabular-nums; }
.re-price__u { font-family: 'Space Mono', monospace; font-size: 14px; color: rgba(255, 255, 255, .8); }
.re-loc { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; font-family: 'Open Sans', sans-serif; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .92); }
.re-loc svg { width: 18px; height: 18px; flex: 0 0 auto; fill: var(--orange); }
.re-specs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.re-specs li { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; font-family: 'Open Sans', sans-serif; font-size: 13px; color: rgba(255, 255, 255, .86); background: rgba(8, 14, 28, .62); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.re-specs svg { width: 18px; height: 18px; fill: var(--cyan); }
.re-spec__v { font-family: 'Archivo', sans-serif; font-size: 16px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.re-desc { max-width: 42ch; margin: 0 0 24px; font-family: 'Open Sans', sans-serif; font-size: clamp(14px, 1.05vw, 16px); line-height: 1.65; color: rgba(255, 255, 255, .88); text-shadow: 0 2px 12px rgba(0, 0, 0, .7); }
.ak-page .re-get { display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 30px; font-family: 'Archivo', sans-serif; font-size: 14px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: #0c0c0c; background: #fff; border: 2px solid #0c0c0c; box-shadow: 6px 6px 0 var(--orange); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.ak-page .re-get:hover, .ak-page .re-get:focus-visible { color: #0c0c0c; transform: translate(-2px, -2px); box-shadow: 9px 9px 0 var(--orange); }

/* ---------- Columna derecha: ventana de render y agente ---------- */
.re-side { position: absolute; z-index: 5; right: var(--gutter); top: calc(68px + 22px); display: flex; flex-direction: column; gap: 12px; width: 228px; }
.re-render { position: relative; padding: 14px; font-family: 'Space Mono', monospace; color: #fff; background: rgba(8, 14, 28, .74); border: 1px solid rgba(127, 224, 255, .3); border-top: 3px solid var(--cyan); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.re-render__k { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.re-render__dot { width: 7px; height: 7px; border-radius: 50%; background: #3cf2a0; box-shadow: 0 0 8px #3cf2a0; }
.re-hero.is-busy .re-render__dot { background: var(--orange); box-shadow: 0 0 8px var(--orange); animation: re-blink .6s steps(2) infinite; }
.re-view { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 12px; border: 1px solid rgba(255, 255, 255, .25); }
.ak-page .re-view__b { min-height: 34px; margin: 0; padding: 6px 8px; font-family: 'Space Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .8); background: transparent; border: 0; border-radius: 0; cursor: pointer; }
.ak-page .re-view__b:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.ak-page .re-view__b.is-on { color: #0a1a33; background: var(--cyan); }
.ak-page .re-view__b:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.re-render__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .72); white-space: nowrap; }
.re-render__p { font-family: 'Archivo', sans-serif; font-size: 18px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.re-render__bar { position: relative; display: block; height: 5px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.re-render__bar b { position: absolute; inset: 0; background: linear-gradient(90deg, var(--cyan), var(--orange)); transform-origin: 0 50%; }
.re-render__t { margin: 8px 0 0; font-size: 11px; color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
@keyframes re-blink { 50% { opacity: .2; } }

/* ---------- Agente ---------- */
.re-agent { position: relative; display: grid; grid-template-columns: 56px auto; align-items: center; gap: 4px 12px; padding: 12px; color: #fff; background: rgba(8, 14, 28, .74); border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.re-agent__img { grid-row: span 2; width: 56px; height: 56px; max-width: none; border-radius: 50%; object-fit: cover; border: 2px solid var(--orange); }
.re-agent__txt { display: grid; margin: 0; font-family: 'Open Sans', sans-serif; font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, .7); }
.re-agent__txt b { font-family: 'Archivo', sans-serif; font-size: 16px; font-weight: 800; color: #fff; }
.ak-page .re-agent__cta { display: grid; font-family: 'Open Sans', sans-serif; font-size: 12px; line-height: 1.35; color: rgba(255, 255, 255, .78); text-decoration: none; }
.ak-page .re-agent__cta b { font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.ak-page .re-agent__cta:hover b, .ak-page .re-agent__cta:focus-visible b { color: #fff; }

.re-hint { position: absolute; z-index: 5; left: var(--gutter); bottom: calc(var(--foot-h) + 22px); margin: 0; font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .72); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); pointer-events: none; }
.re-hint--touch { display: none; }
@media (hover: none) {
	.re-hint--mouse { display: none; }
	.re-hint--touch { display: inline; }
}
.re-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Pie del hero ---------- */
.re-foot {
	position: relative;
	z-index: 8;
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: minmax(260px, 1fr) auto auto;
	gap: 14px clamp(20px, 3vw, 44px);
	align-items: center;
	padding: 14px calc(var(--gutter) + 140px) 16px var(--gutter);
	background: rgba(10, 10, 10, .95);
	border-top: 3px solid var(--accent);
}
.re-foot__meta { margin: 0 0 4px; font-family: var(--mb-mono); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.re-foot__lead { max-width: 60ch; margin: 0; font-size: clamp(14px, 1.1vw, 17px); line-height: 1.5; color: rgba(245, 245, 240, .86); }
.re-ctrl { display: flex; align-items: center; gap: 10px; }
.re-count { margin: 0 6px 0 0; font-family: var(--mb-mono); font-size: 14px; color: rgba(245, 245, 240, .7); white-space: nowrap; }
.re-idx { display: inline-block; font-family: var(--mb-display); font-weight: 900; font-size: 34px; line-height: 1; letter-spacing: -.02em; vertical-align: -5px; color: var(--accent); }
@media (max-width: 1180px) {
	.re-foot { grid-template-columns: minmax(0, 1fr) auto; }
	.re-foot .ak-actions { grid-column: 1 / -1; }
}
@media (max-height: 820px) and (min-width: 1001px) {
	.re-copy { top: calc(68px + 4vh); }
	.re-page .re-title { font-size: clamp(30px, 3vw, 48px); margin-bottom: 10px; }
	.re-price { margin-bottom: 8px; }
	.re-price__v { font-size: clamp(34px, 3.6vw, 56px); }
	.re-loc, .re-specs { margin-bottom: 12px; }
	.re-desc { margin-bottom: 16px; }
	.re-side { top: calc(68px + 14px); gap: 10px; }
	.re-render { padding: 10px 12px; }
	.re-agent { padding: 10px 12px; }
}

/* ---------- Tablet y móvil ---------- */
@media (max-width: 1000px) {
	.re-hero { height: auto; min-height: 0; }
	.re-hero::before { content: ''; display: block; flex: 0 0 auto; height: calc(100svh - 70px); min-height: 700px; max-height: 1000px; }
	.re-shade { background: linear-gradient(0deg, rgba(6, 10, 20, .94) 0%, rgba(6, 10, 20, .7) 40%, rgba(6, 10, 20, 0) 60%); }
	.re-copy { top: auto; bottom: calc(var(--foot-h) + 26px); right: var(--gutter); width: auto; }
	.re-tags { margin-bottom: 10px; }
	.re-page .re-title { font-size: clamp(28px, 7.4vw, 48px); margin-bottom: 8px; }
	.re-price { margin-bottom: 6px; }
	.re-price__v { font-size: clamp(32px, 9vw, 54px); }
	.re-loc { margin-bottom: 10px; font-size: 14px; }
	.re-specs { margin-bottom: 14px; }
	.re-specs li { padding: 6px 10px; font-size: 12px; }
	.re-desc { display: none; }
	.ak-page .re-get { min-height: 48px; font-size: 13px; }
	.re-hint, .re-agent { display: none; }
	/* la ventana de render pasa a ser una barra arriba */
	.re-side { top: calc(68px + 12px); left: var(--gutter); right: var(--gutter); width: auto; }
	.re-render { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 12px; padding: 8px 10px; }
	.re-render__k { margin: 0; }
	.re-view { margin: 0; justify-self: end; width: 150px; }
	.ak-page .re-view__b { min-height: 30px; padding: 4px 6px; font-size: 10px; }
	.re-render__row { grid-column: 3; margin: 0; }
	.re-render__p { font-size: 15px; }
	.re-render__s { display: none; }
	.re-render__bar { grid-column: 1 / -1; height: 3px; }
	.re-render__t { display: none; }
	.re-pin__card { width: 190px; }
}
@media (max-width: 700px) {
	.re-hero { padding-top: 60px; }
	.re-hero::before { height: min(calc(100svh - 136px), 820px); min-height: 660px; }
	.re-side { top: calc(60px + 10px); }
	.re-specs li span { display: none; }
	.re-foot { grid-template-columns: 1fr; padding: 14px var(--gutter) 88px; }
	.re-ctrl { order: -1; }
	.re-foot .ak-actions .ak-btn { flex: 1 1 auto; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
	.ak-page .re-get, .re-pin__card, .re-read { transition: none; }
	.re-pin__dot::before, .re-hero.is-busy .re-render__dot { animation: none; }
}
