/* Homepage: "What we do" product rows + interactive global operations map.
   Both sections break out of the 720px text column to the right, keeping
   the column's golden-ratio left edge. */

:root {
  --ink: #000;
  --ink-2: rgba(0, 0, 0, 0.62);
  --ink-3: rgba(0, 0, 0, 0.4);
  --rule: rgba(0, 0, 0, 0.16);
  --paper: #fbf8f0;
  --card: #fffdf8;
  --accent-expanding: #3159c9;
  --container-left: calc((100vw - var(--col-width)) / 2.618);
  --wide: min(1120px, calc(100vw - var(--container-left) - 48px));
}

body { overflow-x: clip; }

.wide { width: var(--wide); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin: var(--space-4) 0 0;
}

.section-head h2 { margin: 0; }

.section-index {
  font-size: max(11px, var(--text-sm));
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 1.2em;
}

/* ---------- Product rows ---------- */

.product-list {
  margin-top: var(--space-2);
  border-bottom: 1px solid var(--rule);
}

.product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: var(--space-2);
  padding: calc(var(--space-4) * 0.9) 0;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
}



.product-glyph {
  width: 128px;
  height: 128px;
  color: var(--ink);
}

.product-glyph svg { width: 100%; height: 100%; overflow: visible; }

.product-title {
  position: relative;
  text-align: center;
  font-family: Charter, "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 46px);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.product-title .arrow {
  display: inline-block;
  font-family: "JetBrains Mono", Menlo, Consolas, monospace;
  font-weight: 400;
  font-size: 0.42em;
  position: absolute;
  left: 100%;
  top: 50%;
  margin: -0.6em 0 0 0.6em;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.product-row:hover .product-title .arrow,
.product-row:focus-visible .product-title .arrow { opacity: 1; transform: none; }

.product-row:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }

/* glyph motion on hover */

.glyph-matrix circle { transition: r 0.4s ease, opacity 0.4s ease; }

.glyph-arm g { transition: transform 0.7s cubic-bezier(.2,.7,.2,1); }
.glyph-arm .seg2 { transform-origin: 44px 76px; }
.glyph-arm .seg3 { transform-origin: 80px 46px; }
.product-row:hover .glyph-arm .seg2 { transform: rotate(-14deg); }
.product-row:hover .glyph-arm .seg3 { transform: rotate(26deg); }

/* ---------- Global operations map ---------- */

.ops-legend {
  display: flex;
  gap: 0.2em;
  font-size: max(11px, var(--text-sm));
  color: var(--ink-2);
}

.ops-legend button {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 6px;
  transition: opacity 0.2s;
}

.ops-legend button[aria-pressed="false"] { opacity: 0.35; }
.ops-legend button:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.legend-dot.expanding { background: var(--accent-expanding); }

.typed::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: currentColor;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.ops-map {
  position: relative;
  margin-top: var(--space-2);
  aspect-ratio: 225 / 87;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.035) 1px, transparent 1px);
  background-size: calc(100% / 12) calc(100% / 5);
  user-select: none;
  -webkit-user-select: none;
}

.ops-map canvas,
.ops-map svg.ops-leaders { position: absolute; inset: 0; width: 100%; height: 100%; }
.ops-map svg.ops-leaders { pointer-events: none; overflow: visible; }

.ops-corner { position: absolute; width: 14px; height: 14px; border-color: var(--ink-3); border-style: solid; border-width: 0; }
.ops-corner.tl { top: -8px; left: -8px; border-top-width: 1px; border-left-width: 1px; }
.ops-corner.tr { top: -8px; right: -8px; border-top-width: 1px; border-right-width: 1px; }
.ops-corner.bl { bottom: -8px; left: -8px; border-bottom-width: 1px; border-left-width: 1px; }
.ops-corner.br { bottom: -8px; right: -8px; border-bottom-width: 1px; border-right-width: 1px; }

.ops-pin {
  all: unset;
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
}

.ops-pin::before,
.ops-pin::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  left: 50%;
  top: 50%;
}

.ops-pin::before {
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--paper);
  transition: transform 0.2s;
}

.ops-pin::after {
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border: 1px solid var(--ink);
  opacity: 0;
  animation: pulse 2.8s cubic-bezier(.2,.6,.3,1) infinite;
  animation-delay: var(--delay, 0s);
}

.ops-pin.expanding::before { background: var(--accent-expanding); }
.ops-pin.expanding::after { border-color: var(--accent-expanding); }

.ops-pin { pointer-events: none; } /* hover/click handled by nearest-site lookup in ops-map.js; pins stay keyboard-focusable */
.ops-pin.is-active { z-index: 3; }
.ops-pin:hover::before,
.ops-pin.is-active::before { transform: scale(1.6); }

.ops-pin:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

@keyframes pulse {
  0% { transform: scale(0.25); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}

.ops-label {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 4px 10px 4px 8px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, opacity 0.25s;
}

.ops-label small { display: block; font-size: 9.5px; color: var(--accent-expanding); }
.ops-label .flag { font-size: 13px; }
.ops-label.is-active { border-color: var(--ink); }
.ops-label.is-dim, .ops-pin.is-dim { opacity: 0.18; }

.ops-card {
  position: absolute;
  z-index: 5;
  width: 220px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 8px;
  box-shadow: 0 10px 30px -12px rgba(0,0,0,0.25);
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ops-card.is-open { opacity: 1; transform: none; }
.ops-card-head { display: flex; align-items: center; gap: 0.5em; font-weight: 600; font-size: 13px; }
.ops-card-status { display: flex; align-items: center; gap: 0.5em; margin-top: 6px; color: var(--ink-2); }
.ops-card-coords { margin-top: 2px; color: var(--ink-3); font-size: 11px; }

.ops-footer {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: max(11px, var(--text-sm));
  color: var(--ink-3);
}

@media (prefers-reduced-motion: reduce) {
  .ops-pin::after, .typed::after { animation: none; }
  .product-row * { transition: none !important; }
}

@media (max-width: 720px) {
  .wide { width: auto; }

  .product-row {
    padding: var(--space-3) 0;
    gap: var(--space-1);
  }
  .product-title { font-size: 30px; }
  .product-glyph { width: 88px; height: 88px; }

  .ops-label { display: none; }
  .section-head { flex-direction: column; gap: var(--space-tight); align-items: flex-start; }
}

/* 37 sites: pins + hover card only; always-on labels would overlap in Europe */
.ops-label, .ops-map svg.ops-leaders { display: none; }

@media (max-width: 600px) {
  .ops-footer span:last-child { display: none; }
}
