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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-3));
  background: var(--bg-canvas);
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--primary);
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

::selection {
  background: var(--primary-soft);
  color: var(--text-primary);
}

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

h1,
h2,
h3 {
  line-height: 1.1;
  text-wrap: balance;
  overflow-wrap: anywhere;
  hyphens: auto;
}

p,
li,
small,
strong {
  overflow-wrap: anywhere;
}

h1,
.editorial {
  font-family: var(--font-editorial);
  font-weight: 500;
}

h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  letter-spacing: -0.04em;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.015em;
}

p {
  color: var(--text-secondary);
}

.container {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}

.reading-width {
  max-width: var(--reading-width);
}

.section {
  padding-block: clamp(4.5rem, 9vw, 8rem);
}

.section--tight {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 2px;
  height: 1.3rem;
  border-radius: 999px;
  background: currentColor;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: var(--space-2);
  left: var(--space-2);
  transform: translateY(-160%);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: transform var(--motion-fast) var(--easing-standard);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
