/* Latitude (workshop source concepts/05-latitude/style.css), scoped to .latitude so the shared header, footer and
   menu keep the site's tokens. Latitude's scoped palette lives in site.css; its geometry stays on :root
   because main.js sets --vh there. */
@font-face { font-family: 'Archivo'; src: url('/fonts/archivo-vf.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  /* geometry: main.js sets --vh on the root */
  --vh: 1vh;
  --scale-w: 58px;
  --gut: 96px;
  --rider-y: 56;
}
.latitude {
  color: var(--ivory);
}

.latitude * { box-sizing: border-box; }

html { background: #0d1216; }

.latitude ::selection { background: var(--sig-label); color: #fff; }

.latitude { font-family: 'Archivo', system-ui, sans-serif; font-stretch: 100%; font-size: 17px; line-height: 1.55; font-weight: 400; -webkit-font-smoothing: antialiased; }

.latitude a { color: inherit; }

.latitude :focus-visible { outline: 2px solid var(--teal-2); outline-offset: 4px; border-radius: var(--radius-sm); }

.latitude .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.latitude #ground { position: fixed; inset: 0; width: 100vw; height: 100lvh; display: block; z-index: 0; background: #c9d3dc; }

.latitude #strip { display: none; }
/* The browser builds the long flow after first paint; reserve its opening viewport. */
@media (scripting: enabled) { .latitude #flow { min-height: 100svh; } }

/* ---------- the instrument: scale, numeral, readout ---------- */
.latitude .instrument { position: fixed; inset: 0; z-index: 20; pointer-events: none; }

.latitude .scale { position: absolute; left: 0; top: 0; bottom: 0; width: var(--scale-w); overflow: hidden; border-right: 1px solid rgba(242, 235, 220, .5); background: linear-gradient(90deg, rgba(8, 12, 15, .5), rgba(8, 12, 15, .18)); }

.latitude .scale-inner { position: absolute; left: 0; top: 0; width: 100%; will-change: transform; }

.latitude .tick { position: absolute; right: 0; height: 1px; background: var(--ivory); opacity: .75; }

.latitude .tick.t1 { width: 8px; }

.latitude .tick.t5 { width: 15px; opacity: .9; }

.latitude .tick.t10 { width: 26px; opacity: 1; }

.latitude .tick.eq { width: 100%; background: var(--sig); height: 2px; opacity: 1; }

.latitude .tick-l { position: absolute; left: 6px; font-size: 10.5px; font-weight: 600; font-stretch: 112%; letter-spacing: .02em; transform: translateY(-50%); color: var(--ivory); white-space: nowrap; }

.latitude .tick-l.eq { color: var(--sig); }

.latitude .pointer { position: absolute; right: -1px; width: 22px; height: 0; top: calc(var(--rider-y) * 1%); }

.latitude .pointer::before { content: ''; position: absolute; right: 0; top: -7px; border: 7px solid transparent; border-right: 9px solid var(--sig); }

.latitude .pointer::after { content: ''; position: absolute; right: -10px; top: -1px; width: 10px; height: 2px; background: var(--sig); }

.latitude .readout { position: absolute; left: calc(var(--scale-w) + 30px); top: 74px; }

.latitude .num { font-weight: 800; font-stretch: 125%; font-size: clamp(76px, 9.2vw, 138px); line-height: .86; letter-spacing: -.02em; display: flex; align-items: flex-start; color: var(--ivory); text-shadow: 0 2px 24px rgba(0, 0, 0, .22); font-variant-numeric: tabular-nums; }

.latitude .num .col { position: relative; overflow: hidden; height: .9em; display: inline-block; width: .74em; text-align: center; }

.latitude .num .col.hide { width: 0; }

.latitude .num .reel { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; will-change: transform; transition: transform .55s var(--ease); }

.latitude .num .reel span { height: .9em; line-height: .9em; display: block; }

.latitude .num .deg { font-size: .5em; line-height: 1; margin: .02em .02em 0 .04em; font-weight: 600; }

.latitude .num .hemi { width: .82em; height: .9em; position: relative; overflow: hidden; display: inline-block; }

.latitude .num .hemi span { position: absolute; left: 0; top: 0; line-height: .9em; animation: hemi .8s var(--ease); }

.latitude .num .hemi.none { width: 0; }

@keyframes hemi { from { transform: translateY(60%); opacity: 0; } }

.latitude .where { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.3; text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }

.latitude #wherePlace { font-weight: 600; font-stretch: 110%; letter-spacing: .01em; }

.latitude #whereJourney { color: var(--ivory-2); font-weight: 400; }

.latitude .where span:empty { display: none; }

.latitude .readout::before { content: ''; position: absolute; left: -70px; top: -60px; width: 640px; height: 340px; background: radial-gradient(closest-side, rgba(6, 10, 13, .42), rgba(6, 10, 13, 0)); z-index: -1; }

.latitude .cue { position: absolute; left: 0; width: var(--scale-w); top: calc(var(--rider-y) * 1% + 16px); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0 10px; color: #fff; background: var(--sig-label); font-size: 13px; font-weight: 700; font-stretch: 112%; letter-spacing: .08em; text-transform: uppercase; transition: opacity .6s var(--ease); }

.latitude .cue-text { writing-mode: vertical-rl; }

.latitude .cue svg { color: #fff !important; }

.latitude .cue svg { animation: cue 2.2s var(--ease) infinite; color: var(--sig); }
@media (prefers-reduced-motion: reduce) {
  .latitude .cue svg, .latitude .num .hemi span { animation: none; }
  .latitude .num .reel, .latitude .page, .latitude .cap::before,
  .latitude .cue, .latitude .exit { transition: none; }
}

@keyframes cue { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }

.latitude .cue.gone { opacity: 0; }

/* parallels labels */
.latitude #parallels { position: fixed; inset: 0; z-index: 15; pointer-events: none; }

.latitude .par { position: absolute; right: 24px; top: 0; font-size: 11.5px; font-weight: 600; font-stretch: 112%; letter-spacing: .05em; color: var(--ivory); transform: translateY(-130%); white-space: nowrap; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); will-change: transform; }

.latitude .par.eq { color: #fff; background: var(--sig-label); padding: 3px 8px 2px; font-size: 13px; text-shadow: none; transform: translateY(-50%); right: 0; }

/* prints lying on the ground */
.latitude #prints { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }

.latitude .print { position: absolute; left: 0; top: 0; margin: 0; background: #f4efe4; padding: 9px 9px 30px; will-change: transform; visibility: hidden;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, .12), 6px 7px 6px -2px rgba(0, 0, 0, .35), 22px 26px 30px -6px rgba(0, 0, 0, .38); }

.latitude .print img { display: block; width: 100%; height: auto; filter: saturate(.92) contrast(1.02); }

.latitude .print figcaption { position: absolute; left: 11px; bottom: 8px; font-size: 11.5px; color: #3b3a36; font-weight: 500; letter-spacing: .01em; }

/* ---------- flow ---------- */
.latitude .lat-main { position: relative; z-index: 10; }

.latitude #flow { position: relative; overflow-x: clip; }

html, body { overflow-x: clip; }

.latitude .open, .latitude .st, .latitude .gap, .latitude .closing { position: relative; }

.latitude .stage { position: sticky; top: 0; height: calc(var(--vh) * 100); overflow: hidden; }

/* opening */
.latitude .hero { position: absolute; left: calc(var(--scale-w) + var(--gut) - 66px); bottom: 9vh; width: min(980px, 72vw); }

.latitude .hero::before { content: ''; position: absolute; inset: -18% -20% -25% -14%; background: radial-gradient(closest-side, rgba(6, 12, 18, .58), rgba(6, 12, 18, .25) 60%, rgba(6, 12, 18, 0)); z-index: -1; }

.latitude .hero h1 { margin: 0; font-weight: 800; font-stretch: 118%; font-size: clamp(40px, 4.6vw, 70px); line-height: .98; letter-spacing: -.018em; text-wrap: balance; }

.latitude .hero p { margin: 22px 0 0; max-width: 560px; font-size: 18.5px; line-height: 1.5; color: var(--ivory); text-wrap: pretty; }

/* station captions */
.latitude .cap { position: absolute; left: calc(var(--scale-w) + 30px); top: 50%; width: min(520px, 40vw); transform: translateY(-30%); }

.latitude .cap::before { content: ''; position: absolute; inset: -30% -30% -30% -24%; background: radial-gradient(closest-side, rgba(6, 10, 13, .58), rgba(6, 10, 13, .28) 55%, rgba(6, 10, 13, 0)); z-index: -1; transition: opacity .8s var(--ease); }

.latitude .cap h2 { margin: 0; font-weight: 800; font-stretch: 122%; font-size: clamp(30px, 3.2vw, 46px); line-height: 1; letter-spacing: -.01em; text-wrap: balance; }

.latitude .cap h2 .lat { display: none; }

html.static .latitude .cap h2 .lat { display: block; color: var(--sig); font-size: .5em; letter-spacing: .02em; margin-bottom: .3em; }

html.static .latitude .readout, html.static .latitude #parallels { display: none; }

.latitude .cap .jy { margin: 10px 0 0; font-size: 14.5px; font-weight: 600; font-stretch: 108%; letter-spacing: .02em; color: var(--ivory-2); }

.latitude .pages { display: grid; margin-top: 18px; }

.latitude .page { grid-area: 1 / 1; transition: opacity .9s var(--ease), transform .9s var(--ease); }

.latitude .page.off-next { opacity: 0; transform: translateY(14px); pointer-events: none; }

.latitude .page.off-prev { opacity: 0; transform: translateY(-14px); pointer-events: none; }

.latitude .page p { margin: 0 0 .7em; text-wrap: pretty; }

.latitude .page p.lead { font-size: 21px; line-height: 1.42; font-weight: 450; }

.latitude .page p.more { font-size: 17px; line-height: 1.55; color: rgba(242, 235, 220, .9); }

.latitude .dots { display: flex; gap: 6px; margin-top: 6px; }

.latitude .dots i { width: 18px; height: 2px; background: rgba(242, 235, 220, .3); transition: background .5s var(--ease); }

.latitude .dots i.on { background: var(--sig); }

.latitude .cap .inline-prints { display: none; }

/* gap captions */
.latitude .gapcap { position: absolute; left: calc(var(--scale-w) + 30px); width: min(400px, 34vw); padding-left: 16px; border-left: 2px solid var(--sig); }

.latitude .gapcap::before { content: ''; position: absolute; inset: -40% -40% -40% -30%; background: radial-gradient(closest-side, rgba(6, 10, 13, .5), rgba(6, 10, 13, 0)); z-index: -1; }

.latitude .gapcap h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; font-stretch: 115%; letter-spacing: .02em; }

.latitude .gapcap h3 .lat { color: var(--ivory-2); font-weight: 600; margin-right: .5em; }

.latitude .gapcap p { margin: 0 0 .5em; font-size: 15.5px; line-height: 1.5; }

.latitude .gapcap p b { font-weight: 650; font-stretch: 108%; }

/* closing: exits on the last land */
.latitude .closing .stage { display: flex; flex-direction: column; justify-content: center; }

.latitude .exits { position: relative; margin-left: calc(var(--scale-w) + 30px); width: min(1100px, calc(100vw - var(--scale-w) - 90px)); }

.latitude .exits::before { content: ''; position: absolute; inset: -22% -12% -22% -10%; background: radial-gradient(closest-side, rgba(6, 10, 13, .55), rgba(6, 10, 13, 0)); z-index: -1; }

.latitude .exits .here { font-size: 15px; font-weight: 700; font-stretch: 115%; letter-spacing: .03em; margin: 0 0 14px; }

.latitude .exits .here .lat { color: var(--sig); margin-right: .5em; }

.latitude .exit { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 54px; gap: 32px; align-items: center; text-decoration: none; padding: 26px 0; border-top: 1px solid rgba(242, 235, 220, .4); transition: padding .6s var(--ease); }

.latitude .exit:last-of-type { border-bottom: 1px solid rgba(242, 235, 220, .4); }

.latitude .exit .t { font-weight: 800; font-stretch: 122%; font-size: clamp(30px, 3.6vw, 54px); line-height: 1; letter-spacing: -.01em; transition: color .5s var(--ease); }

.latitude .exit .n { font-size: 15.5px; line-height: 1.5; color: var(--ivory-2); }

.latitude .exit .arr { width: 54px; height: 54px; border: 1px solid rgba(242, 235, 220, .55); border-radius: 50%; display: grid; place-items: center; transition: background .5s var(--ease), border-color .5s var(--ease); }

.latitude .exit .arr svg { transition: transform .5s var(--ease); }

.latitude .exit:focus-visible .t { color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .latitude .exit:hover .t { color: #fff; }
}

.latitude .exit:focus-visible .arr { background: var(--sig); border-color: var(--sig); }
@media (hover: hover) and (pointer: fine) {
  .latitude .exit:hover .arr { background: var(--sig); border-color: var(--sig); }
}

@media (hover: hover) and (pointer: fine) {
  .latitude .exit:hover .arr svg { transform: translateX(3px); }
}

.latitude .exit:active .arr { transform: scale(.94); }

.latitude .foot { position: relative; padding: 0 calc(var(--scale-w) + 30px); min-height: calc(var(--vh) * 100); display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 40px; }

.latitude .quote { position: relative; margin: 0 0 9vh; max-width: 900px; }

.latitude .quote::before { content: ''; position: absolute; inset: -40% -12% -40% -10%; background: radial-gradient(closest-side, rgba(6, 10, 13, .5), rgba(6, 10, 13, 0)); z-index: -1; }

.latitude .quote p { margin: 0; font-weight: 800; font-stretch: 118%; font-size: clamp(32px, 4vw, 60px); line-height: 1.02; letter-spacing: -.015em; text-wrap: balance; }

.latitude .quote cite { display: block; margin-top: 14px; font-style: normal; font-size: 15px; color: var(--ivory-2); font-weight: 500; }

/* ---------- static (reduced motion or no WebGL) ---------- */
html.static .latitude #ground { display: none; }

html.static .latitude #strip { display: block; position: absolute; left: 0; top: 0; width: 100%; z-index: 0; background-size: 100% 100%; }

html.static .latitude #strip canvas { display: block; width: 100%; height: 100%; }

html.static .latitude .stage { position: relative; height: auto; overflow: visible; padding: 18vh 0; }

html.static .latitude .st, html.static .latitude .open, html.static .latitude .gap, html.static .latitude .closing { height: auto !important; }

html.static .latitude .open .stage { min-height: 100vh; }

html.static .latitude .hero { position: relative; left: auto; bottom: auto; margin-left: calc(var(--scale-w) + 30px); padding-top: 30vh; }

html.static .latitude .cap { position: relative; top: auto; left: auto; right: auto; bottom: auto; transform: none; width: auto; max-width: 560px; margin: 0 20px 0 calc(var(--scale-w) + 30px); }

html.static .latitude .gapcap { left: auto; width: auto; max-width: 420px; margin-left: calc(var(--scale-w) + 30px); margin-right: 20px; }

html.static .latitude .page { opacity: 1 !important; transform: none !important; grid-area: auto; }

html.static .latitude .dots { display: none; }

html.static .latitude .cap .inline-prints { display: flex; gap: 22px; margin-top: 22px; flex-wrap: wrap; }

html.static .latitude .cap .inline-prints .print { position: relative; visibility: visible; width: 300px; }

html.static .latitude #prints { display: none; }

html.static .latitude .gap { padding: 6vh 0; }

html.static .latitude .gapcap { position: relative; top: auto !important; margin-top: 4vh; margin-bottom: 4vh; }

html.static .latitude .scale-inner { transition: transform .3s linear; }
@media (prefers-reduced-motion: reduce) {
  html.static .latitude .scale-inner { transition: none; }
}

html.static .latitude .cue { display: none; }

html.static .latitude .closing .stage { padding: 20vh 0; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  :root { --scale-w: 26px; --rider-y: 42; }

  .latitude { font-size: 16px; }

  .latitude .scale { width: var(--scale-w); }

  .latitude .tick-l { display: none; }

  .latitude .tick.t10 { width: 14px; }
 .latitude .tick.t5 { width: 9px; }
 .latitude .tick.t1 { width: 5px; }

  .latitude .pointer { width: 12px; }

  .latitude .readout { left: calc(var(--scale-w) + 14px); top: 62px; }

  .latitude .num { font-size: 76px; }

  .latitude .where { margin-top: 8px; font-size: 13.5px; }

  .latitude .readout::before { left: -40px; top: -40px; width: 420px; height: 260px; }

  .latitude .cue { font-size: 11px; letter-spacing: .06em; padding: 10px 0 8px; }

  .latitude .par { right: 12px; font-size: 10.5px; }

  .latitude .par.eq { right: 0; font-size: 12px; }

  .latitude .hero { left: calc(var(--scale-w) + 14px); right: 16px; width: auto; bottom: calc(env(safe-area-inset-bottom) + 34px); }

  .latitude .hero h1 { font-size: 33px; font-stretch: 112%; line-height: 1.02; }

  .latitude .hero p { font-size: 16px; margin-top: 14px; }

  .latitude .hero::before { inset: -30% -30% -20% -20%; background: radial-gradient(closest-side, rgba(6, 12, 18, .62), rgba(6, 12, 18, .3) 65%, rgba(6, 12, 18, 0)); }

  .latitude .cap { left: calc(var(--scale-w) + 14px); right: 16px; width: auto; top: auto; bottom: calc(env(safe-area-inset-bottom) + 26px); transform: none; }

  .latitude .cap::before { inset: -40% -20% -20% -20%; background: radial-gradient(closest-side, rgba(6, 10, 13, .66), rgba(6, 10, 13, .36) 60%, rgba(6, 10, 13, 0)); }

  .latitude .cap h2 { font-size: 27px; font-stretch: 115%; }

  .latitude .cap .jy { font-size: 13px; margin-top: 7px; }

  .latitude .pages { margin-top: 12px; }

  .latitude .page p.lead { font-size: 17px; line-height: 1.42; }

  .latitude .page p.more { font-size: 16px; line-height: 1.5; }

  .latitude .gapcap { left: calc(var(--scale-w) + 14px); width: calc(100vw - var(--scale-w) - 40px); }

  .latitude .gapcap p { font-size: 16px; }

  .latitude .print { padding: 6px 6px 22px; }

  .latitude .print figcaption { font-size: 10px; left: 7px; bottom: 6px; }

  .latitude .closing .stage { justify-content: flex-end; padding-bottom: calc(env(safe-area-inset-bottom) + 18px); }

  .latitude .exits { margin-left: calc(var(--scale-w) + 14px); width: calc(100vw - var(--scale-w) - 30px); }

  .latitude .exits::before { inset: -14% -10% -6% -10%; background: radial-gradient(closest-side, rgba(6, 10, 13, .66), rgba(6, 10, 13, .3) 70%, rgba(6, 10, 13, 0)); }

  .latitude .exit { grid-template-columns: 1fr 44px; gap: 6px 14px; padding: 18px 0; }

  .latitude .exit .t { font-size: 27px; font-stretch: 112%; grid-column: 1; }

  .latitude .exit .n { grid-column: 1; grid-row: 2; font-size: 16px; line-height: 1.42; }

  .latitude .exit .arr { grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 44px; }

  .latitude .foot { padding: 0 16px 28px calc(var(--scale-w) + 14px); }

  .latitude .quote { margin-bottom: 7vh; }

  .latitude .quote p { font-size: 30px; font-stretch: 110%; }

  html.static .latitude .cap .inline-prints .print { width: 46%; }

}

@media (max-width: 1100px) and (min-width: 761px) {
  .latitude .cap { width: 46vw; }

}

@media (prefers-reduced-motion: reduce) {
  .latitude .cue svg { animation: none; }

  .latitude .page, .latitude .num .hemi span { transition: none; }

}

/* ------------------------------------------------------------------ Latitude inside the site
   Theme 'night': the dark bar and night footer sit naturally on the dark ink ground. The shared header replaces
   Latitude's own wordmark and three exits, and keeps the soft fade it had behind it. The fixed instruments
   (scale, numeral, parallels, prints) sit above the page, so the footer is raised over them as it scrolls in. */
body[data-page="latitude"] .site-header::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 100px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(8, 12, 15, .55), rgba(8, 12, 15, 0)); }
body[data-page="latitude"] .site-footer { z-index: 25; margin-top: 0; }
/* site.css element rules Latitude was not written against */
.latitude :where(h1, h2, h3, h4) { font-family: inherit; color: inherit; letter-spacing: normal; max-width: none; text-wrap: wrap; font-weight: 700; }
.latitude :where(p, li) { text-wrap: wrap; }
.latitude a { text-decoration-color: currentColor; text-underline-offset: auto; transition: none; }
.latitude a:active { opacity: 1; }
.latitude :where(canvas) { max-width: none; }
.latitude blockquote { margin: 0; }
@media (max-width: 760px) {
  /* clear of the shared header's tag */
  .latitude .readout { top: 78px; }
}
/* the plain-text page for visitors without JavaScript */
.latitude .lat-text { position: relative; z-index: 10; max-width: 44rem; padding: calc(var(--bar-h) + 80px) 24px 64px calc(var(--scale-w) + 30px); }
.latitude .lat-text h1 { font-weight: 800; font-stretch: 118%; font-size: clamp(36px, 4.6vw, 64px); line-height: 1; }
.latitude .lat-text h2 { margin-top: 1.6em; font-weight: 800; font-stretch: 118%; font-size: 26px; }
.latitude .lat-text p, .latitude .lat-text ul { margin-top: .7em; }

/* Short landscape phones keep the instrument beside the story instead of over it. */
@media (max-width: 1000px) and (max-height: 500px) and (orientation: landscape) {
  .latitude .readout { left: 40px; top: 78px; max-width: 180px; }
  .latitude .num { font-size: 58px; }
  .latitude .where { font-size: 13px; }
  .latitude .hero { left: 258px; right: 24px; bottom: 22px; width: auto; }
  .latitude .hero h1 { font-size: 30px; line-height: 1.02; }
  .latitude .hero p { font-size: 16px; line-height: 1.4; margin-top: 14px; }
  .latitude .cap { left: 258px; right: 24px; width: auto; top: auto; bottom: 22px; transform: none; }
  .latitude .cap h2 { font-size: 27px; }
  .latitude .page p.lead, .latitude .page p.more { font-size: 16px; line-height: 1.4; }
  .latitude .pages { margin-top: 10px; }
  .latitude .cue { display: none; }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .latitude .hero, .latitude .cap, .latitude .gapcap, .latitude .exits {
    background: var(--l-ink); box-shadow: 0 0 0 12px var(--l-ink);
  }
  .latitude .hero::before, .latitude .cap::before, .latitude .gapcap::before,
  .latitude .exits::before { display: none; }
  .latitude .hero p, .latitude .page p.more, .latitude .cap .jy,
  .latitude .exit .n { color: var(--ivory); }
  .latitude .readout::before { background: var(--l-ink); filter: none; }
}
