/* Approved bathroom opening: real text over separately composed photographs. */
html[data-bathroom-opening] .hero {
  --wood-start: 58.6%;
  --inlay-top: 61.2%;
  --floor-start: 87.5%;
  --opening-label-gap: clamp(10px, 1.5vw, 24px);
  container-type: inline-size;
  aspect-ratio: 1672 / 941;
  height: auto;
  min-height: 0;
  max-height: none;
}

html[data-bathroom-opening] .hero,
html[data-bathroom-opening] .stone-bridge {
  --opening-x-size: clamp(22px, 2.2vw, 38px);
}

html[data-bathroom-opening] .hero-bathroom-art {
  background: #e8dfce;
}

.bathroom-picture,
.bathroom-picture > img {
  display: block;
  width: 100%;
  height: 100%;
}

.bathroom-picture > img {
  max-width: none;
  object-fit: cover;
}

html[data-bathroom-opening] .site-header:not(.is-scrolled) .wordmark-image {
  height: clamp(26px, 2.1vw, 40px);
}

html[data-bathroom-opening] .site-header:not(.is-scrolled) .header-category {
  font-size: clamp(.75rem, 1vw, 1rem);
}

html[data-bathroom-opening] .site-header:not(.is-scrolled) .menu-toggle {
  font-size: clamp(.875rem, 1.35vw, 1.375rem);
}

html[data-bathroom-opening] .hero-copy {
  left: calc(var(--gutter) - 12px);
  top: 17%;
  width: 50%;
  z-index: 2;
}

html[data-bathroom-opening] .hero h1 {
  font-size: clamp(2.5rem, 7.5cqw, 9rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.058em;
}

html[data-bathroom-opening] .hero-promise {
  font-size: clamp(1.25rem, 2.9cqw, 3.4rem);
  font-weight: 400;
  line-height: 1.2;
  margin-top: 1.1cqw;
  letter-spacing: -.035em;
}

html[data-bathroom-opening] .hero .hero-foot {
  display: grid;
  gap: clamp(4px, .7cqw, 12px);
  left: calc(var(--gutter) - 12px);
  top: 65.5%;
  bottom: auto;
  width: calc(var(--wood-start) - 7%);
}

html[data-bathroom-opening] .hero .hero-partner-explore {
  margin: 0;
  padding: 0;
  font-size: clamp(1.125rem, 2.05cqw, 2.5rem);
  font-weight: 400;
  line-height: 1.25;
  gap: var(--opening-label-gap);
}

html[data-bathroom-opening] .hero .explore-link {
  justify-self: start;
  min-height: 44px;
  padding: 0;
  font-size: clamp(1rem, 1.65cqw, 2rem);
  font-weight: 400;
  line-height: 1.3;
  gap: var(--opening-label-gap);
}

html[data-bathroom-opening] .hero .hero-partner > svg,
html[data-bathroom-opening] .hero .explore-link > svg:first-child {
  width: var(--opening-x-size);
  height: var(--opening-x-size);
  flex: 0 0 var(--opening-x-size);
}

html[data-bathroom-opening] .hero .explore-link .line-arrow {
  width: clamp(18px, 1.7cqw, 28px);
  height: clamp(18px, 1.7cqw, 28px);
  flex-basis: clamp(18px, 1.7cqw, 28px);
}

html[data-bathroom-opening] .hero .hero-foot > .eyebrow {
  margin-top: 0;
  margin-left: calc(var(--opening-x-size) + var(--opening-label-gap));
  font-size: clamp(.75rem, .95cqw, 1rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .14em;
}

html[data-bathroom-opening] .hero-continuation {
  top: 51.5%;
}

html[data-bathroom-opening] .stone-bridge::before {
  background-image: url('./assets/renewx-materials-desktop-2x1.webp');
}

/* Full-width desktop opening. Responsive photographs carry the full basin
   and foreground floor; the viewport controls height, not the page width. */
@media (min-width: 761px) {
  html[data-bathroom-opening] .hero,
  html[data-bathroom-opening] .stone-bridge {
    width: auto;
    max-width: none;
    margin-left: 12px;
    margin-right: 12px;
  }

  html[data-bathroom-opening] .hero {
    --opening-x-size: clamp(20px, min(1.8cqw, 3.2svh), 32px);
    --opening-label-gap: clamp(10px, 1.25cqw, 20px);
    aspect-ratio: auto;
    height: min(calc(100svh - 12px), calc((100vw - 24px) * 941 / 1672));
    border-radius: clamp(24px, 3vw, 40px) clamp(24px, 3vw, 40px) 0 0;
  }

  html[data-bathroom-opening] .bathroom-picture > img {
    object-fit: cover;
    object-position: center bottom;
  }

  html[data-bathroom-opening] .site-header:not(.is-scrolled) {
    width: auto;
    max-width: none;
    margin: 0;
    min-height: 72px;
    padding: clamp(12px, 2.4svh, 22px) var(--gutter);
  }

  html[data-bathroom-opening] .site-header:not(.is-scrolled) .wordmark-image {
    height: clamp(24px, min(1.8vw, 3.2svh), 32px);
  }

  html[data-bathroom-opening] .site-header:not(.is-scrolled) .header-category {
    font-size: clamp(.75rem, min(.9vw, 1.6svh), .875rem);
  }

  html[data-bathroom-opening] .site-header:not(.is-scrolled) .menu-toggle {
    font-size: clamp(.875rem, min(1.15vw, 2svh), 1.125rem);
  }

  html[data-bathroom-opening] .hero-copy {
    left: calc(var(--gutter) - 12px);
    top: 20%;
    width: 48%;
  }

  html[data-bathroom-opening] .hero h1 {
    font-size: clamp(2.5rem, min(6cqw, 10.5svh), 7.5rem);
  }

  html[data-bathroom-opening] .hero-promise {
    font-size: clamp(1.25rem, min(2.5cqw, 4.4svh), 2.8rem);
    margin-top: 1.2cqw;
  }

  html[data-bathroom-opening] .hero .hero-foot {
    left: calc(var(--gutter) - 12px);
    width: 48%;
    gap: clamp(4px, .65cqw, 10px);
  }

  html[data-bathroom-opening] .hero .hero-partner-explore {
    font-size: clamp(1.125rem, min(1.85cqw, 3.4svh), 2rem);
  }

  html[data-bathroom-opening] .hero .explore-link {
    font-size: clamp(1rem, 1.5cqw, 1.75rem);
  }

  html[data-bathroom-opening] .hero .hero-foot > .eyebrow {
    font-size: clamp(.75rem, .9cqw, .875rem);
    letter-spacing: .12em;
  }
}

@media (min-width: 761px) and (min-aspect-ratio: 11/5) {
  html[data-bathroom-opening] .stone-bridge::before {
    background-image: url('./assets/renewx-materials-desktop-5x2.webp');
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  html[data-bathroom-opening] .hero .hero-foot {
    top: 64%;
    gap: 2px;
  }

  html[data-bathroom-opening] .hero .explore-link {
    min-height: 40px;
  }

  html[data-bathroom-opening] .hero .hero-foot > .eyebrow {
    letter-spacing: .08em;
  }
}

@media (max-width: 760px) {
  html[data-bathroom-opening] .hero {
    --wood-start: 55.5%;
    --inlay-top: 61.2%;
    --floor-start: 81.5%;
    --opening-label-gap: 8px;
    aspect-ratio: 841 / 1870;
    height: auto;
    min-height: 0;
  }

  html[data-bathroom-opening] .hero,
  html[data-bathroom-opening] .stone-bridge {
    --opening-x-size: 18px;
  }

  html[data-bathroom-opening] .site-header:not(.is-scrolled) {
    min-height: 90px;
    padding: 22px 7vw;
  }

  html[data-bathroom-opening] .site-header:not(.is-scrolled) .wordmark-image {
    height: clamp(24px, 7.2vw, 34px);
  }

  html[data-bathroom-opening] .site-header:not(.is-scrolled) .menu-toggle {
    font-size: 1rem;
    gap: 10px;
  }

  html[data-bathroom-opening] .hero-copy {
    left: 5%;
    top: 21.5%;
    width: calc(var(--wood-start) - 7%);
  }

  html[data-bathroom-opening] .hero h1 {
    font-size: clamp(1.875rem, 10vw, 4rem);
    line-height: 1.03;
    letter-spacing: -.058em;
  }

  html[data-bathroom-opening] .hero-promise {
    margin-top: 12px;
    font-size: clamp(1.2rem, 6.2vw, 2.5rem);
    line-height: 1.28;
  }

  html[data-bathroom-opening] .hero-promise .hero-copy-line {
    display: block;
  }

  html[data-bathroom-opening] .hero .hero-services-mobile {
    left: 5%;
    bottom: calc(100% - var(--inlay-top) + 12px);
    width: calc(var(--wood-start) - 7%);
    font-size: clamp(.75rem, 3vw, .8125rem);
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.5;
  }

  html[data-bathroom-opening] .hero .hero-foot {
    display: flex;
    flex-direction: column;
    gap: 0;
    left: calc(8% - var(--opening-x-size) / 2);
    top: 68.5%;
    bottom: auto;
    width: calc(var(--wood-start) - 8% + var(--opening-x-size) / 2);
  }

  html[data-bathroom-opening] .hero .hero-partner-explore {
    gap: var(--opening-label-gap);
    margin: 0;
    font-size: clamp(.8125rem, 3.55vw, .9375rem);
    font-weight: 500;
    letter-spacing: -.015em;
    line-height: 1.4;
  }

  html[data-bathroom-opening] .hero .explore-link {
    width: max-content;
    max-width: 100%;
    min-height: 44px;
    font-size: clamp(.875rem, 3.8vw, .9375rem);
    gap: var(--opening-label-gap);
    letter-spacing: -.015em;
    line-height: 1.4;
  }

  html[data-bathroom-opening] .hero .explore-link > span {
    min-width: 0;
  }

  html[data-bathroom-opening] .hero .explore-link .line-arrow {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }

  html[data-bathroom-opening] .hero .hero-foot > .eyebrow {
    display: none;
  }

  html[data-bathroom-opening] .hero-continuation {
    top: var(--inlay-top);
  }

  html[data-bathroom-opening] .stone-bridge::before {
    background-image: url('./assets/renewx-bathroom-mobile.webp');
    background-size: 100% auto;
  }
}

@media (max-width: 370px) {
  html[data-bathroom-opening] .hero {
    --opening-label-gap: 4px;
    --opening-x-size: 17px;
  }

  html[data-bathroom-opening] .hero .hero-services-mobile {
    letter-spacing: 0;
  }
}

@media (max-width: 340px) {
  html[data-bathroom-opening] .hero .explore-link .line-arrow {
    display: none;
  }

  html[data-bathroom-opening] .hero .hero-services-mobile {
    letter-spacing: 0;
    width: calc(var(--wood-start) - 5.5%);
  }
}
