/* ============================================================
   experience.css - marketing-page motion + layout layer
   Loaded ONLY by the 9 marketing pages (services/buyers, services/sellers,
   areas/index, 6 community pages) AFTER style.css. Consumes the brand vars
   from style.css (:root), never hardcodes navy/gold hex.
   Motion pieces: pinned horizontal scroll-story (buyer/seller), rise-up
   reveals, lazy live-map embed. NO visitor-facing copy may live in this
   file (the long-dash deploy gate only scans HTML).
   ============================================================ */

/* style.css sets html { overflow-x: hidden }, which some engines treat as a
   scroll container on an ancestor and it kills position: sticky inside .story.
   overflow-x: clip clips without creating a scroll container, so the pin
   sticks. Scoped to these pages because only they load this file. */
html {
  overflow-x: clip;
}

/* ---- Marketing hero (video or image background) ----
   Extends .hero-video-section/.hero-video/.hero-overlay from style.css. */
.exp-hero {
  min-height: 72vh;
}
.exp-hero .hero-content {
  max-width: 760px;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.exp-hero .breadcrumb {
  margin-bottom: 1.25rem;
}
.exp-hero .breadcrumb,
.exp-hero .breadcrumb a {
  color: var(--gray-300);
  font-size: 0.875rem;
  text-decoration: none;
}
.exp-hero .breadcrumb a:hover {
  color: var(--gold-light);
}
.exp-hero .breadcrumb .current {
  color: var(--gold-light);
}
.exp-hero .breadcrumb span {
  margin: 0 0.4rem;
}
.exp-hero h1 {
  color: var(--white);
  font-size: 3.25rem;
  line-height: 1.08;
  margin: 0 0 1.25rem;
}
.exp-hero .exp-hero-sub {
  color: var(--gray-200);
  font-size: 1.2rem;
  line-height: 1.65;
  margin: 0 0 2rem;
  max-width: 560px;
}
.exp-hero .exp-hero-rule {
  width: 64px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 1.5rem;
}
.exp-hero .cta-buttons {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}
/* Image-hero variant: a <picture> fills the stage like the video does */
.exp-hero .hero-image,
.exp-hero .hero-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* ---- Pinned horizontal scroll-story ---- */
.story {
  position: relative;
  background: var(--navy-dark);
  /* JS sets the real height (panelCount * 90vh); this floor keeps the
     section visible before init and under no-JS. */
  min-height: 100vh;
}
.story__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.story__track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.story__panel {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 6vw 7rem;
}
.story__panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 3.5rem;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  opacity: 0;
  transform: scale(0.96) translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.story__panel.active .story__panel-inner {
  opacity: 1;
  transform: none;
}
.story__panel-img {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 10;
  background: var(--navy-light);
}
.story__panel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.story__panel-num {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  display: block;
  margin-bottom: 0.875rem;
}
.story__panel-copy h3 {
  color: var(--white);
  font-size: 2rem;
  line-height: 1.15;
  margin: 0 0 1rem;
}
.story__panel-copy p {
  color: var(--gray-300);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}
.story__heading {
  position: absolute;
  top: 6rem; /* clears the sticky 73px site header overlaying the stage */
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}
.story__heading .section-label {
  color: var(--gold);
}
/* Follower: decorative gold pin traveling the bottom rail as progress */
.story__rail {
  position: absolute;
  left: 6vw;
  right: 6vw;
  bottom: 3.25rem;
  height: 2px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 1px;
}
.story__rail-fill {
  height: 100%;
  width: 0;
  background: var(--gold);
  border-radius: 1px;
}
.story__follower {
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  color: var(--gold);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

/* Static fallback (mobile / reduced motion / no-JS): vertical stack */
.story--static {
  min-height: 0;
}
.story--static .story__pin {
  position: static;
  height: auto;
  overflow: visible;
  display: block;
}
.story--static .story__heading {
  position: static;
  padding: 3.5rem 1.5rem 0;
  pointer-events: auto;
}
.story--static .story__track {
  display: block;
  height: auto;
}
.story--static .story__panel {
  flex: none;
  width: auto;
  height: auto;
  padding: 2.5rem 1.5rem;
}
.story--static .story__panel-inner {
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 640px;
  opacity: 1;
  transform: none;
}
.story--static .story__rail,
.story--static .story__follower {
  display: none;
}

/* ---- Rise-up reveals ----
   Hiding styles are gated on html.exp-js (set pre-paint by an inline head
   script on each marketing page) so content is never invisible without JS. */
html.exp-js .reveal-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.exp-js .reveal-up.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.exp-js .reveal-up {
    transition: none;
  }
}

/* ---- Live map embed ---- */
.live-map-section {
  padding: 5rem 0;
  background: var(--gray-50);
}
.live-map-frame {
  position: relative;
}
.live-map-embed {
  width: 100%;
  height: 80vh;
  min-height: 560px;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--gray-100);
  display: block;
}
.live-map-fallback {
  text-align: center;
  margin-top: 1.5rem;
}
/* Mobile CTA card shown INSTEAD of the iframe on phones */
.map-cta-card {
  display: none;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.map-cta-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.map-cta-card .map-cta-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1.25rem 1.25rem;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0) 0%, rgba(17, 24, 39, 0.88) 60%);
  color: var(--white);
}
.map-cta-card h3 {
  color: var(--white);
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}
@media (max-width: 768px) {
  .live-map-frame {
    display: none;
  }
  .map-cta-card {
    display: block;
  }
}

/* ---- Image mosaic (community pages) ---- */
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.mosaic-grid .mosaic-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.mosaic-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.mosaic-grid .mosaic-item:hover img {
  transform: scale(1.04);
}

/* ---- Areas-index photo card grid ---- */
.area-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.area-photo-card {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: box-shadow 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.area-photo-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}
.area-photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.area-photo-card:hover img {
  transform: scale(1.05);
}
.area-photo-card .area-photo-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.75rem 1.25rem 1.1rem;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0) 0%, rgba(17, 24, 39, 0.85) 65%);
}
.area-photo-card h3 {
  color: var(--white);
  margin: 0 0 0.2rem;
  font-size: 1.3rem;
}
.area-photo-card p {
  color: var(--gray-300);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .exp-hero h1 {
    font-size: 2.6rem;
  }
  .story__panel-copy h3 {
    font-size: 1.6rem;
  }
}
@media (max-width: 992px) {
  .area-photo-grid,
  .mosaic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .exp-hero {
    min-height: 60vh;
  }
  .exp-hero h1 {
    font-size: 2.1rem;
  }
  .exp-hero .exp-hero-sub {
    font-size: 1.05rem;
  }
  .exp-hero .hero-content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
@media (max-width: 480px) {
  .area-photo-grid,
  .mosaic-grid {
    grid-template-columns: 1fr;
  }
  .exp-hero h1 {
    font-size: 1.85rem;
  }
}
