/* =========================================================================
   Infinity — About page
   Map (dot-matrix) + team locations, mission, team grid reuse
   ========================================================================= */

/* ---- Function color tokens (legend + markers) ---- */
:root {
  --fn-eng: #00d2ff; /* Engineering */
  --fn-product: #a855f7; /* Product */
  --fn-finance: #4b6bfb; /* Finance */
  --fn-design: #ff007f; /* Design */
  --fn-ops: #c2c8e6; /* Operations */
}

/* ============================================================
   About hero / mission
   ============================================================ */
.about-hero {
  padding-top: 80px;
  padding-bottom: 8px;
}
.about-hero .section-title {
  font-size: clamp(40px, 5vw, 68px);
  max-width: 960px;
}
.about-lede {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.55;
  color: var(--inf-fg-2);
  max-width: 760px;
  margin: 0;
  text-wrap: pretty;
}
/* When the lede stands alone as the hero (no title) */
.about-hero .about-lede {
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.32;
  color: #fff;
  max-width: 920px;
  letter-spacing: -0.015em;
  font-weight: 400;
}
.about-hero .about-lede strong {
  font-weight: 600;
  color: #fff;
}
.about-lede strong {
  color: #fff;
  font-weight: 600;
}

/* ============================================================
   Locations / map section
   ============================================================ */
.map-section {
  padding-top: 24px;
  padding-bottom: 40px;
}

.map-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.map-head .section-title {
  margin-bottom: 0;
}
.map-head .section-lede {
  margin-bottom: 0;
  max-width: 460px;
}

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  margin-bottom: 28px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--inf-fg-2);
  letter-spacing: 0.01em;
}
.legend-item .sw {
  width: 11px;
  height: 11px;
  border-radius: 9999px;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
}
.legend-item .sw.split {
  background: linear-gradient(90deg, var(--fn-product) 0 50%, var(--fn-finance) 50% 100%);
  box-shadow: 0 0 10px rgba(122, 40, 203, 0.6);
}

/* Map canvas */
.map-wrap {
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(122, 40, 203, 0.1), transparent 60%),
    rgba(10, 10, 15, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 36px 40px 30px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.map-wrap::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(0, 210, 255, 0.3),
    transparent 45%,
    rgba(255, 0, 127, 0.22)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}
.map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1888 / 615;
  background-image: url("/assets/img/world-map.webp");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* Geo markers */
.geo {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  z-index: 3;
}
.geo .geo-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  background: var(--c);
  box-shadow:
    0 0 14px var(--c),
    0 0 4px #fff inset;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
}
.geo .geo-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  background: var(--c);
  opacity: 0.5;
  animation: geo-pulse 2.6s ease-out infinite;
}
@keyframes geo-pulse {
  0% {
    width: var(--d);
    height: var(--d);
    opacity: 0.45;
  }
  70% {
    width: calc(var(--d) * 3.4);
    height: calc(var(--d) * 3.4);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.geo[data-size="lg"] {
  --d: 20px;
}
.geo[data-size="md"] {
  --d: 15px;
}
.geo[data-size="sm"] {
  --d: 10px;
}
.geo .geo-dot {
  width: var(--d);
  height: var(--d);
}

/* function colors */
.geo[data-fn="eng"] {
  --c: var(--fn-eng);
}
.geo[data-fn="product"] {
  --c: var(--fn-product);
}
.geo[data-fn="design"] {
  --c: var(--fn-design);
}
.geo[data-fn="ops"] {
  --c: var(--fn-ops);
}

/* half/half split marker (Ireland) */
.geo[data-fn="split"] .geo-dot {
  background: linear-gradient(90deg, var(--fn-product) 0 50%, var(--fn-finance) 50% 100%);
  box-shadow: 0 0 14px rgba(122, 40, 203, 0.7);
}
.geo[data-fn="split"] .geo-pulse {
  background: var(--fn-product);
}

/* tooltip */
.geo .geo-tip {
  position: absolute;
  left: 50%;
  bottom: calc(50% + var(--d));
  transform: translate(-50%, -6px);
  white-space: nowrap;
  background: rgba(8, 8, 14, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  z-index: 5;
  backdrop-filter: blur(8px);
}
.geo .geo-tip .city {
  font-family: var(--inf-font-display);
  font-weight: 600;
  letter-spacing: -0.005em;
}
.geo .geo-tip .fn {
  display: block;
  font-size: 11px;
  color: var(--inf-fg-3);
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.geo:hover {
  z-index: 9;
}
.geo:hover .geo-tip {
  opacity: 1;
  transform: translate(-50%, -12px);
}
.geo .geo-hit {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  cursor: default;
}

/* Location list */
.loc-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}
.loc-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition:
    border-color 200ms ease,
    background 200ms ease,
    transform 200ms ease;
}
.loc-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}
.loc-card .dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  margin-top: 5px;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.loc-card .dot.split {
  background: linear-gradient(90deg, var(--fn-product) 0 50%, var(--fn-finance) 50% 100%);
  box-shadow: 0 0 8px rgba(122, 40, 203, 0.6);
}
.loc-card .city {
  font-family: var(--inf-font-display);
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  letter-spacing: -0.005em;
}
.loc-card .country {
  font-size: 12px;
  color: var(--inf-fg-3);
  margin-top: 2px;
}
.loc-card .fn {
  font-size: 12px;
  font-weight: 500;
  color: var(--inf-fg-2);
  margin-top: 8px;
  letter-spacing: 0.01em;
}

/* ============================================================
   Team grid (about) — reuses .person, .grid-5, .bg-pills
   ============================================================ */
.team-section {
  padding-top: 20px;
  padding-bottom: 24px;
}
.previously {
  margin-top: 44px;
  text-align: center;
}
.previously .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--inf-fg-3);
  margin-bottom: 22px;
}

/* ============================================================
   Home-page team teaser (replaces full team section)
   ============================================================ */
.team-teaser {
  position: relative;
  border-radius: 24px;
  padding: 48px 52px;
  background:
    radial-gradient(ellipse at 85% 20%, rgba(0, 210, 255, 0.1), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(122, 40, 203, 0.12), transparent 55%),
    rgba(10, 10, 15, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  overflow: hidden;
}
.team-teaser .tt-copy {
  max-width: 560px;
}
.team-teaser h2 {
  font-family: var(--inf-font-display);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 14px 0 14px;
  text-wrap: balance;
}
.team-teaser p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--inf-fg-2);
  margin: 0 0 26px;
  max-width: 520px;
}
.team-teaser .tt-faces {
  display: flex;
  align-items: center;
}
.team-teaser .tt-faces .av {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  border: 2px solid rgba(10, 10, 15, 0.9);
  margin-left: -16px;
  overflow: hidden;
  background: var(--inf-elevated);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.team-teaser .tt-faces .av:first-child {
  margin-left: 0;
}
.team-teaser .tt-faces .av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
}
.team-teaser .tt-faces .more {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  margin-left: -16px;
  border: 2px solid rgba(10, 10, 15, 0.9);
  background: var(--inf-gradient-brand);
  display: grid;
  place-items: center;
  font-family: var(--inf-font-display);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(122, 40, 203, 0.4);
}

@media (max-width: 900px) {
  .loc-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .map-wrap {
    padding: 20px 18px 16px;
  }
  .team-teaser {
    padding: 32px;
  }
  .geo .geo-tip {
    display: none;
  }
}
@media (max-width: 560px) {
  .loc-list {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Extracted-from-inline styles
   ============================================================ */

/* Map section title size override */
.section-title--map {
  font-size: 42px;
}

/* Previously-at pills: remove default top margin */
.bg-pills--no-top {
  margin-top: 0;
}

/* Legend colour swatches — function colours set via data attribute
   so background and text-color are declared once per token below.
   Each .sw inherits color from its parent .legend-item, but
   background must be set; we use CSS custom property on the element. */
.sw {
  background: var(--sw-color);
  color: var(--sw-color);
}
.sw[data-fn="eng"] {
  --sw-color: var(--fn-eng);
}
.sw[data-fn="product"] {
  --sw-color: var(--fn-product);
}
.sw[data-fn="finance"] {
  --sw-color: var(--fn-finance);
}
.sw[data-fn="design"] {
  --sw-color: var(--fn-design);
}
.sw[data-fn="ops"] {
  --sw-color: var(--fn-ops);
}

/* Legend item for split team — muted label colour */
.legend-item--muted {
  color: var(--inf-fg-3);
}

/* Geo markers — positions are per-instance data, set via CSS custom properties */
.geo {
  left: var(--geo-x);
  top: var(--geo-y);
}

/* Map head: h2 inside sits under the about page's hidden h1, so it's fine as h2.
   No heading shim needed here. */
