/* DOMIO homepage: the supplied garden photograph, with restrained colour
   presentation. This file affects only the opening of the homepage. */
.page-home .photo-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: clamp(580px, 78vh, 820px);
  min-height: clamp(580px, 78svh, 820px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #25362e;
  color: #fff;
}
.page-home .photo-hero-ground { display: none; background-image: url('/assets/domio-garden-foreground.webp'); }
.page-home .photo-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 48%;
  /* The original photo is preserved; only its presentation is graded. */
  filter: saturate(.91) contrast(.98) brightness(.99) sepia(.025);
}
.page-home .photo-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(0deg, rgba(13,25,18,.78) 0%, rgba(13,25,18,.40) 29%, rgba(13,25,18,.06) 62%, transparent 100%),
    linear-gradient(90deg, rgba(13,25,18,.22), transparent 72%);
  pointer-events: none;
}
.page-home .photo-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1600px;
  padding-top: 180px;
  padding-bottom: clamp(44px, 5vw, 72px);
}
.page-home .photo-hero .hero-main { max-width: 780px; }
.page-home .photo-hero .lbl {
  color: #ead7b8;
  margin-bottom: 18px;
  font-size: 12px;
  letter-spacing: .2em;
  text-shadow: 0 1px 12px rgba(0,0,0,.25);
}
.page-home .photo-hero h1 {
  max-width: 17ch;
  color: #fff;
  font-size: clamp(44px, 4.7vw, 74px);
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0,0,0,.22);
  text-wrap: balance;
}
.page-home .photo-hero .btns { margin-top: 30px; gap: 28px; align-items: center; }
.page-home .photo-hero .text-link { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.3); }
.page-home .photo-hero .text-link:focus-visible { outline-color: #fff; }
.page-home .photo-hero .btn:focus-visible { outline-color: #fff; }
.page-home .home-introduction { padding-block: 36px 0; }
.page-home .home-introduction .lede {
  max-width: 74ch;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}
@media(max-width:719px) {
  .page-home .photo-hero {
    min-height: clamp(500px, 74vh, 620px);
    min-height: clamp(500px, 74svh, 620px);
  }
  /* Favour the entrance and front elevation in the portrait crop. */
  .page-home .photo-hero-media { object-position: 68% 50%; }
  .page-home .photo-hero::after {
    background: linear-gradient(0deg, rgba(13,25,18,.85) 0%, rgba(13,25,18,.53) 25%, rgba(13,25,18,.06) 55%, transparent 100%);
  }
  .page-home .photo-hero-content { padding-top: 240px; padding-bottom: 32px; }
  .page-home .photo-hero .lbl { font-size: 11px; letter-spacing: .15em; margin-bottom: 14px; }
  .page-home .photo-hero h1 { max-width: 16ch; font-size: clamp(36px, 9.4vw, 49px); line-height: 1.13; }
  .page-home .photo-hero .btns { gap: 16px 24px; margin-top: 24px; }
  .page-home .photo-hero .btn { min-width: 0; padding-inline: 22px; }
  .page-home .photo-hero .text-link { font-size: 14px; }
  .page-home .home-introduction { padding-top: 28px; }
  .page-home .home-introduction .lede { font-size: 15px; line-height: 1.9; max-width: 48ch; }
}
@media(max-width:719px) and (orientation:portrait) {
  .page-home .photo-hero {
    /* Browser toolbars can resize even svh in an iOS in-app browser.
       Use the stable screen width so scrolling cannot resize the photograph,
       its foreground extension, or the button row. Rotation still adapts. */
    --original-photo-height: clamp(500px, 130vw, 620px);
    --foreground-height: 70px;
    min-height: calc(var(--original-photo-height) + var(--foreground-height));
  }
  /* Keep the original photo at its previous scale and crop. Only the new
     foreground occupies the extra 70px; increasing the hero never zooms in. */
  .page-home .photo-hero-ground {
    display: block;
    position: absolute;
    inset: 0 0 auto;
    height: calc(var(--original-photo-height) * 1.24993565);
    /* This layer supplies only the gravel extension. Never show its second
       house while the main photo downloads; retain the existing 8px blend. */
    clip-path: inset(calc(var(--original-photo-height) - 8px) 0 0);
    pointer-events: none;
  }
  .page-home .photo-hero-ground {
    background-size: cover;
    background-position: 68% 0;
    background-repeat: no-repeat;
    filter: saturate(.91) contrast(.98) brightness(.99) sepia(.025);
  }
  .page-home .photo-hero-media {
    height: var(--original-photo-height);
    bottom: auto;
    object-position: 68% 50%;
    /* Blend only the final 8px of gravel into the extended foreground. */
    -webkit-mask-image: linear-gradient(#000 calc(100% - 8px), transparent);
    mask-image: linear-gradient(#000 calc(100% - 8px), transparent);
  }
  .page-home .photo-hero::after {
    background:
      linear-gradient(180deg, rgba(13,25,18,.44), rgba(13,25,18,.32) 105px, transparent 210px),
      linear-gradient(0deg, rgba(13,25,18,.68), rgba(13,25,18,.43) 85px, transparent 170px);
  }
  .page-home .photo-hero-content {
    display: flex;
    min-height: inherit;
    padding-top: 24px;
    padding-bottom: 18px;
  }
  .page-home .photo-hero .hero-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: none;
  }
  .page-home .photo-hero .lbl {
    font-size: 10px;
    letter-spacing: .14em;
    margin-bottom: 10px;
  }
  .page-home .photo-hero h1 {
    max-width: 18ch;
    font-size: clamp(30px, 8.2vw, 38px);
    line-height: 1.1;
  }
  .page-home .photo-hero .btns {
    margin-top: auto;
    padding-top: 28px;
    gap: 14px 24px;
  }
}
@media(max-width:359px) {
  .page-home .photo-hero .btns { gap: 14px; }
  .page-home .photo-hero .btn { padding-inline: 18px; }
  .page-home .photo-hero .text-link { font-size: 13px; }
}
@media(max-height:600px) and (orientation:landscape) {
  .page-home .photo-hero { min-height: 440px; }
  .page-home .photo-hero-content { padding-top: 120px; padding-bottom: 32px; }
}
@media(max-width:959px) and (max-height:600px) and (orientation:landscape) {
  .page-home .photo-hero-content {
    display: flex;
    min-height: inherit;
    padding-top: 24px;
    padding-bottom: 24px;
  }
  .page-home .photo-hero .hero-main { flex: 1; display: flex; flex-direction: column; max-width: none; }
  .page-home .photo-hero .lbl { font-size: 10px; margin-bottom: 10px; }
  .page-home .photo-hero h1 { font-size: 32px; max-width: 28ch; }
  .page-home .photo-hero .btns { margin-top: auto; padding-top: 24px; }
  .page-home .photo-hero::after {
    background: linear-gradient(180deg, rgba(13,25,18,.5), transparent 42%, transparent 64%, rgba(13,25,18,.68));
  }
}
