.selune-closing {
  position: relative;
  color: #f8f2e7;
  background: var(--su-paper, #f6f5f1);
}

.selune-closing-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(70px, 10svh, 120px) 24px;
  isolation: isolate;
  text-align: center;
}

.selune-closing-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: clip;
  background: #332a21;
  pointer-events: none;
}

.selune-closing-image,
.selune-closing-media::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.selune-closing-image {
  object-fit: cover;
  object-position: 63% center;
}

.selune-closing-media::after {
  content: '';
  background:
    linear-gradient(180deg, rgb(18 14 10 / .53), transparent 31%, transparent 70%, rgb(18 14 10 / .26)),
    radial-gradient(ellipse at center, rgb(22 17 12 / .73) 0%, rgb(22 17 12 / .45) 48%, rgb(22 17 12 / .12) 100%);
}

.selune-closing-copy h2 {
  max-width: 14ch;
  margin: 0 auto clamp(22px, 3.5svh, 42px);
  color: inherit;
  font: 400 clamp(46px, 7.55vw, 128px) / .97 var(--su-display-font, Georgia, serif);
  letter-spacing: -.05em;
  text-wrap: balance;
}

.selune-closing-word { display: inline-block; }

.selune-closing-action {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  min-height: 44px;
  color: inherit;
  font: 400 15px / 1.35 var(--su-body-font, Arial, sans-serif);
  text-decoration: underline;
  text-underline-offset: .38em;
  text-decoration-thickness: 1px;
}

.selune-closing-action span {
  transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}

.selune-closing-action:is(:hover, :focus-visible) span { transform: translateX(4px); }

.selune-home-footer.demo-footer {
  position: relative;
  isolation: isolate;
  padding: 0;
}

.selune-home-footer.demo-footer:has([data-image-handoff]) { z-index: 2; }

.selune-home-footer-panel {
  --closing-gutter: clamp(24px, 4.8vw, 92px);
  position: relative;
  z-index: 1;
  padding: clamp(56px, 7vw, 128px) var(--closing-gutter) clamp(24px, 3.8vw, 64px);
  color: var(--su-ink, #26251e);
  background: var(--su-surface, #eeece5);
  font: 400 14px / 1.45 var(--su-body-font, Arial, sans-serif);
}

.selune-home-footer-brand {
  display: block;
  overflow: clip;
  margin-inline: -.65%;
  padding-block: .12em;
}

.selune-home-footer-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.selune-home-footer-details {
  display: grid;
  grid-template-columns: minmax(175px, 1fr) minmax(0, 1.7fr) auto;
  align-items: start;
  gap: 12px clamp(20px, 4vw, 70px);
  margin-top: clamp(24px, 4.2vw, 74px);
  padding-top: 12px;
  border-top: 1px solid var(--su-line, #ccc9bf);
}

.selune-home-footer-details p { max-width: 25ch; margin: 0; padding-block: 8px; }
.selune-home-footer-details nav { display: flex; flex-wrap: wrap; gap: 0 clamp(12px, 2vw, 34px); }
.selune-home-footer-details a { display: inline-flex; align-items: center; min-height: 38px; color: inherit; text-decoration: none; }
.selune-home-footer-details a:hover { text-decoration: underline; text-underline-offset: .28em; }
.selune-home-footer-top { gap: 8px; white-space: nowrap; }
.selune-closing a:focus-visible,
.selune-home-footer a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }

html:not(.case-open) body.selune-closing-at-header:not(.service-page, .project-page) .live-header.is-solid {
  color: #f8f2e7;
  background-color: transparent;
}

@media (max-width: 720px) {
  .selune-closing-copy h2 { font-size: clamp(46px, 11vw, 72px); }
  .selune-home-footer-details { grid-template-columns: minmax(0, 1fr) auto; }
  .selune-home-footer-details nav { grid-column: 1 / -1; grid-row: 2; }
}

@media (prefers-reduced-motion: no-preference) {
  .selune-home-footer.has-scroll-reveal .selune-closing { position: sticky; top: 0; }
  .has-scroll-reveal :is(.selune-closing-media, .selune-closing-copy) {
    opacity: var(--closing-media-opacity, 0);
  }
  .has-scroll-reveal [data-image-handoff] .selune-closing-media {
    position: fixed;
    inset: 0 auto auto 0;
    width: var(--closing-image-width);
    height: var(--closing-image-height);
    transform: translate3d(var(--closing-image-x), var(--closing-image-y), 0);
    opacity: 1;
  }
  .has-scroll-reveal [data-image-handoff] .selune-closing-media::after {
    opacity: var(--closing-image-shade);
  }
  .has-scroll-reveal [data-image-handoff] .selune-closing-copy {
    opacity: var(--closing-handoff-copy, 0);
  }
  .has-scroll-reveal .selune-closing:focus-within :is(.selune-closing-media, .selune-closing-copy) {
    opacity: 1;
  }
  /* The gap gives the copy time to reveal while the sticky image fills it. */
  .selune-home-footer.has-scroll-reveal .selune-home-footer-panel { margin-top: 54svh; }
  .has-scroll-reveal .selune-closing-word {
    opacity: var(--closing-word-opacity, 1);
    transform: translateY(var(--closing-word-offset, 0));
  }
  .has-scroll-reveal .selune-closing-action {
    opacity: var(--closing-action-opacity, 1);
    transform: translateY(var(--closing-action-offset, 0));
  }
  .selune-home-footer-brand img { transform: translateY(var(--closing-mark-offset, 0)); }
  .selune-home-footer-details {
    opacity: var(--closing-details-opacity, 1);
    transform: translateY(var(--closing-details-offset, 0));
  }
  .selune-closing:focus-within :is(.selune-closing-word, .selune-closing-action),
  .selune-home-footer:focus-within :is(.selune-home-footer-brand img, .selune-home-footer-details) {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .selune-closing-action span { transition: none; }
}
