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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-bg);
  background-image:
    radial-gradient(at 80% -10%, rgba(131, 179, 61, 0.08), transparent 50%),
    radial-gradient(at -10% 80%, rgba(61, 76, 244, 0.05), transparent 45%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.15 0 0 0 0 0.1 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 var(--space-4);
  color: var(--color-ink);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }

p { margin: 0 0 var(--space-4); }

em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--color-primary-deep);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease-soft);
}

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

blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.35;
  color: var(--color-primary-deep);
  font-style: italic;
}

ul { padding-left: 1.1em; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
}

.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;
}

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

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