/*
 * Exhibit A — The Bathhouse.
 *
 * Editorial copy column (kicker, character-reveal title, subline, one case
 * panel per view, "Beneath the finish") beside a morphing image gallery
 * (click/tap for the next view, generated thumbnails, a NEXT VIEW cursor with
 * a soft trail on fine-pointer desktops). Typography comes from exhibit.css;
 * behaviour from js/home/bathhouse.js.
 *
 * Layout routes (all from the original):
 *   ≤767px                phone: one column — heading, image, thumbs, copy, CTA
 *   phone landscape       ≤1000×500 landscape or compact touch landscape:
 *                         copy 40% | image 60% with a heading bar above and
 *                         the thumbs + CTA overlaid at the image foot
 *   coarse tablet landscape  desktop columns; CTA stacked under the thumbs
 *   ≥1200px fine pointer  CTA drawn from the controls bar into the copy column
 *   1080p / 2160p bands   the 1280×720 composition, scaled
 */

.bathhouse {
  /* Morph timing read by bathhouse.js. */
  --morph-duration: 1900ms;
  --morph-move-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --morph-fade-ease: cubic-bezier(0.42, 0, 0.2, 1);
  /* Horizontal-squeeze morph (odd transitions swap to the vertical set). */
  --morph-out-start-x: 1;
  --morph-out-end-x: 0.7;
  --morph-out-start-y: 1;
  --morph-out-end-y: 1.05;
  --morph-in-start-x: 1.08;
  --morph-in-start-y: 0.46;
  --morph-in-end-x: 1;
  --morph-in-end-y: 1;
  --morph-zoom-in-start: 1.7;
  --morph-zoom-out-end: 1;
  --morph-zoom-leave-end: 1.4;
  --thumb-gold: 215 168 96;
  /* Copy column inset, also used to place the desktop CTA (the CTA keeps
     this unscaled value in the 1080p/2160p bands, as in the original). */
  --copy-inset: clamp(34px, 3.4vw, 58px);

  position: relative;
  z-index: 5;
  width: 100%;
  margin: 0;
  padding: clamp(48px, 5vh, 72px) 0 clamp(56px, 6vh, 88px);
  isolation: isolate;
}

/* ── Frame: copy column | media column ── */

.bathhouse__frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.3fr) minmax(0, 0.7fr);
  width: 100%;
  min-height: clamp(380px, 48vh, 500px);
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgb(var(--rgb-gold-ui) / 0.42);
  border-radius: 2px;
  background:
    radial-gradient(ellipse at 23% 12%, rgb(var(--rgb-gold-highlight) / 0.09), transparent 34%),
    linear-gradient(90deg, rgb(5 5 5 / 0.96) 0%, rgb(12 9 7 / 0.92) 34%, rgb(8 8 8 / 0.72) 48%, rgb(4 4 4 / 0.38) 100%);
  box-shadow: 0 34px 110px rgb(0 0 0 / 0.54), inset 0 1px 0 rgb(255 232 184 / 0.08);
}

/* Shade behind the copy. */
.bathhouse__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.68) 0%, rgb(0 0 0 / 0.42) 28%, rgb(0 0 0 / 0.14) 46%, transparent 66%),
    radial-gradient(ellipse at 30% 50%, rgb(0 0 0 / 0.68), transparent 48%);
}

.bathhouse__copy {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  padding: clamp(34px, 4vw, 58px) var(--copy-inset) calc(clamp(34px, 4vw, 58px) + clamp(10px, 1.2vh, 18px));
  color: rgb(var(--rgb-cream-strong) / 0.88);
}

.bathhouse__media {
  position: relative;
  z-index: 5;
  display: block;
  min-width: 0;
  overflow: hidden;
  background: rgb(0 0 0 / 0.18);
}

/* Heading bar above the image: phone landscape only. */
.bathhouse__landscape-heading {
  display: none;
}

/* ── Case panels: one per view, cross-faded ── */

.bathhouse__cases {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: clamp(325px, 38vh, 440px);
  margin-top: clamp(30px, 4vh, 56px);
  padding-top: clamp(18px, 2vh, 28px);
  padding-bottom: clamp(8px, 1vh, 14px);
  overflow: hidden;
  border-top: 1px solid rgb(var(--rgb-gold-ui) / 0.34);
}

.bathhouse__case {
  position: absolute;
  inset: clamp(18px, 2vh, 28px) 0 clamp(8px, 1vh, 14px) 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 360ms ease, transform 360ms ease, visibility 0s linear 360ms;
}

.bathhouse__case.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 360ms ease, transform 360ms ease, visibility 0s linear 0s;
}

.bathhouse__case-label {
  margin: 0 0 clamp(12px, 1.4vh, 18px);
  font-family: var(--font-sans);
  font-size: clamp(11px, 0.82vw, 14px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgb(var(--rgb-gold-highlight) / 0.78);
}

.bathhouse__case-title {
  max-width: 500px;
  margin: 15px 0 clamp(14px, 1.8vh, 22px);
  font-family: var(--font-serif);
  font-size: clamp(27px, 2.4vw, 42px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgb(0 0 0 / 0.46), 0 12px 28px rgb(0 0 0 / 0.34);
}

.bathhouse__case-title--red {
  color: #d68168;
}

.bathhouse__case-title--green {
  color: #6f8f7e;
}

/* "Precision wipe": views 02–06 titles are revealed left→right behind a
   travelling gold hairline whenever their panel becomes active. */
.bathhouse__wipe {
  position: relative;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  vertical-align: top;
}

.bathhouse__wipe-text {
  display: block;
}

.bathhouse__wipe-line {
  display: none;
}

.bathhouse.is-wipe-ready .bathhouse__wipe-text {
  clip-path: inset(0 100% 0 0);
}

.bathhouse.is-wipe-ready .bathhouse__wipe-line {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  display: block;
  width: 1px;
  background: rgb(var(--rgb-gold-ui) / 0.75);
  opacity: 0;
  pointer-events: none;
}

.bathhouse.is-wipe-ready .is-wiping .bathhouse__wipe-text {
  animation: bathhouseWipeText 1500ms cubic-bezier(0.77, 0, 0.18, 1) both;
}

.bathhouse.is-wipe-ready .is-wiping .bathhouse__wipe-line {
  animation: bathhouseWipeLine 1500ms cubic-bezier(0.77, 0, 0.18, 1) both;
}

.bathhouse.is-wipe-ready .is-wiped .bathhouse__wipe-text {
  clip-path: none;
}

.bathhouse.is-wipe-ready .is-wiped .bathhouse__wipe-line {
  display: none;
}

/* ── "Beneath the finish" ── */

.bathhouse__cta {
  position: relative;
  z-index: 6;
  width: 100%;
  max-width: 520px;
  margin-top: clamp(24px, 3vh, 42px);
}

/* The copy-column button is replaced by the controls-bar one in some layouts. */
.bathhouse__cta--controls {
  display: none;
}

.bathhouse__prep-button.kt-svc-cta {
  display: flex;
  width: min(100%, clamp(300px, 26vw, 480px));
  min-width: 0;
  max-width: 100%;
  height: auto;
  aspect-ratio: 570 / 106;
  margin: 0 auto;
  padding: 0 12px;
  border-width: 2px;
  font-size: clamp(13px, 1.05vw, 20px);
  font-weight: 550;
  line-height: 1;
  letter-spacing: 0.3em;
  white-space: nowrap;
}

/* ── Gallery stage ── */

.bathhouse__gallery {
  width: 100%;
}

.bathhouse__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  isolation: isolate;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.bathhouse__image-area {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.5;
  min-height: clamp(260px, 36vh, 400px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgb(215 168 96 / 0.52);
  cursor: none;
}

/* Soft-light grade over the photographs. */
.bathhouse__image-area::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: soft-light;
  background:
    linear-gradient(90deg, rgb(255 247 226 / 0.1), transparent 18%, transparent 82%, rgb(105 174 165 / 0.08)),
    linear-gradient(180deg, rgb(0 0 0 / 0.06), transparent 42%, rgb(0 0 0 / 0.18));
}

.bathhouse__slides,
.bathhouse__slide,
.bathhouse__slide-media {
  position: absolute;
  inset: 0;
}

.bathhouse__slides {
  overflow: hidden;
}

.bathhouse__slide {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.bathhouse__slide.is-current {
  z-index: 2;
  opacity: 1;
}

.bathhouse__slide.is-leaving {
  z-index: 3;
  opacity: 1;
}

.bathhouse__slide.is-entering {
  z-index: 4;
  opacity: 1;
}

.bathhouse__slide-media {
  overflow: visible;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Edge vignette (::after) and a passing sheen during the morph (::before). */
.bathhouse__slide-media::before,
.bathhouse__slide-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.bathhouse__slide-media::before {
  opacity: 0;
  mix-blend-mode: screen;
  background: linear-gradient(90deg, transparent 0%, rgb(255 238 205 / 0.24) 47%, rgb(105 174 165 / 0.13) 51%, transparent 100%);
  transform: translateX(-120%) skewX(-10deg);
}

.bathhouse__slide-media::after {
  opacity: 0.32;
  background:
    linear-gradient(180deg, rgb(4 5 5 / 0.08), transparent 38%, rgb(4 5 5 / 0.24)),
    linear-gradient(90deg, rgb(4 5 5 / 0.18), transparent 24%, transparent 76%, rgb(4 5 5 / 0.18));
}

.bathhouse__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  backface-visibility: hidden;
  user-select: none;
  -webkit-user-drag: none;
}

.bathhouse__slide--top img {
  object-position: top center;
}

.bathhouse__slide--graded img {
  filter: brightness(0.94) contrast(1.08) saturate(0.94) sepia(0.05) hue-rotate(-6deg);
}

.bathhouse__slide.is-current img {
  opacity: 1;
  transform: translate3d(0, 0, 0) scaleX(1) scaleY(1);
}

.bathhouse__slide.is-leaving img {
  animation:
    bathhouseLeaveImage var(--morph-duration) var(--morph-move-ease) forwards,
    bathhouseLeaveFade var(--morph-duration) var(--morph-fade-ease) forwards;
}

.bathhouse__slide.is-entering img {
  animation:
    bathhouseEnterImage var(--morph-duration) var(--morph-move-ease) forwards,
    bathhouseEnterFade var(--morph-duration) var(--morph-fade-ease) forwards;
}

.bathhouse__slide.is-leaving .bathhouse__slide-media::before,
.bathhouse__slide.is-entering .bathhouse__slide-media::before {
  animation: bathhouseMorphSheen var(--morph-duration) cubic-bezier(0.2, 0.7, 0.18, 1) forwards;
}

/* Alternate transitions squeeze vertically instead of horizontally. */
.bathhouse__stage.is-alt-axis {
  --morph-out-end-x: 1.05;
  --morph-out-end-y: 0.7;
  --morph-in-start-x: 0.46;
  --morph-in-start-y: 1.08;
}

/* ── NEXT VIEW cursor and its trail (fine pointers only, see JS) ── */

.bathhouse__trail {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.bathhouse__trail-dot {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  filter: blur(6px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgb(var(--rgb-gold-highlight) / 0.72) 0%, rgb(var(--rgb-gold-ui) / 0.3) 36%, transparent 78%);
}

.bathhouse__cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  border: 1px solid rgb(255 246 224 / 0.42);
  border-radius: 999px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgb(5 5 5 / 0.96);
  -webkit-backdrop-filter: blur(14px) saturate(1.16);
  backdrop-filter: blur(14px) saturate(1.16);
  box-shadow:
    0 28px 74px rgb(0 0 0 / 0.44),
    0 0 34px rgb(105 174 165 / 0.15),
    inset 0 1px 0 rgb(255 255 255 / 0.38);
  transform: translate3d(-50%, -50%, 0) scale(0.88);
  transition: opacity 0.1s ease, transform 0.12s ease, visibility 0s linear 0.1s;
}

.bathhouse__cursor.is-active {
  visibility: visible;
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
  transition: opacity 0.1s ease, transform 0.12s ease, visibility 0s linear 0s;
}

.bathhouse__cursor.is-active.is-suppressed {
  visibility: hidden;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.88);
  transition: opacity 0.1s ease, transform 0.12s ease, visibility 0s linear 0.1s;
}

/* Outer white ring. */
.bathhouse__cursor::after {
  content: "";
  position: absolute;
  inset: -4.5px;
  border: 3px solid rgb(255 255 255 / 0.55);
  border-radius: inherit;
  pointer-events: none;
}

.bathhouse__cursor span {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  color: rgb(var(--rgb-gold-bright) / 0.96);
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.58);
}

/* ── Controls bar: thumbnails | closing rail ── */

.bathhouse__controls {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(14px, 1.8vw, 28px);
  padding: clamp(12px, 1.2vw, 16px) clamp(14px, 1.4vw, 22px) clamp(12px, 1.2vw, 16px) 0;
  border-top: 1px solid rgb(var(--rgb-gold-ui) / 0.32);
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0.88)),
    radial-gradient(ellipse at 72% 0%, rgb(210 165 95 / 0.07), transparent 58%);
}

/* Transparent on desktop; becomes a column in coarse tablet landscape. */
.bathhouse__thumb-stack {
  display: contents;
}

.bathhouse__thumbs {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgb(var(--thumb-gold) / 0.52);
  border-radius: 4px;
  background: rgb(8 7 5 / 0.48);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.32), inset 0 1px 0 rgb(255 255 255 / 0.07);
}

.bathhouse__thumb {
  position: relative;
  width: 58px;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  appearance: none;
  cursor: pointer;
  opacity: 0.56;
  background: rgb(255 255 255 / 0.06);
  box-shadow: inset 0 0 0 1px rgb(var(--thumb-gold) / 0.52);
  transform: scale(1);
  transition: opacity 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease;
  -webkit-tap-highlight-color: transparent;
}

.bathhouse__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgb(var(--thumb-gold) / 0.52);
}

.bathhouse__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: saturate(0.88) brightness(0.82);
  transform: scale(1.04);
  transition: filter 0.24s ease, transform 0.24s ease;
}

.bathhouse__thumb:hover {
  opacity: 0.84;
}

.bathhouse__thumb.is-active {
  opacity: 1;
  transform: scale(1.06);
  box-shadow:
    inset 0 0 0 1px rgb(var(--thumb-gold) / 0.72),
    0 0 0 2px rgb(var(--thumb-gold) / 0.52),
    0 8px 20px rgb(0 0 0 / 0.28);
}

.bathhouse__thumb.is-active img {
  filter: saturate(1) brightness(1);
  transform: scale(1);
}

.bathhouse__rail {
  position: relative;
  z-index: 8;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 0;
  text-align: right;
}

.bathhouse__rail-kicker,
.bathhouse__rail-copy {
  width: min(100%, 320px);
}

.bathhouse__rail-kicker {
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-size: clamp(9px, 0.68vw, 11px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgb(var(--rgb-gold-highlight) / 0.98);
}

.bathhouse__rail-copy {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(12px, 0.88vw, 15px);
  line-height: 1.55;
  color: rgb(var(--rgb-cream-strong) / 0.92);
}

/* ── Responsive ── */

@media (max-width: 1180px) {
  .bathhouse__frame {
    grid-template-columns: minmax(260px, 0.32fr) minmax(0, 0.68fr);
  }

  .bathhouse__copy {
    padding: 28px 34px;
  }
}

/* Phone: heading, full-bleed image, thumbnails, case copy, CTA. */
@media (max-width: 767px) {
  .bathhouse {
    padding-inline: 0;
  }

  .bathhouse__frame {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .bathhouse__frame::after {
    background:
      linear-gradient(180deg, rgb(0 0 0 / 0.5) 0%, rgb(0 0 0 / 0.16) 34%, transparent 58%),
      radial-gradient(ellipse at 50% 12%, rgb(0 0 0 / 0.58), transparent 44%);
  }

  .bathhouse__copy {
    display: contents;
  }

  .bathhouse__kicker,
  .bathhouse__title,
  .bathhouse__subline,
  .bathhouse__cases,
  .bathhouse__cta--copy {
    position: relative;
    z-index: 5;
    grid-column: 1;
  }

  .bathhouse__kicker {
    grid-row: 1;
    margin: 28px 20px 18px;
  }

  .bathhouse__title {
    grid-row: 2;
    padding-inline: 20px;
  }

  .bathhouse__subline {
    grid-row: 3;
    margin: 16px 20px 0;
  }

  .bathhouse__media {
    grid-row: 4;
    grid-column: 1;
    width: 100%;
    overflow: visible;
  }

  .bathhouse__image-area {
    min-height: 0;
    aspect-ratio: 16 / 10;
    border-right: 0;
    border-left: 0;
  }

  .bathhouse__controls {
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    padding: 8px 10px 6px;
  }

  .bathhouse__thumbs {
    width: fit-content;
    max-width: 100%;
    gap: 6px;
    padding: 5px 6px;
  }

  .bathhouse__thumb {
    flex: 0 0 clamp(40px, 11vw, 44px);
    width: clamp(40px, 11vw, 44px);
  }

  .bathhouse__rail,
  .bathhouse__case-label {
    display: none;
  }

  /* The active panel sits in flow so the stack follows its height. */
  .bathhouse__cases {
    grid-row: 5;
    width: auto;
    max-width: none;
    min-height: 0;
    margin: 10px 20px 0;
    padding: 0;
    overflow: visible;
    border-top: 0;
  }

  .bathhouse__case {
    inset: 0 0 auto 0;
  }

  .bathhouse__case.is-active {
    position: relative;
    inset: auto;
    transform: none;
  }

  .bathhouse__case-title {
    margin-top: 0;
  }

  .bathhouse__cta--copy {
    grid-row: 6;
    width: auto;
    max-width: none;
    margin: 16px 20px 30px;
  }
}

/* Phone landscape and compact touch landscape: copy | image, heading bar
   above the image and controls overlaid along its foot. */
@media (orientation: landscape) and (max-width: 1000px) and (max-height: 500px),
       (pointer: coarse) and (orientation: landscape) and (min-width: 1100px) and (max-width: 1180px) and (max-height: 780px) {
  .bathhouse {
    padding: 20px 0 28px;
  }

  .bathhouse__frame {
    grid-template-columns: minmax(0, 40%) minmax(0, 60%);
    align-items: start;
    min-height: 0;
  }

  .bathhouse__frame::after {
    display: none;
  }

  .bathhouse__copy {
    display: flex;
    width: 100%;
    padding: clamp(16px, 3vw, 28px);
  }

  .bathhouse__kicker,
  .bathhouse__title,
  .bathhouse__subline,
  .bathhouse__cta--copy,
  .bathhouse__rail,
  .bathhouse__case-label {
    display: none;
  }

  .bathhouse__cases {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border-top: 0;
  }

  .bathhouse__case {
    inset: 12px 0 auto;
  }

  .bathhouse__case.is-active {
    position: relative;
    inset: auto;
    transform: none;
  }

  .bathhouse__case-title {
    margin: 0 0 10px;
    font-size: clamp(19px, 2.8vw, 27px);
    line-height: 1;
  }

  .bathhouse__media {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .bathhouse__landscape-heading {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 14px 9px;
    border-bottom: 1px solid rgb(var(--rgb-gold-ui) / 0.42);
    background: linear-gradient(90deg, rgb(7 6 5 / 0.98), rgb(12 9 7 / 0.92));
  }

  .bathhouse__landscape-title {
    flex: 0 0 auto;
    line-height: 0.92;
    white-space: nowrap;
  }

  .bathhouse__landscape-title > span {
    display: inline;
    font-size: clamp(23px, 3.5vw, 32px);
  }

  .bathhouse__landscape-title > .exhibit__title-ivory {
    margin-right: 0.2em;
  }

  .bathhouse__landscape-kicker {
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
    padding: 7px 9px 6px;
    border: 1px solid rgb(var(--rgb-gold-ui) / 0.58);
    background: rgb(5 4 3 / 0.92);
    font-size: clamp(10px, 1.25vw, 12px);
    line-height: 1;
    letter-spacing: 0.2em;
  }

  .bathhouse__image-area {
    min-height: 0;
    aspect-ratio: 16 / 9.5;
    border-right: 0;
    border-left: 0;
  }

  .bathhouse__controls {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    padding: 7px 8px;
    border-top-color: rgb(var(--rgb-gold-ui) / 0.52);
    background: linear-gradient(90deg, rgb(4 4 3 / 0.94), rgb(8 6 4 / 0.9));
  }

  .bathhouse__thumbs {
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    gap: 4px;
    padding: 4px;
  }

  .bathhouse__thumb {
    flex: 0 0 clamp(22px, 2.8vw, 28px);
    width: clamp(22px, 2.8vw, 28px);
  }

  .bathhouse__cta--controls {
    display: block;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
}

/* Small landscape phones keep the phone label size. */
@media (max-width: 767px) {
  .bathhouse__landscape-kicker {
    font-size: 14px;
  }
}

/* Desktop layout route (shared by every homepage section). */
@media (min-width: 1181px),
       (min-width: 1025px) and (max-width: 1099px),
       (min-width: 1025px) and (pointer: fine),
       (min-width: 1025px) and (orientation: portrait),
       (min-width: 1025px) and (min-height: 781px) {
  .bathhouse {
    display: flex;
    flex-direction: column;
    margin-bottom: clamp(56px, 6vh, 88px);
    padding-bottom: 0;
  }

  .bathhouse__cases {
    margin-top: 14px;
    padding-top: 8px;
    border-top: 0;
  }

  .bathhouse__case {
    inset: 8px 0 clamp(8px, 1vh, 14px) 0;
  }

  .bathhouse__cta {
    margin-top: 16px;
    transform: translateY(8px);
  }
}

/* Coarse-pointer tablet landscape (after the desktop route, which it
   refines): desktop columns, the active case in flow, and the CTA stacked
   under the thumbnails. */
@media (orientation: landscape) and (min-width: 768px) and (max-width: 1099px) and (min-height: 501px) and (hover: none) and (pointer: coarse),
       (orientation: landscape) and (min-width: 1100px) and (max-width: 1180px) and (min-height: 781px) and (hover: none) and (pointer: coarse),
       (orientation: landscape) and (min-width: 1181px) and (max-width: 1366px) and (min-height: 501px) and (hover: none) and (pointer: coarse) {
  .bathhouse__frame {
    align-items: start;
    min-height: 0;
    overflow: visible;
  }

  .bathhouse__copy {
    min-height: 0;
    padding-bottom: clamp(24px, 3vh, 36px);
  }

  .bathhouse__cta--copy {
    display: none;
  }

  .bathhouse__cases {
    min-height: 0;
    margin-top: clamp(20px, 2.6vh, 36px);
    padding-top: clamp(14px, 1.8vh, 22px);
    padding-bottom: 0;
    overflow: visible;
  }

  .bathhouse__case {
    inset: 0 0 auto;
  }

  .bathhouse__case.is-active {
    position: relative;
    inset: auto;
    transform: none;
  }

  .bathhouse__thumb-stack {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
  }

  .bathhouse__thumbs {
    align-self: center;
    width: fit-content;
    max-width: 100%;
  }

  .bathhouse__thumb {
    flex: 0 0 42px;
    width: 42px;
  }

  .bathhouse__cta--controls {
    display: block;
    width: 0;
    min-width: 100%;
    max-width: 100%;
    margin: 0;
  }
}

/* Short desktop windows (e.g. 1280×720). */
@media (max-height: 760px) and (min-width: 1181px),
       (max-height: 760px) and (min-width: 1025px) and (max-width: 1099px),
       (max-height: 760px) and (min-width: 1025px) and (pointer: fine),
       (max-height: 760px) and (min-width: 1025px) and (orientation: portrait) {
  .bathhouse {
    margin-bottom: 52px;
    padding-top: 40px;
  }

  .bathhouse__frame {
    min-height: 360px;
  }

  .bathhouse__copy {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .bathhouse__cases {
    min-height: 315px;
  }

  .bathhouse__image-area {
    min-height: 240px;
  }

  .bathhouse__controls {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .bathhouse__thumbs {
    gap: 6px;
    padding: 5px 6px;
  }

  .bathhouse__thumb {
    width: 46px;
  }
}

/* Fine-pointer desktops: the CTA lives in the controls bar but is drawn out
   into the copy column, centred on its lower half. 42.857% = 0.3fr / 0.7fr. */
@media (min-width: 1200px) and (pointer: fine) {
  .bathhouse__media {
    overflow: visible;
  }

  .bathhouse__cta--copy {
    display: none;
  }

  .bathhouse__controls .bathhouse__cta--controls {
    position: absolute;
    top: 50%;
    left: calc(-42.857% + var(--copy-inset));
    z-index: 14;
    display: block;
    width: calc(42.857% - var(--copy-inset) - var(--copy-inset));
    max-width: none;
    margin: 0;
    transform: translateY(calc(-50% - 20px));
  }

  .bathhouse__cta--controls .bathhouse__prep-button.kt-svc-cta {
    width: min(100%, clamp(320px, 28vw, 520px));
  }
}

/* Above 1920×1080: type grows with the smaller viewport ratio (capped). */
@media (min-width: 1921px) and (min-height: 1081px) {
  .bathhouse__case-label {
    font-size: clamp(14px, min(0.729167vw, 1.296296vh), 21px);
  }

  .bathhouse__case-title {
    font-size: clamp(42px, min(2.1875vw, 3.888889vh), 60.9px);
  }

  .bathhouse__rail-kicker,
  .bathhouse__cursor span {
    font-size: clamp(11px, min(0.572917vw, 1.018519vh), 17.05px);
  }

  .bathhouse__rail-copy {
    font-size: clamp(15px, min(0.78125vw, 1.388889vh), 22.5px);
  }
}

/* 1080p / 2160p bands: the complete 1280×720 composition, scaled. */
@media (min-width: 1600px) and (max-width: 2200px) and (min-height: 900px) and (max-height: 1250px),
       (min-width: 3200px) and (max-width: 4400px) and (min-height: 1800px) and (max-height: 2500px) {
  .bathhouse {
    --s: var(--home-scale-720);
    margin-bottom: calc(52 * var(--s));
    padding-top: calc(40 * var(--s));
  }

  .bathhouse__frame {
    min-height: calc(360 * var(--s));
    border-width: calc(1 * var(--s));
    border-radius: calc(2 * var(--s));
  }

  .bathhouse__copy {
    padding: calc(24 * var(--s)) calc(43.52 * var(--s));
  }

  .bathhouse__kicker {
    margin-bottom: calc(14 * var(--s));
    padding-bottom: calc(10 * var(--s));
    border-bottom-width: calc(1 * var(--s));
    font-size: calc(11 * var(--s));
  }

  .bathhouse__title {
    letter-spacing: calc(-1.2 * var(--s));
  }

  .bathhouse__title > .exhibit__title-ivory {
    font-size: calc(40.96 * var(--s));
  }

  .bathhouse__title > .exhibit__title-gold {
    font-size: calc(46.08 * var(--s));
  }

  .bathhouse__subline {
    margin-top: calc(12 * var(--s));
    padding: calc(10 * var(--s)) 0;
    font-size: calc(11.008 * var(--s));
  }

  .bathhouse__subline::before,
  .bathhouse__subline::after {
    width: 100%;
    height: calc(1 * var(--s));
  }

  .bathhouse__cases {
    width: 100%;
    max-width: none;
    min-height: calc(315 * var(--s));
    margin-top: calc(14 * var(--s));
    padding: calc(8 * var(--s)) 0;
  }

  .bathhouse__case {
    inset: calc(8 * var(--s)) 0 calc(8 * var(--s)) 0;
  }

  .bathhouse__case-label {
    margin-bottom: calc(12 * var(--s));
    font-size: calc(11 * var(--s));
  }

  .bathhouse__case-title {
    max-width: none;
    margin: calc(15 * var(--s)) 0 calc(14 * var(--s));
    font-size: calc(30.72 * var(--s));
  }

  .bathhouse__case-copy {
    max-width: none;
    font-size: calc(15 * var(--s));
  }

  .bathhouse__cta,
  .bathhouse__controls .bathhouse__cta--controls {
    max-width: none;
    margin-top: calc(16 * var(--s));
  }

  .bathhouse__cta--copy {
    transform: translateY(calc(8 * var(--s)));
  }

  .bathhouse__prep-button.kt-svc-cta {
    --cta-line: calc(1 * var(--s));
    --cta-corner: calc(10.88 * var(--s));
    background-size: calc(24 * var(--s)) calc(1 * var(--s));
  }

  .bathhouse__image-area {
    border-width: calc(1 * var(--s));
  }

  .bathhouse__controls {
    gap: calc(23.04 * var(--s));
    padding: calc(10 * var(--s)) calc(17.92 * var(--s)) calc(10 * var(--s)) 0;
    border-top-width: calc(1 * var(--s));
  }

  .bathhouse__thumbs {
    gap: calc(6 * var(--s));
    padding: calc(5 * var(--s)) calc(6 * var(--s));
    border-width: calc(1 * var(--s));
    border-radius: calc(4 * var(--s));
    -webkit-backdrop-filter: blur(calc(12 * var(--s)));
    backdrop-filter: blur(calc(12 * var(--s)));
  }

  .bathhouse__thumb {
    width: calc(46 * var(--s));
    border-radius: calc(3 * var(--s));
  }

  .bathhouse__rail-kicker,
  .bathhouse__rail-copy {
    width: min(100%, calc(320 * var(--s)));
  }

  .bathhouse__rail-kicker {
    margin-bottom: calc(4 * var(--s));
    font-size: calc(9 * var(--s));
  }

  .bathhouse__rail-copy {
    font-size: calc(12 * var(--s));
  }

  .bathhouse__cursor {
    width: calc(55 * var(--s));
    height: calc(55 * var(--s));
    border-width: calc(1 * var(--s));
    -webkit-backdrop-filter: blur(calc(14 * var(--s))) saturate(1.16);
    backdrop-filter: blur(calc(14 * var(--s))) saturate(1.16);
  }

  .bathhouse__cursor span {
    font-size: calc(11 * var(--s));
  }

  .bathhouse__cursor::after {
    inset: calc(-4.5 * var(--s));
    border-width: calc(3 * var(--s));
  }

  .bathhouse__trail-dot {
    width: calc(90 * var(--s));
    height: calc(90 * var(--s));
    filter: blur(calc(6 * var(--s)));
  }
}

/* Phones and touch tablets: no backdrop blurs (costly while scrolling). */
@media (max-width: 1180px), (pointer: coarse) and (min-width: 768px) {
  .bathhouse__thumbs,
  .bathhouse__cursor,
  .bathhouse__controls {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .bathhouse__slide img {
    will-change: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bathhouse.is-wipe-ready .bathhouse__wipe-text {
    clip-path: none;
    animation: none;
  }

  .bathhouse.is-wipe-ready .bathhouse__wipe-line {
    display: none;
    animation: none;
  }
}

/* ── Keyframes ── */

@keyframes bathhouseLeaveImage {
  0% {
    transform: translate3d(0, 0, 0) scaleX(var(--morph-out-start-x)) scaleY(var(--morph-out-start-y));
  }
  100% {
    transform: translate3d(0, 0, 0)
      scaleX(calc(var(--morph-out-end-x) * var(--morph-zoom-leave-end)))
      scaleY(calc(var(--morph-out-end-y) * var(--morph-zoom-leave-end)));
  }
}

@keyframes bathhouseEnterImage {
  0%,
  18% {
    transform: translate3d(0, 0, 0)
      scaleX(calc(var(--morph-in-start-x) * var(--morph-zoom-in-start)))
      scaleY(calc(var(--morph-in-start-y) * var(--morph-zoom-in-start)));
  }
  100% {
    transform: translate3d(0, 0, 0)
      scaleX(calc(var(--morph-in-end-x) * var(--morph-zoom-out-end)))
      scaleY(calc(var(--morph-in-end-y) * var(--morph-zoom-out-end)));
  }
}

@keyframes bathhouseLeaveFade {
  0%, 40% { opacity: 1; }
  70% { opacity: 0.35; }
  88% { opacity: 0.08; }
  100% { opacity: 0; }
}

@keyframes bathhouseEnterFade {
  0%, 20% { opacity: 0; }
  46% { opacity: 0.66; }
  76%, 100% { opacity: 1; }
}

@keyframes bathhouseMorphSheen {
  0% {
    opacity: 0;
    transform: translateX(-120%) skewX(-10deg);
  }
  28%,
  52% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateX(120%) skewX(-10deg);
  }
}

@keyframes bathhouseWipeText {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes bathhouseWipeLine {
  0% {
    left: 0;
    opacity: 0.75;
  }
  99% {
    left: calc(100% - 1px);
    opacity: 0.75;
  }
  100% {
    left: calc(100% - 1px);
    opacity: 0;
  }
}
