/* Buy Baja per-listing /tour funnel — non-critical styles.
   Critical step-0 styles are inlined in each tour/index.html so the hero paints immediately.
   Palette + type mirror css/main.css (--navy/--ink/--gold/--cream, Bellefair/Poppins). */

/* Top bar */
.funnel-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 14px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 31, 46, .88) 0%, rgba(12, 31, 46, .45) 60%, transparent 100%);
}
.funnel-top .brand {
  font-size: 12px;
  letter-spacing: .3em;
  font-weight: 600;
  color: rgba(246, 241, 230, .92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}
.back-btn {
  pointer-events: auto;
  background: rgba(12, 31, 46, .45);
  border: 1px solid rgba(246, 241, 230, .25);
  color: #f6f1e6;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.top-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.progress {
  font-size: 12px;
  color: rgba(246, 241, 230, .75);
  background: rgba(12, 31, 46, .45);
  border: 1px solid rgba(246, 241, 230, .18);
  padding: 7px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
/* EN · ES language toggle — the active language is gold, the other muted; one tap flips it. */
.lang-toggle {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(12, 31, 46, .45);
  border: 1px solid rgba(246, 241, 230, .25);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: rgba(246, 241, 230, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lang-toggle .lt-sep { color: rgba(246, 241, 230, .3); }
.lang-toggle[data-lang="en"] .lt-en,
.lang-toggle[data-lang="es"] .lt-es { color: #c9b482; }
.lang-toggle:active { transform: scale(.96); }
/* Video-hook step: the kicker sits at the top of the panel, so it must clear the fixed
   header (57px) — otherwise the EN·ES toggle overlaps the right end of the kicker line. */
.panel-hero-video { padding-top: calc(60px + env(safe-area-inset-top)); }
/* Phones: back-btn + toggle + progress + a centered brand don't all fit at 375px. The brand
   is redundant during the quiz (the property is named in the content), so drop it on the
   question steps only; it stays on the hook and result screens. Toggle/progress tighten up. */
@media (max-width: 560px) {
  body.quiz-progress .funnel-top .brand { display: none; }
  .lang-toggle { padding: 5px 10px; font-size: 11px; letter-spacing: .04em; gap: 4px; }
  .progress { padding: 6px 10px; font-size: 11px; }
  .top-right { gap: 6px; }
}

/* Question panels */
h2 {
  font-family: "Bellefair", "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(28px, 6.8vw, 38px);
  line-height: 1.14;
  margin-bottom: 10px;
  letter-spacing: .01em;
}
.panel-question {
  justify-content: center;               /* center short questions; long ones grow from center */
  padding-top: calc(70px + env(safe-area-inset-top));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
/* trim vertical chrome on question steps so a heading + 3 tall cards (+ button) fits one screen */
.panel-question .sub { margin-bottom: 14px; }
.panel-question .fine { margin-top: 8px; }
.panel-question h2 { margin-bottom: 6px; }
/* Steps whose answers are image cards get a flat backdrop so the photos carry the screen */
.step[data-bg="flat"] { background: linear-gradient(180deg, #143852 0%, #0c1f2e 100%); }
.step.active { animation: stepIn .32s ease both; }
@keyframes stepIn {
  from { transform: translateY(12px); }
  to   { transform: none; }
}

/* Image-answer cards */
.card-grid { display: grid; gap: 10px; margin: 14px 0 4px; }
.cards-3 { grid-template-columns: 1fr; }
.cards-2 { grid-template-columns: 1fr 1fr; }
.img-card {
  position: relative;
  border: 1px solid rgba(246, 241, 230, .14);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #143852;
  text-align: left;
  transition: transform .15s ease, border-color .15s ease;
  font-family: "Poppins", system-ui, sans-serif;
}
.img-card:active { transform: scale(.97); }
/* Card image heights are viewport-relative (dvh) so a full step — heading + 3 cards
   (+ the q4 continue button) — always fits ONE screen and never forces a scroll.
   They cap at a fixed px on tall screens so they don't get comically large. */
.img-card img {
  width: 100%;
  height: clamp(88px, 15dvh, 130px);
  object-fit: cover;
  display: block;
  opacity: .94;
}
.img-card.tall img { height: clamp(90px, 15dvh, 210px); }
.cards-3 .img-card img { height: clamp(84px, 14dvh, 120px); }
.cards-3 .img-card.tall img { height: clamp(90px, 15dvh, 210px); }
.img-card > span {
  display: block;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: #f6f1e6;
}
.img-card.selected { border-color: #b49962; box-shadow: 0 0 0 2px rgba(180, 153, 98, .55); }

@media (min-width: 560px) {
  .cards-3 { grid-template-columns: 1fr 1fr 1fr; }
  .cards-3 .img-card img { height: clamp(120px, 20dvh, 170px); }
  .img-card img { height: clamp(120px, 20dvh, 170px); }
  .img-card.tall img { height: clamp(150px, 26dvh, 260px); }
  .cards-3 .img-card.tall img { height: clamp(150px, 26dvh, 260px); }
}

/* Chips */
.chip-col { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.chip {
  border: 1px solid rgba(246, 241, 230, .28);
  background: rgba(12, 31, 46, .55);
  color: #f6f1e6;
  font-size: 16px;
  font-weight: 500;
  padding: 15px 18px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-family: "Poppins", system-ui, sans-serif;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.chip:active { transform: scale(.98); }
.chip.selected, .chip:hover { border-color: #b49962; background: rgba(180, 153, 98, .18); }
.chip-ghost { margin-top: 12px; text-align: center; background: transparent; border-style: dashed; font-weight: 400; }

/* Contact form */
#contactForm { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
#contactForm input {
  background: rgba(249, 246, 239, .96);
  border: 0;
  border-radius: 12px;
  padding: 16px;
  font-size: 16px; /* 16px minimum prevents iOS zoom-on-focus */
  color: #0c1f2e;
  width: 100%;
  font-family: "Poppins", system-ui, sans-serif;
}
#contactForm input:focus { outline: 3px solid rgba(180, 153, 98, .65); }
#contactForm input.invalid { outline: 3px solid rgba(220, 90, 70, .8); }
.form-error { color: #ffb3a3; font-size: 14px; }
.btn-primary[disabled] { opacity: .6; cursor: wait; }
.panel a { color: #c9b482; }

/* Result screen */
.panel-result {
  justify-content: flex-start;
  padding-top: calc(84px + env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
}
.result-media { border-radius: 16px; overflow: hidden; margin: 14px 0; border: 1px solid rgba(246, 241, 230, .14); }
.result-media img { width: 100%; display: block; }
.spec-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px;
}
.spec-row span {
  font-size: 12.5px; font-weight: 500; letter-spacing: .04em;
  color: #c9b482; border: 1px solid rgba(180, 153, 98, .38);
  padding: 6px 11px; border-radius: 999px;
}
.agent-row { display: flex; gap: 14px; align-items: flex-start; margin: 10px 0 16px; }
.agent-copy strong { display: block; font-size: 15px; color: #c9b482; margin-bottom: 4px; letter-spacing: .04em; }
.agent-copy p { font-size: 14.5px; line-height: 1.55; color: rgba(246, 241, 230, .85); }
/* height (not min-height) is required: Calendly's injected iframe is height:100%, and a
   percentage-height child only resolves against a parent with an explicit height —
   min-height alone leaves it at the browser's 150px iframe default. */
.calendly-holder { height: 640px; border-radius: 16px; overflow: hidden; background: #f6f1e6; }
.calendly-holder .calendly-inline-widget { height: 640px; }

/* Desktop: quiz screens stay phone-narrow (story feel), but the booking screen is where
   conversion happens — Calendly needs real width to show calendar + slots side by side. */
@media (min-width: 820px) {
  .panel-result { max-width: 860px; }
  .calendly-holder { height: 700px; }
  .calendly-holder .calendly-inline-widget { height: 700px; }
  .result-media img { max-height: 420px; object-fit: cover; }
}

@media (prefers-reduced-motion: reduce) {
  .step.active { animation: none; }
}

/* "Watch the tour" secondary CTA (hook screen) — quieter than the gold primary */
.btn-video {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 12px;
  background: transparent; border: 1px solid rgba(246, 241, 230, .32);
  color: #f6f1e6; font-size: 15px; font-weight: 500;
  padding: 14px 20px; border-radius: 12px; cursor: pointer;
  font-family: "Poppins", system-ui, sans-serif;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: border-color .15s ease, background .15s ease;
}
.btn-video:hover, .btn-video:active { border-color: #b49962; background: rgba(180, 153, 98, .12); }
.btn-video .play-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #b49962; color: #0c1f2e; font-size: 10px; padding-left: 2px; flex: none;
}

/* "View photos" button — same treatment as the tour button, its own photo icon */
.btn-photos {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 12px;
  background: transparent; border: 1px solid rgba(246, 241, 230, .32);
  color: #f6f1e6; font-size: 15px; font-weight: 500;
  padding: 14px 20px; border-radius: 12px; cursor: pointer;
  font-family: "Poppins", system-ui, sans-serif;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: border-color .15s ease, background .15s ease;
}
.btn-photos:hover, .btn-photos:active { border-color: #b49962; background: rgba(180, 153, 98, .12); }
.btn-photos .ph-ico { color: #b49962; font-size: 15px; line-height: 1; flex: none; }
.btn-photos .ph-n { color: rgba(246, 241, 230, .6); font-size: 13.5px; }

/* Full-screen swipeable photo gallery overlay — opened on demand from step 0, closes back to
   the quiz. One image at a time (contained, never cropped), arrows + swipe + keyboard. */
.photo-modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; }
.photo-modal[hidden] { display: none; }
.photo-modal-backdrop { position: absolute; inset: 0; background: rgba(6, 12, 18, .96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.photo-stage {
  position: relative; z-index: 1; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: max(56px, env(safe-area-inset-top)) 14px max(48px, env(safe-area-inset-bottom));
  touch-action: pan-y;
}
.photo-slide { display: none; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.photo-slide.is-active { display: block; }
.photo-close {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(246, 241, 230, .3); background: rgba(12, 31, 46, .6); color: #f6f1e6;
  font-size: 24px; line-height: 1; cursor: pointer;
}
.photo-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(246, 241, 230, .28); background: rgba(12, 31, 46, .55); color: #f6f1e6;
  font-size: 26px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.photo-prev { left: 10px; } .photo-next { right: 10px; }
.photo-nav:hover { border-color: #b49962; }
.photo-count {
  position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 2;
  font-size: 12.5px; letter-spacing: .06em; color: rgba(246, 241, 230, .82);
  background: rgba(12, 31, 46, .55); padding: 6px 14px; border-radius: 999px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
@media (max-width: 480px) { .photo-nav { width: 40px; height: 40px; font-size: 22px; } }

/* Video lightbox — full narrated tour, opened on demand (not autoplay) */
.video-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.video-modal[hidden] { display: none; }
.video-modal-backdrop { position: absolute; inset: 0; background: rgba(6, 12, 18, .93); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.video-modal-inner {
  position: relative; z-index: 1; width: 100%; max-width: 1000px; margin: 0 20px;
  border-radius: 14px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.video-modal-inner video { width: 100%; height: auto; max-height: 82vh; display: block; background: #000; }
.video-modal-close {
  position: absolute; top: -46px; right: 0; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(246, 241, 230, .3); background: rgba(12, 31, 46, .6); color: #f6f1e6;
  font-size: 22px; line-height: 1; cursor: pointer; z-index: 2;
}
@media (max-width: 480px) { .video-modal-inner { margin: 0 12px; } .video-modal-close { top: -44px; right: 4px; } }

/* ---- multi-select continue (q4 evenings) ---- */
.btn-multi-next { margin-top: 22px; }

/* ---- cross-listing recommendations on the result step ---- */
.recs { margin-top: 40px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 26px; }
.recs-title { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.55); margin: 0 0 16px; }
.recs-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rec-card { display: flex; flex-direction: column; text-decoration: none; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); transition: transform .2s, border-color .2s; }
.rec-card:hover { transform: translateY(-3px); border-color: #b49962; }
.rec-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.rec-name { font-size: 13.5px; color: #fff; padding: 10px 12px 2px; line-height: 1.25; }
.rec-price { font-size: 13px; color: #b49962; padding: 0 12px 12px; }
@media (max-width: 560px) { .recs-row { grid-template-columns: 1fr; } .rec-card { flex-direction: row; align-items: center; } .rec-card img { width: 110px; aspect-ratio: 4/3; } .rec-name { padding: 8px 12px 2px; } }

/* ─────────────────────────────────────────────────────────────────────────────
   A/B TEST — la-mision-159 hero, VARIANT B (2026-07-21)
   Hypothesis: the video-first hero loses ~76% before quiz_start on mobile.
   Variant B reflows the SAME elements into value-first order — price + benefit +
   a big CTA above the fold, with the video shrunk and demoted below it. Pure
   layout change (no copy edits). Inert unless <html class="ab-hero-b"> is set,
   which only ever happens on the la-mision-159 funnel. Control = untouched.
   ───────────────────────────────────────────────────────────────────────────── */
.ab-hero-b .panel-hero-video { display: flex; flex-direction: column; }
/* price kicker becomes the headline: big, bright, first */
.ab-hero-b .panel-hero-video .kicker {
  order: 1; font-size: 19px; line-height: 1.25; letter-spacing: .01em;
  text-transform: none; color: #f4ecd8; font-weight: 800; margin: 0 0 6px;
}
.ab-hero-b .panel-hero-video h1 { order: 2; font-size: 21px; margin: 2px 0 4px; }
.ab-hero-b .panel-hero-video .hero-specs { order: 3; margin: 6px 0 2px; }
/* the inline gold CTA jumps ABOVE the video, unmissable */
.ab-hero-b .panel-hero-video > .btn-primary { order: 4; margin: 14px 0 2px; font-size: 16.5px; padding: 16px 20px; }
/* video demoted + shrunk so the whole value prop + CTA fit above the fold */
.ab-hero-b .panel-hero-video .hero-video-frame { order: 5; height: min(26dvh, 230px); margin-top: 10px; }
.ab-hero-b .panel-hero-video .hero-sound { order: 6; }
.ab-hero-b .panel-hero-video .fine { order: 7; }
