/* Site-wide footer (all eight pages). Owned by the footer section agent.

   Round 2 (2026-09-24), after the user called the footer "completely shit": his name set across the
   whole width, two doors set as huge type, and nothing to look at or do. The name is gone. Now:
   - The ways in: three rows, each with a real photograph (or the journal's cover) that leans toward
     the pointer, one plate of light gliding to the row being read.
   - The office on a real map of Seattle (US Census shoreline and freeways, footer.js draws it): as the
     page runs out the view settles from the whole Sound onto Cherry Hill, the pin stands on the
     campus and the address card stands beside it. The pointer tilts the view a little.
   - The index (pages, and the places he appears, by their own logos) and the fine print, unchanged.
   It stays dark: it is one of the films on the lightbox. Text on the ink uses white at set strengths
   and lightbox blue, never film blue (2.9:1 on ink). Round 1 is in tools/footer/round2-snapshot/. */

.footer {
  --footer-lift: cubic-bezier(0, 0, 0.5, 1);
  --footer-fade: cubic-bezier(0.4, 0, 0.6, 1);
  --footer-ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --footer-water: #08111A;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 1.5rem;
  font-size: 0.95rem;
}
.footer a { color: rgba(255, 255, 255, 0.86); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; }

/* Small labels beside the index rows. Real headings (h2) so the footer reads in order; set small. */
.footer-h {
  font-family: var(--label); font-weight: 600; font-size: 0.9rem; line-height: 1.3;
  letter-spacing: 0.01em; color: rgba(255, 255, 255, 0.56);
}

/* ---------- the stage: the ways in, and the office on its map ---------- */
.footer-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: stretch;
}

/* the ways in: a photograph, the words, an arrow. One plate of light glides to the row being read. */
.footer-ways { position: relative; display: grid; align-content: center; gap: 0.35rem; }
.footer-ways__plate {
  position: absolute; left: 0; right: 0; top: 0; height: 0; z-index: 0; pointer-events: none;
  border-radius: 18px; background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: transform 0.45s var(--footer-ease), height 0.45s var(--footer-ease), opacity 0.3s var(--footer-fade);
}
.footer-ways__plate.is-snap { transition: opacity 0.3s var(--footer-fade); }
.footer-ways__plate.is-on { opacity: 1; }
.footer-way {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: clamp(5.5rem, 8vw, 7.5rem) minmax(0, 1fr) auto; align-items: center;
  gap: clamp(1rem, 1.8vw, 1.5rem);
  padding: 0.85rem 1.1rem 0.85rem 0.85rem;
  border-radius: 18px;
  outline: none;
}
.footer-way:focus-visible { box-shadow: inset 0 0 0 2px var(--lightbox); }
.footer-way__pic {
  position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  background: #161B22;
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.8);
  transform: perspective(600px) rotateX(var(--footer-ry, 0deg)) rotateY(var(--footer-rx, 0deg)) scale(var(--footer-ps, 1));
  transition: transform 0.5s var(--footer-ease), box-shadow 0.5s var(--footer-ease);
}
.footer-way__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* the journal's cover stands upright in the same slot, like a copy on a shelf */
.footer-way__pic--cover { justify-self: center; width: 62%; aspect-ratio: 400 / 518; background: #2B3B8B; }
.footer-way__txt { display: grid; gap: 0.3rem; min-width: 0; }
.footer-way__t {
  font-family: var(--display); font-weight: 600; font-size: clamp(1.28rem, 1.75vw, 1.6rem); line-height: 1.18;
  letter-spacing: -0.01em; color: #fff; text-wrap: balance;
}
.footer-way--latest .footer-way__t { font-size: clamp(1.1rem, 1.35vw, 1.28rem); line-height: 1.25; }
.footer-way__cap { font-size: 0.95rem; line-height: 1.45; color: rgba(255, 255, 255, 0.64); transition: color 0.25s; }
.footer-way__arrow {
  width: 1.35rem; height: 1.35rem; fill: none; stroke: var(--lightbox); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; opacity: 0.75; transition: opacity 0.25s;
}
.footer-way.is-hot .footer-way__cap, .footer-way:focus-visible .footer-way__cap { color: rgba(255, 255, 255, 0.86); }
.footer-way.is-hot .footer-way__arrow, .footer-way:focus-visible .footer-way__arrow { opacity: 1; animation: footer-arrow-loop 0.62s var(--ease-out); }
.footer-way.is-hot .footer-way__pic { --footer-ps: 1.045; box-shadow: 0 18px 34px -14px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(191, 217, 238, 0.25); }
/* the arrow leaves and comes back: out to the right, in again from the left, at rest */
@keyframes footer-arrow-loop {
  0% { translate: 0 0; opacity: 1; }
  38% { translate: 0.55em 0; opacity: 0; }
  39% { translate: -0.4em 0; opacity: 0; }
  100% { translate: 0 0; opacity: 1; }
}
@keyframes footer-arrow-loop-up {
  0% { translate: 0 0; opacity: 1; }
  38% { translate: 0 -0.55em; opacity: 0; }
  39% { translate: 0 0.4em; opacity: 0; }
  100% { translate: 0 0; opacity: 1; }
}
/* arrows that tell the truth: when the target is on this page, the arrow points up */
[data-footer-here] .footer-way__arrow { rotate: -90deg; }
.footer-way[data-footer-here].is-hot .footer-way__arrow { animation-name: footer-arrow-loop-up; }
/* the latest editorial's title and caption swap in from editorials.json */
.footer-way--latest .footer-way__t, .footer-way--latest .footer-way__cap { transition: opacity 0.2s, translate 0.45s var(--ease-out), color 0.25s; }
.footer-way--latest.is-swap .footer-way__t, .footer-way--latest.is-swap .footer-way__cap { opacity: 0; translate: 0 0.35em; }

/* ---------- the map ---------- */
.footer-map {
  position: relative; min-height: clamp(22rem, 34vw, 28rem);
  border-radius: 18px; overflow: hidden; isolation: isolate;
  background: var(--footer-water);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.footer-map__view { position: absolute; inset: 0; }
.footer-map__c { position: absolute; inset: 0; width: 100%; height: 100%; }
.footer-map__marks { position: absolute; inset: 0; pointer-events: none; }
/* the edges fall into the film, so the map has no hard frame */
.footer-map__view::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 60% 50%, transparent 55%, rgba(10, 13, 18, 0.55) 100%);
}
/* water names and the campus, set by footer.js at their real places */
.footer-map__label {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  font-family: var(--label); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.06em;
  color: rgba(191, 217, 238, 0.5); translate: -50% -50%;
  transition: opacity 0.4s var(--footer-fade);
}
.footer-map__pin { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.footer-map__pin::before {           /* its shadow on the ground */
  content: ''; position: absolute; left: -7px; top: -2.5px; width: 14px; height: 5px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
}
.footer-map__pin::after {            /* the stem */
  content: ''; position: absolute; left: -1px; bottom: 0; width: 2px; height: 20px; border-radius: 1px;
  background: var(--lightbox);
}
.footer-map__head {
  position: absolute; left: -8px; top: -34px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--lightbox); box-shadow: 0 0 0 3px var(--ink), 0 6px 16px rgba(0, 0, 0, 0.6);
  transition: scale 0.4s var(--ease-spring);
}
.footer-map.is-office .footer-map__head { scale: 1.25; }
.footer-map__pin-t {
  position: absolute; left: 16px; top: -38px; white-space: nowrap;
  font-family: var(--label); font-weight: 600; font-size: 0.86rem; color: #fff;
  text-shadow: 0 1px 8px rgba(10, 13, 18, 0.9), 0 0 2px rgba(10, 13, 18, 0.9);
}

/* the office card: paper on the film, standing beside the pin (footer.js places it), with a tail */
.footer-office {
  position: absolute; left: clamp(1rem, 2.4vw, 1.75rem); bottom: clamp(1rem, 2.4vw, 1.75rem); z-index: 2;
  width: min(20.5rem, calc(100% - 2rem));
  display: grid; gap: 0.7rem; padding: 1.2rem 1.25rem 1.1rem;
  background: var(--paper); color: var(--ink); border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 24px 48px -12px rgba(0, 0, 0, 0.6);
}
.footer-office.is-placed { left: 0; top: 0; bottom: auto; translate: var(--footer-cx, 0px) var(--footer-cy, 0px); }
.footer-office::after {
  content: ''; position: absolute; right: -6px; top: var(--footer-tail, 50%); width: 12px; height: 12px; margin-top: -6px;
  background: var(--paper); border-radius: 0 3px 0 0; rotate: 45deg; display: none;
}
.footer-office.is-placed::after { display: block; }
.footer-office__h { font-family: var(--display); font-weight: 600; font-size: 1.08rem; line-height: 1.25; color: var(--ink); }
.footer-office__addr { font-style: normal; font-size: 0.97rem; line-height: 1.5; color: var(--ink-2); }
.footer-office__where { display: block; margin-top: 0.15rem; font-size: 0.88rem; color: var(--muted); }
.footer-office__go { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1.2rem; }
.footer .footer-office .footer-link { color: var(--ink); background-image: linear-gradient(var(--accent), var(--accent)); }
.footer .footer-office .footer-link:hover, .footer .footer-office .footer-link:focus-visible { color: var(--accent); }
.footer-office .footer-out { color: var(--muted); }
.footer-office .footer-link--out:hover .footer-out { color: var(--accent); }
.footer-office .footer-copy--done { color: var(--accent); }
.footer-office .footer-copy__tick { stroke: var(--accent); }

/* Copy the address: the tick draws itself in, the label says so, a polite live region says it once */
.footer-copy {
  position: relative; font: inherit; color: inherit; background-color: transparent;
  border: 0; border-radius: 0; padding: 0 0 2px; margin: 0; cursor: pointer; text-align: left;
}
.footer-copy__tick {
  position: absolute; left: calc(100% + 0.3rem); top: 50%; translate: 0 -55%;
  width: 0.95em; height: 0.95em; fill: none; stroke: var(--lightbox); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset 0.45s var(--ease-out);
}
.footer-copy--done .footer-copy__tick { stroke-dashoffset: 0; }
.footer-copy__say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html:not(.js) .footer-office__copy { display: none; }

/* Links: an underline that draws in; outside links carry an arrow that leaves */
.footer-link {
  color: rgba(255, 255, 255, 0.86); text-decoration: none; padding-bottom: 2px;
  background-image: linear-gradient(var(--lightbox), var(--lightbox));
  background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 1px;
  transition: background-size 0.4s var(--ease-out), color 0.2s;
}
.footer-link:hover, .footer-link:focus-visible { color: #fff; background-size: 100% 1px; }
.footer-link[aria-current="page"] { color: var(--lightbox); background-size: 100% 1px; }
.footer-out { display: inline-block; margin-left: 0.3em; color: rgba(255, 255, 255, 0.5); transition: translate 0.4s var(--ease-spring), color 0.2s; }
.footer-link--out:hover .footer-out, .footer-link--out:focus-visible .footer-out { color: var(--lightbox); translate: 0.14em -0.14em; }

/* Book through Swedish: the office's one button, the patient's way in. Ink on the paper card; the
   light comes up behind the logo, which cross-fades to its own colours. */
.footer-mark, .footer-book { position: relative; isolation: isolate; text-decoration: none; }
.footer .footer-book {
  display: inline-flex; align-items: center; gap: 0.55rem; justify-self: start; min-height: 46px;
  padding: 0 1rem 0 1.05rem;
  font-family: var(--label); font-weight: 600; font-size: 0.98rem; color: #fff;
  background: var(--ink); border-radius: var(--r-btn);
  transition: color 0.3s var(--footer-fade), scale 0.3s var(--footer-lift);
}
.footer-book .footer-mark__plate { inset: 0; border-radius: inherit; }
.footer-book__t { white-space: nowrap; }
.footer-book__logo img { height: 1.15rem; }
.footer-book .footer-out { margin-left: 0.1rem; color: rgba(255, 255, 255, 0.6); }
.footer .footer-book:focus-visible, .footer .footer-book:active { color: var(--ink); }
.footer-book:focus-visible .footer-out, .footer-book:active .footer-out { color: var(--accent); translate: 0.14em -0.14em; }
@media (hover: hover) {
  .footer .footer-book:hover { color: var(--ink); scale: 1.02; }
  .footer-book:hover .footer-out { color: var(--accent); translate: 0.14em -0.14em; }
}

/* ---------- the index: the pages, and the places he appears ---------- */
.footer-index { display: grid; gap: 0.9rem; margin-top: clamp(2.75rem, 5vw, 3.75rem); padding-top: clamp(1.75rem, 3vw, 2.25rem); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-index__row { display: grid; grid-template-columns: 7rem minmax(0, 1fr); align-items: baseline; gap: 0.5rem 1.5rem; }
.footer-index__row ul { display: flex; flex-wrap: wrap; gap: 0.35rem 1.7rem; }

/* THE MARKS. The places he appears, by their own logos. At rest each is its brand's solid white
   version; point at one, or tab to it, and a plate of light comes up behind it and the mark
   cross-fades to its true colours on the ground it was drawn for. Nothing ever touches a mark itself. */
.footer-index__row--marks { align-items: center; margin-top: 0.6rem; }
.footer-index__row .footer-marks { gap: 0.5rem clamp(0.75rem, 2.2vw, 2.25rem); align-items: center; margin: -0.5rem -1.1rem; }
.footer-mark {
  display: grid; place-items: center; height: 4.6rem; padding: 0 1.15rem; border-radius: var(--r-card);
  transition: scale 0.3s var(--footer-lift);
}
.footer-mark__plate {
  position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--mist); opacity: 0; scale: 0.94;
  box-shadow: 0 12px 34px -12px rgba(191, 217, 238, 0.45);
  transition: opacity 0.3s var(--footer-lift), scale 0.45s var(--footer-lift), translate 0.5s var(--footer-lift);
}
.footer-mark--gsj .footer-mark__plate { background: #2B3B8B; }
.footer-mark__art {
  position: relative; display: block;
  translate: var(--footer-mx, 0px) var(--footer-my, 0px); transition: translate 0.5s var(--footer-lift);
}
.footer-mark__plate { translate: calc(var(--footer-mx, 0px) * 0.55) calc(var(--footer-my, 0px) * 0.55); }
.footer-book .footer-mark__art { translate: none; }
.footer-mark__art img { display: block; width: auto; height: var(--footer-mark-h, 2.4rem); }
.footer-mark__mono { filter: brightness(0) invert(1); transition: opacity 0.4s var(--footer-fade) 0.05s; }
.footer-mark__color { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity 0.25s var(--footer-fade); }
.footer-mark--ssf { --footer-mark-h: 2.8rem; }
.footer-mark--gsj { --footer-mark-h: 2.85rem; }
.footer-mark--in { --footer-mark-h: 2rem; }
.footer-mark--rod { --footer-mark-h: 2.65rem; }
.footer-mark__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.footer-mark:is(:focus-visible, :active) { scale: 1.04; }
:is(.footer-mark, .footer-book):is(:focus-visible, :active) .footer-mark__plate { opacity: 1; scale: 1; }
:is(.footer-mark, .footer-book):is(:focus-visible, :active) .footer-mark__mono { opacity: 0; transition: opacity 0.25s var(--footer-fade); }
:is(.footer-mark, .footer-book):is(:focus-visible, :active) .footer-mark__color { opacity: 1; transition: opacity 0.4s var(--footer-fade) 0.05s; }
@media (hover: hover) {
  .footer-mark:hover { scale: 1.04; }
  :is(.footer-mark, .footer-book):hover .footer-mark__plate { opacity: 1; scale: 1; }
  :is(.footer-mark, .footer-book):hover .footer-mark__mono { opacity: 0; transition: opacity 0.25s var(--footer-fade); }
  :is(.footer-mark, .footer-book):hover .footer-mark__color { opacity: 1; transition: opacity 0.4s var(--footer-fade) 0.05s; }
}

/* ---------- the base: the fine print and the way back up ---------- */
.footer-base {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem 2rem;
  margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem; color: rgba(255, 255, 255, 0.56);
}
.footer-base__fine { display: flex; flex-wrap: wrap; gap: 0.1rem 1.5rem; }
.footer .footer-up {
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px; padding: 0 0.95rem;
  font-family: var(--label); font-weight: 600; font-size: 0.92rem; color: #fff; text-decoration: none;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: var(--r-btn);
  cursor: pointer; transition: border-color 0.25s, background 0.25s;
}
.footer-up__arrow { width: 1rem; height: 1rem; fill: none; stroke: var(--lightbox); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: translate 0.45s var(--ease-spring); }
.footer-up:hover, .footer-up:focus-visible { border-color: var(--lightbox); }
.footer-up:hover .footer-up__arrow, .footer-up:focus-visible .footer-up__arrow { translate: 0 -0.2rem; }

@media (forced-colors: active) {
  .footer-mark__art, .footer-mark__plate { display: none; }
  .footer-mark__name { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .footer-mark { height: auto; padding: 0.5rem 0; }
  .footer-map__view { display: none; }
}

/* ---------- narrower: the ways above, the map below with the card under it ---------- */
@media (max-width: 980px) {
  .footer-stage { grid-template-columns: minmax(0, 1fr); }
  .footer-map { min-height: 0; display: grid; background: none; box-shadow: none; overflow: visible; }
  .footer-map__view { position: relative; height: clamp(15rem, 52vw, 22rem); border-radius: 18px; overflow: hidden; background: var(--footer-water); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
  .footer-office, .footer-office.is-placed { position: relative; left: auto; top: auto; bottom: auto; translate: none; width: auto; margin: -2.5rem 1rem 0; }
  .footer-office::after, .footer-office.is-placed::after { display: none; }
}
@media (max-width: 760px) {
  .footer-index__row--marks { align-items: start; }
  .footer-index__row--marks .footer-h { padding-top: 1.55rem; }
  .footer-index__row .footer-marks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 0.5rem; }
  .footer-marks > li { display: flex; }
}
/* 44px touch targets on a phone, and wherever the pointer is a finger */
@media (pointer: coarse), (max-width: 640px) {
  .footer-index__row ul, .footer-office__go { gap: 0 1.35rem; }
  .footer-index .footer-link, .footer-office__go .footer-link {
    display: inline-block; padding: 0.7rem 0; line-height: 1.5;
    background-origin: content-box; background-position: 0 calc(100% + 3px);
  }
}
@media (max-width: 640px) {
  .footer-way { grid-template-columns: 4.75rem minmax(0, 1fr) auto; padding: 0.7rem 0.4rem; gap: 0.9rem; }
  .footer-way__cap { font-size: 0.9rem; }
  .footer-index { margin-top: 2.25rem; gap: 0.6rem; }
  .footer-index__row { grid-template-columns: 1fr; gap: 0.1rem; }
  .footer-index__row .footer-marks { margin: 0.1rem -1.1rem -0.4rem; }
  .footer-index__row--marks .footer-h { padding-top: 0; }
  .footer-mark { height: 4.3rem; }
  .footer-mark--ssf { --footer-mark-h: 2.55rem; }
  .footer-mark--gsj { --footer-mark-h: 2.6rem; }
  .footer-mark--in { --footer-mark-h: 1.85rem; }
  .footer-mark--rod { --footer-mark-h: 2.35rem; }
  .footer-base { gap: 0.75rem 1rem; font-size: 0.85rem; }
  .footer-base__fine { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .footer-way__pic, .footer-ways__plate, .footer-map__head { transition: none; }
  .footer-way.is-hot .footer-way__arrow { animation: none; }
}
/* on the paper card the focus ring is film blue, not the lightbox blue used on the ink */
.footer-office :focus-visible { outline-color: var(--accent); }
