/* Dyson Swarm homepage: a trip out from the Sun, one screenprinted world in the Dyson Swarm
   poster's inks (navy, cream, yellow, orange), each place adding its own accent.

   Two layouts from the same markup:
   - live (html.trip-live, set in <head>): a sticky stage (home/trip/) behind the sections. Each
     place's section is a screen plus a hold; its card sticks to the bottom left while the
     camera holds on the place.
   - still (no JavaScript, reduced motion, ?still): each section is one screen with its own still
     print behind its card.
   Fonts are self-hosted subsets: Michroma (the poster's lettering) and Instrument Sans (text). */
@font-face { font-family: "Instrument Sans"; src: url(fonts/instrument-sans.woff2) format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Michroma"; src: url(covers/fonts/michroma-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --navy: #151b32; --cream: #f2e7cb; --muted: rgba(242, 231, 203, .72); --faint: rgba(242, 231, 203, .5); --rule: rgba(242, 231, 203, .18);
  --yellow: #f6c444; --orange: #ff6b2f;
  --gutter: clamp(20px, 4.4vw, 64px);
  --wide: "Michroma", "Instrument Sans", "Eurostile", sans-serif;
  --screen: 100vh; --hold: 46vh;
}
@supports (height: 100lvh) { :root { --screen: 100lvh; --hold: 46lvh; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--navy); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--navy); color: var(--cream); font: 16px/1.6 "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; border-radius: 2px; }
::selection { background: var(--yellow); color: var(--navy); }
.bar { display: block; background: var(--yellow); }
h1, h2, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── the top bar: a small mark, the itinerary rail, links ── */
.top { position: fixed; z-index: 30; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: clamp(14px, 2.6vh, 26px) var(--gutter) 0; pointer-events: none; }
.top > * { pointer-events: auto; }
.mark { justify-self: start; font: 400 clamp(10.5px, .72vw, 15px)/1 var(--wide); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; padding: 8px 0; }
.more { justify-self: end; display: flex; gap: clamp(28px, 1.9vw, 40px); font: 400 clamp(10px, .68vw, 14px)/1 var(--wide); letter-spacing: .17em; text-transform: uppercase; }
.more a { text-decoration: none; padding: 8px 0; white-space: nowrap; }
.more a:hover, .mark:hover { color: var(--yellow); }
.more span { font-family: "Instrument Sans", sans-serif; }
.rail { opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
.rail ol { display: flex; gap: clamp(16px, 1.9vw, 30px); margin: 0; padding: 0; list-style: none; }
.rail li { position: relative; }
.rail a { display: flex; align-items: center; gap: 8px; padding: 8px 0; text-decoration: none; font: 400 clamp(9px, .62vw, 13px)/1 var(--wide); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.rail i { flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--cream); background: var(--navy); transition: background .3s, border-color .3s, transform .3s; }
.rail a:hover { color: var(--cream); }
.rail a[aria-current] { color: var(--cream); }
.rail a[aria-current] i { background: var(--yellow); border-color: var(--yellow); transform: scale(1.25); }
.trip-live .rail.is-shown { opacity: 1; visibility: visible; }
html:not(.trip-live) .rail { display: none; }

/* how far from the Sun, at the foot of the screen */
.odo { position: fixed; z-index: 25; right: var(--gutter); bottom: clamp(28px, 7vh, 72px); margin: 0; font: 400 clamp(9.5px, .64vw, 14px)/1 var(--wide); letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
  opacity: 0; transition: opacity .5s; pointer-events: none; font-variant-numeric: tabular-nums; }
.odo b { font-weight: 400; color: var(--cream); }
.odo i { font-style: normal; margin: 0 .5em; opacity: .6; }
.trip-live .is-past .odo { opacity: 1; }
.trip-live .is-end .odo { opacity: 0; }
html:not(.trip-live) .odo { display: none; }

/* ── the stage ── */
.trip { position: relative; }
.stage { position: absolute; z-index: 0; top: 0; left: 0; right: 0; height: var(--screen); overflow: hidden; background: var(--navy); isolation: isolate; }
.trip-live .stage { position: sticky; margin-bottom: calc(-1 * var(--screen)); }
.stage picture, .stage-still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-still { object-fit: cover; object-position: 60% 40%; user-select: none; -webkit-user-drag: none; transition: opacity .9s ease; }
.stage-layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .9s ease; }
.stage-world { right: auto; bottom: auto; width: 0; height: 0; will-change: transform; }
.is-live .stage-layer { opacity: 1; }
.is-live .stage-still { opacity: 0; }
.plate { position: absolute; display: block; opacity: 0; transition: opacity .7s ease; }
.plate.is-in { opacity: 1; }
/* a fall of navy under the top bar, so its words never sit on bright art */
.stage::after { content: ""; position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: clamp(70px, 11vh, 110px); pointer-events: none;
  background: linear-gradient(rgba(21, 27, 50, .88), rgba(21, 27, 50, .55) 45%, rgba(21, 27, 50, 0)); }
/* a soft fall of navy under the words, so they read over any place */
.stage-scrim { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(120% 70% at 0% 100%, rgba(21, 27, 50, .78), rgba(21, 27, 50, .4) 38%, rgba(21, 27, 50, 0) 62%); }
.stage-label { position: absolute; transform: translate(0, -50%); white-space: nowrap; font: 400 9px/1 var(--wide); letter-spacing: .18em; text-transform: uppercase; color: var(--faint); padding-left: 16px; }
.stage-label::before { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 1px; background: var(--faint); }
.stage-label.is-left { transform: translate(-100%, -50%); padding: 0 16px 0 0; }
.stage-label.is-left::before { left: auto; right: 0; }
.stage-label.is-centre { transform: translate(-50%, 0); padding: 0; }
.stage-label.is-centre::before { display: none; }

/* a small scroll hint on the first screen, in the distance readout's style */
.hint { position: absolute; right: var(--gutter); bottom: clamp(28px, 7vh, 72px); display: flex; align-items: center; gap: 12px; margin: 0; font: 400 clamp(9.5px, .64vw, 14px)/1 var(--wide); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); pointer-events: none; transition: opacity .4s; }
.hint i { position: relative; width: 1px; height: 18px; background: var(--rule); overflow: hidden; }
.hint i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--yellow); animation: hint 2.4s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes hint { to { top: 100%; } }
.trip-live .is-past .hint { opacity: 0; }
html:not(.trip-live) .hint { display: none; }

/* ── the end of the trip: starting in the 2050s ── */
.beat { position: relative; z-index: 2; min-height: var(--screen); pointer-events: none; }
.trip-live .beat { height: calc(var(--screen) + var(--hold) * 1.4); }
.statement { --o: 1; max-width: min(68vw, 100%); pointer-events: auto; opacity: var(--o); transform: translate3d(0, calc((1 - var(--o)) * 26px), 0); }
.statement h2 { font: 400 clamp(40px, 5.6vw, 108px)/1.02 var(--wide); letter-spacing: .01em; margin-left: -.04em; }
.statement em { font-style: normal; color: var(--yellow); }
.statement-body { max-width: 34em; margin-top: clamp(18px, 2.6vh, 34px); font-size: clamp(17px, 1.42vw, 32px); line-height: 1.45; color: var(--cream); text-wrap: pretty; }
.statement .motto { margin-top: clamp(20px, 3vh, 32px); }
/* the printed timeline: now to 2080; most futures bracketed; these places a solid bar from 2050 on */
.timeline { position: relative; height: 78px; margin-top: clamp(26px, 4vh, 52px); margin-right: calc(-1 * var(--gutter)); max-width: min(980px, 68vw); font: 400 clamp(9.5px, .62vw, 13px)/1 var(--wide); letter-spacing: .14em; text-transform: uppercase; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 44px; height: 1px; background: var(--cream); opacity: .55; }
.tl-tick { position: absolute; top: 39px; left: calc(var(--at) * (100% - 40px)); height: 11px; border-left: 1px solid var(--cream); }
.tl-tick b { position: absolute; top: 19px; left: 0; transform: translateX(-50%); font-weight: 400; color: var(--muted); white-space: nowrap; }
.tl-tick:first-of-type b { transform: none; }
.tl-big { height: 15px; top: 37px; border-left: 2px solid var(--yellow); }
.tl-big b { color: var(--yellow); }
.tl-most { position: absolute; top: 22px; left: calc(.185 * (100% - 40px)); width: calc(.185 * (100% - 40px)); height: 12px; border: 1px solid var(--yellow); border-bottom: 0; }
.tl-ours { position: absolute; top: 36px; left: calc(.444 * (100% - 40px)); right: 0; height: 8px; background: linear-gradient(90deg, var(--yellow), var(--orange)); }
.tl-ours::after { content: ""; position: absolute; right: -10px; top: -5px; border: 9px solid transparent; border-left: 11px solid var(--orange); border-right: 0; }
.tl-most i, .tl-ours i { position: absolute; bottom: calc(100% + 9px); font-style: normal; color: var(--yellow); white-space: nowrap; }
.tl-most i { left: 50%; transform: translateX(-50%); }
.tl-ours i { left: 0; bottom: calc(100% + 23px); }

/* ── the places ── */
.stop { position: relative; z-index: 2; min-height: var(--screen); pointer-events: none; }
.trip-live .stop { height: calc(var(--screen) + var(--hold)); }
.stop-still, .stop-still img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.beat .stop-still::after { display: none; }
.stop-still::before { content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: clamp(70px, 11vh, 110px); background: linear-gradient(rgba(21, 27, 50, .88), rgba(21, 27, 50, .55) 45%, rgba(21, 27, 50, 0)); }
.stop-still img { object-fit: cover; object-position: 60% 40%; }
.trip-live .stop-still { display: none; }
.stop-still::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 70% at 0% 100%, rgba(21, 27, 50, .78), rgba(21, 27, 50, .4) 38%, rgba(21, 27, 50, 0) 62%); }
.card-wrap { position: relative; height: var(--screen); min-height: 520px; display: flex; align-items: flex-end; padding: 0 var(--gutter) clamp(28px, 7vh, 72px); }
.trip-live .card-wrap { position: sticky; top: 0; }
.card { --o: 1; display: flex; align-items: flex-end; gap: clamp(18px, 2vw, 44px); max-width: clamp(560px, 46vw, 1120px); pointer-events: auto;
  opacity: var(--o); transform: translate3d(0, calc((1 - var(--o)) * 22px), 0); }
.card.is-away { pointer-events: none; }
.poster { flex: none; display: block; width: clamp(120px, 11.5vw, 270px); aspect-ratio: 2 / 3; background: #1d2440;
  box-shadow: 0 0 0 1px rgba(242, 231, 203, .1), 0 2px 3px rgba(0, 0, 0, .35), 0 26px 40px -24px rgba(0, 0, 0, .9); transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card:hover .poster { transform: translateY(-4px); }
.card-text { min-width: 0; padding-bottom: 2px; }
.where { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px .9em; font: 400 clamp(9px, .62vw, 14px)/1.6 var(--wide); letter-spacing: .15em; text-transform: uppercase; color: var(--accent, var(--yellow)); }
.where b { font-weight: 400; color: var(--cream); margin-right: 4px; }
.where i { font-style: normal; opacity: .6; }
.card h2 { margin-top: .4em; font: 400 clamp(24px, 2.35vw, 58px)/1.1 var(--wide); letter-spacing: .035em; text-transform: uppercase; }
.card h2 a { text-decoration: none; }
.card h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.pitch { margin-top: .7em; max-width: 30em; font-size: clamp(16px, 1.2vw, 28px); line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.open { display: inline-flex; align-items: center; gap: .7em; margin-top: 1.25em; padding: .76em 1.24em .76em 1.1em; border-radius: 2px; background: var(--accent, var(--yellow)); color: var(--navy);
  font-size: clamp(14.5px, 1vw, 22px); font-weight: 600; line-height: 1.2; text-decoration: none; transition: background .2s, transform .2s; }
.open span { transition: transform .25s; }
.open:hover { background: var(--cream); }
.open:hover span { transform: translateX(3px); }

.passage { position: relative; z-index: 2; display: flex; align-items: center; height: calc(var(--screen) * .62); padding: 0 var(--gutter); pointer-events: none; }
.passage p { max-width: 24em; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; color: var(--muted); }
html:not(.trip-live) .passage { height: auto; padding-top: 72px; padding-bottom: 72px; }

/* small caps labels and the tagline */
.label { font: 400 11px/1.5 var(--wide); letter-spacing: .2em; text-transform: uppercase; color: var(--yellow); }
.label .bar { width: 38px; height: 2.5px; margin-bottom: 20px; }
.motto { margin-top: clamp(36px, 5vh, 56px); font: 400 clamp(11px, .95vw, 19px)/1.6 var(--wide); letter-spacing: .24em; text-transform: uppercase; color: var(--yellow); }

.foot { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; margin: 0 var(--gutter); padding: 22px 0 40px; border-top: 1px solid var(--rule); font-size: 13.5px; color: var(--muted); }
.foot nav { display: flex; gap: 8px 22px; flex-wrap: wrap; }
.foot a:hover { color: var(--cream); }

/* ── portrait screens: the trip runs downward; words at the foot of each screen ── */
@media (max-aspect-ratio: 19/20) {
  .stage-still, .stop-still img { object-position: 50% 34%; }
  .stage-scrim, .stop-still::after { background: linear-gradient(rgba(21, 27, 50, 0) 46%, rgba(21, 27, 50, .55) 66%, rgba(21, 27, 50, .86) 100%); }
  .card { max-width: 560px; }
}
@media (max-width: 1279px) {
  .rail span { display: none; }
  .rail a[aria-current] span { display: inline; }
}
@media (max-width: 619px) {
  .top { grid-template-columns: auto 1fr; padding-top: 10px; }
  .mark { grid-column: 1; grid-row: 1; }
  .rail { grid-column: 2; grid-row: 1; justify-self: end; }
  .rail ol { gap: 13px; }
  .rail a[aria-current] span { display: none; }
  .rail i { width: 8px; height: 8px; }
  .more { display: none; }
  .card-wrap { padding-bottom: 20px; }
  .card { align-items: flex-start; gap: 14px; }
  .poster { width: 92px; }
  .where { font-size: 8.5px; letter-spacing: .12em; gap: 0 7px; }
  .card h2 { margin-top: 8px; font-size: 21px; }
  .pitch { margin-top: 8px; font-size: 15px; line-height: 1.4; }
  .open { margin-top: 12px; padding: 9px 14px; font-size: 13.5px; }
  .hint { display: none; }
  .odo { top: 46px; bottom: auto; left: var(--gutter); right: auto; font-size: 8px; letter-spacing: .12em; }
  .statement h2 { font-size: min(10.4vw, 44px); }
  .statement-body { font-size: 15.5px; line-height: 1.42; }
  .timeline { height: 70px; font-size: 7.5px; letter-spacing: .08em; margin-right: 0; }
  .tl-tick:nth-of-type(2n+4) b { display: none; }
  .tl-most i { left: 0; transform: none; }
  .tl-ours i { left: auto; right: 0; }
  .foot { flex-direction: column; }
}
@media (max-width: 380px) {
  .poster { width: 78px; }
  .card h2 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-layer, .stage-still, .plate, .poster, .open, .open span { transition: none; }
  .hint i::after { animation: none; }
}
.open.soon { background: transparent; color: var(--accent, var(--yellow)); border: 1px solid currentColor; opacity: .85; cursor: default; }
.open.soon:hover { background: transparent; }
