/* Homepage opening: one clean scene spans the hero and proof continuously. */

.home-page .home-opening {
  --proof-position: 55%;
  --opening-hero-height: max(100svh, 44rem);
  --opening-scene-top: 5.5rem;
  --proof-height: clamp(28rem, 34vw, 34rem);
  --proof-media-height: clamp(22rem, 78vw, 31rem);
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #f4eee4;
  color: #081b35;
}

.home-opening__scene {
  position: absolute;
  inset: var(--opening-scene-top) 0 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.home-opening__scene-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
  object-fit: cover;
  object-position: 50% top;
  filter: saturate(0.92) contrast(0.99) brightness(1.01);
}

.home-page .home-hero--ready {
  position: relative;
  z-index: 2;
  width: 100%;
  height: var(--opening-hero-height);
  min-height: 0;
  padding-top: 5.5rem;
  display: block;
  overflow: hidden;
  background: transparent;
  color: #081b35;
}

.home-page .home-hero--ready .ready-hero__frame {
  position: relative;
  z-index: 2;
  width: min(calc(100% - clamp(3rem, 8vw, 8rem)), 86rem);
  height: 100%;
  margin-inline: auto;
  display: grid;
  place-items: center;
}

.ready-hero__copy {
  width: min(100%, 74rem);
  min-width: 0;
  padding: clamp(3rem, 8vh, 5.25rem) 0 clamp(2.75rem, 7vh, 4.75rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(clamp(2.5rem, 5.7vh, 3.5rem));
}

.ready-hero__copy h1 {
  width: 100%;
  margin: 0;
  color: #081b35;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(5.2rem, 6.65vw, 6.4rem);
  font-weight: 400;
  letter-spacing: -0.052em;
  line-height: 0.82;
  text-transform: uppercase;
  text-wrap: balance;
}

.ready-hero__copy h1 span {
  display: block;
  white-space: nowrap;
}

.ready-hero__intro {
  width: min(100%, 46rem);
  margin: clamp(1.45rem, 3.2vh, 2rem) auto 0;
  color: rgba(8, 19, 33, 0.84);
  font-size: clamp(0.88rem, 1.05vw, 1rem);
  line-height: 1.55;
  text-wrap: balance;
}

.ready-hero__actions {
  margin-top: clamp(1.5rem, 3.4vh, 2.2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.75rem, 3vw, 2.75rem);
}

.ready-hero__primary,
.ready-hero__secondary {
  min-height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #081321;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}

.ready-hero__primary {
  min-width: 14.25rem;
  padding: 0 1.6rem;
  border: 1px solid #b8965a;
  background: #b8965a;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ready-hero__primary:hover {
  background: #081321;
  color: #faf6ee;
  transform: translateY(-1px);
}

.ready-hero__secondary {
  position: relative;
  min-width: 9.8rem;
  padding-inline: 0;
}

.ready-hero__secondary::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.45rem;
  left: 0;
  height: 1px;
  background: #b8965a;
  transform-origin: center;
  transition: transform 0.2s ease;
}

.ready-hero__secondary:hover::after {
  transform: scaleX(0.6);
}

.ready-hero__primary:focus-visible,
.ready-hero__secondary:focus-visible {
  outline: 2px solid #081321;
  outline-offset: 4px;
}

@media (max-width: 1040px) {
  .home-page .home-hero--ready .ready-hero__frame {
    width: min(calc(100% - 3rem), 68rem);
  }

  .ready-hero__copy h1 {
    font-size: clamp(4.4rem, 7.15vw, 5rem);
  }
}

/* Keep the approved two-line desktop composition fluid through the narrow
   desktop band instead of letting the 4.4rem floor clip the second line. */
@media (min-width: 861px) and (max-width: 969px) {
  .ready-hero__copy h1 {
    font-size: 7.15vw;
  }
}

/* Desktop baseline lock: 1041px and wider use only the canonical declarations above. */

@media (max-width: 860px) {
  .home-page .home-opening {
    --opening-hero-height: 100svh;
  }

  .home-opening__scene {
    bottom: auto;
    height: calc(var(--opening-hero-rendered-height, var(--opening-hero-height)) - var(--opening-scene-top) + var(--proof-media-height));
  }

  .home-page .home-hero--ready {
    height: auto;
    min-height: 100svh;
  }

  .home-page .home-hero--ready .ready-hero__frame {
    width: min(calc(100% - 2.5rem), 46rem);
    min-height: calc(100svh - 5.5rem);
    padding: clamp(19rem, 60vw, 25rem) 0 clamp(2.75rem, 8vw, 4.5rem);
    place-items: end center;
  }

  .ready-hero__copy {
    width: 100%;
    padding: 0;
    transform: none;
  }

  .ready-hero__copy h1 {
    font-size: clamp(3.75rem, 10vw, 4.65rem);
    line-height: 0.86;
  }

  .ready-hero__copy h1 span {
    white-space: normal;
  }

  .ready-hero__copy h1 span:first-child {
    white-space: nowrap;
  }

  .ready-hero__intro {
    width: min(100%, 36rem);
    margin-top: 1.35rem;
  }
}

/* Roomy compact: center the complete hero group below the fixed header. */
@media (min-width: 621px) and (max-width: 860px) {
  .home-page .home-hero--ready .ready-hero__frame {
    min-height: calc(100svh - var(--opening-scene-top));
    padding: clamp(2rem, 5svh, 3.25rem) 0;
    place-items: center;
  }
}

@media (max-width: 620px) {
  .home-page .home-hero--ready .ready-hero__frame {
    width: min(calc(100% - 2rem), 34rem);
    min-height: calc(100svh - var(--opening-scene-top));
    padding: clamp(2rem, 5svh, 3.25rem) 0;
    place-items: center;
  }

  .ready-hero__copy h1 {
    font-size: clamp(2.35rem, 9.8vw, 4rem);
    letter-spacing: -0.055em;
    line-height: 0.84;
  }

  .ready-hero__intro {
    margin-top: 1.2rem;
    font-size: 0.9rem;
  }

  .ready-hero__actions {
    width: 100%;
    margin-top: 1.45rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .ready-hero__primary,
  .ready-hero__secondary {
    width: 100%;
    min-width: 0;
  }

  .ready-hero__secondary {
    min-height: 2.85rem;
  }

  .ready-hero__secondary::after {
    right: 24%;
    left: 24%;
  }
}

@media (max-width: 340px) {
  .ready-hero__copy h1 {
    font-size: clamp(1.75rem, 8.3vw, 2.35rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ready-hero__primary,
  .ready-hero__secondary::after {
    transition: none;
  }
}
