/* ===== ab-footprint: the studio and its four offices, under one sky.
   The picture is the sunlight on the world at this minute, unrolled and drawn without coastlines or borders:
   the lit half, the warm band where it is dawn or dusk, night beyond. Each office is a gold light where it
   stands, with its local time read from the visitor's clock. It redraws once a minute; nothing else moves.
   With scripting off, a still of one moment stands in and the times are absent. ===== */
.ab-footprint {
  --ab-fp-h: clamp(300px, 30vw, 440px);
  padding-block: var(--section-gap-s);
}

/* --- The head: the heading and its line on the left, the studio on the right --- */
.ab-footprint__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-xl); align-items: end; }
.ab-footprint__intro { grid-column: 1 / span 6; display: grid; gap: var(--space-lg); }
.ab-footprint__intro h2 { max-width: 12ch; }
.ab-footprint__line { max-width: 40ch; }
.ab-footprint__studio { grid-column: 8 / -1; display: grid; gap: var(--space-xs); padding-top: var(--space-md); border-top: 1px solid var(--color-rule-2); }
.ab-footprint__studio-h { font-size: var(--text-title); }
.ab-footprint__studio p { color: var(--color-ink-2); max-width: 52ch; }

/* --- The sky: full-bleed, soft at its top and bottom so it rests in the ground rather than in a box --- */
.ab-footprint__sky { margin: var(--space-2xl) 0 0; }
.ab-footprint__field { position: relative; height: var(--ab-fp-h); background: var(--color-paper); isolation: isolate; }
.ab-footprint__still, .ab-footprint__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ab-footprint__still { object-fit: fill; }
.ab-footprint__canvas { opacity: 0; }
.ab-footprint.is-live .ab-footprint__canvas { opacity: 1; }
.ab-footprint.is-live .ab-footprint__still { visibility: hidden; }
.ab-footprint__field::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--color-paper), color-mix(in oklab, var(--color-paper) 40%, transparent) 12%, transparent 30%, transparent 62%, color-mix(in oklab, var(--color-paper) 45%, transparent) 84%, var(--color-paper));
}

/* --- Geography, said quietly: the three continents' names where they lie, and the equator (drawn in the canvas) --- */
.ab-footprint__frame { position: absolute; inset: 0; z-index: 1; }
.ab-footprint__lands { margin: 0; padding: 0; list-style: none; }
.ab-footprint__lands li {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%);
  font-size: var(--text-sm); line-height: 1.2; white-space: nowrap; color: var(--color-ink-2);
  text-shadow: 0 1px 2px var(--color-paper), 0 0 12px var(--color-paper);
}

/* --- The offices on the sky: an anchor at the office, a gold light on it, and its tag on the side the script finds clear --- */
.ab-footprint__lands li.is-covered { visibility: hidden; }
.ab-footprint__pins { margin: 0; padding: 0; list-style: none; }
.ab-footprint__pin { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }
.ab-footprint__pin::before {           /* the light: a small gold point inside a soft warm pool */
  content: ""; position: absolute; left: 0; top: 0;
  width: 7px; height: 7px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--color-gold);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-gold) 22%, transparent), 0 0 18px 8px color-mix(in oklab, var(--color-dawn) 26%, transparent);
}
.ab-footprint__tag {
  position: absolute; display: flex; align-items: baseline; gap: var(--space-xs);
  font-size: var(--text-sm); line-height: 1.2; white-space: nowrap; color: var(--color-ink);
}
.ab-footprint__pin { --off: 13px; }
.ab-footprint__pin[data-side="right"] .ab-footprint__tag { left: var(--off); top: 0; transform: translateY(-50%); }
.ab-footprint__pin[data-side="left"] .ab-footprint__tag { right: var(--off); top: 0; transform: translateY(-50%); }
.ab-footprint__pin::after {            /* the leader, when a tag stands further out than its light's own glow */
  content: ""; position: absolute; top: 0; height: 1px; width: calc(var(--off) - 13px);
  background: color-mix(in oklab, var(--color-ink) 55%, transparent);
}
.ab-footprint__pin[data-side="right"]::after { left: 9px; }
.ab-footprint__pin[data-side="left"]::after { right: 9px; }
.ab-footprint__pin[data-side="ne"] .ab-footprint__tag { left: 5px; bottom: 7px; }
.ab-footprint__pin[data-side="nw"] .ab-footprint__tag { right: 5px; bottom: 7px; }
.ab-footprint__pin[data-side="se"] .ab-footprint__tag { left: 5px; top: 7px; }
.ab-footprint__pin[data-side="sw"] .ab-footprint__tag { right: 5px; top: 7px; }
.ab-footprint__pin[data-side^="n"]::after, .ab-footprint__pin[data-side^="s"]::after { display: none; }
.ab-footprint__pin[data-side="above"]::after, .ab-footprint__pin[data-side="below"]::after { left: 0; width: 1px; height: calc(var(--off) - 11px); }
.ab-footprint__pin[data-side="above"]::after { top: auto; bottom: 8px; }
.ab-footprint__pin[data-side="below"]::after { top: 8px; }
.ab-footprint__pin[data-side="above"] .ab-footprint__tag { left: 0; bottom: var(--off); transform: translateX(-50%); }
.ab-footprint__pin[data-side="below"] .ab-footprint__tag { left: 0; top: var(--off); transform: translateX(-50%); }
.ab-footprint__pin-name { font-weight: 500; text-shadow: 0 1px 2px var(--color-paper), 0 0 10px var(--color-paper); }
.ab-footprint__time { font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px var(--color-paper), 0 0 10px var(--color-paper); }
.ab-footprint__time:empty { display: none; }

/* --- The address book under the sky --- */
.ab-footprint__book { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-lg); margin-top: var(--space-xl); }
.ab-footprint__where { grid-column: 1 / span 3; display: grid; align-content: start; gap: var(--space-2xs); }
.ab-footprint__label { color: var(--color-ink); }
.ab-footprint__span { color: var(--color-ink-2); max-width: 26ch; }
.ab-footprint__offices { grid-column: 4 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap-columns); row-gap: var(--space-lg); margin: 0; padding: 0; list-style: none; }
.ab-footprint__office { display: grid; align-content: start; gap: var(--space-3xs); padding-top: var(--space-md); border-top: 1px solid var(--color-rule-2); min-width: 0; }
.ab-footprint__city { font-size: var(--text-md); line-height: 1.35; letter-spacing: 0; }
.ab-footprint__country { font-size: var(--text-sm); color: var(--color-muted); }
.ab-footprint__office address { margin-top: var(--space-xs); font-style: normal; font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink-2); overflow-wrap: anywhere; }

@media (max-width: 75rem) {
  .ab-footprint__intro { grid-column: 1 / span 7; }
  .ab-footprint__where { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: var(--space-md); }
  .ab-footprint__span { max-width: none; }
  .ab-footprint__offices { grid-column: 1 / -1; }
}
@media (max-width: 60rem) {
  .ab-footprint { --ab-fp-h: clamp(280px, 52vw, 400px); }
  .ab-footprint__head { grid-template-columns: minmax(0, 1fr); }
  .ab-footprint__intro, .ab-footprint__studio { grid-column: 1 / -1; }
  .ab-footprint__offices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .ab-footprint { --ab-fp-h: 340px; }
  .ab-footprint__sky { margin-top: var(--space-xl); }
  .ab-footprint__where { grid-template-columns: minmax(0, 1fr); }
  .ab-footprint__tag { flex-direction: column; align-items: flex-start; gap: 0; }
  .ab-footprint__pin[data-side="left"] .ab-footprint__tag, .ab-footprint__pin[data-side$="w"] .ab-footprint__tag { align-items: flex-end; }
  .ab-footprint__pin[data-side="above"] .ab-footprint__tag, .ab-footprint__pin[data-side="below"] .ab-footprint__tag { align-items: center; }
}
@media (max-width: 22rem) {
  .ab-footprint__offices { grid-template-columns: minmax(0, 1fr); }
}
