/* V7 story layer. Equinox owns the image, type and ground; light is a brief
   entrance inside the photograph. No scroll capture and no animated copy. */
:root {
  --v7-story-space: clamp(56px, 7svh, 80px);
  --v7-photo-ease: cubic-bezier(.19, 1, .22, 1);
}

html.v5-snap[data-view="home"] { scroll-snap-type: none !important; }
html[data-view="home"] .v5-stop { scroll-snap-align: none !important; }
html[data-view="home"] :is(#findings, #feeling, #inway, #movement, #next) { scroll-margin-top: 64px; }

/* Paint only the photo plane. The existing image and text never move or blur. */
.v5-photo.v7-photo-light::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(108deg, transparent 19%, rgba(255,255,255,.04) 37%, rgba(255,255,255,.24) 51%, rgba(255,255,255,.06) 64%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 75% 64% at 52% 46%, #000 20%, transparent 77%);
  mask-image: radial-gradient(ellipse 75% 64% at 52% 46%, #000 20%, transparent 77%);
}
.v5-photo.v7-photo-light.is-light-passing::before {
  animation: v7-photo-pass 1800ms var(--v7-photo-ease) both;
}
@keyframes v7-photo-pass {
  0% { opacity: 0; transform: translate3d(-35%, 0, 0); }
  24% { opacity: .9; }
  68% { opacity: .4; }
  100% { opacity: 0; transform: translate3d(35%, 0, 0); }
}

/* At rest the fixed invitation cannot receive keyboard focus. Its lifecycle is
   independent of the old door cue, including reduced motion and return visits. */
.af-sticky-cta { display: none; }
@media (max-width: 767px) {
  .af-sticky-cta {
    display: block;
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 45;
    visibility: hidden;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 180ms var(--ease), transform 180ms var(--ease), visibility 0s 180ms;
  }
  .af-sticky-cta.is-on {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition-delay: 0s;
  }
  .af-sticky-cta .sc-host-x,
  .af-sticky-cta .sc-host-x > :is(button, a) {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  .af-sticky-cta .sc-host-x > :is(button, a) {
    min-height: 52px;
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #000 !important;
  }
  html.dim-open .af-sticky-cta,
  html:not([data-view="home"]) .af-sticky-cta {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 1023px) {
  html[data-view="home"] .af-light {
    padding-top: var(--v7-story-space) !important;
    padding-bottom: var(--v7-story-space) !important;
    gap: 20px !important;
  }
  html[data-view="home"] .af-light > .af-cl {
    margin-left: 0 !important;
    max-width: min(30ch, calc(100% - 20px)) !important;
  }
  html[data-view="home"] .af-light-foot { padding-top: 12px !important; }
  html[data-view="home"] .af-sec-findings {
    min-height: 0 !important;
    justify-content: flex-start !important;
    padding-block: var(--v7-story-space) !important;
  }
  html[data-view="home"] .af-sec-feeling,
  html[data-view="home"] .af-sec-next {
    padding-top: var(--v7-story-space) !important;
    padding-bottom: var(--v7-story-space) !important;
  }
  html[data-view="home"] .af-card-photo { height: clamp(360px, 57svh, 560px) !important; }
  html[data-view="home"] .af-inway-band {
    min-height: 360px !important;
    height: clamp(360px, 52svh, 560px) !important;
  }
  html[data-view="home"] .af-inway-on { margin-top: 64px !important; }
  html[data-view="home"] .af-arch-photo { height: clamp(380px, 58svh, 600px) !important; }
  html[data-view="home"] .af-arch-hl { top: 64px !important; }
  html[data-view="home"] .af-move-block { padding-block: 36px 48px !important; }
  html[data-view="home"] .af-sec-inway { padding-top: 12px !important; padding-bottom: var(--v7-story-space) !important; }
  html[data-view="home"] .af-inway-close { padding-top: 12px !important; }
}

@media (max-width: 559px) {
  html[data-view="home"] #story { min-height: 100svh !important; }
  html[data-view="home"] .af-hero {
    min-height: 100svh !important;
    padding: clamp(112px, 19svh, 172px) 24px 32px !important;
    gap: 32px !important;
  }
  html[data-view="home"] .af-hero-hl {
    font-size: clamp(44px, 12vw, 54px);
    line-height: .94;
    max-width: 8.5em;
  }
  html[data-view="home"] .af-hero-block { gap: 14px !important; }
  html[data-view="home"] .af-hero-block p { max-width: 32ch !important; line-height: 1.5 !important; }
  html[data-view="home"] .af-hero-block .af-eyebrow { margin-top: 2px; font-size: 11px !important; letter-spacing: .075em !important; }
  html[data-view="home"] .af-sec-findings { gap: 24px !important; }
  html[data-view="home"] .af-six-head { gap: 16px !important; }
  html[data-view="home"] .v5-doors { column-gap: 14px; row-gap: 22px; }
  html[data-view="home"] .door-img { aspect-ratio: 4 / 5; }
  html[data-view="home"] .door-name { margin-top: 9px; font-size: 12px; }
  html[data-view="home"] .af-sec-feeling { gap: 28px !important; padding-bottom: 32px !important; }
  html[data-view="home"] .af-sec-feeling > div:first-child { gap: 0 !important; }
  html[data-view="home"] .af-diptych { row-gap: 16px !important; }
  html[data-view="home"] .af-card-body { padding-block: 8px 16px !important; }
  html[data-view="home"] .af-inway-row {
    grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr) !important;
    column-gap: 20px !important;
    row-gap: 18px !important;
    padding-block: 28px !important;
  }
  html[data-view="home"] .af-inway-main { gap: 8px !important; }
  html[data-view="home"] .af-inway-main > p { font-size: 17px !important; line-height: 1.45; }
  html[data-view="home"] .af-inway-main .af-inway-actions { gap: 0 !important; }
  html[data-view="home"] .af-inway-main .af-inway-actions .sc-host-x > button { font-size: 11px !important; padding-inline: 0 !important; text-align: left; }
  html[data-view="home"] .af-inway-close { gap: 20px !important; }
  html[data-view="home"] .af-inway-close > .sc-host-x,
  html[data-view="home"] .af-inway-close > .sc-host-x > button { width: 100%; }
  html[data-view="home"] .af-sec-next { gap: 36px !important; }
  html[data-view="home"] #equinox,
  html[data-view="home"] .af-sec-equinox { min-height: max(620px, 88svh) !important; }
  html[data-view="home"] .af-sec-equinox { padding-bottom: 32px !important; }
}

/* Short phones keep the complete invitation on the first screen. The portrait
   retains its established crop so the white copy stays over the darker field. */
@media (max-width: 559px) and (max-height: 700px) {
  html[data-view="home"] .af-hero { padding-top: 116px !important; padding-bottom: 24px !important; gap: 24px !important; }
  html[data-view="home"] .af-hero-hl { font-size: 44px; }
  html[data-view="home"] .af-hero-block { gap: 12px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .v5-photo.v7-photo-light::before { display: none; }
  .af-sticky-cta { transition: none !important; transform: none !important; }
}
