/* =====================================================================
   Contact page — dark green theme
   ===================================================================== */

/* Page body stays green — the hero is white, contact-body is green. */
.page-contact {
  background: var(--primary);
}

/* Default ("white") nav — let style.css drive logo/menu colours. The logo
   SVG paths use fill="currentColor"; pin the colour to brand green here so
   it renders correctly regardless of inherited text colour. */
.page-contact .nav__logo { color: #005950; }

/* Talk-to-Us pill in brand dark green */
.page-contact .nav__cta {
  background: var(--primary);
  color: #fff;
}
.page-contact .nav__cta:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* =====================================================================
   Hero with dot grid animation — WHITE background
   ===================================================================== */
.contact-hero {
  position: relative;
  background: #ffffff;
  padding-top: calc(var(--nav-h, 88px) + 90px);
  padding-bottom: 120px;
  overflow: hidden;
  color: var(--text-body);
}

.contact-hero__dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.contact-hero__dots canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Top fade — solid white near the nav so the dots fade out behind the logo
   and menu, gradually revealing the dot animation below. */
.contact-hero__overlay {
  position: absolute;
  inset: 0 0 auto 0;
  height: 220px;
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    rgba(255, 255, 255, 0.96) 30%,
    rgba(255, 255, 255, 0.55) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.contact-hero .container {
  position: relative;
  z-index: 2;
}

.contact-hero__inner {
  max-width: 912px;       /* 760 × 1.20 */
}

.contact-hero__inner .label--coral {
  color: var(--coral);
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 800;
}

.contact-hero__inner h1 {
  color: var(--text-heading);
  font-size: clamp(3rem, 5.4vw, 5.4rem);   /* +20% on all three clamp values */
  line-height: 1.05;
  margin: 0 0 24px;
  /* White halo to punch the dot grid out from around the headline.
     Using filter: drop-shadow (not text-shadow) so the halo respects
     gradient text inside (.text-gradient uses background-clip:text +
     transparent fill — text-shadow would bleed through that and wash
     the gradient out). */
  filter:
    drop-shadow(0 0 18px #fff)
    drop-shadow(0 0 10px #fff)
    drop-shadow(0 0 4px #fff);
}

.contact-hero__inner p {
  color: var(--text-body);
  font-size: 1.3125rem;
  line-height: 1.55;
  max-width: 620px;
  margin: 0;
}

/* =====================================================================
   Contact body — form + details + map
   ===================================================================== */
.contact-body {
  background: var(--primary);
  padding: 40px 0 120px;
  position: relative;
  color: #fff;
}

.contact-body__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  align-items: start;
  margin-bottom: 100px;
}

/* Source order keeps form first — visually put it on the right */
.contact-body__form-col  { order: 2; }
.contact-body__details-col { order: 1; }

/* Form overlaps up into the hero by ~80px (40px contact-body padding-top + 80px = -120px) */
.contact-body__form-col {
  margin-top: -120px;
  position: relative;
  z-index: 5;
}

/* Indent the contact info column so it sits closer to the form and the gap
   on its right reads tighter. */
.contact-body__details-col {
  padding-left: 72px;
}

.contact-body__details-col h2 {
  color: #fff;
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  margin: 10px 0 40px;
}

/* The form uses the .cta__form wrapper so it inherits the CTA form styling
   (two-column grid, coral submit pill, etc.) from forms.css. Here we override
   only the panel background — a lighter green so it pops against the
   dark-green contact-body and reads as a clear panel where it overhangs
   the white hero above. */
.page-contact .cta__form .umbraco-forms-form {
  background: #326158;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

.page-contact .cta__form {
  margin-bottom: 36px;
}

/* ── Contact details list (right column) ── */
.contact-detail {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.contact-detail:first-of-type { padding-top: 0; }
.contact-detail:last-of-type { border-bottom: none; }

.contact-detail__icon {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--coral);
  color: #4a5568;            /* blue-grey SVG stroke */
}
.contact-detail__icon svg {
  width: 22px;
  height: 22px;
}

.contact-detail__body h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.contact-detail__body p {
  margin: 0;
  color: rgba(255,255,255,0.75);
  font-size: 1.4rem;
  line-height: 1.5;
}
.contact-detail__body a {
  color: rgba(255,255,255,0.9);
  border-bottom: 1px solid rgba(246,171,147,0.5);
  transition: color var(--transition), border-color var(--transition);
}
.contact-detail__body a:hover {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

/* =====================================================================
   Google Map — full-bleed below the grid, tinted to brand
   ===================================================================== */
.contact-map {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Map wrapped in .container so its left/right edges line up with form,
   details, hero text and footer. */
.contact-map__frame {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}

.contact-map__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  /* Recolour Google's default palette into our brand greens.
     - hue-rotate shifts blues/teals toward deeper greens
     - saturate drops noise from the road palette
     - sepia adds a subtle warm undertone before the rotate */
  filter: grayscale(0.35) sepia(0.25) hue-rotate(115deg) saturate(0.85) brightness(0.92) contrast(1.05);
}

.contact-map__tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(3,88,78,0.0) 0%, rgba(3,88,78,0.18) 70%, rgba(3,88,78,0.35) 100%),
    linear-gradient(180deg, rgba(3,88,78,0.10) 0%, rgba(3,88,78,0.0) 30%, rgba(3,88,78,0.0) 70%, rgba(3,88,78,0.18) 100%);
  mix-blend-mode: multiply;
}

/* Custom coral marker overlaid on the map */
.contact-map__pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  text-decoration: none;
}
.contact-map__pin-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow:
    0 0 0 6px rgba(246,171,147,0.25),
    0 6px 18px rgba(0,0,0,0.35);
  animation: pin-pulse 2.4s ease-out infinite;
}
@keyframes pin-pulse {
  0%   { box-shadow: 0 0 0 6px rgba(246,171,147,0.35), 0 6px 18px rgba(0,0,0,0.35); }
  70%  { box-shadow: 0 0 0 22px rgba(246,171,147,0.0),  0 6px 18px rgba(0,0,0,0.35); }
  100% { box-shadow: 0 0 0 6px rgba(246,171,147,0.0),  0 6px 18px rgba(0,0,0,0.35); }
}
.contact-map__pin-label {
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  position: relative;
}
.contact-map__pin-label small {
  display: block;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  margin-top: 2px;
}
.contact-map__pin-label::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--primary);
}

/* =====================================================================
   Footer overrides — already styled dark in style.css, leave alone
   ===================================================================== */

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 960px) {
  .contact-body__grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  /* Reset the desktop visual swap (form was visually right via order:2,
     details was visually left via order:1). On mobile we want the form
     to be the first thing the user sees — most CTAs are typed straight
     after landing — with the office address / contact info below. */
  .contact-body__form-col    { order: 1; }
  .contact-body__details-col { order: 2; }
  /* Desktop indent on the details column would push the office text
     out of alignment with the form above on mobile. Reset it. */
  .contact-body__details-col { padding-left: 0; }
  .contact-map__frame { height: 380px; }
  /* Padding-bottom 150 (was 80, briefly tried 180). With the form column's
     `margin-top: -120px` (unchanged — overlap into hero is intentional),
     this leaves ~30px of clear space between the hero's subheading and
     the form's top edge — tighter than the airy 60px the 180 value gave,
     but enough that the heading no longer touches the form. */
  .contact-hero { padding-top: calc(var(--nav-h, 88px) + 60px); padding-bottom: 150px; }
  .contact-hero__inner h1 { font-size: clamp(2.5rem, 8.5vw, 3.75rem); }
}
@media (max-width: 600px) {
  .contact-map__pin-label { font-size: 0.8rem; padding: 8px 12px; }
}
