/* Self-hosted fonts — DSGVO compliant */
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/syne-500.woff2) format('woff2') }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/syne-600.woff2) format('woff2') }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/syne-700.woff2) format('woff2') }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/syne-800.woff2) format('woff2') }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/inter-400.woff2) format('woff2') }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/inter-500.woff2) format('woff2') }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/inter-600.woff2) format('woff2') }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/jbmono-400.woff2) format('woff2') }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/jbmono-500.woff2) format('woff2') }

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

html {
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--paper);
  background: var(--ink);
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Balanced line breaks — prevents orphans and ugly wrapping */
h1, h2, h3, h4 {
  text-wrap: balance;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--paper);
  font-size: var(--text-sm);
  z-index: 10000;
}

.skip-link:focus {
  top: var(--space-2);
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.pn--accent :focus-visible {
  outline-color: var(--paper);
}

/* Screen reader only */
.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;
}

/* Eyebrow utility */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-8);
}

.eyebrow--accent { color: var(--accent); }

/* Accent utility */
.accent {
  color: var(--accent);
}
