/* Loma Serena /tour funnel — non-critical styles (critical block is inline in tour/index.html) */

/* 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(11, 21, 32, .88) 0%, rgba(11, 21, 32, .45) 60%, transparent 100%);
}
.funnel-top .brand {
  font-size: 13px;
  letter-spacing: .32em;
  font-weight: 600;
  color: rgba(245, 241, 232, .92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.back-btn {
  pointer-events: auto;
  background: rgba(11, 21, 32, .45);
  border: 1px solid rgba(245, 241, 232, .25);
  color: #f5f1e8;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.progress {
  font-size: 12px;
  color: rgba(245, 241, 232, .75);
  background: rgba(11, 21, 32, .45);
  border: 1px solid rgba(245, 241, 232, .18);
  padding: 7px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Question panels */
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(26px, 6.4vw, 36px);
  line-height: 1.16;
  margin-bottom: 10px;
}
.panel-question {
  justify-content: flex-start;
  padding-top: calc(84px + env(safe-area-inset-top));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.step[data-step="1"], .step[data-step="3"], .step[data-step="4"],
.step[data-step="6"], .step[data-step="8"] {
  background: linear-gradient(180deg, #0e1a28 0%, #0b1520 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: 12px; margin: 18px 0 6px; }
.cards-3 { grid-template-columns: 1fr; }
.cards-2 { grid-template-columns: 1fr 1fr; }
.img-card {
  position: relative;
  border: 1px solid rgba(245, 241, 232, .14);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #0e1a28;
  text-align: left;
  transition: transform .15s ease, border-color .15s ease;
}
.img-card:active { transform: scale(.97); }
.img-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  opacity: .92;
}
.img-card.tall img { height: 210px; }
.cards-3 .img-card img { height: 120px; }
.cards-3 .img-card.tall img { height: 210px; }
/* focal-point fixes for vertical renders in wide cards */
.img-card img[src*="q1-coffee"] { object-position: 50% 74%; }
.img-card img[src*="q1-beach"] { object-position: 50% 22%; }
.media-bg img[src*="q5-community"] { object-position: 15% 45%; }
.img-card > span {
  display: block;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #f5f1e8;
}
.img-card.selected { border-color: #c8a35c; box-shadow: 0 0 0 2px rgba(200, 163, 92, .5); }

/* On phones ≥ 400px tall 3-card grid becomes photo rows; on wider screens 3-up */
@media (min-width: 560px) {
  .cards-3 { grid-template-columns: 1fr 1fr 1fr; }
  .cards-3 .img-card img { height: 170px; }
  .img-card img { height: 170px; }
  .img-card.tall img { height: 260px; }
  .cards-3 .img-card.tall img { height: 260px; }
}

/* Model cards */
.model-card .model-name {
  padding: 12px 14px 2px;
  font-size: 17px;
  letter-spacing: .18em;
  font-weight: 700;
  color: #d9c69a;
}
.model-card .model-spec {
  padding: 0 14px 14px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  color: rgba(245, 241, 232, .78);
}

/* Chips */
.chip-col { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.chip {
  border: 1px solid rgba(245, 241, 232, .28);
  background: rgba(11, 21, 32, .55);
  color: #f5f1e8;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 18px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  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: #c8a35c; background: rgba(200, 163, 92, .16); }
.chip-ghost { margin-top: 12px; text-align: center; background: transparent; border-style: dashed; font-weight: 500; }

/* Contact form */
#contactForm { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
#contactForm input {
  background: rgba(245, 241, 232, .96);
  border: 0;
  border-radius: 12px;
  padding: 16px 16px;
  font-size: 16px; /* prevents iOS zoom */
  color: #14202c;
  width: 100%;
}
#contactForm input:focus { outline: 3px solid rgba(200, 163, 92, .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: #d9c69a; }

/* 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(245, 241, 232, .14); }
.result-media img { width: 100%; display: block; }
.result-media .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.result-media .duo figure { margin: 0; }
.result-media .duo figcaption {
  font-size: 12px; letter-spacing: .14em; color: #d9c69a; padding: 8px 4px 2px; text-align: center; font-weight: 700;
}
.parvin-row { display: flex; gap: 14px; align-items: flex-start; margin: 10px 0 16px; }
.parvin-copy strong { display: block; font-size: 15px; color: #d9c69a; margin-bottom: 4px; letter-spacing: .04em; }
.parvin-copy p { font-size: 14.5px; line-height: 1.55; color: rgba(245, 241, 232, .85); }
/* height (not just min-height) is required here — Calendly's iframe uses
   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 default for iframes. */
.calendly-holder { height: 640px; border-radius: 16px; overflow: hidden; background: #f5f1e8; }
.calendly-holder .calendly-inline-widget { height: 640px; }

/* Desktop: the quiz screens intentionally stay phone-narrow (story feel), but the
   booking screen is where conversion happens — Calendly needs real width to show
   its calendar + time-slots side by side instead of cramming into a mobile column. */
@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; }
}

/* "Watch the tour" secondary CTA — deliberately quieter than the primary gold
   button so it never competes with the quiz start, just offers it. */
.btn-video {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  background: transparent;
  border: 1px solid rgba(245, 241, 232, .32);
  color: #f5f1e8;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  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: #c8a35c; background: rgba(200, 163, 92, .1); }
.btn-video .play-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #c8a35c;
  color: #141b14;
  font-size: 10px;
  padding-left: 2px;
  flex: none;
}

/* Video lightbox */
.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, 10, 16, .92); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.video-modal-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  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(245, 241, 232, .3);
  background: rgba(11, 21, 32, .6);
  color: #f5f1e8;
  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; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .step.active { animation: none; }
  #heroVideo { display: none !important; }
}
