:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #13161b;
  --muted: #5a636e;
  --line: #e2e5e9;
  --accent: #1667c7;
  --media-bg: #2a2e35;
  --radius: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f13;
    --surface: #15191f;
    --text: #e8ebef;
    --muted: #98a1ac;
    --line: #252b33;
    --accent: #56b0ff;
    --media-bg: #1d2128;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.intro, main, footer {
  width: min(1080px, 100% - 48px);
  margin-inline: auto;
}

/* Intro */

.intro { padding: clamp(56px, 10vw, 96px) 0 clamp(40px, 6vw, 56px); }

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.lede {
  max-width: 40em;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 19px;
  text-wrap: pretty;
}

.links { display: flex; gap: 20px; margin-top: 24px; }

.links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Grid */

.section-title {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr));
  gap: 24px;
}

/* Card */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.08);
}

.card:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }

.media {
  aspect-ratio: 16 / 9;
  background: var(--media-bg);
}

.media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.body {
  display: flex;
  flex-direction: column;
  padding: 24px 26px 26px;
}

.body h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* The title link covers the whole card. */
.card-link { text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link:focus { outline: none; }

.body > p { margin: 10px 0 0; color: var(--muted); text-wrap: pretty; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0 0;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}

/* Each value sits at the bottom of its column, so values line up even when a
   label wraps. */
.stats div { min-width: 0; display: flex; flex-direction: column; }

.stats dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats dd {
  margin: auto 0 0;
  padding-top: 2px;
  font-size: 20px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font: 12.5px/1.6 var(--mono);
}

.body > .more {
  margin: 20px 0 0;
  color: var(--accent);
  font-weight: 600;
}

.more span { display: inline-block; transition: transform 150ms ease; }
.card:hover .more span { transform: translateX(3px); }

/* The featured card spans the grid; on wide screens the video sits left. */
.card.featured { grid-column: 1 / -1; }

@media (min-width: 880px) {
  .card.featured { flex-direction: row; }
  .card.featured .media { flex: 1.45 1 0; align-self: stretch; aspect-ratio: auto; min-height: 340px; }
  .card.featured .body { flex: 1 1 0; justify-content: center; padding: 32px 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .more span { transition: none; }
  .card:hover .more span { transform: none; }
}

/* Footer */

footer {
  margin-top: 72px;
  padding: 24px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer p { margin: 0; }
