/* The photo and its highlights share the image's original coordinate system. */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: max(720px, calc(100svh - 90px), calc(40vw + 55px));
  overflow: hidden;
  color: white;
  background: var(--ink);
}
.hero-art { position: absolute; inset: 0; container-type: size; }
.route-photo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100cqw, 150cqh);
  aspect-ratio: 3 / 2;
  transform: translate(-50%, -50%);
}
.route-photo img { width: 100%; height: 100%; }
.route-photo::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100cqw;
  height: 100cqh;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: linear-gradient(90deg, rgb(14 47 38 / .94), rgb(14 47 38 / .86) 35%, rgb(14 47 38 / .24) 80%),
              linear-gradient(0deg, rgb(14 47 38 / .65), transparent 45%);
}
.hero-content {
  position: relative;
  z-index: 2;
  pointer-events: none;
  width: min(1200px, calc(100% - 96px));
  padding-block: 88px;
}
.hero-content a, .hero-content :is(h1,p) { pointer-events: auto; }
.hero-content :is(h1,p) { width: fit-content; }
.hero .eyebrow { font-size: .75rem; line-height: 1.6; font-weight: 600; letter-spacing: .14em; color: var(--routura-mint); margin-bottom: 26px; }
.hero .marker { display: inline-block; width: 7px; height: 7px; margin-right: 9px; background: var(--routura-green); }
.hero h1 {
  max-width: 17ch;
  font-size: clamp(2.8rem, 4.8vw, 4.7rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero h1 span { color: var(--routura-mint); }
.hero .lead { max-width: 47ch; font-size: 1.1rem; line-height: 1.75; color: white; margin-top: 28px; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 34px; }
.hero .button { padding: 13px 21px; min-height: 50px; border-radius: 4px; gap: 30px; }
.hero .text-link { gap: 22px; }
.hero .hero-note { font-size: .8rem; color: white; margin-top: 40px; }
.hero-sign { position: absolute; right: 6%; bottom: 56px; width: 235px; z-index: 2; pointer-events: none; }
.hero-sign img { width: 100%; }
.hero-sign p { color: white; font-size: .68rem; line-height: 1.6; letter-spacing: .15em; margin: 14px 0 0 6px; font-weight: 500; }
.hero-content a:focus-visible { outline-color: var(--routura-mint); }
.route-trace { display: none; }
.route-node {
  --ring: max(18px, 2.65cqw, 3.975cqh);
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: max(44px, 2.65%);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.node-data { left: 26.920%; top: 76.962%; }
.node-plan { left: 67.314%; top: 20.614%; }
@media (any-hover: hover) {
  .route-trace {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
  }
  .route-hit { stroke: transparent; stroke-width: 16; pointer-events: stroke; }
  .route-light {
    opacity: 0;
    transition: opacity .2s ease;
  }
  .route-light use {
    stroke: #8fe4b1;
    stroke-width: 4;
    filter: drop-shadow(0 0 4px #5fda98);
  }
  .route-trace:hover .route-light { opacity: .8; }
  .route-node::before {
    content: "";
    width: var(--ring);
    height: var(--ring);
    border-radius: 50%;
    box-shadow: 0 0 0 1px #9be7bc, 0 0 12px 3px rgb(95 218 152 / .54);
    opacity: 0;
    transition: opacity .2s ease;
  }
  .route-node:hover::before { opacity: 1; }
}
@media (max-width: 1050px) {
  .hero-sign { display: none; }
  .hero-content { width: calc(100% - 64px); padding-block: 72px; }
}
/* On shorter desktop screens the lower bend sits alongside the last line.
   Lift the copy so the complete marker is clear of the text and links. */
@media (min-width: 761px) and (max-height: 930px) {
  .hero-content { transform: translateY(-42px); }
  .hero .hero-note { margin-top: 26px; }
}
/* In portrait, fit the road across the lower part of the photograph so both
   stops remain on screen and the copy and tap targets have separate space. */
@media (max-width: 760px) {
  .hero { min-height: calc(100svh - 76px); align-items: flex-start; }
  .hero-content { width: calc(100% - 40px); padding-block: 52px calc(68vw + 24px); }
  .hero h1 { font-size: clamp(2.6rem, 8.5vw, 3.8rem); }
  .hero .eyebrow { font-size: .65rem; letter-spacing: .09em; margin-bottom: 18px; }
  .hero .lead { font-size: 1.03rem; }
  .hero .actions { gap: 10px 22px; margin-top: 25px; }
  .hero .hero-note { margin-top: 18px; }
  /* A dark crop of the forest continues behind the text. The wider view of
     the road blends into it below, where both stops are visible. */
  .hero-art {
    background: linear-gradient(100deg, rgb(14 47 38 / .90), rgb(14 47 38 / .76)),
                url("images/hero-route-forest.webp") left top / auto max(150%, 1240px) no-repeat;
  }
  .route-photo img, .route-trace { mask-image: linear-gradient(180deg, transparent, black 23%); }
  .route-photo { width: 130%; top: auto; bottom: 0; transform: translateX(-50%); }
  .route-photo::after {
    inset: 0;
    width: auto;
    height: auto;
    transform: none;
    background: linear-gradient(to bottom, transparent, rgb(14 47 38 / .25) 28%, rgb(14 47 38 / .2) 55%, rgb(14 47 38 / .45));
  }
  .route-node { --ring: max(18px, 3.445cqw); }
}
@media (max-width: 420px) {
  .hero .actions { align-items: stretch; flex-direction: column; }
}
