:root {
  --bg: #f4efe4;
  --bg-strong: #ebe1cd;
  --surface: rgba(255, 250, 240, 0.82);
  --surface-strong: rgba(255, 248, 235, 0.96);
  --text: #1f2430;
  --muted: #5e6470;
  --accent: #a23c2a;
  --accent-dark: #7d2418;
  --line: rgba(63, 43, 26, 0.14);
  --shadow: 0 18px 60px rgba(68, 45, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(162, 60, 42, 0.12), transparent 32%),
    radial-gradient(circle at 85% 12%, rgba(45, 92, 145, 0.12), transparent 24%),
    linear-gradient(180deg, #f9f4ea 0%, var(--bg) 46%, #efe5d2 100%);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

code,
pre {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
}

.page-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 20px 0 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.brand {
  letter-spacing: 0.18em;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--accent-dark);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 36px;
  align-items: center;
}

.hero-copy,
.hero-figure,
.stats-strip article,
.prose-card,
.figure-card,
.callout,
.list-card,
.code-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-copy,
.hero-figure,
.prose-card,
.figure-card,
.list-card,
.code-card {
  border-radius: 30px;
}

.hero-copy {
  padding: 34px;
  animation: rise 700ms ease both;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  line-height: 1.02;
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.4rem);
  letter-spacing: -0.05em;
}

.subtitle {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.authors {
  margin: 0 0 24px;
  font-size: 1rem;
  color: #2f3541;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: #fff8f2;
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  border: 1px solid rgba(162, 60, 42, 0.28);
  background: rgba(255, 250, 244, 0.78);
  color: var(--text);
}

.tldr {
  margin: 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  border-radius: 0 18px 18px 0;
  background: rgba(255, 245, 235, 0.85);
  line-height: 1.7;
}

.tldr span {
  display: inline-block;
  margin-right: 8px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
}

.logo-row img {
  height: 66px;
  width: auto;
  object-fit: contain;
}

.hero-figure {
  padding: 20px;
  animation: rise 820ms ease 90ms both;
}

.hero-figure img {
  width: 100%;
  border-radius: 18px;
}

.hero-figure figcaption {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 54px;
}

.stats-strip article {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: 22px;
  animation: rise 700ms ease both;
}

.stats-strip strong {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  font-size: 2rem;
  color: var(--accent-dark);
}

.stats-strip span {
  color: var(--muted);
  line-height: 1.5;
}

.content-grid {
  margin-bottom: 56px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
}

.prose-card,
.list-card,
.code-card,
.figure-card {
  padding: 26px;
}

.prose-card p,
.list-card li,
.caption {
  color: var(--muted);
  line-height: 1.8;
}

.prose-card p:first-child,
.caption {
  margin-top: 0;
}

.prose-card p:last-child {
  margin-bottom: 0;
}

.figure-card img {
  width: 100%;
  border-radius: 18px;
  margin-bottom: 12px;
}

.callout-grid,
.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.callout {
  padding: 22px;
  border-radius: 24px;
}

.callout h3,
.list-card h3 {
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.callout p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.list-card ul {
  margin: 0;
  padding-left: 18px;
}

.code-card {
  background: rgba(30, 35, 41, 0.96);
  color: #f3f0ea;
}

.code-card pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  line-height: 1.6;
}

.wide {
  width: 100%;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .stats-strip,
  .two-column,
  .callout-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    padding-top: 14px;
  }

  .hero-copy,
  .hero-figure,
  .prose-card,
  .list-card,
  .code-card,
  .figure-card {
    padding: 20px;
    border-radius: 24px;
  }

  .button {
    width: 100%;
  }

  .logo-row {
    flex-wrap: wrap;
  }
}
