/*
 * Homepage hero: full-height bathhouse photograph with a timed statement
 * reveal, the "Our role" image CTA, and the four proof cards beneath.
 *
 * Intro timeline (ms after first paint, motion tokens in tokens.css):
 *   900   photograph + vignettes fade in (3800) and start a 44s 4% zoom
 *   1250  kicker rises (1650)          1680  "The less" rises (1650)
 *   1900  gold rule widens (1400)      2180  subline rises (1500)
 *   2350  gold line drops in (1850)
 *   4350  CTA resolves (1760) — 1000ms earlier on fine-pointer desktops ≥1181px
 * Phone portrait (≤600px) shows the copy at rest until each line's reveal
 * begins, exactly like the original.
 */

.hero {
  --hero-cta-advance: 0ms;
  position: relative;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
}

/* ── Photograph ── */

.hero__visual {
  position: relative;
  height: calc(100svh - var(--home-header-reveal));
  overflow: hidden;
  isolation: isolate;
}

/* Two vignette layers that fade in with the photograph. */
.hero__visual::before,
.hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  animation: heroFadeIn var(--dur-hero-reveal) var(--ease-hero-reveal) var(--delay-hero-bg) forwards;
}

.hero__visual::before {
  background: linear-gradient(180deg, rgb(0 0 0 / 0.26) 0%, rgb(0 0 0 / 0.2) 24%, rgb(0 0 0 / 0.22) 48%, rgb(0 0 0 / 0.36) 76%, rgb(0 0 0 / 0.52) 100%);
}

.hero__visual::after {
  background: radial-gradient(ellipse 88% 62% at 50% 38%, rgb(0 0 0 / 0.4) 0%, rgb(0 0 0 / 0.28) 32%, rgb(0 0 0 / 0.12) 56%, transparent 74%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transform-origin: center top;
  will-change: transform, opacity;
  pointer-events: none;
  animation:
    heroFadeIn var(--dur-hero-reveal) var(--ease-hero-reveal) var(--delay-hero-bg) forwards,
    heroZoom var(--dur-hero-zoom) linear var(--delay-hero-bg) forwards;
}

/* ── Statement ── */

.hero__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.hero__statement {
  position: absolute;
  top: clamp(18%, 21vh, 25%);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(96vw, 1180px);
  text-align: center;
  transform: translateX(-50%);
}

.hero__kicker {
  margin: clamp(10px, 1.1vh, 16px) 0 clamp(14px, 1.7vh, 20px);
  font-size: clamp(19px, 1.38vw, 24px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgb(var(--rgb-cream-strong) / 0.88);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.55), 0 4px 18px rgb(0 0 0 / 0.42);
  opacity: 0;
  will-change: transform, opacity;
  animation: heroLineReveal var(--dur-line-up) var(--ease-motion) calc(var(--delay-hero-copy) + var(--delay-line-up)) forwards;
}

.hero__title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 0.85vh, 10px);
  width: 100%;
}

.hero__rule {
  display: block;
  width: min(520px, 78vw);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgb(var(--rgb-gold-ui) / 0.22) 14%, rgb(var(--rgb-gold-highlight) / 0.72) 50%, rgb(var(--rgb-gold-ui) / 0.22) 86%, transparent 100%);
  opacity: 0;
  transform: scaleX(0.72);
  will-change: transform, opacity;
  animation: heroRuleReveal 1400ms var(--ease-premium) calc(var(--delay-hero-copy) + 900ms) forwards;
}

.hero__rule--lower {
  display: none;
}

.hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(54px, 5.4vw, 96px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.015em;
}

/* Inline on desktop, so only their opacity animates there. */
.hero__title-ivory,
.hero__title-gold {
  opacity: 0;
  will-change: transform, opacity;
}

.hero__title-ivory {
  --line-y-start: 28px;
  color: rgb(var(--rgb-cream-strong) / 0.96);
  text-shadow: 0 2px 4px rgb(0 0 0 / 0.48), 0 8px 28px rgb(0 0 0 / 0.42);
  animation: heroLineReveal var(--dur-line-up) var(--ease-motion) calc(var(--delay-hero-copy) + 680ms) forwards;
}

.hero__title-gold {
  --line-y-start: -18px;
  font-weight: 700;
  color: rgb(var(--rgb-gold-about) / 0.96);
  text-shadow: 0 2px 4px rgb(0 0 0 / 0.42), 0 6px 20px rgb(0 0 0 / 0.32);
  animation: heroLineReveal var(--dur-line-down) var(--ease-motion) calc(var(--delay-hero-copy) + var(--delay-line-down)) forwards;
}

.hero__subline {
  max-width: min(820px, 92vw);
  margin: clamp(10px, 1.2vh, 16px) 0 0;
  font-size: clamp(15px, calc(1vw + 2px), 18px);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(255 255 255);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.52), 0 4px 16px rgb(0 0 0 / 0.38);
  opacity: 0;
  will-change: transform, opacity;
  animation: heroLineReveal 1500ms var(--ease-motion) calc(var(--delay-hero-copy) + 1180ms) forwards;
}

.hero__subline-lead {
  display: block;
  font-size: 1.32em;
}

.hero__subline-list {
  display: block;
}

/* ── "Our role" image CTA ── */

.hero__cta {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(260px, 19vw, 380px);
  max-width: 82vw;
  margin-top: clamp(28px, 3.6vh, 42px);
  overflow: hidden;
  color: #f1c77f;
  text-decoration: none;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  clip-path: inset(0 50% 0 50% round var(--radius-sm));
  filter: blur(8px);
  will-change: opacity, transform, clip-path, filter;
  animation: heroCtaResolve var(--dur-cta-resolve) var(--ease-cta-resolve)
    calc(var(--delay-hero-copy) + var(--delay-cta-resolve) - var(--hero-cta-advance)) forwards;
}

.hero__cta:focus-visible {
  outline: 2px solid var(--focus-gold);
  outline-offset: 4px;
}

.hero__cta-image {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  transition: filter 200ms ease;
}

@media (hover: hover) {
  .hero__cta:hover .hero__cta-image {
    filter: brightness(1.35);
  }
}

/* ── Proof cards ── */

.hero__proofs {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding-top: 5px;
}

.hero__proof {
  position: relative;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: none;
  appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Warm wash + diagonal shine on hover/focus. */
.hero__proof::before,
.hero__proof::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
}

.hero__proof::before {
  inset: 0;
  z-index: 2;
  background: linear-gradient(125deg, rgb(228 189 116 / 0.05), rgb(201 154 74 / 0.14));
  mix-blend-mode: screen;
  transition: opacity 320ms ease;
}

.hero__proof::after {
  inset: -45%;
  z-index: 3;
  background: linear-gradient(112deg, transparent 42%, rgb(255 224 159 / 0.22) 50%, transparent 58%);
  transform: translateX(-65%);
}

.hero__proof img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  transition: filter 320ms ease;
}

.hero__proof:hover img,
.hero__proof:focus-visible img {
  filter: brightness(1.09) saturate(1.06) drop-shadow(0 0 7px rgb(228 189 116 / 0.25));
}

.hero__proof:hover::before,
.hero__proof:focus-visible::before {
  opacity: 0.84;
}

.hero__proof:hover::after,
.hero__proof:focus-visible::after {
  animation: heroProofShine 720ms var(--ease-motion);
}

.hero__proof:focus-visible {
  outline: 2px solid rgb(var(--rgb-gold-highlight) / 0.95);
  outline-offset: 2px;
}

/* ── Responsive ── */

/* Phones: single column of proof cards. */
@media (max-width: 767px) {
  .hero__proofs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) and (orientation: portrait) {
  .hero__kicker {
    font-size: 23px;
    letter-spacing: 0.2em;
  }

  .hero__subline {
    font-size: 18px;
    line-height: 1.55;
    letter-spacing: 0.12em;
  }
}

/* Phone portrait composition. Copy rests visible until its reveal begins. */
@media (max-width: 600px) and (orientation: portrait) {
  .hero__visual::before {
    background: linear-gradient(180deg, rgb(0 0 0 / 0.24) 0%, rgb(0 0 0 / 0.27) 30%, rgb(0 0 0 / 0.29) 62%, rgb(0 0 0 / 0.3) 100%);
  }

  .hero__visual::after {
    background: radial-gradient(ellipse 94% 68% at 50% 42%, rgb(0 0 0 / 0.26) 0%, rgb(0 0 0 / 0.18) 48%, transparent 78%);
  }

  .hero__statement {
    top: 19%;
    width: 88%;
    max-width: 390px;
    isolation: isolate;
  }

  /* Soft dark pool behind the copy. */
  .hero__statement::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -28px -18px -34px;
    pointer-events: none;
    background: radial-gradient(ellipse 68% 58% at 50% 48%, rgb(0 0 0 / 0.3) 0%, rgb(0 0 0 / 0.2) 48%, rgb(0 0 0 / 0.08) 68%, transparent 84%);
    filter: blur(8px);
  }

  .hero__kicker,
  .hero__title-ivory,
  .hero__title-gold,
  .hero__subline,
  .hero__cta {
    opacity: 1;
  }

  .hero__kicker {
    width: 85%;
    margin: 0 0 17px;
    font-size: clamp(18px, 4.7vw, 21px);
    font-weight: 550;
    letter-spacing: 0.16em;
    color: #f1eee7;
    text-shadow: 0 1px 2px rgb(0 0 0 / 0.7), 0 4px 12px rgb(0 0 0 / 0.28);
  }

  .hero__kicker-line,
  .hero__title-line {
    display: block;
    white-space: nowrap;
  }

  .hero__title-block {
    gap: 0;
  }

  .hero__rule {
    width: 44%;
    height: 2px;
    margin: 0 0 22px;
    background: linear-gradient(90deg, rgb(220 170 77 / 0.5) 0%, #e5b75d 50%, rgb(220 170 77 / 0.5) 100%);
    box-shadow: 0 0 7px rgb(220 170 77 / 0.2);
  }

  .hero__rule--lower {
    display: block;
    margin: 23px 0 0;
  }

  .hero__title {
    width: 100%;
    max-width: 365px;
    font-size: clamp(56px, 14.8vw, 66px);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: 0;
  }

  /* Block lines: here the reveal also slides them. */
  .hero__title-ivory,
  .hero__title-gold {
    display: block;
  }

  .hero__title-ivory {
    color: #f3eee4;
    text-shadow: 0 2px 3px rgb(0 0 0 / 0.55), 0 8px 18px rgb(0 0 0 / 0.24), 0 -1px 0 rgb(255 255 255 / 0.16);
  }

  .hero__title-gold {
    font-weight: 650;
    color: #e3ae4f;
    background: linear-gradient(180deg, #f2cc79 0%, #e3ae4f 42%, #cc8d2c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.5)) drop-shadow(0 8px 10px rgb(0 0 0 / 0.22));
    text-shadow: none;
  }

  .hero__subline {
    width: 100%;
    max-width: 100%;
    margin: 23px 0 0;
    line-height: 1;
    color: #f5f3ee;
    text-shadow: 0 1px 2px rgb(0 0 0 / 0.72), 0 4px 10px rgb(0 0 0 / 0.24);
  }

  .hero__subline-lead {
    font-size: clamp(18px, 5vw, 21px);
    font-weight: 650;
    line-height: 1;
    letter-spacing: 0.13em;
  }

  .hero__subline-list {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.42em;
    margin-top: 13px;
    font-size: clamp(13px, 3.7vw, 16px);
    font-weight: 550;
    line-height: 1;
    letter-spacing: 0.11em;
    white-space: nowrap;
  }

  .hero__subline-dot {
    font-size: 0.72em;
    color: #d8aa55;
  }

  .hero__cta {
    --radius-sm: 999px;
    margin-top: 30px;
  }
}

/* Phones (portrait and landscape): larger CTA artwork. */
@media (max-width: 767px), (max-width: 900px) and (orientation: landscape) {
  .hero__cta {
    width: clamp(275px, 74vw, 300px);
    max-width: 88vw;
  }
}

/* Phone landscape and compact touch landscape: the photograph shows at its
   full natural height (no crop); the copy overlays the image only. */
@media (max-width: 900px) and (orientation: landscape),
       (pointer: coarse) and (orientation: landscape) and (min-width: 1100px) and (max-width: 1180px) and (max-height: 780px) {
  .hero__visual {
    height: auto;
  }

  .hero__bg {
    position: relative;
    inset: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    transform-origin: center center;
  }

  .hero__statement {
    top: clamp(10%, 12vh, 16%);
  }
}

/* Tablets: proof cards in two columns. */
@media (min-width: 768px) and (max-width: 1180px) {
  .hero__proofs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tablet portrait keeps its 2×2 grid when page zoom narrows the viewport
   into the phone breakpoint. Screen dimensions exclude actual phones. */
@media (pointer: coarse) and (orientation: portrait) and (min-device-width: 768px) and (max-device-width: 1100px) {
  .hero__proofs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Touch tablets in landscape: all four proof cards share one row. */
@media (pointer: coarse) and (orientation: landscape) and (min-device-width: 600px) and (min-device-height: 600px) and (max-width: 1400px) {
  .hero__proofs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Phones and touch tablets: the CTA resolves without the blur filter, and no
   layers are promoted ahead of time (cheaper compositing while scrolling). */
@media (max-width: 1180px), (pointer: coarse) and (min-width: 768px) {
  .hero__cta {
    filter: none;
    animation-name: heroCtaResolveFlat;
  }

  .hero__bg,
  .hero__kicker,
  .hero__rule,
  .hero__title-ivory,
  .hero__title-gold,
  .hero__subline,
  .hero__cta {
    will-change: auto;
  }
}

/* Fine-pointer desktops bring the CTA in a second earlier. */
@media (min-width: 1181px) and (hover: hover) and (pointer: fine) {
  .hero {
    --hero-cta-advance: 1000ms;
  }
}

@media (min-width: 1200px) {
  .hero__subline {
    font-size: clamp(20px, 0.9vw, 23px);
  }

  .hero__subline-lead {
    font-size: 1.4em;
  }
}

/* Above 1920×1080: type grows with the smaller viewport ratio (capped). */
@media (min-width: 1921px) and (min-height: 1081px) {
  .hero__kicker {
    font-size: clamp(24px, min(1.25vw, 2.222222vh), 36px);
  }

  .hero__title {
    font-size: clamp(96px, min(5vw, 8.888889vh), 139.2px);
  }

  .hero__subline {
    font-size: clamp(20px, min(1.041667vw, 1.851852vh), 30px);
  }
}

/* 1080p / 2160p bands: the 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) {
  .hero__statement {
    width: min(96vw, calc(1180 * var(--home-scale-720)));
  }

  .hero__kicker {
    margin: calc(10 * var(--home-scale-720)) 0 calc(14 * var(--home-scale-720));
    font-size: calc(19 * var(--home-scale-720));
  }

  .hero__title-block {
    gap: calc(6.12 * var(--home-scale-720));
  }

  .hero__rule {
    width: min(calc(520 * var(--home-scale-720)), 78vw);
    height: calc(1 * var(--home-scale-720));
  }

  .hero__title {
    font-size: calc(69.12 * var(--home-scale-720));
  }

  .hero__title-ivory {
    --line-y-start: calc(28 * var(--home-scale-720));
  }

  .hero__title-gold {
    --line-y-start: calc(-18 * var(--home-scale-720));
  }

  .hero__subline {
    max-width: min(calc(820 * var(--home-scale-720)), 92vw);
    margin-top: calc(10 * var(--home-scale-720));
    font-size: calc(15 * var(--home-scale-720));
  }

  .hero__cta {
    --radius-sm: calc(8 * var(--home-scale-720));
    margin-top: calc(28 * var(--home-scale-720));
    border-radius: var(--radius-sm);
    -webkit-backdrop-filter: blur(calc(10 * var(--home-scale-720))) saturate(1.06);
    backdrop-filter: blur(calc(10 * var(--home-scale-720))) saturate(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero__kicker,
  .hero__title-ivory,
  .hero__title-gold,
  .hero__subline,
  .hero__rule {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero__cta {
    animation: none;
    opacity: 1;
    transform: none;
    clip-path: none;
    filter: none;
  }

  .hero__proof:hover::after,
  .hero__proof:focus-visible::after {
    animation: none;
    opacity: 0.14;
    transform: none;
  }
}

/* ── Keyframes ── */

@keyframes heroFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

@keyframes heroLineReveal {
  0% {
    opacity: 0;
    transform: translateY(var(--line-y-start, 24px));
  }
  60% {
    opacity: 0.9;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroRuleReveal {
  from {
    opacity: 0;
    transform: scaleX(0.72);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* The CTA opens from its centre line while sharpening into focus. */
@keyframes heroCtaResolve {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    clip-path: inset(0 50% 0 50% round var(--radius-sm));
    filter: blur(8px);
  }
  38% {
    opacity: 0.55;
    filter: blur(3px);
  }
  72%,
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    clip-path: inset(0 0 0 0 round var(--radius-sm));
    filter: blur(0);
  }
}

@keyframes heroCtaResolveFlat {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
    clip-path: inset(0 50% 0 50% round var(--radius-sm));
  }
  38% {
    opacity: 0.55;
  }
  72%,
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    clip-path: inset(0 0 0 0 round var(--radius-sm));
  }
}

@keyframes heroProofShine {
  0% {
    opacity: 0;
    transform: translateX(-65%);
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(65%);
  }
}
