/* A postal route frames the title; the letter opens in the next section. */
.delivery-hero {
  display: block;
  height: max(560px, calc(100svh - var(--nav-height, 58px)));
  min-height: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}
.hero-delivery-route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero-delivery-route path { fill: none; stroke: var(--postman-green); stroke-width: 2.2px; stroke-dasharray: 11 12; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hero-delivery-route-narrow { display: none; }
.hero-route-heart { position: absolute; left: 2.3%; top: 72%; width: clamp(28px, 3.4vw, 56px); height: auto; transform: rotate(-12deg); z-index: 1; pointer-events: none; filter: drop-shadow(0 2px 1px #8f54121a); }
.hero-route-heart path { fill: var(--postage); }
.delivery-hero .hero-envelope-heading { position: absolute; z-index: 1; top: 25%; left: 16%; right: 16%; padding: 0; text-align: center; }
.delivery-hero h1 { font-size: clamp(5rem, 12vw, 13rem); font-style: italic; font-weight: 700; line-height: 1.08; letter-spacing: -.025em; white-space: nowrap; color: #294b3b; text-shadow: none; }
.delivery-hero .sub { max-width: 35ch; margin: clamp(12px, 1.6vw, 24px) auto 0; font-size: clamp(1.08rem, 2.05vw, 2.1rem); line-height: 1.4; color: var(--ink); text-wrap: balance; }
.delivery-hero .title-hero-art { position: absolute; z-index: 2; right: 6%; bottom: 8.5%; width: min(27vw, 420px); max-height: 40%; height: auto; object-fit: contain; margin: 0; }
.delivery-hero > .hero-letter-invite { position: absolute; z-index: 3; left: 50%; bottom: 4.5%; transform: translateX(-50%); margin: 0; font-size: clamp(.85rem, 1.4vw, 1.15rem); white-space: nowrap; gap: 18px; }
.delivery-hero > .hero-letter-invite span { width: 36px; height: 36px; font-size: 1.3rem; }

/* Live, selectable lettering with uneven pigment and small worn paper flecks. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .delivery-hero h1 {
    background: #294b3b url('../img/letterpress-ink.svg') 0 0 / 220px 180px repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

@media (max-width: 900px) {
  .delivery-hero .hero-envelope-heading { top: 28%; left: 13%; right: 13%; }
  .delivery-hero h1 { font-size: clamp(4.5rem, 11vw, 6.5rem); }
  .delivery-hero .sub { max-width: 31ch; }
  .delivery-hero .title-hero-art { bottom: 14%; width: 29vw; right: 7%; }
  .delivery-hero > .hero-letter-invite { bottom: 5%; }
  .hero-delivery-route path { stroke-width: 1.8px; stroke-dasharray: 8 9; }
}
@media (max-width: 620px) {
  .hero-delivery-route-wide { display: none; }
  .hero-delivery-route-narrow { display: block; }
  .delivery-hero .hero-envelope-heading { top: 25%; left: 9%; right: 9%; }
  .delivery-hero h1 { font-size: clamp(3.5rem, 15vw, 5rem); letter-spacing: -.035em; }
  .delivery-hero .sub { max-width: 28ch; font-size: 1rem; margin-top: 14px; line-height: 1.5; }
  .delivery-hero .title-hero-art { right: 7%; bottom: 15%; width: min(52vw, 240px); max-height: 28%; }
  .hero-route-heart { left: 4%; top: 72%; width: 30px; }
  .delivery-hero > .hero-letter-invite { bottom: 5%; font-size: .82rem; gap: 12px; }
  .delivery-hero > .hero-letter-invite span { width: 30px; height: 30px; font-size: 1.1rem; }
}
@media (forced-colors: active) {
  .delivery-hero h1 { background: none; -webkit-text-fill-color: CanvasText; color: CanvasText; }
  .hero-delivery-route, .hero-route-heart { display: none; }
}
