@import "./tokens.css";

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
}

body {
  min-height: 100vh;
}

a { color: inherit; }

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

.masthead-inner,
.wrap,
.footer-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.masthead-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px 0 18px;
  gap: 16px;
}

.brand {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.edition {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero {
  padding: 56px 0 28px;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--spot);
  margin: 0 0 14px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.95;
  margin: 0 0 18px;
  max-width: 14ch;
}

.lede {
  max-width: 58ch;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 40px 0 8px;
}

.stage {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 14px 14px 16px;
  min-height: 118px;
}

.stage b {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.stage span {
  display: block;
  font-size: 14px;
  line-height: 1.4;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 28px 0 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  margin: 0;
}

.section-head p {
  margin: 0;
  color: var(--mute);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding-bottom: 72px;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 20px;
  text-decoration: none;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--ink);
}

.card-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mute);
  letter-spacing: 0.06em;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  margin: 14px 0 10px;
}

.card p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  line-height: 1.5;
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  border: 1px solid var(--rule);
  padding: 3px 7px;
}

.empty,
.error {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--rule);
  color: var(--mute);
}

footer {
  border-top: 1px solid var(--rule);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 36px;
  font-size: 13px;
  color: var(--mute);
}

.footer-inner a { color: var(--ink-soft); }

@media (max-width: 820px) {
  .pipeline { grid-template-columns: 1fr 1fr; }
  .masthead-inner, .footer-inner { flex-direction: column; }
}

@media (max-width: 520px) {
  .pipeline { grid-template-columns: 1fr; }
}
