/*
 * Farewell Tour 2027: shared base styles for / (landing) and /presale.
 * Tokens (official PSD swatches), reset, paper background, screen-reader + focus utilities.
 */
:root {
  /* Official PSD swatches */
  --bg: #4d4842;
  --green: #d7e33b;
  --cream: #ede1c8;
  --cream-dim: rgba(237, 225, 200, 0.78); /* 0.78 keeps >= 4.5:1 (WCAG AA) on the lightest texture */
  --rule: rgba(237, 225, 200, 0.16);
  --ink: #1f1b17;
  /* Average colour of the rendered paper texture. Used as the plain page colour, because Safari
     (iOS 26+) tints its status bar and toolbar from it and can't use the texture image.
     Keep in sync with <meta name="theme-color"> in each page. */
  --bg-edge: #3d352d;
  --font: 'Normal TM', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; background-color: var(--bg-edge); }

/* Page colour goes on <html> only. If <body> also had a background, it would stop propagating
   to the canvas and paint as a solid box over the z-index:-1 texture below. */
body {
  min-height: 100vh;
  color: var(--cream);
  font-family: var(--font);
  line-height: 1.1;
  -webkit-font-smoothing: antialiased;
}
/* Paper background, pinned behind the content (works on iOS, unlike background-attachment: fixed).
   Two layers split from the PSD background export:
     bg-grain  sharp seamless grain tile, overlay-blended (128 grey = neutral), drawn at 2 tile px per CSS px
     bg-folds  soft folds/creases/tone only, so it can be tiny and stretched without looking worse */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100lvh; /* large viewport: reaches under Safari's floating toolbar, so no flat band shows there */
  z-index: -1;
  background-color: var(--bg-edge);
  background-image: url('/images/farewell/bg-grain.webp'), url('/images/farewell/bg-folds.webp');
  background-size: 256px 256px, cover;
  background-position: 0 0, center;
  background-repeat: repeat, no-repeat;
  background-blend-mode: overlay, normal;
}

/* Visible to screen readers only */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* Worn print texture: soft ink-noise mask for live text (matches the printed poster) */
:root { --worn-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.5' numOctaves='3' stitchTiles='stitch' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -1 1.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E"); }
