/* ==========================================================================
   KOBIL — Company — Section: Locations
   Figma D-Company 5948:97494 "LOCATION" (full-bleed 1440x796 — title column
   986 wide at 227/110, four 216-wide address columns 1104 wide at 168.5/326,
   navy pill 168x56 at 636.5/541, globe photo + blurred blue layer behind) ·
   M-Company 5882:51572 (393x872 — one address column, pill 140x40).
   Both background layers are exported at exactly the section box (1440x796 /
   393x284), so they align by covering the section rather than by offsets.
   ========================================================================== */

.sec-company-locations {
  position: relative;
  background: var(--white);
  overflow: clip;
}

/* ---- Background: globe photo + the blurred blue layer above it ---- */

.sec-company-locations__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.sec-company-locations__bg picture {
  display: contents;
}

.sec-company-locations__globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center bottom;
}

/* Baked-in feGaussianBlur vectors (Figma "blue", rendered clipped to the
   1440x796 section) — max alpha ~8%, so it survives lossy scaling */
.sec-company-locations__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/company/locations/blue-glow.webp") center / 100% 100% no-repeat;
}

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

.sec-company-locations__inner {
  position: relative;
  z-index: 1;
  padding: var(--w110) var(--w40) var(--w199);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- Title: eyebrow + centred serif H2 (986 column) ---- */

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

.sec-company-locations__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--w12);
  font-weight: 500;
  line-height: var(--w18);
  letter-spacing: 0.48px;
  text-transform: uppercase;
  color: var(--navy-70);
  /* Figma's `tag` is a cap-trimmed 8px box, so its 12/18 line box is 5px
     taller on each side. Pulling those back in keeps every y below it on
     the frame's own numbers. */
  margin-block: calc(-1 * var(--w5));
}

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

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

/* ---- Addresses: 4 columns of 216, gap 80 (Figma y=326) ---- */

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

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

/* Title/Desktop/Title 3: 18/24 SemiBold */
.sec-company-locations__card-title {
  font-family: var(--font-sans);
  font-size: var(--w18);
  line-height: var(--w24);
  font-weight: 600;
  color: var(--navy);
}

/* Body/Small: 14/20 Regular, Figma System/70% */
.sec-company-locations__card-addr {
  font-style: normal;
  font-family: var(--font-sans);
  font-size: var(--w14);
  line-height: var(--w20);
  font-weight: 400;
  color: #4d586e;
}

/* ---- CTA: navy pill (Figma Button Variant 168x56, radius 32) ---- */

.sec-company-locations__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--w8);
  height: var(--w56);
  margin-top: var(--w83);
  padding: var(--w8) var(--w20) var(--w8) var(--w24);
  border-radius: var(--w32);
  background: var(--navy);
  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-company-locations__cta:hover {
  background: #1a3164;
}

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

.sec-company-locations__cta:hover .sec-company-locations__cta-icon {
  transform: translateX(3px);
}

/* ---- Tablet: the four address columns fold to 2x2 ---- */

@media (max-width: 1024px) {
  .sec-company-locations__inner {
    padding: var(--w80) var(--w40) var(--w160);
  }

  .sec-company-locations__grid {
    grid-template-columns: repeat(2, var(--w216));
    margin-top: var(--w48);
  }

  .sec-company-locations__cta {
    margin-top: var(--w64);
  }
}

/* ---- Phone (Figma 5882:51572: 60/40/105 padding, one column, pill 140x40) ---- */

@media (max-width: 768px) {
  .sec-company-locations__inner {
    padding: var(--m60) var(--m40) var(--m105);
  }

  /* The phone frame bottom-aligns the globe at its natural 393x284 instead
     of letting it cover the whole section (Figma 5882:51573, y=588). */
  .sec-company-locations__globe {
    inset: auto 0 0 0;
    height: auto;
    object-fit: contain;
  }

  /* Its blue layer is a single blurred circle low on the left, not the
     desktop three-vector wash — that one would stretch out of shape here. */
  .sec-company-locations__bg::after {
    inset: auto auto calc(-1 * var(--m120)) calc(-1 * var(--m180));
    width: var(--m794);
    height: var(--m793);
    background: radial-gradient(
      closest-side,
      rgba(62, 191, 252, 0.16),
      rgba(62, 191, 252, 0.08) 55%,
      rgba(62, 191, 252, 0) 100%
    );
  }

  .sec-company-locations__title {
    gap: var(--m24);
    max-width: none;
  }

  .sec-company-locations__eyebrow {
    font-size: var(--m12);
    line-height: var(--m18);
    margin-block: calc(-1 * var(--m5));
  }

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

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

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

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

  /* The phone frame sets each address as one running line — the company
     name, then the rest comma-joined — so the desktop line breaks are
     folded back into separators here (Figma 5882:51580). */
  .sec-company-locations__card-addr {
    font-size: var(--m14);
    line-height: var(--m20);
  }

  .sec-company-locations__card-addr br {
    display: none;
  }

  /* company name keeps its own line, the street/city/country lines fold
     into one comma-separated run below it */
  .sec-company-locations__card-addr span:first-of-type::before {
    content: "\A";
    white-space: pre;
  }

  .sec-company-locations__card-addr span:not(:first-of-type)::before {
    content: ", ";
  }

  .sec-company-locations__cta {
    height: var(--m40);
    margin-top: var(--m56);
    padding: var(--m8) var(--m16) var(--m8) var(--m20);
    border-radius: var(--m24);
    font-size: var(--m14);
    line-height: var(--m18);
  }

  .sec-company-locations__cta-icon {
    width: var(--m16);
    height: var(--m16);
  }
}
