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

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

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition:
    background-color var(--fade) var(--ease),
    color var(--fade) var(--ease);
}

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

a { color: inherit; }

button { font: inherit; cursor: pointer; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

main { display: block; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  text-decoration: none;
  z-index: 9999;
}
.skip-link:focus { left: 16px; top: 16px; outline: 3px solid var(--p3); }

/* Subtle paper grain — covers the whole page so palette shifts feel atmospheric */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  transition: mix-blend-mode var(--fade) var(--ease);
}
body[data-palette="midnight-lager"]::before,
body[data-palette="lic-neon"]::before {
  mix-blend-mode: screen;
  opacity: .12;
}

/* Page-wide wash that gently flushes accent over the whole page during palette change */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 999;
  background: var(--p1);
  opacity: 0;
  mix-blend-mode: soft-light;
  transition: opacity 1400ms var(--ease);
}
body.washing::after { opacity: .22; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    transform .18s cubic-bezier(.2,.7,.2,1),
    box-shadow .18s ease,
    background-color var(--fade) var(--ease),
    color var(--fade) var(--ease),
    border-color var(--fade) var(--ease);
}
.btn:hover  {
  transform: translate(-3px, -3px);
  box-shadow: 4px 4px 0 0 var(--p1);
}
.btn:active { transform: translate(0, 0); box-shadow: 0 0 0 0 var(--p1); }
.btn:focus-visible { outline: 3px solid var(--p3); outline-offset: 3px; }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

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

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 84px);
  line-height: .92;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: -.015em;
}
.section__title .accent           { color: var(--p1); transition: color var(--fade) var(--ease); }
.section__title .accent--p2       { color: var(--p2); }
.section__title .accent--p3       { color: var(--p3); }
.section__title .stroke {
  -webkit-text-stroke: 2px var(--ink);
  color: transparent;
  transition: -webkit-text-stroke-color var(--fade) var(--ease);
}
.section__title .hand {
  font-family: var(--hand);
  font-weight: 600;
  font-style: normal;
  text-transform: none;
  font-size: .55em;
  display: inline-block;
  transform: rotate(-4deg) translateY(-.12em);
  color: var(--p2);
  letter-spacing: 0;
  transition: color var(--fade) var(--ease);
}

.section__meta {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .15em;
  text-transform: uppercase;
  opacity: .7;
}

.notfound {
  padding: 100px 0;
  text-align: center;
}
.notfound__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 80px);
  text-transform: uppercase;
  margin: 0 0 16px;
  color: var(--p1);
}
.notfound__body {
  max-width: 48ch;
  margin: 0 auto 28px;
}
