:root {
  --bg: #ffffff;
  --ink: #000000;
  --sans: Helvetica, "Helvetica Neue", Arial, sans-serif;

  --grid-margin: 20px;

  --tracking-normal: -0.09em;
  --tracking-tight: -0.06em;

  /* Portrait scale */
  --text-title: 24.35svw;
  --text-details: 3.58svw;
  --text-big-p: 4.61svw;
  --text-xsmall-p: 4.61svw;
  --text-small-p: 4.1svw;
  --text-cta: 8.2svw;
}

@media (orientation: landscape) {
  :root {
    --text-title: 16.78svw;
    --text-details: 0.92svw;
    --text-big-p: 1.73svw;
    --text-xsmall-p: 1.04svw;
    --text-small-p: 1.15svw;
    --text-cta: 1.85svw;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  background: #05070a;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

p {
  margin: 0;
}

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

/* ---------- Pills ---------- */

.pill {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: max-content;
  padding: 0.21em 0.31em 0.1em;
  border: 1px solid currentColor;
  border-radius: 50px;
  background: transparent;
  cursor: pointer;
  font-size: inherit;
  font-weight: 400;
  letter-spacing: var(--tracking-normal);
  line-height: 0.9;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background-color 220ms ease,
    color 220ms ease;
}

.pill:hover,
.pill:focus-visible {
  background: var(--ink);
  color: var(--bg);
  outline: none;
}

.pill-xl {
  font-size: var(--text-cta);
}

/* ---------- Hero shell ---------- */

/* The hero sits on video, so it flips to a dark colour scheme. */
.hero {
  --ink: #ffffff;
  --bg: #05070a;

  position: relative;
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
}

@media (orientation: landscape) {
  .hero {
    flex-direction: row;
  }
}

/* ---------- Background video ---------- */

.hero-media {
  position: absolute;
  inset: 0;
  background: #05070a;
}

.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.04);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(5, 7, 10, 0.78) 0%,
      rgba(5, 7, 10, 0.58) 48%,
      rgba(5, 7, 10, 0.68) 100%
    );
}

@media (orientation: landscape) {
  .hero-scrim {
    background:
      linear-gradient(
        180deg,
        rgba(5, 7, 10, 0.6) 0%,
        rgba(5, 7, 10, 0.24) 16%,
        rgba(5, 7, 10, 0) 34%
      ),
      linear-gradient(
        96deg,
        rgba(5, 7, 10, 0.84) 0%,
        rgba(5, 7, 10, 0.66) 36%,
        rgba(5, 7, 10, 0.36) 68%,
        rgba(5, 7, 10, 0.26) 100%
      );
  }
}

/* ---------- Header ---------- */

.nav {
  position: fixed;
  z-index: 100;
  top: 1.25svh;
  left: var(--grid-margin);
  right: var(--grid-margin);
  display: flex;
  justify-content: space-between;
  font-size: var(--text-small-p);
}

@media (orientation: landscape) {
  .nav {
    top: 2.05svh;
    align-items: center;
    font-size: var(--text-details);
  }
}

.nav-brand {
  flex: 1;
}

.logo {
  display: block;
  width: 11.86svw;
}

/* The mark ships as solid black artwork; invert it for the dark hero. */
.logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: invert(1);
}

.nav-links {
  display: none;
}

.nav-links .pill + .pill {
  margin-left: 1.44svw;
}

.nav-utils {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.nav-utils .pill + .pill {
  margin-left: 0.6svw;
}

@media (orientation: landscape) {
  .logo {
    width: 4.12svw;
  }

  .nav-links {
    display: flex;
    flex: 1;
    justify-content: center;
  }
}

/* ---------- Left column ---------- */

.hero-left {
  position: relative;
  padding: 7.78svh var(--grid-margin) 0;
}

@media (orientation: landscape) {
  .hero-left {
    width: 50%;
    display: flex;
    flex-direction: column;
    padding-top: 14.32svh;
  }
}

.title-block {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.51svh;
}

@media (orientation: landscape) {
  .title-block {
    flex-direction: column;
    margin-bottom: 5.37svh;
  }
}

.display {
  margin: 0;
  font-size: var(--text-title);
  font-weight: 700;
  letter-spacing: var(--tracking-normal);
  line-height: 0.78;
}

.anno-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2em;
  font-size: var(--text-details);
}

.anno {
  font-size: var(--text-details);
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
}

.anno::before {
  content: "( ";
}

.anno::after {
  content: " )";
}

@media (orientation: landscape) {
  .anno-group {
    display: contents;
  }

  .anno-city {
    width: max-content;
    margin-left: 1.27svw;
  }

  .anno-year {
    position: absolute;
    top: 3svw;
    right: 1svw;
    min-width: max-content;
  }
}

/* ---------- Copy row ---------- */

@media (orientation: landscape) {
  .hero-row {
    flex: 1;
    display: flex;
    justify-content: space-between;
    padding-right: 8.33%;
  }
}

.hero-col {
  margin-bottom: 2.51svh;
}

@media (orientation: landscape) {
  .hero-col {
    width: 71.4286%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 1.96svh;
  }
}

.hero-text {
  width: 87.5%;
  text-transform: uppercase;
}

@media (orientation: landscape) {
  .hero-text {
    padding-right: var(--grid-margin);
  }
}

.lede {
  font-size: var(--text-big-p);
  font-weight: 700;
  letter-spacing: var(--tracking-normal);
  line-height: 1;
}

@media (orientation: landscape) {
  .lede {
    margin-bottom: 1.79svh;
  }
}

.sub {
  margin-top: 0.8em;
  font-size: var(--text-xsmall-p);
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
}

@media (orientation: landscape) {
  .sub {
    margin-top: 0;
  }
}

.tagline {
  display: flex;
  align-items: center;
  width: max-content;
  margin-top: 1.6em;
  font-size: var(--text-small-p);
  letter-spacing: var(--tracking-tight);
}

@media (orientation: landscape) {
  .tagline {
    margin-top: 0;
  }
}

.tagline::before {
  content: "[";
  margin-right: 0.28em;
}

.tagline::after {
  content: "]";
  margin-left: 0.28em;
}

.tagline-a {
  padding-left: 0.25em;
}

.tagline-b {
  padding-right: 0.25em;
}

.tagline-rule {
  width: 2.85em;
  margin: 0 0.5em;
  border-bottom: 1px solid currentColor;
}

.hero-cta {
  margin-bottom: 2.51svh;
}

@media (orientation: landscape) {
  .hero-cta {
    margin-bottom: 0;
  }
}

.scroll-cue {
  display: none;
}

@media (orientation: landscape) {
  .scroll-cue {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 4svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55em;
    transform: translateX(-50%);
    font-size: var(--text-details);
    letter-spacing: var(--tracking-tight);
    text-transform: uppercase;
  }
}

.scroll-cue-arrow {
  width: 0.65em;
  height: 0.65em;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

/* ---------- Rail ---------- */

.rail {
  display: none;
}

@media (orientation: landscape) {
  .rail {
    position: fixed;
    z-index: 90;
    top: 50%;
    right: 1.4vw;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.15em;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: var(--text-details);
    letter-spacing: var(--tracking-tight);
    text-transform: uppercase;
  }

  .rail a {
    display: flex;
    align-items: center;
    gap: 0.7em;
    opacity: 0.38;
    transition: opacity 220ms ease;
  }

  .rail a::before {
    content: "";
    width: 0;
    border-bottom: 1px solid currentColor;
    transition: width 220ms ease;
  }

  .rail a:hover,
  .rail a:focus-visible,
  .rail a.is-active {
    opacity: 1;
    outline: none;
  }

  .rail a.is-active::before {
    width: 1.8em;
  }
}

/* ---------- Chapters ---------- */

.chapter {
  --ink: #ffffff;
  --bg: #05070a;

  position: relative;
  color: var(--ink);
  background: var(--bg);
  padding: 10svh var(--grid-margin) 8svh;
}

@media (orientation: landscape) {
  .chapter {
    padding: 16svh 10vw;
  }
}

.chapter-grid {
  display: grid;
  align-items: center;
  gap: 2.8rem;
  max-width: 92rem;
  margin: 0 auto;
}

@media (orientation: landscape) {
  .chapter-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6vw;
    min-height: 68svh;
  }
}

.chapter-copy {
  position: relative;
  z-index: 1;
}

.chapter-index {
  position: absolute;
  top: -0.28em;
  left: -0.06em;
  z-index: -1;
  font-size: 32svw;
  font-weight: 700;
  letter-spacing: var(--tracking-normal);
  line-height: 0.72;
  opacity: 0.1;
  pointer-events: none;
  user-select: none;
}

@media (orientation: landscape) {
  .chapter-index {
    top: -0.34em;
    left: -0.1em;
    font-size: 17.5svw;
  }
}

.chapter-kicker {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin: 0 0 1.15rem;
  font-size: var(--text-details);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
}

.chapter-rule {
  display: block;
  width: 2.6em;
  border-bottom: 1px solid currentColor;
}

.chapter-title {
  position: relative;
  margin: 0;
  font-size: 13.2svw;
  font-weight: 700;
  letter-spacing: var(--tracking-normal);
  line-height: 0.84;
}

@media (orientation: landscape) {
  .chapter-title {
    font-size: 5svw;
  }
}

.chapter-text {
  width: 94%;
  margin-top: 1.6rem;
  text-transform: uppercase;
}

@media (orientation: landscape) {
  .chapter-text {
    width: 82%;
    margin-top: 2.2svh;
  }
}

.chapter-text .lede {
  margin-bottom: 0.85em;
}

.chapter-text .sub {
  margin-top: 0;
}

.chapter-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55em 1.1em;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-details);
}

.chapter-more {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin-top: 1.6rem;
  font-size: var(--text-small-p);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
}

.chapter-more span {
  transition: transform 220ms ease;
}

.chapter-more:hover span,
.chapter-more:focus-visible span {
  transform: translateX(0.28em);
}

.chapter-media {
  position: relative;
  z-index: 1;
  width: 86%;
  margin: 0 0 0 auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

@media (orientation: landscape) {
  .chapter-media {
    width: 78%;
    justify-self: end;
    transform: translateY(-5vh);
  }

  .chapter--flip .chapter-copy {
    order: 2;
  }

  .chapter--flip .chapter-media {
    order: 1;
    justify-self: start;
    transform: translateY(5vh);
  }
}

.chapter-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(0.38) contrast(1.04);
}

.chapter-media figcaption {
  position: absolute;
  right: 0.4em;
  bottom: 0.7em;
  margin: 0;
  font-size: var(--text-details);
}

@media (orientation: portrait) {
  .chapter-kicker,
  .chapter-facts,
  .chapter-media figcaption {
    font-size: var(--text-xsmall-p);
  }
}

/* ---------- Footer / colophon ---------- */

.end {
  --ink: #ffffff;
  --bg: #05070a;

  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: var(--bg);
}

.end-media,
.end-scrim {
  position: absolute;
  inset: 0;
}

.end-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.52) contrast(1.06) brightness(0.78);
}

.end-scrim {
  background:
    linear-gradient(180deg, rgba(5, 7, 10, 0.68), rgba(5, 7, 10, 0.18) 42%),
    linear-gradient(0deg, rgba(5, 7, 10, 0.84), rgba(5, 7, 10, 0.08) 62%);
}

.end-ticker,
.end-stage,
.end-slate {
  position: relative;
  z-index: 1;
}

.end-ticker {
  overflow: hidden;
  padding: 0.85em 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: var(--text-xsmall-p);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
  opacity: 0.46;
}

@media (orientation: landscape) {
  .end-ticker {
    font-size: var(--text-details);
  }
}

.end-ticker-track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: ticker 42s linear infinite;
}

.end-ticker-track span {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.end-ticker-track span::after {
  content: "—";
  margin: 0 1.35em;
  opacity: 0.55;
}

.end-stage {
  position: relative;
  min-height: 78svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12svh var(--grid-margin) 6svh;
}

@media (orientation: landscape) {
  .end-stage {
    min-height: 86svh;
    padding: 16svh 10vw 7svh;
  }
}

.end-index {
  position: absolute;
  top: 8svh;
  left: var(--grid-margin);
  z-index: 0;
  font-size: 42svw;
  font-weight: 700;
  letter-spacing: var(--tracking-normal);
  line-height: 0.7;
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

@media (orientation: landscape) {
  .end-index {
    top: 4svh;
    left: 6vw;
    font-size: 28svw;
  }
}

.end-corner {
  position: absolute;
  z-index: 2;
  width: 1.8rem;
  height: 1.8rem;
  pointer-events: none;
}

.end-corner--tl,
.end-corner--tr {
  top: 2.4rem;
}

.end-corner--bl,
.end-corner--br {
  bottom: 2.4rem;
}

.end-corner--tl,
.end-corner--bl {
  left: var(--grid-margin);
}

.end-corner--tr,
.end-corner--br {
  right: var(--grid-margin);
}

.end-corner--tl {
  border-top: 1px solid currentColor;
  border-left: 1px solid currentColor;
}

.end-corner--tr {
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
}

.end-corner--bl {
  border-bottom: 1px solid currentColor;
  border-left: 1px solid currentColor;
}

.end-corner--br {
  border-bottom: 1px solid currentColor;
  border-right: 1px solid currentColor;
}

@media (orientation: landscape) {
  .end-corner {
    width: 2.4rem;
    height: 2.4rem;
  }

  .end-corner--tl,
  .end-corner--bl {
    left: 3.2vw;
  }

  .end-corner--tr,
  .end-corner--br {
    right: 3.2vw;
  }
}

.end-kicker,
.end-display,
.end-body {
  position: relative;
  z-index: 1;
}

.end-display {
  margin: 0 0 1.6rem;
  font-size: 16svw;
  font-weight: 700;
  letter-spacing: var(--tracking-normal);
  line-height: 0.82;
}

@media (orientation: landscape) {
  .end-display {
    width: 78%;
    margin-bottom: 2.4svh;
    font-size: 8.4svw;
  }
}

.end-body {
  max-width: 28rem;
  text-transform: uppercase;
}

@media (orientation: landscape) {
  .end-body {
    max-width: 34vw;
  }
}

.end-body .lede {
  margin-bottom: 0.75em;
}

.end-body .sub {
  margin-top: 0;
}

.end-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em;
  margin-top: 1.8rem;
}

.end-actions .pill {
  font-size: var(--text-small-p);
}

.end-slate {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.4rem var(--grid-margin) 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: var(--text-xsmall-p);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
}

@media (orientation: landscape) {
  .end-slate {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2vw;
    padding: 1.15rem 3.2vw 1.3rem;
    font-size: var(--text-details);
  }
}

.end-coords,
.end-mark {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55em 1.1em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.end-plates {
  display: flex;
  gap: 1.1em;
}

.end-plates a {
  opacity: 0.46;
  transition: opacity 220ms ease;
}

.end-plates a:hover,
.end-plates a:focus-visible {
  opacity: 1;
  outline: none;
}

.end-credit {
  opacity: 0.46;
  transition: opacity 220ms ease;
}

.end-credit:hover,
.end-credit:focus-visible {
  opacity: 1;
  outline: none;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .end-ticker-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    row-gap: 0.4em;
  }
}

/* ---------- Overlays ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
}

.overlay[hidden] {
  display: none;
}

.overlay-panel {
  width: min(34rem, 100%);
  padding: 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 1.4rem;
  background: var(--bg);
}

.overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.overlay-head h2,
.overlay-empty {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: var(--tracking-tight);
}

.overlay-head h2 {
  font-size: 0.95rem;
}

.overlay-empty {
  font-size: 0.85rem;
}

.overlay-panel input {
  width: 100%;
  padding: 0.85rem 0.2rem 0.7rem;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  outline: none;
}

/* ---------- Motion ---------- */

.nav,
.title-block,
.hero-row {
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.title-block {
  animation-delay: 60ms;
}

.hero-row {
  animation-delay: 180ms;
}

.hero-media {
  animation: fade 1.6s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
