/* ==========================================================================
   CONTACT PAGE — hero + locations · Enderby Design System v1.1
   Tokens/base/shell/footer live in the global style.css.
   ========================================================================== */

/* ==========================================================================
   CONTACT HERO — Enderby Design System v1.1 · light surface
   ========================================================================== */

.contact-hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background-color: var(--surface-light, #f7f7f5);
  color: var(--text-on-light, #0a0a0b);
  /* top padding clears the fixed navbar; bottom keeps center optically true */
  padding: 120px var(--edge, clamp(1.25rem, 4vw, 5rem)) 96px;
  overflow: hidden;
}

/* Cobalt tint bleeding from the top-right — design system §5, light recipe */
.contact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 60% at 100% 0%,
      rgba(46, 107, 255, 0.13) 0%,
      rgba(46, 107, 255, 0.05) 40%,
      transparent 68%);
  pointer-events: none;
}

.contact-hero__inner {
  text-align: center;
  max-width: 900px;
}

.contact-hero__eyebrow {
  margin: 0 0 24px;
  font-size: 0.75rem;                    /* label token */
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-light-3, rgba(10, 10, 11, 0.44));
}

.contact-hero__title {
  margin: 0 0 clamp(2.5rem, 2rem + 2.2vw, 4rem);
  font-size: clamp(2.5rem, 1.67rem + 3.7vw, 5rem);   /* h1 token */
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.contact-hero__accent {
  color: var(--cobalt, #2e6bff);
}

.contact-hero__email {
  display: inline-block;
  padding-bottom: 8px;
  font-size: clamp(1.125rem, 1rem + 1vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-on-light, #0a0a0b);
  text-decoration: none;
  border-bottom: 1.5px solid var(--cobalt, #2e6bff);
  overflow-wrap: anywhere;
  transition: color 200ms ease, border-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .contact-hero__email:hover {
    color: var(--cobalt-deep, #1e52e0);
    border-color: var(--cobalt-deep, #1e52e0);
  }
}

.contact-hero__email:focus-visible {
  color: var(--cobalt-deep, #1e52e0);
  outline: 2px solid var(--cobalt, #2e6bff);
  outline-offset: 4px;
}

.contact-hero__social {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: clamp(24px, 4vw, 40px);
}

.contact-hero__social a {
  position: relative;
  font-size: 0.875rem;                   /* small token */
  font-weight: 500;
  color: var(--text-on-light-2, rgba(10, 10, 11, 0.64));
  text-decoration: none;
  transition: color 200ms ease;
}

.contact-hero__social a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .contact-hero__social a:hover { color: var(--cobalt-deep, #1e52e0); }
  .contact-hero__social a:hover::after { transform: scaleX(1); }
}

.contact-hero__social a:focus-visible {
  color: var(--cobalt-deep, #1e52e0);
  outline: 2px solid var(--cobalt, #2e6bff);
  outline-offset: 3px;
}
.contact-hero__social a:focus-visible::after { transform: scaleX(1); }

/* --- Reduced motion --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .contact-hero__email,
  .contact-hero__social a,
  .contact-hero__social a::after {
    transition: none;
  }
}


/* ==========================================================================
   LOCATIONS SECTION — Enderby Design System v1.1 · light surface
   Pairs with locations.html + locations.js. Buttons come from flow-button.css.
   ========================================================================== */

.locations {
  background-color: var(--surface-light, #f7f7f5);
  color: var(--text-on-light, #0a0a0b);
  /* asymmetric: tighter top (hero already carries exit space),
     full rhythm at the bottom before the footer */
  padding-block: clamp(2.5rem, 1.5rem + 2.5vw, 4rem)
                 var(--space-section, clamp(5rem, 3.33rem + 7.4vw, 10rem));
}

.locations__inner {
  max-width: var(--container-max, 1440px);
  margin-inline: auto;
  padding-inline: var(--edge, clamp(1.25rem, 4vw, 5rem));
}

/* --- Header ---------------------------------------------------------------- */

.locations__header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: clamp(3rem, 2rem + 4vw, 6rem);
}

@media (min-width: 1024px) {
  .locations__header {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .locations__eyebrow { grid-column: 1 / -1; }
  .locations__lead   { text-align: right; }
}

.locations__eyebrow {
  margin: 0;
  font-size: 0.75rem;               /* label token */
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cobalt-deep, #1e52e0);
}

.locations__title {
  margin: 0;
  font-size: clamp(2rem, 1.5rem + 2.22vw, 3.5rem);   /* h2 token */
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.locations__lead {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1.125rem, 1.04rem + 0.37vw, 1.375rem); /* lead token */
  line-height: 1.5;
  color: var(--text-on-light-2, rgba(10, 10, 11, 0.64));
}

/* --- Map --------------------------------------------------------------------
   The SVG carries its own #0a0a0b background and edge fades, so it dissolves
   into the section with no visible frame.                                     */

.locations__map {
  margin: 0 0 clamp(2rem, 1.5rem + 2vw, 4rem);
}

.locations__map--mobile { display: none; }

@media (max-width: 767px) {
  .locations__map--desktop { display: none; }
  .locations__map--mobile  { display: block; }
}

.locations__map--mobile img {
  display: block;
  width: 100%;
  height: auto;
}

.locations__map svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Pin idle pulse — the ring emits outward, offices breathing in sequence */
.map-pin__ring,
.map-pin__glow,
.map-pin__dot {
  transform-box: fill-box;
  transform-origin: center;
}

.map-pin__ring {
  animation: pin-pulse 3.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

#pin-kelowna   .map-pin__ring { animation-delay: 1.05s; }
#pin-stockholm .map-pin__ring { animation-delay: 2.1s; }

@keyframes pin-pulse {
  0%   { transform: scale(1);   opacity: 1; }
  70%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Row ↔ pin coupling states (classes set by locations.js) */
.map-pin {
  transition: opacity 400ms ease;
}

.map-pin.is-dimmed { opacity: 0.25; }

.map-pin.is-active .map-pin__glow {
  transform: scale(1.35);
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.map-pin.is-active .map-pin__dot {
  transform: scale(1.25);
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Office list ------------------------------------------------------------ */

.locations__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.locations__row {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1.1fr) minmax(0, 1fr) auto;
  grid-template-areas: "num city addr time";
  align-items: start;
  gap: 24px;
  padding: clamp(2rem, 1.5rem + 1.5vw, 2.75rem) 24px;
  margin-inline: -24px;
  border-radius: 2px;                 /* radius-xs */
  border-top: 1px solid var(--border-on-light, rgba(10, 10, 11, 0.12));
  transition: background-color 400ms ease;
}

.locations__row:last-child {
  border-bottom: 1px solid var(--border-on-light, rgba(10, 10, 11, 0.12));
}

@media (hover: hover) and (pointer: fine) {
  .locations__row:hover { background-color: rgba(10, 10, 11, 0.03); }
}
.locations__row.is-highlight { background-color: rgba(10, 10, 11, 0.03); }

.locations__num {
  grid-area: num;
  padding-top: 0.5em;
  font-size: 0.6875rem;               /* label-sm token */
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.16em;
  color: var(--text-on-light-3, rgba(10, 10, 11, 0.44));
}

.locations__city { grid-area: city; }

.locations__name {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 1.25rem + 1.11vw, 2.25rem);  /* h3 token */
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.locations__country {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-light-3, rgba(10, 10, 11, 0.44));
}

.locations__address {
  grid-area: addr;
  padding-top: 0.35em;
  font-style: normal;
  font-size: 0.875rem;                /* small token */
  line-height: 1.6;
  color: var(--text-on-light-2, rgba(10, 10, 11, 0.64));
}

.locations__maplink {
  position: relative;
  display: inline-block;
  margin-top: 12px;
  font-weight: 500;
  color: var(--text-on-light, #0a0a0b);
  text-decoration: none;
  transition: color 200ms ease;
}

.locations__maplink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .locations__maplink:hover { color: var(--cobalt-deep, #1e52e0); }
  .locations__maplink:hover::after { transform: scaleX(1); }
}

.locations__maplink:focus-visible {
  color: var(--cobalt-deep, #1e52e0);
  outline: 2px solid var(--cobalt, #2e6bff);
  outline-offset: 3px;
}
.locations__maplink:focus-visible::after { transform: scaleX(1); }

.locations__time {
  grid-area: time;
  justify-self: end;
  text-align: right;
  padding-top: 0.35em;
}

.locations__clock {
  display: block;
  min-width: 5ch;         /* no layout shift when JS fills the time */
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.locations__timelabel {
  display: block;
  margin-top: 8px;
  font-size: 0.6875rem;               /* label-sm token */
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-on-light-3, rgba(10, 10, 11, 0.44));
}

/* --- CTA --------------------------------------------------------------------- */

.locations__cta {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--border-on-light, rgba(10, 10, 11, 0.12));
  padding-top: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
}
.locations__cta-line {
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--text-on-light-2, rgba(10, 10, 11, 0.64));
  max-width: 46ch;
}
.locations__cta-line strong {
  font-weight: 600;
  color: var(--text-on-light, #0a0a0b);
}
@media (max-width: 767px) {
  .locations__cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

/* --- Responsive ---------------------------------------------------------------
   Tablet: time tucks under the city column. Mobile: single reading column.     */

@media (max-width: 1023px) {
  .locations__row {
    grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "num city addr"
      "num time addr";
  }
  .locations__time {
    justify-self: start;
    text-align: left;
    padding-top: 16px;
  }
}

@media (max-width: 639px) {
  .locations__row {
    grid-template-columns: 3rem minmax(0, 1fr);
    grid-template-areas:
      "num city"
      "num addr"
      "num time";
    gap: 16px 24px;
  }
  .locations__address { padding-top: 0; }
}

/* --- Reduced motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .map-pin__ring { animation: none; }
  .map-pin,
  .map-pin.is-active .map-pin__glow,
  .map-pin.is-active .map-pin__dot,
  .locations__row,
  .locations__maplink,
  .locations__maplink::after {
    transition: none;
  }
}
