:root {
  --bg: #ffffff;
  --bg-elev: #f7f6f3;
  --ink: #0f0f0f;
  --muted: #6b6762;
  --muted-soft: #9b9895;
  --line: rgba(15, 15, 15, 0.10);
  --line-strong: rgba(15, 15, 15, 0.22);
  --orange: #ea580c;
  --orange-deep: #c2410c;
  --max-prose: 44rem;
  --max-layout: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
}

a {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(234, 88, 12, 0.40);
  transition: color 120ms ease, text-decoration-color 120ms ease;
}

a:hover {
  color: var(--orange-deep);
  text-decoration-color: var(--orange-deep);
}

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

::selection {
  background: var(--orange);
  color: #ffffff;
}

/* Layout */

.site-frame {
  width: min(var(--max-layout), calc(100% - 2.5rem));
  margin: 0 auto;
}

.page {
  padding: 3.5rem 0 5rem;
}

/* Header */

.topbar-wrap {
  padding-top: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 0 1.25rem;
}

.brand {
  font-family: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--orange);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.5rem;
}

.nav-links a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.is-current {
  color: var(--ink);
}

.nav-links a.is-current {
  color: var(--orange);
}

/* Hero */

.hero {
  margin: 0 0 4rem;
  max-width: 56rem;
}

.hero h1 {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  max-width: 22ch;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--orange);
}

.lede {
  max-width: 44rem;
  margin: 1.25rem 0 0;
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Sections */

.section {
  margin-top: 4rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.section-head a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.section-head a:hover {
  color: var(--orange);
}

/* Cards */

.card {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}

.card h3 {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  color: var(--ink);
  line-height: 1.25;
}

.card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--orange);
}

.card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.meta-line {
  margin: 0 0 0.4rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-soft);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.3rem;
  border: 1px solid var(--orange);
  background: var(--orange);
  color: #ffffff;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.button:hover {
  background: var(--orange-deep);
  border-color: var(--orange-deep);
  color: #ffffff;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.button.secondary:hover {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

/* CTA card */

.cta-card {
  max-width: var(--max-prose);
  padding: 2rem 0;
  border-top: 1px solid var(--line-strong);
  background: transparent;
}

.cta-card h2 {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.cta-card .lede {
  margin: 0.75rem 0 1.5rem;
  font-size: 1rem;
}

/* Blog grid */

.blog-list {
  display: flex;
  flex-direction: column;
}

/* Article pages */

.article-header {
  max-width: var(--max-prose);
  margin: 0 0 2.5rem;
}

.article-header h1 {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  max-width: 22ch;
}

.article-summary {
  margin: 1.25rem 0 0;
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.55;
}

.article-body {
  max-width: var(--max-prose);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 2.5rem 0 0.85rem;
}

.article-body h2 {
  font-size: 1.6rem;
}

.article-body h3 {
  font-size: 1.25rem;
}

.article-body p {
  margin: 1.1rem 0;
  color: var(--ink);
}

.article-body li {
  color: var(--ink);
  margin: 0.4rem 0;
}

.article-body ul,
.article-body ol {
  padding-left: 1.4rem;
  margin: 1rem 0;
}

.article-body blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--orange);
  color: var(--muted);
  font-style: normal;
}

.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.article-body code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.92em;
  padding: 0.1rem 0.35rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink);
}

.article-body pre {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  overflow-x: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.92rem;
  line-height: 1.6;
}

.article-body pre code {
  padding: 0;
  background: transparent;
  border: 0;
}

.article-cta {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  max-width: var(--max-prose);
}

/* Coming soon */

.coming-soon {
  max-width: var(--max-prose);
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}

/* Legal pages */

.legal-section {
  max-width: var(--max-prose);
  padding: 1.5rem 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-top: 1px solid var(--line);
}

.legal-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.legal-section h2 {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.legal-section p,
.legal-section li {
  color: var(--muted);
}

/* Footer */

.footer-wrap {
  margin-top: 6rem;
  padding: 3rem 0 3rem;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
}

.footer-title {
  margin: 0 0 1rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--orange);
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li + li {
  margin-top: 0.55rem;
}

.footer-list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-list a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted-soft);
}

.footer-bottom a {
  color: var(--muted);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* Responsive */

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section {
    margin-top: 3rem;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .site-frame {
    width: min(var(--max-layout), calc(100% - 1.75rem));
  }

  .page {
    padding: 2.5rem 0 4rem;
  }

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

  .nav-links {
    gap: 1rem;
  }

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