/* Ivrea 1964 — Tokens, Typography & Paper Surface */
:root {
  --paper: #F6F0E2;
  --paper-deep: #ECE3CE;
  --sheet: #FFFDF7;
  --ink: #171614;
  --ink-soft: #4A463F;
  --ink-muted: #767065;
  --red: #D93829;
  --red-dark: #B02619;
  --yellow: #F3BE26;
  --blue: #3A94B8;
  --sage: #2E6F56;
  --rule: #171614;
  --rule-thin: rgba(23, 22, 20, 0.22);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Newsreader', Georgia, serif;
  --font-mono: 'Courier Prime', 'Courier New', monospace;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: url('../assets/paper-grain.webp');
  background-repeat: repeat;
  background-size: 256px 256px;
  overflow-x: hidden;
  position: relative;
}

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

a {
  color: inherit;
}

/* Bichrome Ribbon Background Track */
.ribbon-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.ribbon-stage svg {
  width: 100%;
  height: 100%;
  opacity: 0.92;
}

main, header, footer {
  position: relative;
  z-index: 2;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.ink-stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border: 1.5px solid currentColor;
  transform: rotate(-2deg);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
