/* ==========================================================================
   base.css — reset, document defaults, primitives
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text-strong);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

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

::selection {
  background: var(--orange);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Page-wide texture: a static film grain over everything.
   -------------------------------------------------------------------------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.24;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
  animation: grain-drift 8s steps(6) infinite;
}

@keyframes grain-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  20% {
    transform: translate3d(-2%, 1%, 0);
  }
  40% {
    transform: translate3d(1%, -2%, 0);
  }
  60% {
    transform: translate3d(-1%, 2%, 0);
  }
  80% {
    transform: translate3d(2%, 1%, 0);
  }
}

/* Keep scrolling smooth on phones: the grain is static there. */
@media (max-width: 760px) {
  .grain {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Shared typographic utilities
   -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75em;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-faint);
}

.eyebrow::before {
  content: "";
  width: clamp(1.5rem, 3vw, 2.75rem);
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.eyebrow__num {
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 46ch;
}

.body-copy {
  color: var(--text-muted);
  max-width: 52ch;
}

.body-copy strong {
  color: var(--text-strong);
  font-weight: 600;
}

.section-heading {
  font-size: var(--step-4);
  max-width: 13ch;
}

.section-heading em {
  font-style: normal;
  color: var(--orange);
}

.section-heading .heading__aside {
  display: block;
  font-size: 0.52em;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  margin-top: 0.35em;
  font-weight: 600;
}

/* accessible, reusable rules */
.visually-hidden {
  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;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--paper-bright);
  color: var(--ink);
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform var(--dur-1) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Hide reveal animations until JavaScript confirms it can run them. */
html:not(.js) [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
}

html:not(.js) [data-reveal="clip"]::before {
  display: none;
}

html:not(.js) .art-tile {
  opacity: 1;
  transform: none;
  animation: none;
}
