/* Zillow 3D Home page: live tour stage, capture-to-listing flow, Zillow vs Matterport.
   Accent blue matches the capture dots inside a real Zillow 3D Home tour. */

:root {
  --zx-ink: #10230b;
  --zx-deep: #102a0a;
  --zx-paper: #fffdf8;
  --zx-dot: #2f7fe0;
  --zx-dot-glow: rgba(47, 127, 224, 0.42);
  --zx-line: rgba(23, 53, 14, 0.14);
}

.zx-stage,
.zx-flow,
.zx-choose {
  font-family: var(--font-body);
}

.zx-stage .sr-only,
.zx-choose .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 1. Live tour stage ---------- */
.zx-stage {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 7vw, 96px) 0 clamp(24px, 3vw, 40px);
  background:
    radial-gradient(70% 60% at 78% 62%, rgba(47, 127, 224, 0.07) 0%, transparent 70%),
    var(--zx-paper);
  color: var(--zx-ink);
}

.zx-stage__head {
  display: grid;
  justify-items: center;
  margin-bottom: clamp(20px, 2.5vw, 34px);
  text-align: center;
}

.zx-stage__lede {
  max-width: 56ch;
  margin: 18px auto 0;
  color: rgba(16, 35, 11, 0.72) !important;
  font-size: 1.1rem;
  line-height: 1.6;
}

.zx-stage__layout {
  display: grid;
  justify-items: center;
}

.zx-stage__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
  margin-top: clamp(4px, 1vw, 12px);
}

.zx-stage__link {
  color: var(--green, #296216);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.zx-stage__link:hover,
.zx-stage__link:focus-visible {
  color: var(--gold, #c48d26);
}

.zx-stage__device {
  position: relative;
  width: min(100%, 1060px);
}

/* Standard Door3D laptop: live tour sits in the screen area, shell image on top. */
.zx-laptop {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
}

.zx-laptop::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: clamp(3px, 1.2vw, 15px);
  z-index: 0;
  width: 84%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(7, 14, 9, 0.24) 0%, rgba(7, 14, 9, 0.13) 44%, transparent 74%);
  filter: blur(8px);
  transform: translateX(-50%);
  pointer-events: none;
}

.zx-laptop__screen {
  position: absolute;
  left: 17.35%;
  top: 8%;
  z-index: 1;
  width: 64.9%;
  height: 61.3%;
  overflow: hidden;
  background: #10210d;
}

.zx-laptop__shell {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 28px 34px rgba(6, 14, 8, 0.16));
}

.zx-screen {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 35, 11, 0.12);
  border-radius: 18px;
  background: #0d1a09;
  box-shadow:
    0 40px 80px rgba(16, 35, 11, 0.22),
    0 8px 20px rgba(16, 35, 11, 0.1);
}

.zx-screen__bar {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #17350e;
}

.zx-screen__live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(246, 241, 228, 0.88);
  font-size: 0.86rem;
  font-weight: 600;
}

.zx-screen__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4cd964;
  box-shadow: 0 0 0 0 rgba(76, 217, 100, 0.6);
  animation: zx-live 2.2s ease-out infinite;
}

.zx-screen__view {
  position: relative;
  aspect-ratio: 16 / 9.5;
  background: #1a2716;
}

.zx-screen__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.zx-screen__start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, rgba(8, 20, 5, 0.18) 0%, rgba(8, 20, 5, 0.5) 100%);
  color: #fff;
  cursor: pointer;
  transition: background 0.35s ease;
}

.zx-screen__start:hover {
  background: linear-gradient(180deg, rgba(8, 20, 5, 0.08) 0%, rgba(8, 20, 5, 0.38) 100%);
}

.zx-screen__start:focus-visible {
  outline: 3px solid #f2c46a;
  outline-offset: -6px;
}

.zx-screen__start-ring {
  position: relative;
  width: 64px;
  height: 64px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--zx-dot);
  box-shadow: 0 0 0 10px var(--zx-dot-glow);
  animation: zx-ring 2.4s ease-in-out infinite;
}

.zx-screen__start-ring::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid #fff;
  transform: translate(-50%, -50%);
}

.zx-screen__start-label {
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(8, 20, 5, 0.72);
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
}

[data-zx-tour].is-active .zx-screen__start {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* iPhone frame around the floating floor plan */
.zx-phone {
  position: absolute;
  bottom: 9%;
  left: 3%;
  z-index: 4;
  width: clamp(110px, 11vw, 160px);
  aspect-ratio: 9 / 19.2;
  margin: 0;
  padding: 7px;
  border-radius: 34px;
  background: linear-gradient(145deg, #3a3d42 0%, #16181b 38%, #2b2e33 70%, #0c0d0f 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.16),
    0 30px 50px rgba(16, 35, 11, 0.32),
    0 10px 18px rgba(16, 35, 11, 0.18);
  animation: zx-float 6s ease-in-out infinite;
}

.zx-phone::before,
.zx-phone::after {
  content: "";
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: #2a2c30;
}

.zx-phone::before {
  top: 22%;
  left: -3px;
  height: 12%;
  box-shadow: 0 -34px 0 -0.5px #2a2c30;
}

.zx-phone::after {
  top: 28%;
  right: -3px;
  height: 16%;
}

.zx-phone__screen {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 27px;
  background: #fff;
}

.zx-phone__screen > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.zx-phone__island {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 34%;
  height: 15px;
  border-radius: 999px;
  background: #050505;
  transform: translateX(-50%);
}

.zx-phone__brand {
  position: absolute;
  left: 50%;
  bottom: 7%;
  display: grid;
  place-items: center;
  width: 64%;
  padding: 6px 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  transform: translateX(-50%);
}

.zx-phone__brand img {
  width: 84%;
}

/* ---------- 2. Capture-to-listing flow ---------- */
.zx-flow {
  padding: clamp(56px, 6vw, 88px) 0 clamp(20px, 2vw, 28px);
  background: var(--zx-paper);
}

.zx-flow__head {
  display: grid;
  justify-items: center;
  margin-bottom: clamp(40px, 5vw, 64px);
  text-align: center;
}

.zx-flow__lede {
  max-width: 58ch;
  margin: 18px auto 0;
  color: rgba(16, 35, 11, 0.72) !important;
  font-size: 1.08rem;
  line-height: 1.6;
}

.zx-flow__steps {
  --zx-progress: 0;
  --zx-gap: clamp(16px, 2vw, 24px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--zx-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The walk path: a dashed track from first to last dot, then a blue line drawn over it. */
.zx-flow__steps::before,
.zx-flow__steps::after {
  content: "";
  position: absolute;
  top: 9px;
  left: calc((100% - 3 * var(--zx-gap)) / 8);
  right: calc((100% - 3 * var(--zx-gap)) / 8);
  height: 2px;
}

.zx-flow__steps::before {
  background: repeating-linear-gradient(90deg, var(--zx-line) 0 8px, transparent 8px 14px);
}

.zx-flow__steps::after {
  background: var(--zx-dot);
  transform: scaleX(var(--zx-progress));
  transform-origin: left center;
  transition: transform 2.2s cubic-bezier(0.65, 0, 0.35, 1);
}

.zx-flow__steps.is-drawn {
  --zx-progress: 1;
}

.zx-flow__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 44px;
  text-align: center;
}

.zx-flow__node {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #c9d3c2;
  box-shadow: 0 0 0 1px var(--zx-line);
  transform: translateX(-50%);
  transition: background 0.3s ease, box-shadow 0.4s ease;
}

.zx-flow__steps.is-drawn .zx-flow__node {
  background: var(--zx-dot);
  box-shadow: 0 0 0 6px var(--zx-dot-glow);
}

.zx-flow__steps.is-drawn .zx-flow__step:nth-child(1) .zx-flow__node { transition-delay: 0.05s; }
.zx-flow__steps.is-drawn .zx-flow__step:nth-child(2) .zx-flow__node { transition-delay: 0.75s; }
.zx-flow__steps.is-drawn .zx-flow__step:nth-child(3) .zx-flow__node { transition-delay: 1.45s; }
.zx-flow__steps.is-drawn .zx-flow__step:nth-child(4) .zx-flow__node { transition-delay: 2.15s; }

.zx-flow__icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  border-radius: 22px;
  background: linear-gradient(150deg, #2b6418 0%, var(--green-deep, #17350e) 100%);
  box-shadow: 0 16px 30px rgba(23, 53, 14, 0.22);
}

.zx-flow__icon svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: #f2c46a;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.zx-flow__icon .zx-fill {
  fill: var(--zx-dot);
  stroke: #fff;
  stroke-width: 1.4;
}

.zx-flow__when {
  margin-bottom: 8px;
  color: var(--gold, #c48d26);
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 700;
}

.zx-flow__step h3 {
  margin: 0 0 10px;
  color: var(--zx-ink) !important;
  font-family: var(--font-heading);
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.25;
}

.zx-flow__step p {
  max-width: 30ch;
  margin: 0;
  color: rgba(16, 35, 11, 0.72) !important;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ---------- 3. Zillow 3D Home or Matterport ---------- */
.zx-choose {
  padding: clamp(28px, 3vw, 40px) 0 clamp(40px, 4vw, 56px);
  background: var(--zx-paper);
}

.zx-choose__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
  padding-top: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--zx-line);
}

.zx-choose__title {
  max-width: 14ch;
  margin: 0 0 20px;
  color: var(--zx-ink) !important;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-align: left;
}

.zx-choose__copy p {
  max-width: 46ch;
  margin: 0 0 16px;
  color: rgba(16, 35, 11, 0.76) !important;
  font-size: 1.04rem;
  line-height: 1.65;
}

.zx-choose__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.zx-table {
  overflow: hidden;
  border: 1px solid var(--zx-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(16, 35, 11, 0.08);
}

.zx-table__row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  border-top: 1px solid var(--zx-line);
}

.zx-table__row > span {
  padding: 18px 20px;
  color: var(--zx-ink);
  font-size: 0.98rem;
  line-height: 1.35;
}

.zx-table__row--head {
  border-top: 0;
  background: var(--green-deep, #17350e);
}

.zx-table__row--head > span {
  color: #fffaf0;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
}

.zx-table__row > span[role="rowheader"] {
  font-weight: 600;
}

.zx-yes,
.zx-no {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zx-yes::before,
.zx-no::before {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.zx-yes::before {
  border: 2px solid #fff;
  background: var(--zx-dot);
  box-shadow: 0 0 0 3px var(--zx-dot-glow);
}

.zx-no {
  color: rgba(16, 35, 11, 0.5) !important;
}

.zx-no::before {
  border: 2px solid rgba(16, 35, 11, 0.22);
}

/* ---------- Motion ---------- */
@keyframes zx-live {
  0% { box-shadow: 0 0 0 0 rgba(76, 217, 100, 0.6); }
  80%, 100% { box-shadow: 0 0 0 8px rgba(76, 217, 100, 0); }
}

@keyframes zx-ring {
  0%, 100% { box-shadow: 0 0 0 10px var(--zx-dot-glow); }
  50% { box-shadow: 0 0 0 18px rgba(47, 127, 224, 0.12); }
}

@keyframes zx-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(-3deg); }
}

@media (prefers-reduced-motion: reduce) {
  .zx-screen__pulse,
  .zx-screen__start-ring,
  .zx-phone {
    animation: none;
  }

  .zx-flow__steps::after,
  .zx-flow__node {
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) and (min-width: 721px) {
  .zx-flow__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 48px;
  }

  .zx-flow__steps::before,
  .zx-flow__steps::after {
    display: none;
  }
}

@media (max-width: 960px) {
  .zx-stage__layout,
  .zx-choose__layout {
    grid-template-columns: 1fr;
  }

  .zx-stage__device {
    padding: 0;
  }
}

@media (max-width: 720px) {
  .zx-flow__steps {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-left: 44px;
  }

  .zx-flow__steps::before,
  .zx-flow__steps::after {
    top: 10px;
    bottom: 60px;
    left: 9px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .zx-flow__steps::before {
    background: repeating-linear-gradient(180deg, var(--zx-line) 0 8px, transparent 8px 14px);
  }

  .zx-flow__steps::after {
    transform: scaleY(var(--zx-progress));
    transform-origin: center top;
  }

  .zx-flow__step {
    align-items: flex-start;
    padding-top: 0;
    text-align: left;
  }

  .zx-flow__node {
    top: 4px;
    left: -44px;
    transform: none;
  }

  .zx-flow__icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
  }

  .zx-flow__icon svg {
    width: 32px;
    height: 32px;
  }

  .zx-stage__device {
    padding: 0;
  }

  .zx-phone {
    display: none;
  }

  .zx-table__row > span {
    padding: 14px 12px;
    font-size: 0.9rem;
  }
}

/* ---------- Hero walkthrough video (desktop and mobile) ---------- */
.industry-hero--zillow-tour .hero__bg img,
.industry-hero--zillow-tour .hero__bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.industry-hero--zillow-tour .hero__bg img {
  z-index: 0;
}

.industry-hero--zillow-tour .hero__bg-video {
  z-index: 1;
  display: block;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .industry-hero--zillow-tour .hero__bg-video {
    display: none;
  }
}

/* ---------- FAQ: match the 3D tour page (no card, no band shadow) ---------- */
.page-zillow-3d-home .faq {
  margin-bottom: 0;
  padding-top: clamp(34px, 3.6vw, 44px);
  padding-bottom: clamp(30px, 3.2vw, 38px);
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* ---------- "Zillow 3D Home tours show on" logo strip (under the hero) ---------- */
.page-zillow-3d-home .logo-band--zillow-platforms {
  margin-top: 18px;
  padding-top: 4px;
  padding-bottom: 10px;
}

.page-zillow-3d-home .logo-band--zillow-platforms .logo-band__header {
  margin-bottom: 14px;
}

.logo-band--zillow-platforms .logo-band__logo--platform-zillow,
.logo-band--zillow-platforms .logo-band__logo--platform-streeteasy {
  --platform-logo-height: 35px;
}

.logo-band--zillow-platforms .logo-band__logo--platform-trulia {
  --platform-logo-height: 32px;
}

.logo-band--zillow-platforms + .zx-stage {
  padding-top: clamp(20px, 2.4vw, 32px);
}

@media (max-width: 768px) {
  .logo-band--zillow-platforms .logo-band__logo--platform-zillow,
  .logo-band--zillow-platforms .logo-band__logo--platform-streeteasy {
    --platform-logo-height: 29px;
  }

  .logo-band--zillow-platforms .logo-band__logo--platform-trulia {
    --platform-logo-height: 27px;
  }
}

/* Keep the poster visible until playback actually starts. */
.industry-hero--zillow-tour .hero__bg-video { opacity: 0; }
.industry-hero--zillow-tour .hero__bg-video.is-ready { opacity: 1; }
.industry-hero--zillow-tour .hero__bg-video[hidden] { display: none; }
