/*
 * Haven Care artistic LBI footer
 * Shared by every public page. The map image is derived from the exact
 * OpenStreetMap LBI boundary and clipped to New Jersey 2020 orthophotography.
 */

.site-footer.haven-footer {
  --footer-navy: #14223b;
  --footer-green: #6a8b5b;
  --footer-paper: #f3f5f3;
  --footer-mist: #daddd6;
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  max-width: none;
  margin: clamp(56px, 8vw, 104px) auto 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: var(--footer-navy);
  box-shadow: 0 0 0 100vmax var(--footer-navy);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  clip-path: inset(0 -100vmax);
  color: var(--footer-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  text-align: left;
}

.site-footer.haven-footer::before,
.site-footer.haven-footer::after {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.site-footer.haven-footer::before {
  inset: 0 50% 0 auto;
  width: 100vw;
  transform: translateX(50%);
  background:
    radial-gradient(circle at 84% 18%, rgba(106, 139, 91, 0.14), transparent 24%),
    radial-gradient(circle at 8% 88%, rgba(218, 221, 214, 0.07), transparent 31%),
    radial-gradient(circle at 54% 48%, rgba(243, 245, 243, 0.03), transparent 40%),
    radial-gradient(ellipse at 34% 22%, rgba(243, 245, 243, 0.018), transparent 48%),
    radial-gradient(ellipse at 68% 78%, rgba(106, 139, 91, 0.025), transparent 44%);
}

.site-footer.haven-footer::after {
  inset: 0 50% 0 auto;
  width: 100vw;
  opacity: 0.24;
  transform: translateX(50%);
  background: url("/assets/footer-paper-grain.svg?v=20260803-6") center / 280px 280px repeat;
  mix-blend-mode: screen;
}

.haven-footer__canvas {
  position: relative;
  display: grid;
  box-sizing: border-box;
  width: min(1296px, 100%);
  margin-inline: auto;
  grid-template-columns: minmax(0, 1.16fr) minmax(210px, 0.7fr) minmax(300px, 0.9fr);
  grid-template-areas:
    "intro coverage map"
    "links coverage map"
    "meta meta map";
  column-gap: clamp(34px, 4.5vw, 68px);
  row-gap: 38px;
  min-height: 620px;
  padding: clamp(64px, 7vw, 92px) clamp(16px, 3vw, 32px) 34px;
}

.haven-footer__intro {
  grid-area: intro;
  align-self: start;
  max-width: 600px;
}

.haven-footer__brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.haven-footer__brand img {
  display: block;
  width: clamp(190px, 22vw, 258px);
  height: auto;
}

.haven-footer__eyebrow {
  margin: 30px 0 12px;
  color: rgba(218, 221, 214, 0.72);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.haven-footer__intro h2 {
  max-width: 11ch;
  margin: 0;
  color: var(--footer-paper);
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(3rem, 5.2vw, 4.75rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.94;
  text-wrap: balance;
}

.site-footer.haven-footer .haven-footer__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 28px;
  box-sizing: border-box;
  width: min(100%, 360px);
  padding: 12px 22px;
  border: 1px solid var(--footer-green);
  background-color: var(--footer-green);
  background-image: url("/assets/footer-paper-grain.svg?v=20260803-6");
  background-position: center;
  background-size: 190px 190px;
  background-blend-mode: soft-light;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.105em;
  line-height: 1.25;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.haven-footer__cta::after {
  margin-left: 12px;
  content: "\2192";
  font-size: 1rem;
  line-height: 1;
}

.site-footer.haven-footer .haven-footer__cta:hover {
  border-color: var(--footer-paper);
  background: var(--footer-paper);
  color: var(--footer-navy);
  transform: translateY(-2px);
}

.haven-footer__coverage {
  grid-area: coverage;
  align-self: center;
  padding: 12px 0;
}

.haven-footer__coverage-title,
.haven-footer__nav-title {
  margin: 0 0 16px;
  color: rgba(218, 221, 214, 0.66);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  line-height: 1.5;
  text-transform: uppercase;
}

.haven-footer__coverage-title {
  position: relative;
  margin-bottom: 14px;
  padding-bottom: 11px;
  color: #8ea77f;
}

.haven-footer__coverage-title::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 76px;
  height: 1px;
  background: linear-gradient(90deg, var(--footer-green), rgba(106, 139, 91, 0.08));
  content: "";
}

.haven-footer__towns {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.haven-footer__towns li {
  margin: 0;
  padding: 8px 0 7px;
  border-bottom: 1px solid rgba(218, 221, 214, 0.2);
  color: rgba(243, 245, 243, 0.94);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.02rem;
  font-weight: 440;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.haven-footer__towns li:last-child {
  border-bottom: 0;
}

.haven-footer__coverage-note {
  margin: 16px 0 0;
  color: rgba(142, 167, 127, 0.9);
  font-family: Newsreader, Georgia, serif;
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.55;
  text-wrap: pretty;
}

.haven-footer__map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  grid-area: map;
  align-self: stretch;
  min-height: 560px;
  overflow: visible;
}

.haven-footer__map::before,
.haven-footer__map::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.haven-footer__map::before {
  z-index: 0;
  inset: 2% -7% 1% -11%;
  opacity: 0.86;
  background: url("/assets/footer-tidal-waves.svg?v=20260803-6") center / contain no-repeat;
}

.haven-footer__map::after {
  z-index: 2;
  top: 32px;
  left: 24px;
  width: 142px;
  padding-top: 10px;
  border-top: 1px solid rgba(218, 221, 214, 0.34);
  color: rgba(218, 221, 214, 0.7);
  content: "LBI / COASTAL SERVICE MAP";
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.45;
  text-transform: uppercase;
}

.haven-footer__map img {
  position: absolute;
  z-index: 1;
  top: 51%;
  left: 57%;
  display: block;
  width: auto;
  height: auto;
  max-width: 84%;
  max-height: 430px;
  object-fit: contain;
  transform: translate(-50%, -50%) rotate(1deg);
  filter:
    brightness(0)
    invert(1)
    drop-shadow(0 0 1px rgba(255, 255, 255, 1))
    drop-shadow(3px 5px 0 rgba(218, 221, 214, 0.075))
    drop-shadow(0 12px 19px rgba(4, 13, 27, 0.24));
  opacity: 0.955;
}

.haven-footer__map-note {
  position: absolute;
  z-index: 2;
  right: 20px;
  bottom: 28px;
  margin: 0;
  color: rgba(218, 221, 214, 0.68);
  font-family: Newsreader, Georgia, serif;
  font-size: 0.78rem;
  font-style: italic;
  letter-spacing: 0.025em;
}

.haven-footer__links {
  grid-area: links;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(218, 221, 214, 0.18);
}

.site-footer.haven-footer .haven-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(243, 245, 243, 0.86);
  font-size: 0.77rem;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-decoration-color: rgba(106, 139, 91, 0.84);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-transform: uppercase;
}

.site-footer.haven-footer .haven-footer__links a:hover {
  color: #fff;
  text-decoration-color: var(--footer-paper);
}

.haven-footer__socials {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.site-footer.haven-footer .haven-footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(218, 221, 214, 0.48);
  border-radius: 50%;
  color: var(--footer-paper);
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.haven-footer__social svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.haven-footer__social--facebook svg {
  fill: currentColor;
  stroke: none;
}

.site-footer.haven-footer .haven-footer__social:hover {
  border-color: var(--footer-paper);
  background: var(--footer-paper);
  color: var(--footer-navy);
  transform: translateY(-2px);
}

.haven-footer__meta {
  grid-area: meta;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding-top: 22px;
  border-top: 1px solid rgba(218, 221, 214, 0.18);
  color: rgba(218, 221, 214, 0.62);
  font-size: 0.7rem;
  line-height: 1.55;
}

.haven-footer__meta p {
  margin: 0;
}

.haven-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}

.site-footer.haven-footer .haven-footer__meta a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: rgba(243, 245, 243, 0.76);
  text-decoration-color: rgba(106, 139, 91, 0.72);
  text-underline-offset: 4px;
}

.site-footer.haven-footer .haven-footer__meta a:hover {
  color: #fff;
  text-decoration-color: var(--footer-paper);
}

.haven-footer a:focus-visible {
  outline: 3px solid var(--footer-paper);
  outline-offset: 4px;
}

@media (max-width: 980px) {
  .haven-footer__canvas {
    grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.85fr);
    grid-template-areas:
      "intro map"
      "coverage map"
      "links links"
      "meta meta";
    min-height: 0;
    padding-bottom: 34px;
  }

  .haven-footer__coverage {
    align-self: end;
  }

  .haven-footer__map {
    min-height: 550px;
  }

  .haven-footer__map img {
    max-width: 80%;
    max-height: 405px;
  }

  .haven-footer__links {
    align-self: start;
  }
}

@media (max-width: 700px) {
  .site-footer.haven-footer {
    margin-top: 54px;
  }

  .haven-footer__canvas {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "map"
      "coverage"
      "links"
      "meta";
    gap: 34px;
    padding-top: 52px;
  }

  .haven-footer__intro h2 {
    max-width: 10ch;
    font-size: clamp(3rem, 13.5vw, 4.15rem);
  }

  .haven-footer__cta {
    width: 100%;
    max-width: 360px;
  }

  .haven-footer__map {
    min-height: 370px;
    margin: 0;
  }

  .haven-footer__map::before {
    inset: 0 -5% 0 -7%;
  }

  .haven-footer__map::after {
    top: 18px;
    left: 12px;
  }

  .haven-footer__map img {
    left: 55%;
    max-width: 72%;
    max-height: 310px;
  }

  .haven-footer__map-note {
    right: 12px;
    bottom: 14px;
  }

  .haven-footer__coverage {
    padding: 24px 0;
  }

  .haven-footer__towns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
  }

  .haven-footer__towns li:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .haven-footer__links {
    gap: 4px 18px;
  }

  .haven-footer__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 420px) {
  .haven-footer__intro h2 {
    font-size: clamp(2.75rem, 13vw, 3.35rem);
  }

  .haven-footer__towns {
    grid-template-columns: 1fr;
  }

  .haven-footer__towns li:nth-last-child(2) {
    border-bottom: 1px solid rgba(218, 221, 214, 0.2);
  }

  .haven-footer__map {
    min-height: 350px;
  }

  .haven-footer__map img {
    max-height: 285px;
  }

  .haven-footer__map::after {
    top: 14px;
    left: 8px;
  }

  .haven-footer__map-note {
    right: 8px;
    bottom: 10px;
    max-width: 19ch;
    text-align: right;
  }

  .haven-footer__links {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .haven-footer__cta,
  .haven-footer__social {
    transition: none;
  }

  .haven-footer__cta:hover,
  .haven-footer__social:hover {
    transform: none;
  }
}
