/* RnB homepage correction layer.
   Loaded after styles.css. This file is the single authority for the homepage
   scroll/problem sections, so old desktop pin spacers cannot leak through. */

html,
body {
  overflow-x: clip !important;
}

body {
  overflow-y: visible !important;
}

.feature-panel .kicker,
.mosaic-tile span,
.space-panel span,
.editorial-grid span,
.world-grid span,
.inner-service-grid span,
.project-gallery article.project-item span {
  display: inline-flex;
  width: fit-content;
  max-width: calc(100% - 32px);
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 10px 5px;
  color: #fff8ee !important;
  background: rgba(24, 18, 14, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 26px rgba(16, 11, 8, 0.18);
  font-family: "Exo 2", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
  text-shadow: none;
  text-transform: uppercase;
}

.feature-panel .kicker {
  margin-bottom: 14px;
}

.mosaic-tile span {
  right: auto;
  bottom: 18px;
  left: 20px;
}

.why-premium .split-title h2,
.spaces-heading h2,
.before-after-section .section-title h2,
.journey .split-title h2 {
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.why-premium .split-title h2 {
  max-width: 1320px;
  font-size: clamp(48px, 4.45vw, 76px);
  line-height: 0.96;
}

.before-after-section .section-title.narrow {
  max-width: 1460px;
}

.before-after-section .section-title h2 {
  max-width: 1360px;
  font-size: clamp(44px, 4.1vw, 74px);
  line-height: 0.98;
}

.why-premium .split-title h2 em,
.spaces-heading h2 em,
.before-after-section h2 em {
  color: var(--walnut);
  font-style: italic;
}

/* Dream: compact, always visible. JS only rotates the image/story label. */
.dream-story {
  position: relative;
  min-height: auto !important;
  padding-block: clamp(72px, 7vw, 110px);
  overflow: clip;
  background: var(--ivory);
}

.story-sticky {
  position: relative !important;
  top: auto !important;
  display: grid;
  grid-template-columns: minmax(360px, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(34px, 4.5vw, 76px);
  width: min(1460px, calc(100% - 56px));
  min-height: auto !important;
  margin: 0 auto;
  padding-block: 0;
  align-items: center;
  transform: none !important;
  will-change: auto;
}

.story-copy h2 {
  max-width: 660px;
  font-size: clamp(48px, 4.15vw, 72px);
  line-height: 0.96;
  text-wrap: balance;
}

.story-copy p:last-child {
  max-width: 520px;
  margin-top: clamp(16px, 2vw, 22px);
}

.story-stage {
  height: clamp(520px, 62vh, 720px);
  min-height: 0 !important;
}

.story-stage img:first-child {
  opacity: 0;
}

.story-stage img.is-active {
  z-index: 1;
  opacity: 1;
  transform: scale(1);
}

.story-label {
  z-index: 2;
}

/* Spaces We Shape: native sticky horizontal scroll, no fake vertical translation. */
.spaces-shape {
  position: relative;
  min-height: var(--spaces-height, 220vh) !important;
  padding-top: clamp(38px, 4vw, 60px);
  padding-bottom: clamp(44px, 4vw, 66px);
  overflow: clip;
  background: var(--ivory);
}

.spaces-heading {
  position: relative !important;
  top: auto !important;
  z-index: 3;
  width: min(1460px, calc(100% - 56px));
  margin: 0 auto;
  padding: clamp(16px, 1.7vw, 24px) 0 clamp(8px, 1vw, 14px);
  background: linear-gradient(180deg, rgba(246, 240, 231, 0.96) 0%, rgba(246, 240, 231, 0.88) 72%, rgba(246, 240, 231, 0) 100%);
  flex: 0 0 auto;
}

.spaces-heading h2 {
  max-width: 1000px;
  font-size: clamp(34px, 3.35vw, 54px);
  line-height: 0.98;
}

.spaces-pin {
  position: sticky !important;
  top: 0 !important;
  display: flex;
  min-height: min(74svh, 660px) !important;
  flex-direction: column;
  margin-top: 0 !important;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
  transform: none !important;
}

.spaces-track {
  display: flex;
  gap: clamp(16px, 1.4vw, 22px);
  padding-inline: max(28px, calc((100vw - 1460px) / 2));
  margin-top: clamp(8px, 1vw, 14px);
  overflow: visible;
  scrollbar-width: none;
  transform: translate3d(var(--spaces-x, 0px), 0, 0) !important;
  will-change: transform;
}

.spaces-track.is-scroll-linked {
  transition: transform 80ms linear;
}

.spaces-track::-webkit-scrollbar {
  display: none;
}

.space-panel,
.space-panel:nth-child(even),
.space-panel:nth-child(3n + 2),
.space-panel:nth-child(3n) {
  flex: 0 0 clamp(360px, 31vw, 500px);
  height: clamp(360px, 48vh, 500px);
  transform: none;
  scroll-snap-align: center;
}

.space-panel strong {
  font-size: clamp(34px, 3.2vw, 52px);
}

/* How We Work: native sticky 01-05 progression with brush highlights. */
.journey-bg {
  display: none !important;
}

.journey {
  position: relative;
  min-height: var(--journey-height, 220vh) !important;
  padding-top: clamp(56px, 5vw, 82px);
  padding-bottom: clamp(56px, 5vw, 82px);
}

.journey-stage {
  position: sticky !important;
  top: clamp(46px, 5vh, 62px) !important;
  z-index: 4;
}

.journey .split-title {
  position: relative !important;
  top: auto !important;
  z-index: 2;
  grid-template-columns: clamp(150px, 13vw, 220px) minmax(0, 1fr);
  margin-bottom: 0;
  padding-bottom: clamp(12px, 1.2vw, 18px);
  background: linear-gradient(180deg, rgba(246, 240, 231, 0.96) 0%, rgba(246, 240, 231, 0.9) 72%, rgba(246, 240, 231, 0) 100%);
}

.journey .split-title h2 {
  max-width: 980px;
  font-size: clamp(32px, 3.2vw, 52px);
  line-height: 1;
  white-space: normal !important;
}

.journey-line {
  --journey-progress: 0%;
  position: relative !important;
  top: auto !important;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: clamp(380px, 45svh, 440px);
  margin-top: clamp(10px, 1.2vw, 16px);
  overflow: hidden;
  border: 1px solid rgba(83, 55, 34, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 250, 243, 0.92), rgba(247, 241, 233, 0.97)),
    repeating-linear-gradient(90deg, rgba(83, 55, 34, 0.05) 0 1px, transparent 1px 18%);
  box-shadow: 0 28px 80px rgba(49, 31, 19, 0.08);
  transform: none !important;
  will-change: auto;
}

.journey-line::after {
  content: "";
  position: absolute;
  top: 58%;
  right: 6%;
  left: 6%;
  z-index: 0;
  height: 1px;
  background: rgba(83, 55, 34, 0.2);
}

.journey-line::before {
  content: "";
  position: absolute;
  top: 58%;
  left: 6%;
  z-index: 1;
  width: min(var(--journey-progress), 88%);
  max-width: 88%;
  height: 2px;
  background: linear-gradient(90deg, #7d3e18, #c99a5e);
  box-shadow: 0 0 22px rgba(143, 75, 28, 0.28);
}

.journey-line article,
.journey-line article:nth-of-type(even) {
  position: relative;
  z-index: 2;
  display: block;
  min-height: clamp(380px, 45svh, 440px);
  padding: 0 clamp(20px, 1.8vw, 28px);
  border-right: 1px solid rgba(83, 55, 34, 0.12);
  opacity: 0.48;
  transform: none;
  transition: opacity 260ms ease, background 260ms ease;
}

.journey-line article:nth-of-type(1),
.journey-line article:nth-of-type(5) {
  padding-top: clamp(168px, 20vh, 196px);
}

.journey-line article:nth-of-type(2),
.journey-line article:nth-of-type(4) {
  padding-top: clamp(26px, 3vh, 34px);
}

.journey-line article:nth-of-type(3) {
  padding-top: clamp(228px, 27vh, 264px);
}

.journey-line article:last-child {
  border-right: 0;
}

.journey-line article::before {
  content: "";
  position: absolute;
  top: calc(58% - 8px);
  left: clamp(20px, 1.8vw, 28px);
  width: 16px;
  height: 16px;
  border: 1px solid rgba(143, 75, 28, 0.68);
  border-radius: 999px;
  background: #d4b179;
  box-shadow: 0 0 0 8px rgba(143, 75, 28, 0.06);
}

.journey-line article:nth-of-type(5)::before {
  right: clamp(20px, 1.8vw, 28px);
  left: auto;
}

.journey-line article::after {
  content: "";
  position: absolute;
  right: clamp(18px, 1.8vw, 28px);
  bottom: clamp(102px, 11vh, 128px);
  left: clamp(18px, 1.8vw, 28px);
  z-index: -1;
  height: 28px;
  opacity: 0;
  transform: scaleX(0.15) rotate(-1deg);
  transform-origin: left center;
  background:
    radial-gradient(ellipse at 8% 56%, rgba(143, 75, 28, 0.26) 0 22%, transparent 24%),
    linear-gradient(92deg, rgba(143, 75, 28, 0), rgba(143, 75, 28, 0.24) 12%, rgba(197, 144, 82, 0.34) 48%, rgba(143, 75, 28, 0.12) 88%, rgba(143, 75, 28, 0));
  filter: blur(0.15px);
  transition: opacity 220ms ease, transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.journey-line article:nth-of-type(even)::after {
  top: clamp(90px, 10vh, 112px);
  bottom: auto;
}

.journey-line article.is-active,
.journey-line article.is-past {
  opacity: 1;
}

.journey-line article.is-past {
  background: rgba(255, 250, 243, 0.34);
}

.journey-line article.is-active {
  background: rgba(255, 250, 243, 0.82);
}

.journey-line article.is-active::before {
  border-color: #8f4b1c;
  background: #8f4b1c;
  box-shadow: 0 0 0 12px rgba(143, 75, 28, 0.12), 0 0 30px rgba(143, 75, 28, 0.28);
  transform: scale(1.2);
}

.journey-line article.is-active::after {
  opacity: 1;
  transform: scaleX(1) rotate(-1deg);
}

.journey-line span {
  display: block;
  margin: 0 0 clamp(12px, 1.4vw, 18px);
  color: #7d3e18;
  font-family: var(--serif);
  font-size: clamp(38px, 3.4vw, 56px);
  font-weight: 600;
  line-height: 0.9;
  transform: none !important;
}

.journey-line h3 {
  position: relative;
  color: #211712;
  font-size: clamp(20px, 1.7vw, 28px);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.journey-line p {
  max-width: 260px;
  margin-top: clamp(10px, 1.1vw, 14px);
  color: rgba(72, 55, 44, 0.78);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.6;
}

@media (max-width: 980px) {
  .dream-story,
  .journey {
    padding-block: 54px;
  }

  .spaces-shape {
    min-height: auto !important;
    padding-block: 54px;
    overflow: visible;
  }

  .story-sticky,
  .journey .split-title {
    grid-template-columns: 1fr;
  }

  .story-sticky,
  .spaces-heading,
  .journey {
    width: min(100% - 32px, 760px);
  }

  .story-stage {
    height: clamp(390px, 66svh, 620px);
  }

  .story-copy h2,
  .spaces-heading h2,
  .journey .split-title h2 {
    font-size: clamp(34px, 9vw, 52px);
    line-height: 1;
  }

  .spaces-track {
    padding-inline: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    transform: none !important;
  }

  .spaces-pin {
    position: relative !important;
    top: auto !important;
    min-height: auto !important;
    overflow: visible;
  }

  .journey-stage {
    position: relative !important;
    top: auto !important;
  }

  .space-panel,
  .space-panel:nth-child(even),
  .space-panel:nth-child(3n + 2),
  .space-panel:nth-child(3n) {
    flex: 0 0 min(84vw, 560px);
    height: min(66svh, 570px);
  }

  .journey-line {
    position: relative !important;
    top: auto !important;
    grid-template-columns: 1fr;
    min-height: auto;
    overflow: visible;
  }

  .journey-line::before {
    top: 32px;
    bottom: 32px;
    left: 28px;
    width: 2px;
    max-width: none;
    height: calc(100% - 64px);
  }

  .journey-line::after {
    top: 32px;
    bottom: 32px;
    left: 28px;
    width: 1px;
    height: auto;
  }

  .journey-line article,
  .journey-line article:nth-of-type(even) {
    min-height: 0;
    padding: 28px 26px 28px 62px;
    border-right: 0;
    border-bottom: 1px solid rgba(83, 55, 34, 0.12);
  }

  .journey-line article:last-child {
    border-bottom: 0;
  }

  .journey-line article::before {
    top: 31px;
    left: 20px;
  }

  .journey-line article::after,
  .journey-line article:nth-of-type(even)::after {
    top: 64px;
    right: 26px;
    bottom: auto;
    left: 62px;
    height: 20px;
  }

  .journey-line span {
    margin-bottom: 14px;
    font-size: clamp(34px, 11vw, 50px);
  }

  .journey-line p {
    max-width: 540px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-stage img {
    transition: none;
  }
}

/* Testimonial-only marquee lock: one row, same visual card system, no rating-label gap. */
.testimonials .testimonial-shell {
  overflow: hidden;
}

.testimonials .testimonial-track.is-marquee {
  animation: testimonial-marquee-single 180s linear infinite;
}

.testimonials .testimonial-track article p:first-child {
  margin-top: 0;
}

@keyframes testimonial-marquee-single {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 7px));
  }
}
