*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Luminance-only grain over chassis surfaces. Alpha stays low: the app uses 11/255. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
}

.bar {
  position: relative;
  min-height: 100vh;
  padding: 12vh 6vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--border-soft);
}

.bar__label {
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-left: var(--rail) solid var(--accent);
  padding-left: 12px;
  margin-bottom: 18px;
}

h1, h2 { font-weight: 500; color: var(--text-strong); line-height: 1.08; margin: 0 0 18px; }
h1 { font-size: clamp(48px, 11vw, 168px); letter-spacing: 0.02em; }
h2 { font-size: clamp(30px, 4.4vw, 62px); }
p { max-width: 62ch; margin: 0 0 16px; }
.lede { font-size: clamp(18px, 2vw, 24px); color: var(--text-strong); }
.dim { color: var(--text-dim); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Site footer: lives after #reel's closing tag, so the loop engine's clone
   step (which only touches elements inside #reel) never touches it. Because
   the wrap fires the instant scroll reaches the bottom of the last real bar,
   this footer sits below the point the loop ever scrolls to; the same five
   legal links are repeated inside bar 9 (.buy__legal) so they stay reachable
   while the loop is running. */
#site-footer {
  padding: 32px 6vw 40px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 13px;
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer__credit {
  margin: 0;
  color: var(--text-dim);
}

#site-footer a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 120ms;
}

#site-footer a:hover,
#site-footer a:focus-visible {
  color: var(--accent);
}

.footer__note {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

@media (max-width: 620px) {
  .footer__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
