/* Static, full-bleed Saphire campaign photograph. */
.reference-hero.saphire-hero {
  height: 100vh;
  height: 100svh;
  min-height: 320px;
  max-height: none;
  background: #211b15;
}

.saphire-hero-picture {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
}

.saphire-hero-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}

.saphire-hero::after {
  pointer-events: none;
  background:
    linear-gradient(90deg, rgb(13 11 9 / .60), transparent 40%),
    linear-gradient(180deg, rgb(13 11 9 / .34), transparent 18%),
    linear-gradient(0deg, rgb(13 11 9 / .20), transparent 18%);
}

.saphire-hero .reference-hero-content {
  inset: 54% auto auto max(var(--reference-gutter), env(safe-area-inset-left));
  width: max-content;
  max-width: 25%;
  transform: translateY(-50%);
  text-align: left;
}

.overa-editorial-home .saphire-hero .reference-saphire-signature {
  width: clamp(132px, 13.6vw, 222px);
  margin: 0 0 clamp(14px, 2.2vh, 22px);
}

.catalog-site .saphire-hero h1 {
  align-items: flex-start;
  font-size: clamp(26px, 2.75vw, 55px);
  line-height: 1.03;
}

.saphire-hero .reference-hero-button {
  min-width: 155px;
  min-height: 44px;
  margin-top: clamp(18px, 2.8vh, 30px);
  padding: 12px 23px;
  background: #f7f3ec;
  color: #211c17;
  border-color: #f7f3ec;
  font-size: 12px;
  text-shadow: none;
}

.saphire-hero .reference-hero-button:hover { background: #fff; }

/* At narrower aspect ratios keep the desk at its native proportions. Only
   empty wall above it and foreground floor below it adapt to the viewport.
   All three areas sample the same photograph and meet at the same pixel row. */
@media (max-aspect-ratio: 3/2) {
  .saphire-hero-picture {
    display: flex;
    flex-direction: column;
    --room: url('./home/saphire-night-desktop.webp');
    --middle-ratio: 12 / 5;
    --middle-position: 66.6667%;
    --wall-weight: 2;
    --floor-size: 800%;
  }

  .saphire-hero-picture::before,
  .saphire-hero-picture::after {
    content: "";
    display: block;
    min-height: 0;
    background-image: var(--room);
    background-repeat: no-repeat;
  }

  .saphire-hero-picture::before {
    flex: var(--wall-weight) 1 0;
    background-size: 100% 400%;
    background-position: center top;
  }

  .saphire-hero-picture img {
    flex: none;
    height: auto;
    aspect-ratio: var(--middle-ratio);
    object-position: 50% var(--middle-position);
  }

  .saphire-hero-picture::after {
    flex: 1 1 0;
    background-size: 100% var(--floor-size);
    background-position: center bottom;
  }
}

@media (max-aspect-ratio: 6/5) {
  .saphire-hero-picture {
    --room: url('./home/saphire-night-mobile.webp');
    --middle-ratio: 4 / 3;
    --middle-position: 50%;
    --wall-weight: 1;
    --floor-size: 400%;
  }

  .saphire-hero::after {
    background:
      linear-gradient(0deg, rgb(16 13 11 / .72), rgb(16 13 11 / .32) 20%, transparent 40%),
      linear-gradient(180deg, rgb(16 13 11 / .34), transparent 17%);
  }

  .saphire-hero .reference-hero-content {
    inset: auto 16px max(25px, 4.5svh, calc(env(safe-area-inset-bottom) + 14px));
    width: auto;
    max-width: none;
    transform: none;
    text-align: center;
  }

  .overa-editorial-home .saphire-hero .reference-saphire-signature {
    width: clamp(107px, 20vw, 155px);
    margin: 0 auto 10px;
  }

  .catalog-site .saphire-hero h1 {
    align-items: center;
    font-size: clamp(24px, min(5.6vw, 4.1svh), 39px);
    line-height: 1;
  }

  .saphire-hero .reference-hero-button { margin-top: 17px; }
}

/* Extend the empty left side on panoramic screens, keeping the feet in view. */
@media (min-aspect-ratio: 21/10) {
  .saphire-hero-picture img {
    position: absolute;
    right: 0;
    width: 210svh;
    max-width: none;
    clip-path: inset(0 0 0 25%);
  }

  .saphire-hero-picture::before {
    content: "";
    position: absolute;
    inset: 0 157.5svh 0 0;
    background: url('./home/saphire-night-desktop.webp') left 62% / 400% 140% no-repeat;
  }
}

@media (max-height: 540px) and (min-aspect-ratio: 6/5) {
  .saphire-hero .reference-hero-content { top: 58%; }
  .overa-editorial-home .saphire-hero .reference-saphire-signature {
    width: clamp(110px, 13vw, 155px);
    margin-bottom: 10px;
  }
  .catalog-site .saphire-hero h1 { font-size: clamp(22px, 2.75vw, 32px); }
  .saphire-hero .reference-hero-button { min-width: 136px; margin-top: 14px; }
}
