/* Base: reset, typography, layout, and the fixed photo the page scrolls over. Values from tokens.css. */

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--space-4)); background: var(--bb-paper); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  min-height: 100vh;
  background: transparent;          /* lets the fixed .site-bg show between panels */
  color: var(--bb-ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--step-0);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

/* Fixed, pre-blurred black-and-white workshop photo, washed toward Paper. The page scrolls over it.
   A fixed element (not background-attachment: fixed) so it also works on iPhone.
   STOCK PHOTO, atmosphere only: Unsplash / Heng Yin. Replace assets/img/bg-workshop.webp with
   our own shop photo later (same filename, ~960px wide, black and white, blurred).
   Panels are opaque, so the photo only shows in the .window gaps between sections. */
.site-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(rgb(243 242 242 / 0.30), rgb(243 242 242 / 0.40)),
    url("../img/bg-workshop.webp") center / cover no-repeat,
    var(--bb-paper);
}

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 900;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-head);
  color: var(--bb-ink);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 800; letter-spacing: -0.01em; }
p, li { max-width: var(--measure); text-wrap: pretty; }
strong { font-weight: 600; }

a { color: var(--bb-ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--bb-walnut); }
a:hover { color: var(--bb-walnut); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--bb-ink); color: var(--bb-paper); }

/* Layout */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.stack > * + * { margin-top: var(--space-4); }

/* Panels: solid slabs that slide over the fixed photo, separated by 2px ink rules */
.panel       { background: var(--bb-paper); border-top: var(--bb-rule); }
.panel--ash  { background: var(--bb-ash);   border-top: var(--bb-rule); }
.panel--ink  { background: var(--bb-ink);   color: var(--bb-ash); border-top: var(--bb-rule); }
.panel--ink :is(h1, h2, h3) { color: var(--bb-paper); }
.panel--ink a:not(.btn) { color: var(--bb-ash); text-decoration-color: var(--bb-tan); }
.panel--ink .lead, .panel--ink .text-dim { color: #CFC7BC; }
.panel--ink .eyebrow { color: var(--bb-tan); }
.panel--ink .eyebrow::before { background: var(--bb-tan); }
/* A window: the gap between panels where the photo shows through */
.window { height: clamp(4rem, 10vw, 9rem); border-top: var(--bb-rule); }

/* Equal-column grid with visible rules */
.grid { display: grid; gap: var(--space-6); }
@media (min-width: 48rem) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(3, 1fr); } }
.ruled { display: grid; border-top: var(--bb-rule); }
.ruled > * { padding: var(--space-6) 0; border-bottom: var(--bb-hair); }
@media (min-width: 48rem) {
  .ruled--3 { grid-template-columns: repeat(3, 1fr); }
  .ruled--3 > * { padding: var(--space-6) var(--space-6) var(--space-6) 0; border-bottom: 0; }
  .ruled--3 > * + * { padding-left: var(--space-6); border-left: var(--bb-hair); }
}
.panel--ink .ruled { border-top-color: var(--bb-ash); }
.panel--ink .ruled > * { border-color: rgb(232 224 213 / 0.2); }

.section-head { max-width: 48rem; margin-bottom: var(--space-7); }
.section-head > * + * { margin-top: var(--space-4); }

/* Small caps label (700, wide tracking) with a short walnut rule */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-size: var(--step--1); font-weight: 700; line-height: var(--leading-body); letter-spacing: var(--tracking-caps); text-transform: uppercase;
  color: var(--bb-walnut);
}
.eyebrow::before { content: ""; width: 1.75rem; height: 2px; background: var(--bb-walnut); flex: none; }

.lead { font-size: var(--step-1); color: var(--bb-muted); line-height: 1.5; font-weight: 400; }
.text-dim { color: var(--bb-muted); }

/* Utilities */
.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;
}
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--bb-ink); color: var(--bb-paper); padding: var(--space-3) var(--space-4); font-weight: 700;
}
.skip-link:focus { top: var(--space-3); color: var(--bb-paper); }

/* Scroll reveal: visible by default; only animates when JS is on and motion is allowed */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
