/* ==========================================================================
   KOBIL — Contact Us: LOCATION (Aug 2026 redesign)
   Figma: D-Contact 6700:45621 → LOCATION 6700:45622 (1440x916)
          M-Contact 6700:45647 → LOCATION 6700:45651 (393x919)

   One full-bleed section that runs from under the nav straight into the
   footer: centered mono eyebrow + Instrument Serif 56/1.3 headline, four
   216px address columns, and a solid navy pill CTA (Cal.com). The notched
   button and the 32/42 sans headline of the previous version are gone.

   The background is the Figma layer stack rather than one baked composite:

     globe photo  (mix-blend-mode: darken, white top-fade)
     blue wash    (blurred vector, normal blend, alpha peaks at 8%)

   `darken` is load-bearing — the photo's sky is pure white, and only the
   blend maps it onto the section colour (#f5f7fc desktop / white phone).
   Which means the section, not .__bg, carries `isolation`: the blend needs
   the section's own background as its backdrop, so .__bg must NOT create a
   stacking context (no z-index on it) or the photo would blend against
   nothing and its white sky would stay white. Verified against the Figma
   render: mean error 0.9/255 desktop, 0.6/255 phone.
   ========================================================================== */

.sec-contact-locations {
  position: relative;
  /* Keeps `darken` inside the section — it must not reach the page below. */
  isolation: isolate;
  overflow: clip;
  background: var(--navy-20);
  /* This page is a single section, so it carries the whole viewport: the
     composition breaks out of .page's side padding and runs up behind the
     sticky header (padding-top --w20 + an --w80 bar = --w100). The content's
     own top padding gets that 100 back, below. */
  width: calc(100% + var(--page-pad) * 2);
  margin-left: calc(-1 * var(--page-pad));
  margin-top: calc(-1 * var(--w100));
}

/* ---- Background ---------------------------------------------------------- */

.sec-contact-locations__bg {
  position: absolute;
  inset: 0;
  overflow: clip;
  pointer-events: none;
}

/* Photo layer, Figma 6700:45623: a 1440x919 box at y=-3 holding the globe
   scaled to 143.26% x 126.33% and offset (-24.3%, +3.39%) — i.e. Figma's
   image-fill crop, kept as percentages so it tracks the fluid scale. */
.sec-contact-locations__photo {
  position: absolute;
  left: 0;
  /* Figma pins the box at y=-3 in a 916-tall frame, i.e. flush with the
     section's bottom edge — and bottom is the anchor that survives the
     section growing: below 1024 the address grid goes two-up, which makes
     the section ~100px taller than the fluid --w919 box, and a top-anchored
     photo would leave a flat band of section colour under the globe. */
  bottom: 0;
  width: 100%;
  height: var(--w919);
  overflow: clip;
  mix-blend-mode: darken;
}

.sec-contact-locations__photo-img {
  position: absolute;
  left: -24.3%;
  top: 3.39%;
  width: 143.26%;
  height: 126.33%;
  max-width: none;
}

/* White top-fade painted inside the blend group (Figma: the gradient sits in
   the photo layer, above the image). Over a light backdrop `darken` makes it
   read as the photo dissolving into the section colour. */
.sec-contact-locations__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 60.37%);
}

/* Blue wash, Figma 6700:45624 — stored at 480x305 (240x451 on the phone)
   because it is a pure blur: a third of the resolution costs <2/255 and the
   files stay ~20KB. Lossless WebP, and listed in optimize-images.sh's
   KEEP_FULL_FIDELITY: at 8% peak alpha a lossy pass shreds it. */
.sec-contact-locations__glow {
  position: absolute;
  left: 0;
  /* Bottom-anchored for the same reason as the photo — and it is where the
     wash actually has density, so this is the edge worth pinning. */
  bottom: 0;
  width: 100%;
  height: var(--w916);
}

/* ---- Content ------------------------------------------------------------- */

.sec-contact-locations__inner {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  /* Figma: title y=230 … button bottom 742, section 916. The 230 is measured
     from the frame top, which is where the section starts thanks to the
     negative margin above. */
  padding: var(--w230) var(--w40) var(--w174);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- Title (Figma 6700:45642 — 985 wide, centered) ---- */

.sec-contact-locations__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--w30);
  max-width: var(--w985);
  text-align: center;
}

.sec-contact-locations__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--w12);
  font-weight: 500;
  line-height: var(--w18);
  letter-spacing: 2.04px;
  text-transform: uppercase;
  color: var(--navy-70);
}

.sec-contact-locations__heading {
  font-family: var(--font-serif);
  font-size: var(--w56);
  font-weight: 400;
  line-height: 1.3;
  color: var(--navy);
}

.sec-contact-locations__heading-accent {
  color: var(--blue);
}

/* ---- Addresses (Figma 6700:45628 — 4 columns of 216, gap 80, y=496) ---- */

.sec-contact-locations__grid {
  display: grid;
  grid-template-columns: repeat(4, var(--w216));
  gap: var(--w40) var(--w80);
  margin-top: var(--w72);
}

.sec-contact-locations__card {
  display: flex;
  flex-direction: column;
  gap: var(--w8);
}

.sec-contact-locations__card-title {
  font-family: var(--font-sans);
  font-size: var(--w18);
  font-weight: 600;
  line-height: var(--w24);
  color: var(--navy);
}

.sec-contact-locations__card-addr {
  font-style: normal;
  font-family: var(--font-sans);
  font-size: var(--w14);
  font-weight: 400;
  line-height: var(--w20);
  /* Figma "System/70%" on this frame is #4d586e, a shade off the --navy-70
     token (#586680) the eyebrow uses — both appear in the same file. */
  color: #4d586e;
}

/* The phone frame joins some address lines: the breaks that only exist on
   desktop, and the comma that replaces them below 768 (the space after it
   comes from the collapsed source newline). */
.sec-contact-locations__sep {
  display: none;
}

/* ---- CTA (Figma "Button Variant" 6700:45974 — solid navy pill, y=686) ---- */

.sec-contact-locations__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--w8);
  height: var(--w56);
  margin-top: var(--w58);
  padding: var(--w8) var(--w20) var(--w8) var(--w24);
  background: var(--navy);
  border-radius: var(--w31);
  font-family: var(--font-ui);
  font-size: var(--w16);
  font-weight: 600;
  line-height: var(--w20);
  color: var(--white);
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease);
}

.sec-contact-locations__cta:hover {
  background: #1a3164;
}

.sec-contact-locations__cta:active {
  transform: translateY(1px);
}

.sec-contact-locations__cta-icon {
  width: var(--w18);
  height: var(--w18);
  transition: transform var(--dur) var(--ease);
}

.sec-contact-locations__cta:hover .sec-contact-locations__cta-icon {
  transform: translateX(var(--w3));
}

/* --------------------------------------------------------------------------
   Tablet — Figma has 1440 and 393 only; the fluid scale interpolates
   everything between, so the only real step is the 4→2 address columns
   (four 216px columns plus two 80px gutters stop fitting first).
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .sec-contact-locations__grid {
    grid-template-columns: repeat(2, var(--w216));
  }
}

/* --------------------------------------------------------------------------
   Phone — M-Contact LOCATION 6700:45651 (393x919): white ground, content
   column 313 at y=136, one address per row, small pill.
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .sec-contact-locations {
    background: var(--white);
    /* Phone header: --m8 padding + an --m60 bar. */
    margin-top: calc(-1 * var(--m68));
  }

  /* Photo layer, Figma 6700:45652: 393x507 pinned to the section bottom. */
  .sec-contact-locations__photo {
    height: var(--m507);
  }

  .sec-contact-locations__photo-img {
    left: -52.18%;
    top: 10.85%;
    width: 204.36%;
    height: 89.15%;
  }

  .sec-contact-locations__photo::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 41.08%);
  }

  /* The phone wash is a separate export with its own framing: 738 tall ending
     2px below the frame, fitted against the Figma render (the blurred
     vector's own box says nothing about where its visible field lands). */
  .sec-contact-locations__glow {
    height: var(--m738);
  }

  .sec-contact-locations__inner {
    padding: var(--m136) var(--m40) var(--m66);
  }

  .sec-contact-locations__title {
    gap: var(--m24);
    max-width: 100%;
  }

  .sec-contact-locations__eyebrow {
    font-size: var(--m11);
    line-height: var(--m18);
    letter-spacing: 1.87px;
  }

  .sec-contact-locations__heading {
    font-size: var(--m34);
    line-height: 1.2;
  }

  .sec-contact-locations__grid {
    grid-template-columns: 100%;
    gap: var(--m24);
    margin-top: var(--m40);
    width: 100%;
  }

  .sec-contact-locations__card {
    gap: var(--m8);
  }

  .sec-contact-locations__card-title {
    font-size: var(--m16);
    line-height: var(--m23);
  }

  .sec-contact-locations__card-addr {
    font-size: var(--m14);
    line-height: var(--m20);
  }

  .sec-contact-locations__br-d {
    display: none;
  }

  .sec-contact-locations__sep {
    display: inline;
  }

  .sec-contact-locations__cta {
    height: var(--m40);
    margin-top: var(--m56);
    padding: var(--m4) var(--m12) var(--m4) var(--m16);
    border-radius: var(--m31);
    font-size: var(--m14);
    line-height: var(--m18);
    gap: var(--m8);
  }

  .sec-contact-locations__cta-icon {
    width: var(--m18);
    height: var(--m18);
  }

  .sec-contact-locations__cta:hover .sec-contact-locations__cta-icon {
    transform: translateX(var(--m3));
  }
}
