:root {
  --paper: #dfe3e3;
  --ink: #101719;
  --muted: #697377;
  --line: rgba(16, 23, 25, 0.25);
  --boeing: #0d55c8;
  --gd: #173b64;
  color: var(--ink);
  background: var(--paper);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100svh;
}

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

.masthead {
  display: grid;
  min-height: clamp(92px, 14svh, 132px);
  padding: clamp(20px, 2.5vw, 38px);
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: clamp(28px, 5vw, 96px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  width: fit-content;
  font-family: Optima, Candara, "Segoe UI", sans-serif;
  font-size: clamp(38px, 5.1vw, 78px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.8;
}

.masthead p,
.shelf__facts {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.055em;
  line-height: 1.35;
}

.masthead p:last-child {
  text-align: right;
}

.catalogue {
  min-height: calc(100svh - clamp(92px, 14svh, 132px));
}

.shelf {
  --accent: var(--boeing);
  position: relative;
  display: grid;
  min-height: max(360px, 43svh);
  grid-template-columns: clamp(150px, 17vw, 260px) minmax(0, 1fr) clamp(66px, 7vw, 104px);
  align-items: stretch;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.shelf[data-archive="general-dynamics"] {
  --accent: var(--gd);
}

.shelf__label {
  position: relative;
  z-index: 20;
  display: flex;
  padding: clamp(22px, 2.5vw, 38px);
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.shelf__label a {
  width: fit-content;
}

.shelf__label img {
  display: block;
  width: auto;
  max-width: min(100%, 220px);
  max-height: 38px;
  object-fit: contain;
  object-position: left center;
}

.shelf__facts {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cover-rail {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: end;
  gap: 1px;
  padding: clamp(42px, 5vw, 78px) clamp(10px, 1.5vw, 24px) clamp(28px, 3vw, 46px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(16, 23, 25, 0.035) 1px, transparent 1px) 0 0 / 8.333% 100%,
    var(--paper);
}

.cover {
  position: relative;
  display: block;
  min-width: 2px;
  height: 72%;
  flex: 1 1 0;
  overflow: hidden;
  outline: none;
  transform-origin: 50% 100%;
  transition:
    flex-basis 360ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 220ms ease,
    opacity 220ms ease;
}

.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.cover-rail.is-scrubbing .cover:not(.is-active):not(.is-near) {
  opacity: 0.58;
  filter: saturate(0.55);
}

.cover.is-near {
  flex: 0 0 clamp(12px, 1.7vw, 27px);
  opacity: 0.86;
}

.cover.is-active,
.cover:focus-visible {
  z-index: 10;
  flex: 0 0 clamp(150px, 14vw, 220px);
  box-shadow: 0 18px 28px rgba(16, 23, 25, 0.28);
  transform: translateY(-14px) rotate(-0.45deg);
}

.cover.is-active img,
.cover:focus-visible img {
  object-fit: contain;
  background: white;
}

.cover:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.active-year {
  display: flex;
  padding: clamp(22px, 2.5vw, 38px) clamp(16px, 2vw, 30px);
  align-items: flex-end;
  justify-content: flex-end;
  border-left: 1px solid var(--line);
  background: var(--paper);
  color: var(--accent);
  font-family: Optima, Candara, "Segoe UI", sans-serif;
  font-size: clamp(26px, 3.3vw, 50px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.065em;
  line-height: 0.8;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

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

@media (max-width: 760px) {
  .masthead {
    min-height: 124px;
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .wordmark {
    font-size: clamp(38px, 11vw, 60px);
  }

  .masthead p:first-of-type {
    display: none;
  }

  .shelf {
    min-height: 460px;
    grid-template-columns: 1fr 62px;
    grid-template-rows: 96px minmax(0, 1fr);
  }

  .shelf__label {
    padding: 20px;
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .shelf__label img {
    max-width: 190px;
    max-height: 31px;
  }

  .shelf__facts {
    text-align: right;
  }

  .cover-rail {
    grid-row: 2;
    padding: 54px 14px 30px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .cover {
    min-width: 9px;
  }

  .cover.is-near {
    flex-basis: 22px;
  }

  .cover.is-active,
  .cover:focus-visible {
    flex-basis: min(44vw, 176px);
  }

  .active-year {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .cover.is-active,
  .cover:focus-visible {
    transform: none;
  }
}
