* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background-color: var(--color-surface);
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  margin: 0;
  background-color: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  text-rendering: optimizeLegibility;
}

main,
.footer {
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration-thickness: var(--border-thin);
  text-underline-offset: var(--space-1);
}

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

:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  line-height: var(--leading-tight);
}

.section {
  padding-block: var(--space-section);
  background-color: var(--color-surface);
}

.section[data-surface="dark"] {
  background-color: var(--color-surface-dark);
  color: var(--color-text-on-dark);
}

.section[data-surface="alt"] {
  background-color: var(--color-surface-alt);
}

.section[data-density="compact"] {
  padding-block: var(--space-12);
}

.container {
  width: min(100%, var(--width-content));
  margin-inline: auto;
  padding-inline: var(--space-gutter);
}

.container[data-width="prose"] {
  max-width: var(--width-prose);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.stack[data-gap="tight"] {
  gap: var(--space-3);
}

.stack[data-gap="loose"] {
  gap: var(--space-10);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.row[data-justify="between"] {
  justify-content: space-between;
}

.nav {
  min-height: var(--nav-height);
  border-bottom: var(--border-thin) solid var(--color-border);
  background-color: var(--color-surface);
}

.nav > .container > .row {
  min-height: var(--nav-height);
}

.nav__brand {
  min-height: var(--tap-target-min);
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}

.nav__icon {
  width: var(--icon-size-small);
  height: var(--icon-size-small);
}

.nav__links {
  font-size: var(--text-sm);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--col-min), 100%), 1fr));
  gap: var(--space-12);
  align-items: center;
}

.eyebrow {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.section[data-surface="dark"] .eyebrow,
.section[data-surface="dark"] .lede {
  color: var(--color-text-muted-on-dark);
}

.display {
  max-width: var(--width-prose);
  font-size: var(--display-md);
  letter-spacing: -0.04em;
}

.lede {
  max-width: var(--width-prose);
  color: var(--color-text-muted);
  font-size: var(--text-xl);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--col-min), 100%), 1fr));
  gap: var(--space-6);
}

.card {
  padding: var(--card-padding);
  border: var(--card-border);
  border-radius: var(--card-radius);
  background-color: var(--color-card);
}

.card h2 {
  font-size: var(--text-2xl);
}

.card p {
  color: var(--color-text-muted);
}

.footer {
  padding-block: var(--space-8);
  border-top: var(--border-thin) solid var(--color-border-dark);
  background-color: var(--color-surface-dark);
  color: var(--color-text-muted-on-dark);
  font-size: var(--text-sm);
}

.footer a {
  color: var(--color-text-on-dark);
}

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