/* ==========================================================================
   Casa Oslo J67 — Fortius Inmuebles
   Paleta Francia medieval.
   ========================================================================== */

:root {
  /* Paleta Francia medieval: terciopelo azul real de la capa, flor de lis de oro,
     plata, armiño y azul medianoche */
  color-scheme: light;
  --accent: #1F3C88;       /* azur real (terciopelo de la capa): botones y banda de datos */
  --accent-deep: #152A63;  /* hover */
  --accent-rgb: 31 60 136;
  --accent-text: #1F3C88;  /* acento usado como texto o ícono */
  --gold: #D2AE4F;         /* oro de la flor de lis: acentos sobre fondos oscuros */
  --silver: #C4C9D4;       /* plata: texto secundario sobre oscuro */
  --ink: #111A33;          /* azul medianoche: texto */
  --dark: #0F1A3C;         /* terciopelo azul profundo: secciones oscuras */
  --dark-rgb: 15 26 60;
  --tint-rgb: 15 26 60;    /* velos suaves sobre el fondo (íconos de la lista) */
  --scrim-rgb: 7 12 28;    /* fondo del visor de fotos */
  --paper: #F4F3EF;        /* armiño: fondo */
  --card: #FFFFFF;         /* tarjetas y formulario */
  --surface: #E6E8EE;      /* fondo del mapa mientras carga */
  --map-bg: #EFF0F3;
  --white: #FFFFFF;        /* blanco fijo: texto sobre oscuro */
  --on-white: #111A33;     /* texto sobre botones o chips blancos */
  --line: #D9DBE3;
  --line-strong: #AEB4C2;
  --muted: #525A6E;
  --on-ink-muted: var(--silver);

  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(72px, 10vw, 140px);
  --radius: 6px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

.material-symbols-outlined {
  font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal;
  font-size: 22px; line-height: 1; display: inline-block; white-space: nowrap;
  -webkit-font-feature-settings: "liga"; font-feature-settings: "liga";
}

/* ---------- Tipografía ---------- */
.h2 {
  font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; font-weight: 600;
  letter-spacing: -0.035em; text-wrap: balance;
}
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--muted); max-width: 46ch; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-weight: 500; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: background-color 200ms, color 200ms, box-shadow 200ms, transform 200ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-deep); }
.btn--line { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--dark); color: var(--white); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  transition: box-shadow 250ms;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.brand img { height: 26px; width: auto; }
.site-nav { display: none; gap: 32px; }
.site-nav a { text-decoration: none; font-size: 15px; color: var(--muted); position: relative; padding-block: 6px; transition: color 200ms; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease-out);
}
.site-nav a:hover, .site-nav a.is-active { color: var(--ink); }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }
@media (min-width: 900px) { .site-nav { display: flex; } }
.site-header__actions { display: flex; align-items: center; gap: 16px; }

@media (max-width: 899px) { .site-header .btn { display: none; } }

/* ==========================================================================
   Portada
   ========================================================================== */
/* La fachada cubre toda la portada; el texto va encima */
.hero { position: relative; min-height: calc(100svh - 68px); display: flex; align-items: flex-end; overflow: hidden; background: var(--dark); color: var(--white); }
.hero__media { position: absolute; inset: 0; margin: 0; }
.hero__photo { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transition: transform 1.2s var(--ease-out); }
.hero__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(0deg, rgb(var(--dark-rgb) / 0.9) 0%, rgb(var(--dark-rgb) / 0.55) 30%, rgb(var(--dark-rgb) / 0) 62%),
    linear-gradient(90deg, rgb(var(--dark-rgb) / 0.55) 0%, rgb(var(--dark-rgb) / 0) 55%);
}
.hero__inner { position: relative; z-index: 1; padding-top: 120px; padding-bottom: clamp(32px, 6vw, 72px); pointer-events: none; }
.hero__actions { pointer-events: auto; }
.hero__title {
  font-size: clamp(60px, 10vw, 168px); line-height: 0.88; font-weight: 700; white-space: nowrap;
  letter-spacing: -0.055em; margin-left: -0.04em; text-shadow: 0 2px 30px rgb(var(--dark-rgb) / 0.35);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .line > span { display: block; }
.hero__title .line:last-child > span { color: var(--gold); }
.hero__place { margin-top: 20px; font-size: 18px; color: rgba(255, 255, 255, 0.88); }
.hero__furnished { color: var(--gold); font-weight: 500; }
.hero__bottom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin-top: 32px; padding-top: 24px; border-top: 1.5px solid rgba(255, 255, 255, 0.45); }
.price-xl { font-size: clamp(32px, 3.6vw, 44px); font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.price-xl small, .mobile-cta__price small { font-size: 0.45em; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.hero .price-xl small { color: rgba(255, 255, 255, 0.75); }
.hero__cash { margin-top: 6px; color: rgba(255, 255, 255, 0.8); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn--line, .pricing .btn--line { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85); color: var(--white); }
.hero .btn--line:hover, .pricing .btn--line:hover { background: var(--white); color: var(--on-white); }

/* Tres franjas = tres niveles */
.level { position: absolute; left: 0; right: 0; height: 34%; background: var(--dark); transform-origin: top; pointer-events: none; z-index: 1; }
.level--1 { bottom: 0; }
.level--2 { bottom: 33.3%; }
.level--3 { top: 0; }

/* Secuencia de entrada (solo con JS) */
.js .hero__title .line > span { transform: translateY(105%); }
.js .rise { opacity: 0; transform: translateY(14px); }
.js .hero__photo img { transform: scale(1.14); }

.is-loaded .hero__title .line > span { transform: none; transition: transform 1s var(--ease-out); }
.is-loaded .hero__title .line:nth-child(2) > span { transition-delay: 90ms; }
.is-loaded .rise { opacity: 1; transform: none; transition: opacity 700ms ease-out, transform 700ms var(--ease-out); }
.is-loaded .hero__place { transition-delay: 450ms; }
.is-loaded .hero__bottom { transition-delay: 560ms; }
.is-loaded .hero__photo img { transform: scale(1); transition: transform 1.8s var(--ease-out); }
.is-loaded .hero__photo:hover img { transform: scale(1.03); transition-duration: 1.2s; }
.is-loaded .level { transform: scaleY(0); transition: transform 700ms var(--ease-inout); }
.is-loaded .level--1 { transition-delay: 150ms; }
.is-loaded .level--2 { transition-delay: 330ms; }
.is-loaded .level--3 { transition-delay: 510ms; }
html:not(.js) .level { display: none; }

/* ==========================================================================
   Datos
   ========================================================================== */
.facts { background: var(--accent); color: var(--white); }
.facts__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 24px; padding-block: 40px; }
.facts__list div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; }
.facts dt { font-size: 14px; color: rgba(255, 255, 255, 0.82); }
.facts dd { font-size: clamp(30px, 3.4vw, 44px); font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
@media (min-width: 700px) { .facts__list { grid-template-columns: repeat(3, auto); justify-content: space-between; } }
@media (min-width: 1100px) { .facts__list { grid-template-columns: repeat(6, auto); } }

/* ==========================================================================
   Mosaico de fotos
   ========================================================================== */
.section__head { display: grid; gap: 16px; margin-bottom: 48px; }
@media (min-width: 900px) {
  .section__head { grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; }
  .section__head .lead { justify-self: end; }
}

.mosaic { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 42vw; gap: 8px; grid-auto-flow: dense; }
.tile { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.tile--big { grid-column: span 2; grid-row: span 2; }
.tile--wide { grid-column: span 2; }
.tile--tall { grid-row: span 2; }
.tile button { display: block; width: 100%; height: 100%; cursor: zoom-in; position: relative; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.tile__name {
  position: absolute; left: 12px; bottom: 12px;
  padding: 6px 12px; border-radius: 999px;
  background: rgb(var(--dark-rgb) / 0.85); color: var(--white); font-size: 14px; font-weight: 500;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
@media (hover: hover) {
  .tile__name { opacity: 0; transform: translateY(6px); transition: opacity 300ms, transform 400ms var(--ease-out); }
  .tile button:hover img, .tile button:focus-visible img { transform: scale(1.05); }
  .tile button:hover .tile__name, .tile button:focus-visible .tile__name { opacity: 1; transform: none; }
}
@media (min-width: 900px) { .mosaic { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 15vw; gap: 12px; } }
@media (min-width: 1400px) { .mosaic { grid-auto-rows: 210px; } }

/* Cada foto se descubre de abajo hacia arriba al llegar a ella */
.js .tile { clip-path: inset(100% 0 0 0); }
.js .tile img { transform: scale(1.15); }
.js .tile.is-in { clip-path: inset(0 0 0 0); transition: clip-path 1s var(--ease-inout); }
.js .tile.is-in img { transform: scale(1); transition: transform 1.4s var(--ease-out); }
@media (hover: hover) { .js .tile.is-in button:hover img { transform: scale(1.05); transition-duration: 900ms; } }

/* ==========================================================================
   Terraza
   ========================================================================== */
.terrace { position: relative; overflow: hidden; color: var(--white); background: var(--dark); }
.terrace__media { position: absolute; inset: -10% 0; }
.terrace__media img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.terrace::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgb(var(--dark-rgb) / 0.82) 0%, rgb(var(--dark-rgb) / 0.4) 45%, rgb(var(--dark-rgb) / 0) 72%);
}
.terrace__inner { position: relative; z-index: 1; display: flex; align-items: flex-end; min-height: min(92svh, 860px); padding-block: 64px; }
.terrace__card { max-width: 520px; }
.terrace .lead { color: rgba(255, 255, 255, 0.85); margin-top: 16px; }
.terrace__thumb {
  display: block; margin-top: 32px; width: 168px; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); cursor: zoom-in;
}
.terrace__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.terrace__thumb:hover img { transform: scale(1.08); }
@media (max-width: 699px) {
  .terrace::after { background: linear-gradient(0deg, rgb(var(--dark-rgb) / 0.9) 0%, rgb(var(--dark-rgb) / 0.45) 55%, rgb(var(--dark-rgb) / 0.1) 100%); }
  .terrace__inner { min-height: 88svh; }
}

/* ==========================================================================
   Ubicación
   ========================================================================== */
.area { display: grid; gap: 32px; }
.area__map {
  position: relative; height: 62svh; min-height: 380px; max-height: 560px;
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  display: grid; place-items: center;
}
.area__map.is-ready { display: block; }
.area__fallback { font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.area__map.is-ready .area__fallback { display: none; }
.area__group { font-size: 15px; font-weight: 600; color: var(--muted); margin: 0 0 4px; }
.area__group:not(:first-child) { margin-top: 28px; }
.area__list ul { border-top: 1px solid var(--line); }
.spot {
  width: 100%; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 14px;
  padding: 12px 8px 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none;
  font: inherit; color: var(--ink); text-align: left; cursor: pointer;
  transition: background-color 200ms var(--ease-out), padding 300ms var(--ease-out);
}
.spot__icon {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  background: rgb(var(--tint-rgb) / 0.07); color: var(--ink); font-size: 20px;
  transition: background-color 200ms, color 200ms;
}
.spot__name { font-weight: 500; line-height: 1.25; }
.spot__time { font-size: 15px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.spot:hover .spot__icon { background: rgb(var(--tint-rgb) / 0.14); }
.spot[aria-pressed="true"] { padding-left: 10px; background: linear-gradient(90deg, rgb(var(--accent-rgb) / 0.07), transparent); }
.spot[aria-pressed="true"] .spot__icon { background: var(--accent); color: #fff; }
.spot[aria-pressed="true"] .spot__time { color: var(--accent-text); font-weight: 600; }
.area__note { margin-top: 20px; font-size: 14px; color: var(--muted); }
.area__note a { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }

/* Marcadores del mapa */
.pin-house {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font: 600 14px/1 "Geist", system-ui, sans-serif; white-space: nowrap;
  box-shadow: 0 6px 18px rgb(var(--accent-rgb) / 0.35);
}
.pin-house .material-symbols-outlined { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--accent); font-size: 18px; }
.pin-house::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: var(--accent); transform: translateX(-50%) rotate(45deg); z-index: -1; }
.pin {
  display: flex; align-items: center; gap: 6px; padding: 4px; border: 0; border-radius: 999px;
  background: var(--dark); color: #fff; cursor: pointer; font: 500 13px/1 "Geist", system-ui, sans-serif;
  box-shadow: 0 3px 10px rgb(var(--dark-rgb) / 0.3); transition: background-color 200ms;
}
.pin .material-symbols-outlined { font-size: 16px; width: 20px; height: 20px; display: grid; place-items: center; }
.pin__label { display: none; padding-right: 8px; white-space: nowrap; }
.pin.is-active { background: var(--accent); z-index: 4; }
.pin-house { z-index: 3; }
.pin.is-active .pin__label, .pin:hover .pin__label { display: inline; }
.maplibregl-ctrl-attrib { font-size: 11px; }
.tour-section { padding-top: 0; }
.tour { border-radius: var(--radius); overflow: hidden; background: var(--dark); min-height: 480px; }
.tour iframe { display: block; width: 100%; height: 480px; border: 0; }
@media (min-width: 900px) {
  .area { grid-template-columns: 7fr 5fr; gap: 48px; align-items: start; }
  .area .area__map { height: 620px; max-height: none; position: sticky; top: 92px; }
}

/* ==========================================================================
   Precio y preguntas frecuentes
   ========================================================================== */
.pricing { background: var(--dark); color: var(--white); padding-block: var(--section); }
.options { display: grid; margin-top: 48px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.option { padding-block: 28px; border-bottom: 1px solid rgba(255, 255, 255, 0.18); display: grid; gap: 8px; }
.option__name { font-size: 16px; font-weight: 500; color: var(--on-ink-muted); }
.option__price { font-size: clamp(44px, 6vw, 84px); font-weight: 600; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.option:first-child .option__price { color: var(--gold); }
.option__note { color: var(--on-ink-muted); max-width: 36ch; }
.option__note a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; margin-left: 4px; }
.option__note a:hover { color: var(--gold); }
.pricing__download {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding-block: 28px; border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.pricing__download p { color: var(--on-ink-muted); font-size: 17px; }
.pricing__download .btn { gap: 10px; }
@media (min-width: 900px) {
  .options { grid-template-columns: 1fr 1fr; }
  .option { padding: 36px 40px 36px 0; }
  .option + .option { border-left: 1px solid rgba(255, 255, 255, 0.18); padding-left: 40px; }
}

/* Preguntas frecuentes */
.faq { margin-top: clamp(64px, 8vw, 104px); display: grid; gap: 32px; }
.faq__title { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.faq__more { margin-top: 12px; color: var(--on-ink-muted); max-width: 30ch; }
.faq__wa { margin-top: 24px; gap: 10px; }
.faq__wa .material-symbols-outlined { font-size: 20px; }

.faq__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  min-height: 40px; padding: 0 18px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 500;
  color: var(--white); background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); cursor: pointer;
  transition: background-color 250ms var(--ease-out), color 250ms var(--ease-out), box-shadow 250ms var(--ease-out), transform 150ms;
}
.chip:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6); }
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--white); color: var(--on-white); box-shadow: none; }

.faq__list { border-top: 1px solid rgba(255, 255, 255, 0.18); }
.faq__item { position: relative; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.faq__item::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform 700ms var(--ease-out);
}
.faq__item.is-open::after { transform: scaleX(1); }
.faq__item[hidden] { display: none !important; }
.faq__item.is-entering { animation: faq-in 520ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes faq-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.faq__q { font: inherit; margin: 0; }
.faq__q button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0; border: 0; background: none; color: var(--white); text-align: left; cursor: pointer;
  font: inherit; font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; letter-spacing: -0.015em; line-height: 1.3;
}
.faq__q button > span:first-child { transition: transform 400ms var(--ease-out), color 250ms; }
.faq__q button:hover > span:first-child { transform: translateX(6px); }
.faq__item.is-open .faq__q button > span:first-child { color: var(--gold); }

.faq__icon {
  position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  transition: transform 500ms var(--ease-out), background-color 300ms, box-shadow 300ms;
}
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px;
  border-radius: 2px; background: var(--white); transition: background-color 300ms;
}
.faq__icon::after { transform: rotate(90deg); }
.faq__q button:hover .faq__icon { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7); }
.faq__item.is-open .faq__icon { transform: rotate(135deg); background: var(--white); box-shadow: none; }
.faq__item.is-open .faq__icon::before, .faq__item.is-open .faq__icon::after { background: var(--dark); }

.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 500ms var(--ease-out); }
.faq__a > div { overflow: hidden; }
.faq__a p {
  max-width: 58ch; padding: 0 56px 26px 0; color: var(--on-ink-muted); font-size: 17px; line-height: 1.6;
  opacity: 0; transform: translateY(-6px); transition: opacity 300ms, transform 500ms var(--ease-out);
}
.faq__a strong { color: var(--white); font-weight: 600; }
.faq__a a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.faq__a a:hover { color: var(--gold); }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__item.is-open .faq__a p { opacity: 1; transform: none; transition-delay: 120ms, 0ms; }
.no-js .faq__a, .faq:not(.is-ready) .faq__a { grid-template-rows: 1fr; }
.faq:not(.is-ready) .faq__a p { opacity: 1; transform: none; }

@media (max-width: 599px) {
  .faq__a p { padding-right: 0; font-size: 16px; }
}
@media (min-width: 900px) {
  .faq { grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; }
  .faq__side { position: sticky; top: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  .faq__item::after, .faq__a, .faq__a p, .faq__icon, .faq__q button > span:first-child { transition: none; }
  .faq__item.is-entering { animation: none; }
}

/* ==========================================================================
   Contacto
   ========================================================================== */
.contact { position: relative; overflow: hidden; }
/* Bloque azul que continúa la sección de precio y enmarca la foto */
.contact::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: calc(var(--section) + 240px); background: var(--dark);
}
.contact__inner { position: relative; display: grid; gap: 56px; }
.contact .lead { margin-top: 16px; }
.contact__main .contact__form { margin-top: 32px; }

.agent-card { position: relative; width: min(100%, 440px); margin: 0 auto; }
.agent-card__frame { position: relative; }
.agent-card__photo {
  position: relative; z-index: 2; display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius); background: var(--line);
  box-shadow: 0 30px 60px -30px rgb(var(--dark-rgb) / 0.6);
}
.agent-card__square {
  position: absolute; z-index: 1; top: -20px; right: -20px; width: 38%; aspect-ratio: 1;
  background: var(--accent); border-radius: var(--radius);
}
.agent-card__outline {
  position: absolute; z-index: 1; left: -22px; bottom: -22px; width: 62%; height: 44%;
  border: 1.5px solid var(--gold); border-radius: var(--radius); pointer-events: none;
}
.agent-card__info {
  position: relative; z-index: 4; margin: -64px 16px 0; padding: 22px 24px;
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--line), 0 24px 50px -28px rgb(var(--dark-rgb) / 0.45);
}
.agent-card__info::before {
  content: ""; position: absolute; left: 24px; top: 0; width: 48px; height: 3px; background: var(--accent);
}
.agent-card__name { font-size: clamp(24px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.agent-card__role { margin-top: 4px; color: var(--muted); font-size: 15px; }
.agent-card__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.agent-card__links a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--paper); text-decoration: none; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere; transition: background-color 200ms, color 200ms;
}
.agent-card__links a:hover { background: var(--dark); color: var(--white); }
.agent-card__links .material-symbols-outlined { font-size: 18px; color: var(--accent-text); transition: color 200ms; }
.agent-card__links a:hover .material-symbols-outlined { color: var(--gold); }

/* Entrada: la foto se descubre de abajo hacia arriba y las figuras aparecen después */
.js .agent-card__photo { clip-path: inset(100% 0 0 0); transition: clip-path 1100ms var(--ease-out); }
.js .agent-card__square { transform: scale(0); transform-origin: top right; transition: transform 800ms var(--ease-out) 350ms; }
.js .agent-card__outline { opacity: 0; transform: translate(-12px, 12px); transition: opacity 600ms 600ms, transform 800ms var(--ease-out) 600ms; }
.js .agent-card__info { opacity: 0; transform: translateY(24px); transition: opacity 600ms 500ms, transform 800ms var(--ease-out) 500ms; }
.js .agent-card.is-in .agent-card__photo { clip-path: inset(0 0 0 0); }
.js .agent-card.is-in .agent-card__square { transform: none; }
.js .agent-card.is-in .agent-card__outline, .js .agent-card.is-in .agent-card__info { opacity: 1; transform: none; }

@media (min-width: 900px) {
  .contact::before { right: auto; bottom: 0; height: auto; width: calc(var(--gutter) + (100vw - min(100vw, var(--wrap))) / 2 + 26%); }
  .contact__inner { grid-template-columns: 5fr 6fr; gap: clamp(56px, 7vw, 112px); align-items: center; }
  .agent-card { margin: 0; width: 100%; max-width: 480px; }
  .agent-card__info { margin: -96px -40px 0 56px; }
  .contact__main .contact__form { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .agent-card__photo, .js .agent-card__square, .js .agent-card__outline, .js .agent-card__info {
    clip-path: none; transform: none; opacity: 1; transition: none;
  }
}

.contact__form { background: var(--card); border-radius: var(--radius); padding: clamp(24px, 4vw, 48px); box-shadow: 0 1px 0 var(--line), 0 24px 60px -32px rgb(var(--dark-rgb) / 0.35); }
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.input {
  width: 100%; min-height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); font: inherit; color: var(--ink); transition: border-color 200ms, background-color 200ms;
}
select.input {
  appearance: none; padding-right: 44px; background-repeat: no-repeat; background-size: 6px 6px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
}
.input:hover { border-color: var(--line-strong); }
.input:focus { outline: none; border-color: var(--ink); background-color: var(--card); }
.has-error .input { border-color: #B3261E; }
.field__error { font-size: 14px; color: #B3261E; }
.form .btn { margin-top: 8px; }

.confirmation { display: grid; gap: 12px; }
.confirmation__title { font-size: 22px; font-weight: 600; color: #1D6B3A; }
.confirmation p:not(.confirmation__title) { color: var(--muted); }
.confirmation__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.confirmation:focus { outline: none; }

/* ==========================================================================
   Pie y barra móvil
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px 120px; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.site-footer__logo { height: 44px; width: auto; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer__fine { color: var(--muted); font-size: 14px; }
@media (min-width: 900px) { .site-footer { padding-bottom: 40px; } .site-footer__fine { margin-left: auto; } }

.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: var(--card); box-shadow: 0 -1px 0 var(--line);
  transform: translateY(110%); transition: transform 400ms var(--ease-out);
}
.mobile-cta.is-visible { transform: none; }
.mobile-cta__price { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .mobile-cta { display: none; } }

/* ==========================================================================
   Visor de fotos
   ========================================================================== */
.lightbox {
  width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(var(--scrim-rgb) / 0.96); color: var(--white);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; place-items: center; animation: lb-in 300ms ease-out; }
@keyframes lb-in { from { opacity: 0; } }
.lightbox__stage { display: grid; gap: 14px; justify-items: center; padding: 64px 16px 24px; max-width: 100%; }
.lightbox__stage img {
  max-width: min(1400px, calc(100vw - 32px)); max-height: calc(100svh - 150px); width: auto; height: auto;
  border-radius: 4px; object-fit: contain; user-select: none; -webkit-user-drag: none;
  transition: opacity 250ms, transform 350ms var(--ease-out);
}
.lightbox__stage img.is-swapping { opacity: 0; transform: scale(0.985); }
.lightbox figcaption { display: flex; gap: 16px; font-size: 15px; color: rgba(255, 255, 255, 0.85); }
.lightbox figcaption span:last-child { font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.6); }
.lightbox__btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); color: var(--white); transition: background-color 200ms;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 16px; top: 50%; translate: 0 -50%; }
@media (max-width: 699px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: 20px; translate: none; }
  .lightbox__stage { padding-bottom: 88px; }
  .lightbox__stage img { max-height: calc(100svh - 200px); }
}
body.lightbox-open { overflow: hidden; }

img.is-broken { visibility: hidden; }

/* ==========================================================================
   Movimiento reducido: todo aparece en su lugar
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .hero__title .line > span, .js .rise, .js .hero__photo img, .js .tile, .js .tile img { transform: none; opacity: 1; clip-path: none; }
  .level { display: none; }
}
