@font-face {
  font-family: Archivo Black;
  src: url("assets/archivo-black.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: DM Sans;
  src: url("assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: IBM Plex Mono;
  src: url("assets/ibm-plex-mono.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --ink: #201a17;
  --dim: #564d46;
  --rule: #d5cbbd;
  --orange: #f48738;
  --rust: #ac3c10;
  --night: #211a17;
  --display: "Archivo Black", "Arial Black", Arial, sans-serif;
  --body: "DM Sans", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --gutter: clamp(1.25rem, 5vw, 5rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

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

a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 5px;
}

.wrap {
  width: min(100% - var(--gutter) * 2, 80rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  inset: .75rem auto auto .75rem;
  z-index: 5;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

.site-header { border-bottom: 1px solid var(--rule); }

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.header-inner { min-height: 4.5rem; }

.wordmark {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  font: 1.22rem/1 var(--display);
  letter-spacing: -.075em;
  text-decoration: none;
}

.wordmark-suffix { color: var(--rust); }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(.8rem, 3vw, 2.4rem);
}

nav a, .eyebrow, figcaption, .label {
  font: 500 .875rem/1.4 var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

nav a {
  padding-block: .4rem;
  color: var(--dim);
  text-decoration: none;
}

nav a:hover, .subtle-link:hover { color: var(--rust); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

.hero-copy { padding-block: .5rem; }

.eyebrow, .label {
  color: var(--rust);
  font-weight: 500;
  letter-spacing: .075em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.marker {
  width: .6rem;
  height: .6rem;
  flex: none;
  background: currentColor;
  clip-path: polygon(25% 0, 75% 0, 75% 25%, 100% 25%, 100% 75%, 75% 75%, 75% 100%, 25% 100%, 25% 75%, 0 75%, 0 25%, 25% 25%);
}

h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.075em;
}

h1 {
  font-size: clamp(2.15rem, 5.15vw, 5rem);
  line-height: .99;
}

h1 span {
  color: var(--rust);
  white-space: nowrap;
}

.lede {
  max-width: 32ch;
  margin-top: 1.5rem;
  color: var(--dim);
  font-size: clamp(1.06rem, 1.55vw, 1.3rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem 1.3rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: .71rem .96rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--orange);
  color: var(--ink);
}

.subtle-link,
.source-link {
  font-weight: 700;
  text-underline-offset: .23em;
}

.hero-art {
  overflow: hidden;
  border: 1px solid var(--ink);
  background: #140e0c;
  box-shadow: .45rem .45rem 0 #e1d7c7;
}

.hero-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.hero-art figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 1rem;
  border-top: 1px solid #493329;
  padding: .72rem 1rem;
  color: #e7bc9b;
  font-size: .79rem;
}

.section { padding-block: clamp(3.75rem, 8vw, 7rem); }

h2 {
  margin-top: .9rem;
  font-size: clamp(2.45rem, 5vw, 4.85rem);
  line-height: .99;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.autopsy {
  border-top: 1px solid var(--rule);
  background: #ede5d8;
}

.autopsy-inner, .crashout-inner, .fork-control-inner, .sources, .shoutouts-inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 5rem);
}

.autopsy-copy, .crashout-copy, .fork-control-copy {
  display: grid;
  gap: 1.1rem;
  max-width: 62ch;
  color: var(--dim);
  font-size: 1.08rem;
}

.payment-note {
  border-left: 3px solid var(--rust);
  padding-left: 1rem;
}

.payment-note strong { color: var(--ink); }

.source-link {
  display: inline-block;
  margin: .75rem .8rem 0 0;
  color: var(--rust);
  font-size: .9rem;
}

.source-link:hover { color: var(--ink); }

.fallout {
  background: var(--night);
  color: var(--paper);
}

.fallout-intro {
  margin-bottom: 2.3rem;
}

.fallout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.1rem, 2vw, 1.6rem);
}

.fallout article {
  display: flex;
  flex-direction: column;
  align-items: start;
  border: 1px solid #634c3d;
  padding: clamp(1.15rem, 2.4vw, 1.85rem);
  background: #2a201b;
}

.fallout .eyebrow,
.fallout .label,
.fallout .source-link { color: #ffa66a; }

.fallout .source-link:hover { color: var(--paper); }
.fallout :focus-visible { outline-color: var(--orange); }

.fallout h3 { margin-top: .65rem; }

.fallout article p:not(.label) {
  flex-grow: 1;
  margin: .85rem 0 .2rem;
  color: #e0d2c6;
}

.crashout {
  border-bottom: 1px solid var(--rule);
  background: #ede5d8;
}

.fork-control { border-bottom: 1px solid var(--rule); }

.crashout-quote {
  border-left: 3px solid var(--rust);
  padding: clamp(1rem, 3vw, 1.7rem);
  background: var(--paper);
}

.crashout-quote blockquote {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
}

.crashout-quote figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  margin-top: .85rem;
}

.crashout-quote a { text-underline-offset: .23em; }
.crashout-quote a:hover { color: var(--rust); }

.source-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.source-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .3rem 1rem;
  border-bottom: 1px solid var(--rule);
  padding-block: .73rem;
  text-decoration: none;
}

.source-list a:hover strong { text-decoration: underline; text-underline-offset: .22em; }

.source-list span {
  color: var(--dim);
  font: 500 .875rem/1.4 var(--mono);
  text-align: right;
}

.shoutouts { background: var(--night); color: var(--paper); }
.shoutouts h2 { margin-top: 0; }

.shoutout-list {
  margin: 0 0 1rem;
  padding: 0;
  border-top: 1px solid #634c3d;
  list-style: none;
}

.shoutout-list li {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  align-items: start;
  gap: .2rem .85rem;
  border-bottom: 1px solid #634c3d;
  padding-block: .65rem;
}

.shoutout-list s { color: #e0d2c6; }

.shoutout-note { position: relative; max-inline-size: 100%; }

.shoutout-note summary {
  display: block;
  inline-size: fit-content;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: .24em;
}

.shoutout-note summary::-webkit-details-marker { display: none; }
.shoutout-note :focus-visible { outline-color: #ffa66a; }

.shoutout-note-panel {
  inline-size: max-content;
  max-inline-size: min(19rem, 100%);
  margin-top: .4rem;
  padding: .45rem .7rem;
  border: 1px solid #634c3d;
  background: #2a201b;
  color: var(--paper);
  font-size: .9rem;
}

.shoutout-note-panel a {
  color: #ffa66a;
  text-underline-offset: .2em;
}

@media (hover: hover) {
  .shoutout-note:not([open]):has(> summary:hover, > .shoutout-note-panel:hover)::details-content {
    content-visibility: visible;
  }

  .shoutout-note:not([open]) .shoutout-note-panel {
    position: absolute;
    z-index: 1;
    inset-block-start: 100%;
    inset-inline-start: 0;
    margin-top: 0;
  }
}

.site-footer {
  border-top: 1px solid var(--rule);
  background: #ede5d8;
}

.footer-inner { min-height: 5.4rem; padding-block: 1rem; }
.footer-tagline { max-width: 54ch; color: var(--dim); }
.footer-inner .subtle-link { flex: none; color: var(--dim); font-size: .9rem; }

@media (max-width: 960px) {
  .autopsy-inner, .crashout-inner, .fork-control-inner, .sources, .shoutouts-inner { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .fallout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 690px) {
  .header-inner { min-height: 4.2rem; }
  .header-inner nav { gap: .35rem .85rem; }
  .header-inner nav a { font-size: .79rem; }
  .hero { grid-template-columns: 1fr; gap: 1.6rem; }
  h1 { font-size: clamp(2rem, 9.5vw, 4.6rem); }
  .hero-copy { padding-top: .15rem; }
  .lede { margin-top: 1.15rem; }
  .hero-actions { margin-top: 1.15rem; }
  .autopsy-inner, .crashout-inner, .fork-control-inner, .sources, .shoutouts-inner { grid-template-columns: 1fr; }
  .footer-inner { flex-wrap: wrap; justify-content: start; padding-block: 1.2rem; }
  .footer-tagline { flex-basis: 100%; order: 1; }
  .footer-inner .subtle-link { margin-left: auto; }
}

@media (max-width: 480px) {
  .header-inner { flex-wrap: wrap; gap: .35rem; padding-block: .6rem; }
}

@media (max-width: 400px) {
  .source-list a { flex-wrap: wrap; }
  .shoutout-list li { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
