/* page CSS: only what the kit lacks (the client's logo beside the name, the discount code, the form card) */
.nav__logo { display: inline-flex; align-items: center; gap: 10px; }
.nav__logo .brand-logo { width: 28px; height: 28px; flex: none; }
.footer--dark .nav__logo .brand-logo { width: 40px; height: 40px; }

/* the discount code: one ticket on the dark band */
.promo { display: grid; gap: var(--s-3); }
.promo__label { font-size: var(--t-label); font-weight: 500; color: var(--muted); margin: 0; }
.promo__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); justify-content: space-between; }
.promo__code { font-family: var(--font-display); font-size: clamp(32px, 2vw + 20px, 48px); letter-spacing: 0.06em; color: var(--ink); line-height: 1; }
.promo__copy-text { display: inline-block; transition: filter 200ms ease, opacity 200ms ease; }
.promo__copy.is-swapping .promo__copy-text { filter: blur(2px); opacity: 0.6; }
.promo__status { margin: 0; min-height: 1.5em; font-size: var(--t-small); color: var(--muted); }

/* the form sits on the alternate ground, never over a picture */
.form-card { background: var(--g-alt, var(--surface)); border-radius: var(--r-lg); padding: var(--s-6); }
.form-card .form { display: grid; gap: var(--s-4); }
@media (max-width: 639px) { .form-card { padding: var(--s-5); } }

/* the tour's floor plan, inside each chapter's panel: where you are in the house and the way you came */
.plan { width: 168px; height: auto; display: block; margin-bottom: var(--s-3); overflow: visible; }
.plan__room { fill: transparent; }
.plan__room.is-past { fill: color-mix(in oklab, var(--ink) 8%, transparent); }
.plan__room.is-here { fill: color-mix(in oklab, var(--accent) 20%, transparent); }
.plan__walls { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: square; }
.plan__out { fill: none; stroke: color-mix(in oklab, var(--ink) 55%, transparent); stroke-width: 1.2; stroke-dasharray: 3 3; }
.plan__doors { fill: none; stroke: color-mix(in oklab, var(--ink) 30%, transparent); stroke-width: 1; }
.plan__route { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 2.5 3; stroke-linecap: round; stroke-linejoin: round; }
.plan__dot { fill: var(--accent); }

/* browser surfaces in the palette */
html { scrollbar-color: color-mix(in oklab, var(--ink) 35%, transparent) transparent; accent-color: var(--action); }
input, textarea { caret-color: var(--action); }
a { text-underline-offset: 0.18em; }
.mo-wh__text { margin: 0; }

/* contact: the photograph under the text column; services: a taller photograph on a phone */
.contact-aside { display: flex; flex-direction: column; align-self: stretch; }
.contact-photo { flex: 1 1 0; min-height: 200px; }
.form__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (min-width: 640px) and (max-width: 1023px) { #contacto { --h: 2; } .contact-photo { flex: none; aspect-ratio: 16 / 10; } }


/* method: three open columns, then the house across the wrap down to the section's foot */
.metodo__cols { margin-bottom: var(--s-7); row-gap: var(--s-5); }
.metodo__cols h3 { margin: 0 0 var(--s-2); }
.metodo__cols p { margin: 0; max-width: 40ch; }
.metodo__photo { min-height: 240px; }
.form-card { align-self: start; }

/* on a phone the split photographs fill their two screens: aim each tall crop at its subject */
@media (max-width: 639px) {
  #metodo .frame__img { object-position: 52% 50% !important; }
  #descuento .frame__img { object-position: 58% 50% !important; }
}

/* art-directed photographs: the <picture> wrapper takes no box of its own */
.frame picture, .hero__media picture, .mo-ph__pic picture { display: contents; }

/* the tour's photographs sit in a <picture> (a portrait crop on a phone): the moment's own rules, one level down */
[data-moment="photo-chapters"] .mo-ph__pic > picture > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 640px) { [data-moment="photo-chapters"]:not(.is-live) .mo-ph__pic > picture > img { aspect-ratio: 4 / 5; max-height: 44svh; } }
@media (max-width: 639px) { [data-moment="photo-chapters"]:not(.is-live) .mo-ph__pic > picture > img { aspect-ratio: 16 / 10; } }
[data-moment="photo-chapters"].is-live .mo-ph__stage > .mo-ph__pic > picture > img { width: 100%; height: 100%; aspect-ratio: auto; max-height: none;
  transform: scale(var(--mo-z, 1)); transform-origin: 50% 100%; will-change: transform; }
@media print { [data-moment="photo-chapters"].is-live .mo-ph__stage > .mo-ph__pic > picture > img { transform: none; } }

/* contact on a tablet or a phone: the words, then the form, then the photograph taking the spare height */
@media (max-width: 1023px) {
  .contact-aside { display: contents; }
  #contacto .grid.fill > * , #contacto .contact-aside > * { grid-column: 1 / -1; }
  #contacto .section-head { order: 0; }
  #contacto .form-card { order: 1; }
  #contacto .contact-photo { order: 2; }
  #contacto .grid.fill { grid-template-rows: auto auto 1fr; }
}
@media (max-width: 1023px) {
  .contact-aside { flex: 1 1 auto; }
  .contact-photo { flex: 1 1 0; aspect-ratio: auto; min-height: 280px; }
  .form-card { flex: none; align-self: start; }
  .form-card .form { height: auto; }
}

/* frames whose photograph sits in a <picture>: the kit's cover rule, one level down */
:is(.frame, .panel) > picture > .frame__img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }

/* hero: the three facts sit at the foot of the words' column, on the photograph's bottom line */
@media (min-width: 1024px) {
  .hero__text { height: 100%; display: flex; flex-direction: column; }
  .hero__text > .hero-facts { margin-top: auto; }
}

/* the form: the kit's two-up grid; on a desktop the message grows to the card's foot */
.form-card .form { display: grid; gap: var(--s-4); }
.field--grow { display: flex; flex-direction: column; }


/* the statement one clear step above its heading */
#nosotros .mo-wh__text { font-size: clamp(32px, 3.4vw + 14px, 64px); line-height: 1.12; max-width: 1120px; }

/* the tour on a phone: a compact panel, the plan beside the count, so the room stays in view */
@media (max-width: 639px) {
  [data-moment="photo-chapters"].is-live .mo-ph__panel { padding: var(--s-4); gap: var(--s-2); }
  [data-moment="photo-chapters"].is-live .plan { position: absolute; top: var(--s-4); right: var(--s-4); width: 84px; margin: 0; }
  [data-moment="photo-chapters"].is-live .mo-ph__ch h3 { font-size: 20px; margin-top: 30px; }
  [data-moment="photo-chapters"].is-live .mo-ph__ch p { line-height: 1.45; }
  [data-moment="photo-chapters"].is-live .mo-ph__head p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
