:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #14171f;
  --muted: #5b6270;
  --border: #e3e6eb;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --radius: 14px;
  --wrap: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1017;
    --surface: #151a23;
    --text: #e8ebf1;
    --muted: #9aa3b2;
    --border: #242b37;
    --accent: #6d9bff;
    --accent-text: #0b1020;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4rem);
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 6px;
  background: var(--accent);
  clip-path: polygon(50% 8%, 96% 88%, 4% 88%);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

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

.site-nav a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

/* Hero */

.hero {
  padding-block: clamp(4rem, 12vw, 8rem);
  max-width: 46rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 1.2rem;
}

.lede {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--muted);
  max-width: 38rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 550;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

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

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-text);
}

/* Sections */

.section {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--border);
}

.prose {
  max-width: 42rem;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 1.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}

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

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.35em;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
}

.site-footer p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

/* Mobile nav */

@media (max-width: 40rem) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1rem;
  }

  .site-nav[data-open="true"] {
    display: flex;
  }

  .site-nav a {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
