:root {
  --paper: #f8f7f3;
  --ink: #171717;
  --muted: #5d5b57;
  --line: #d6d1c8;
  --panel: #ffffff;
  --accent: #d63c2e;
  --accent-dark: #991f18;
  --blue: #2663a6;
  --green: #356b45;
  --yellow: #b98719;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 247, 243, 0.94);
  backdrop-filter: blur(16px);
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
}

.nav a,
.button,
.link-row a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
}

.nav a:hover,
.button:hover,
.link-row a:hover,
.download-card:hover {
  border-color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 40px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 48px 0 36px;
}

.hero-copy {
  min-width: 0;
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.92;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
}

.intro {
  max-width: 590px;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

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

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

.hero-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-strip img,
.work-card img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: cover;
}

.hero-strip img {
  aspect-ratio: 3 / 2;
}

.hero-strip img:nth-child(1) {
  border-top: 4px solid var(--accent);
}

.hero-strip img:nth-child(2) {
  border-top: 4px solid var(--blue);
}

.hero-strip img:nth-child(3) {
  border-top: 4px solid var(--green);
}

.hero-strip img:nth-child(4) {
  border-top: 4px solid var(--yellow);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

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

.format-grid,
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.download-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.info-panel,
.download-card,
.work-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.info-panel {
  padding: 22px;
}

.info-panel p {
  color: var(--muted);
}

.info-panel p:last-child,
.plain-copy p:last-child {
  margin-bottom: 0;
}

.caution {
  border-top: 4px solid var(--yellow);
}

.download-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  color: var(--muted);
  text-decoration: none;
}

.download-title {
  display: block;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  overflow: hidden;
}

.work-card img {
  aspect-ratio: 3 / 2;
  border-width: 0 0 1px;
}

.work-body {
  padding: 18px;
}

.work-body p {
  color: var(--muted);
  font-size: 14px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-row a {
  color: var(--accent-dark);
}

.section-note {
  max-width: 880px;
  margin: -6px 0 26px;
  color: var(--muted);
  font-size: 16px;
}

.plain-copy ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.plain-copy li {
  margin-bottom: 8px;
}

.plain-copy strong {
  color: var(--ink);
}

.plain-copy pre {
  margin: 0 0 16px;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: #e8e6e1;
  font-size: 13px;
  line-height: 1.6;
}

.plain-copy pre code {
  font-size: inherit;
  overflow-wrap: normal;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin-bottom: 6px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 44px;
  align-items: start;
  padding-bottom: 96px;
}

.plain-copy {
  color: var(--muted);
  font-size: 17px;
}

.plain-copy a {
  color: var(--accent-dark);
  font-weight: 700;
}

@media (max-width: 920px) {
  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .format-grid,
  .download-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero,
  .section {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    padding-top: 34px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  .hero-strip {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  h1 {
    max-width: 340px;
    font-size: 42px;
  }

  .intro {
    max-width: 340px;
    font-size: 18px;
  }
}
