@font-face {
  font-family: Gambetta;
  src: url("./assets/gambetta-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("./assets/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f2efe9;
  --ink: #171614;
  --muted: #5f5b54;
  --line: #c7c3bb;
  --wash: #eae6dd;
  --panel: #f2efe9;
  --serif: Gambetta, Georgia, serif;
  --sans: Inter, system-ui, sans-serif;
  --side: clamp(1.25rem, 3.125vw, 3rem);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151412;
  --ink: #ede9e2;
  --muted: #bdb6aa;
  --line: #4c473f;
  --wash: #201e1a;
  --panel: #211f1b;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem / 1.6 var(--sans);
}

h1, h2, h3, p, figure, dl, dd { margin: 0; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.06;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

button { font: inherit; }

summary {
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

.skip-link {
  position: fixed;
  inset: 1rem auto auto 1rem;
  z-index: 5;
  translate: 0 -200%;
  padding: 0.6rem 1rem;
  background: var(--paper);
}

.skip-link:focus { translate: 0; }

.page-width {
  width: min(100% - var(--side) * 2, 97.5rem);
  margin-inline: auto;
}

.eyebrow {
  color: var(--muted);
  font: 600 0.75rem / 1.3 var(--sans);
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.site-controls {
  position: fixed;
  z-index: 3;
  top: 1rem;
  right: 1.25rem;
  display: flex;
  gap: 0.5rem;
}

.icon-button {
  position: relative;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  color: var(--ink);
  cursor: pointer;
}

.icon-button:hover { background: var(--wash); }

.theme-icon {
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 50%;
  box-shadow: -0.13rem 0.12rem 0 0.015rem currentColor;
  transform: translate(0.07rem, -0.06rem);
}

[data-theme="dark"] .theme-icon {
  width: 0.57rem;
  height: 0.57rem;
  border: 1px solid currentColor;
  box-shadow: 0 -0.37rem 0 -0.24rem, 0 0.37rem 0 -0.24rem, 0.37rem 0 0 -0.24rem, -0.37rem 0 0 -0.24rem;
  transform: none;
}

.menu { position: relative; }

.menu > summary {
  z-index: 1;
  box-shadow: 0 0.22rem 1rem #1716140e;
}

.menu[open] > summary {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  width: 0.92rem;
  height: 1px;
  background: currentColor;
}

.menu-icon { position: relative; }

.menu-icon::before, .menu-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-icon::before { transform: translateY(-0.29rem); }
.menu-icon::after { transform: translateY(0.29rem); }
.menu[open] .menu-icon { background: transparent; }
.menu[open] .menu-icon::before { transform: rotate(45deg); }
.menu[open] .menu-icon::after { transform: rotate(-45deg); }

.menu-panel {
  position: absolute;
  inset: 0 0 auto auto;
  width: min(15rem, 88vw);
  padding: 2.55rem 1.25rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1.45rem;
  background: var(--panel);
  box-shadow: 0 0.22rem 1rem #1716140f;
}

.menu-panel a {
  display: block;
  padding-block: 0.24rem;
  font: 400 1.7rem / 1.15 var(--serif);
  text-decoration: none;
}

.menu-panel a:hover { color: var(--muted); }

.opening {
  --name-height: calc((100vw - 48px) * 0.189);
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  padding: 1rem 1.5rem 1.45rem;
}

.masthead {
  width: 100%;
  height: var(--name-height);
  container-type: inline-size;
  overflow: clip;
  line-height: 1;
  white-space: nowrap;
}

.masthead span {
  display: inline-block;
  font-size: var(--name-size, 17.8cqw);
  line-height: 1;
  letter-spacing: -0.035em;
}

.opening-photo {
  width: min(18.25rem, 72vw);
  margin: 1.75rem auto 0;
}

.opening-photo img {
  height: clamp(14.75rem, calc(100svh - var(--name-height) - 169px), 39rem);
  object-fit: cover;
  object-position: 52% 49%;
}

.opening-photo figcaption {
  margin-top: 0.68rem;
  color: var(--muted);
}

.opening-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: auto 1.375rem 0;
  padding-top: 1.75rem;
}

.opening-caption a { text-decoration: none; }
.opening-caption a:hover { text-decoration: underline; }

.intro {
  display: grid;
  min-height: 84svh;
  place-content: center;
  gap: 2.25rem;
  padding: 5rem var(--side);
  text-align: center;
}

.intro p {
  max-width: 52.5rem;
  color: var(--muted);
  font: 400 clamp(2.15rem, 3.75vw, 3rem) / 1.14 var(--serif);
  letter-spacing: -0.015em;
}

.inline-link { text-decoration: none; }
.inline-link:hover { color: var(--ink); }

.intro-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.pill {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.65rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.pill:hover { background: var(--wash); }

.pill.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.pill.primary:hover {
  border-color: var(--muted);
  background: var(--muted);
}

.cooper-records {
  scroll-margin-top: 2rem;
}

.cooper-records .page-width {
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}

.cooper-records h2 {
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  letter-spacing: -0.032em;
}

.cooper-records header p {
  margin-top: 0.65rem;
  color: var(--muted);
}

.cooper-records dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 4vw, 4rem);
  margin-top: clamp(1.75rem, 5vw, 4rem);
}

.cooper-records dl > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.55rem;
}

.cooper-records dt {
  max-width: 26ch;
  color: var(--muted);
  font-size: clamp(0.875rem, 1.4vw, 1.1rem);
  line-height: 1.4;
}

.cooper-records dd {
  font: 400 clamp(2.75rem, 7vw, 6.5rem) / 0.98 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.045em;
}

.cooper-records data { display: block; }

.record-period {
  margin-top: clamp(1.5rem, 3vw, 2.75rem);
  color: var(--muted);
  font-size: 0.875rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.photo-spread {
  display: grid;
  height: clamp(21rem, 49vw, 48rem);
  grid-template-columns: minmax(0, 0.6875fr) minmax(0, 0.3125fr);
  gap: 0.5rem;
}

.photo-spread img, .photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-spread img:first-child { object-position: 53% 62%; }
.photo-spread img:last-child { object-position: 46% 52%; }

.section {
  padding-block: clamp(4.5rem, 10vw, 8rem);
  scroll-margin-top: 2rem;
}

.section + .section { padding-top: 0; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 4vw, 3.2rem);
}

.section-heading h2, .dispatch h2 {
  font-size: clamp(2.2rem, 4vw, 2.875rem);
  letter-spacing: -0.025em;
}

.section-heading .eyebrow, .dispatch .eyebrow { margin-bottom: 0.7rem; }

.section-heading > p, .section-heading > a {
  color: var(--muted);
  font-size: 0.875rem;
}

.text-link {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}

.text-link:hover, a:hover > .text-link { text-decoration: underline; }

.featured {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(1.5rem, 3.75vw, 3rem);
  color: inherit;
  text-decoration: none;
}

.photo-frame {
  overflow: hidden;
  border-radius: 2px;
  background: var(--wash);
}

.photo-frame img {
  transition: scale 450ms ease;
}

a:hover .photo-frame img { scale: 1.035; }

.featured .photo-frame { aspect-ratio: 1.35; }
.featured .photo-frame img { object-position: 66% 50%; }

.featured-caption h3 { font-size: clamp(2.25rem, 4vw, 2.875rem); }

.featured-caption dl, .dispatch dl {
  margin-block: 1.3rem 0.6rem;
}

.featured-caption dl div, .dispatch dl div {
  display: grid;
  grid-template-columns: minmax(5.5rem, 0.75fr) minmax(0, 1.25fr);
  gap: 0.75rem;
  padding-block: 0.55rem;
  font-size: 0.875rem;
}

.featured-caption dt, .dispatch dt { color: var(--muted); }

.story-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.1rem, 2.5vw, 2rem);
  margin-top: clamp(2rem, 4.5vw, 4rem);
}

.story-card {
  display: grid;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
}

.story-card .photo-frame {
  aspect-ratio: 0.86;
}

.story-card h3 {
  font-size: clamp(1.55rem, 2.35vw, 1.75rem);
}

.airline-references {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
  margin: 0 0 1.4rem;
  scroll-margin-top: 4.5rem;
}

.airline-logos {
  display: grid;
  width: min(100%, 23rem);
  grid-template-columns: repeat(auto-fit, minmax(min(8.75rem, 100%), 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.airline-logos li {
  display: grid;
  min-width: 0;
  min-height: 3.75rem;
  place-items: center;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
}

.airline-logos img { max-width: 9rem; }

.chapter-index {
  margin: 0;
  padding: 0;
  list-style: none;
}

.chapter-index a {
  display: grid;
  min-height: 4rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.chapter-index a:hover { color: var(--muted); }

.chapter-name {
  font: 400 clamp(1.45rem, 2.45vw, 1.95rem) / 1.12 var(--serif);
}

.chapter-kind {
  color: var(--muted);
  font-size: 0.875rem;
}

.index-preview {
  position: fixed;
  z-index: 2;
  inset: 0 auto auto 0;
  width: 15.5rem;
  height: 10.5rem;
  object-fit: cover;
  box-shadow: 0 0.4rem 1.1rem #0003;
  pointer-events: none;
}

.entry { scroll-margin-top: 4.25rem; }

.entry summary {
  display: grid;
  min-height: 4rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}

.entry h3 { font-size: clamp(1.45rem, 2.35vw, 1.85rem); }
.entry summary:hover { color: var(--muted); }

.entry-icon, .entry-icon::before {
  width: 0.82rem;
  height: 1px;
  background: currentColor;
}

.entry-icon { position: relative; }

.entry-icon::before {
  position: absolute;
  transform: rotate(90deg);
  content: "";
}

.entry[open] .entry-icon::before { transform: none; }

.entry > p {
  max-width: 53rem;
  margin: 0.1rem 0 1.4rem;
  color: var(--muted);
}

.entry > .text-link { margin: -0.3rem 0 0.9rem; }

.panorama img {
  height: clamp(20rem, 39vw, 41rem);
  object-fit: cover;
  object-position: 55% 42%;
}

.panorama figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.dispatch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 6.25vw, 5rem);
}

.dispatch h2 { max-width: 12ch; }
.dispatch > div > p { max-width: 51ch; color: var(--muted); }
.dispatch dl { margin-bottom: 1.35rem; }

.site-footer {
  background: var(--wash);
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.65fr) minmax(0, 0.85fr);
  gap: 2rem;
  padding-block: clamp(2.5rem, 6.25vw, 5rem);
}

.footer-inner .footer-title {
  margin-bottom: 0.55rem;
  color: var(--ink);
  font: 400 1.85rem / 1.1 var(--serif);
}

.footer-inner p, .footer-inner a { color: var(--muted); }

.footer-inner nav a {
  display: table;
  min-height: 2rem;
  padding-block: 0.25rem;
  font-size: 0.9rem;
}

.footer-inner .eyebrow { margin-bottom: 0.6rem; }

.footer-credits {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  padding-block: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 50rem) {
  .opening {
    --name-height: calc((100vw - 32px) * 0.189);
    padding: 4.5rem 1rem clamp(2rem, 7.1svh, 3.75rem);
  }

  .site-controls { top: 0.75rem; right: 0.75rem; }

  .opening-photo {
    width: min(13.75rem, 70vw);
    margin-top: clamp(2.25rem, 9.8svh, 5.2rem);
  }

  .opening-photo img {
    height: clamp(14rem, 43svh, 25rem);
  }

  .opening-caption { margin-inline: var(--side); }

  .featured {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
  }

  .featured-caption { max-width: 30rem; }

  .dispatch {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner > div { grid-column: 1 / -1; }
}

@media (max-width: 36rem) {
  .opening-caption {
    justify-content: flex-start;
    margin-inline: 1.55rem;
  }

  .opening-caption a { display: none; }

  .intro { min-height: 76svh; }

  .cooper-records dl {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cooper-records dl > div {
    display: grid;
    grid-template-columns: clamp(8.25rem, 34%, 11rem) minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
  }

  .cooper-records dd { grid-area: 1 / 1; }
  .cooper-records dt { grid-area: 1 / 2; }

  .photo-spread {
    height: clamp(16rem, 80vw, 23rem);
    grid-template-columns: 2fr 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .story-cards {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .story-card .photo-frame { aspect-ratio: 0.92; }
  .chapter-index a, .entry summary { gap: 0.65rem; }
  .chapter-index a { grid-template-columns: minmax(0, 1fr) auto; }
  .chapter-kind { display: none; }
}

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

  .cooper-records.animate-records data { animation: record-rise 650ms ease-out; }

  @keyframes record-rise {
    from { opacity: 0.5; transform: translateY(0.45rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-frame img { transition: none; }
  a:hover .photo-frame img { scale: none; }
}
