*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

input,
select,
textarea {
  width: 100%;
  height: 42px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  padding: 9px 16px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-accent);
  background: var(--color-surface);
}

label {
  display: grid;
  gap: var(--space-2);
  color: var(--color-text-secondary);
  font-size: var(--text-body-sm);
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.text-display {
  font-size: var(--text-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-h1 {
  font-size: var(--text-h1);
  line-height: 1.2;
}

.text-h2 {
  font-size: var(--text-h2);
  line-height: 1.2;
}

.text-h3 {
  font-size: var(--text-h3);
  line-height: 1.2;
}

.text-body-sm {
  font-size: var(--text-body-sm);
}

.text-caption {
  font-size: var(--text-caption);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-tertiary {
  color: var(--color-text-tertiary);
}

.text-metric {
  font-family: var(--font-mono);
  font-size: var(--text-metric);
  line-height: 1;
}

.section {
  padding: var(--space-16) 0;
}

.section-alt {
  background: var(--color-bg-secondary);
}

.grid {
  display: grid;
  gap: var(--space-6);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 767px) {
  .section {
    padding: var(--space-8) 0;
  }
}
