/* Old Mill Textiles — LOT & SHADE
   Dyehouse shade book. Ground colour is driven by scroll position (--dye).
   Seed 8d41535f. */

:root {
  /* dye lots */
  --dye-01: #5A3620;  /* hamilton brown */
  --dye-02: #2C3A55;  /* indigo */
  --dye-03: #4A5230;  /* olive drab */
  --dye-04: #6B2733;  /* oxblood */
  --dye-05: #2B2B29;  /* charcoal */
  --dye-06: #7A4522;  /* duck */
  --dye-07: #1F3B34;  /* spruce */
  --dye-08: #8A2E10;  /* deep rust */

  --bone:   #EFE9DC;
  --bone-2: #D9D0BE;
  --ink:    #16150F;
  --signal: #E8541F;
  --signal-ink: #A8330D;  /* signal, darkened for use on bone */

  /* live ground, updated by script.js */
  --dye: var(--dye-01);
  --ink-on-dye: var(--bone);

  --rail-w: 132px;
  --gutter: clamp(20px, 4vw, 64px);
  --measure: 68ch;

  --ease: cubic-bezier(.16, .84, .3, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--dye-01);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--dye-a, #5A3620);
  color: var(--bone);
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color 120ms linear;
}

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

/* ---- browser surfaces ---- */
::selection { background: var(--signal); color: var(--bone); }
:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
  border-radius: 1px;
}
html { scrollbar-color: var(--bone-2) rgba(0,0,0,.35); scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,.35); }
::-webkit-scrollbar-thumb { background: var(--bone-2); }
::-webkit-scrollbar-thumb:hover { background: var(--bone); }
.num, table td, table th { font-variant-numeric: tabular-nums; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--bone); color: var(--ink);
  padding: 12px 18px; font-weight: 700;
}
.skip:focus { left: 12px; top: 12px; }

.vh {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- the vat: dye grounds, flood front, dip and cloth ---- */
.vat { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.vat > span { position: absolute; inset: 0; display: block; }

/* outgoing dye */
.vat__a { background: var(--dye-a, #5A3620); }

/* incoming dye floods up from the bottom on a soft, uneven wet edge */
.vat__b {
  background: var(--dye-b, #5A3620);
  transform: translateY(calc(100% - var(--flood, 0%)));
  will-change: transform;
  -webkit-mask-image: linear-gradient(to top, #000 0 82%, rgba(0,0,0,.72) 90%, transparent 100%);
          mask-image: linear-gradient(to top, #000 0 82%, rgba(0,0,0,.72) 90%, transparent 100%);
}

/* dip: cloth sits darker where it hung longest in the vat */
.vat__dip {
  background:
    linear-gradient(to bottom, rgba(0,0,0,.34) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 62%, rgba(0,0,0,.30) 100%),
    radial-gradient(120% 80% at 22% 8%, rgba(255,255,255,.045) 0%, transparent 62%);
}

/* woven cloth: fibre noise, not a tiled dot grid */
.vat__cloth {
  opacity: .34;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27220%27 height=%27220%27%3E%3Cfilter id=%27f%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%270.7 1.25%27 numOctaves=%274%27 stitchTiles=%27stitch%27/%3E%3CfeColorMatrix type=%27saturate%27 values=%270%27/%3E%3C/filter%3E%3Crect width=%27220%27 height=%27220%27 filter=%27url(%23f)%27/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ---- typography ---- */
.display {
  font-family: 'Big Shoulders Display', 'Archivo', Impact, sans-serif;
  font-weight: 800;
  line-height: .88;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: balance;
  margin: 0;
}
.display--xl { font-size: clamp(46px, 8.2vw, 96px); }
.display--lg { font-size: clamp(36px, 5.4vw, 68px); }
.display--sm { font-size: clamp(21px, 2.1vw, 27px); letter-spacing: 0; line-height: .95; }

.lede {
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.5;
  max-width: 46ch;
  margin: 0;
  color: color-mix(in srgb, var(--bone) 97%, transparent);
  text-wrap: pretty;
}
.lede--wide { max-width: 62ch; }

.fine {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  color: color-mix(in srgb, var(--bone) 92%, transparent);
  max-width: 52ch;
}

.stamp {
  display: inline-block;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bone);
  border: 1px solid color-mix(in srgb, var(--bone) 45%, transparent);
  padding: 7px 12px;
}

/* ---- lot rail: a dye strip you navigate by shade ---- */
.rail {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--rail-w);
  z-index: 30;
  display: flex; align-items: center;
  padding-left: 26px;
  pointer-events: none;
}
/* the bone spine the chips are mounted on */
.rail__strip {
  position: absolute;
  left: 26px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 336px;
  background: color-mix(in srgb, var(--bone) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--bone) 26%, transparent);
}
/* exact scroll position along the strip */
.rail__travel {
  position: absolute;
  left: 18px; top: calc(50% - 168px + (336px * var(--progress, 0)));
  width: 31px; height: 2px;
  background: var(--bone);
  box-shadow: 0 0 0 1px rgba(0,0,0,.45);
  transition: top 90ms linear;
  pointer-events: none;
}
.rail__list {
  list-style: none; margin: 0; padding: 0;
  position: relative;
  display: flex; flex-direction: column; gap: 1px;
  pointer-events: auto;
}
.rail__list a {
  position: relative;
  display: flex; align-items: center;
  text-decoration: none;
  min-height: 44px;
  padding: 0;
}
/* the dye chip itself */
.rail__chip {
  display: block;
  width: 31px; height: 41px;
  background: var(--c);
  border: 1px solid rgba(0,0,0,.45);
  outline: 1px solid color-mix(in srgb, var(--bone) 18%, transparent);
  outline-offset: -1px;
  /* clip rather than resize: the chip box never reflows */
  clip-path: inset(0 16px 0 0);
  transition: clip-path 280ms var(--ease), box-shadow 280ms var(--ease);
}
.rail__list a:hover .rail__chip { clip-path: inset(0 6px 0 0); }
.rail__list a[aria-current="true"] .rail__chip {
  clip-path: inset(0 0 0 0);
  box-shadow: 0 3px 10px rgba(0,0,0,.45);
}
/* lot name rides out on a bone plate, legible on every ground */
.rail__tag {
  position: absolute; left: 38px;
  display: flex; align-items: baseline; gap: 7px;
  white-space: nowrap;
  background: var(--bone); color: var(--ink);
  padding: 5px 9px 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  opacity: 0; transform: translateX(-6px);
  transition: opacity 200ms var(--ease), transform 240ms var(--ease);
  pointer-events: none;
}
.rail__tag b {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 13px; font-weight: 800; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--signal-ink);
}
.rail__list a:hover .rail__tag,
.rail__list a:focus-visible .rail__tag,
.rail__list a[aria-current="true"] .rail__tag { opacity: 1; transform: none; }

/* ---- masthead ---- */
.masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--dye) 88%, #000);
  border-bottom: 1px solid color-mix(in srgb, var(--bone) 22%, transparent);
  transition: background-color 120ms linear;
}
.mono { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.mono__mk {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900; font-size: 19px; letter-spacing: .06em;
  color: var(--ink);
  background: var(--bone);
  padding: 4px 8px 2px;
}
.mono__nm {
  font-size: 13px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--bone);
}
.masthead__acts { display: flex; gap: 8px; }

/* ---- keys (pressed-travel controls) ---- */
.key {
  --k-shadow: 0 3px 0 rgba(0,0,0,.42), 0 6px 14px rgba(0,0,0,.28);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 17px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,.32);
  box-shadow: var(--k-shadow);
  transition: transform 110ms var(--ease), box-shadow 110ms var(--ease),
              background-color 160ms var(--ease), color 160ms var(--ease);
}
.key--lg { min-height: 56px; padding: 16px 30px; font-size: 21px; }
.key:hover { transform: translateY(1px); box-shadow: 0 2px 0 rgba(0,0,0,.42), 0 4px 10px rgba(0,0,0,.26); }
.key:active { transform: translateY(3px); box-shadow: 0 0 0 rgba(0,0,0,.42), 0 1px 3px rgba(0,0,0,.3); }

.key--signal { background: var(--signal); color: #1A0E06; }
.key--signal:hover { background: #F2661F; }
.key--bone { background: var(--bone); color: var(--ink); }
.key--ink  { background: var(--ink);  color: var(--bone); }
.key--ghost {
  background: transparent; color: var(--bone);
  border: 1px solid color-mix(in srgb, var(--bone) 55%, transparent);
  box-shadow: none;
}
.key--ghost:hover { background: color-mix(in srgb, var(--bone) 16%, transparent); box-shadow: none; transform: translateY(1px); }
.key--ghost:active { transform: translateY(2px); }

.keys { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- lots ---- */
.lot {
  position: relative; z-index: 2;
  padding: clamp(90px, 12vh, 150px) var(--gutter) clamp(90px, 12vh, 150px);
  padding-left: calc(var(--rail-w) + var(--gutter) * .5);
  border-bottom: 1px solid rgba(0,0,0,.28);
}
.lot__inner { max-width: 1240px; margin: 0 auto; }
.lot > .lot__inner > .display + .lede { margin-top: 22px; }
.lot--open { min-height: 100svh; display: flex; align-items: center; padding-top: 118px; }

/* opening */
.open { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr); gap: clamp(28px, 5vw, 72px); align-items: center; width: 100%; }
.open__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.open__copy .display--xl { margin-top: 4px; }

/* ---- plates (lab-dip cards) ---- */
.plate {
  margin: 0;
  background: var(--bone);
  padding: 12px 12px 0;
  border: 1px solid rgba(0,0,0,.35);
  box-shadow: 0 14px 34px rgba(0,0,0,.34);
}
.plate img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: contain;
  background: #fff;
}
.plate figcaption {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 10px 2px 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #4A4335;
  border-top: 1px solid rgba(0,0,0,.16);
  margin-top: 10px;
}
.plate--hero img { aspect-ratio: 3 / 4; }
.plate--tall img { aspect-ratio: 3 / 4; }

/* ---- routes ---- */
.routes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: clamp(18px, 2.4vw, 30px);
  margin-top: 52px;
}
.route { display: flex; flex-direction: column; gap: 16px; }
.route > .plate { order: -1; }
.route p { margin: 0; font-size: 16px; line-height: 1.5; color: color-mix(in srgb, var(--bone) 96%, transparent); }
.route .display--sm { color: var(--bone); }

.spec { margin: 0; display: flex; flex-direction: column; gap: 0; }
.spec > div {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 0;
  border-top: 1px solid color-mix(in srgb, var(--bone) 26%, transparent);
}
.spec dt {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: color-mix(in srgb, var(--bone) 90%, transparent);
  flex: 0 0 auto;
}
.spec dd { margin: 0; font-size: 14px; text-align: right; color: var(--bone); }

/* ---- brands ---- */
.brands { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.brands__copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 18px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  padding: 8px 14px 6px;
}
.tag--on { background: var(--bone); color: var(--ink); }
.tag--off {
  border: 1px dashed color-mix(in srgb, var(--bone) 50%, transparent);
  color: color-mix(in srgb, var(--bone) 94%, transparent);
}

/* ---- checks ---- */
.checks {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid color-mix(in srgb, var(--bone) 30%, transparent);
}
.check {
  padding: 26px 26px 30px 0;
  border-right: 1px solid color-mix(in srgb, var(--bone) 18%, transparent);
}
.check:last-child { border-right: 0; }
.check p { margin: 12px 0 0; font-size: 16px; color: color-mix(in srgb, var(--bone) 96%, transparent); max-width: 34ch; }

/* ---- record / moq tables ---- */
.record, .moq { margin-top: 54px; max-width: 560px; }
.record table, .moq table { width: 100%; border-collapse: collapse; }
.record caption, .moq caption {
  text-align: left;
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 20px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--bone);
  padding-bottom: 10px;
}
.record th, .moq th {
  text-align: left; font-weight: 500; font-size: 15px;
  color: color-mix(in srgb, var(--bone) 95%, transparent);
  padding: 12px 0;
  border-top: 1px solid color-mix(in srgb, var(--bone) 26%, transparent);
}
.record td, .moq td {
  text-align: right; padding: 12px 0;
  border-top: 1px solid color-mix(in srgb, var(--bone) 26%, transparent);
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 30px; font-weight: 800; letter-spacing: .01em;
  color: var(--bone);
  line-height: 1;
}
.moq td { font-size: 22px; }
.record .fine { margin-top: 14px; }

/* ---- shades ---- */
.shades {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
  margin-top: 52px;
}
.shade {
  margin: 0; background: var(--bone);
  border: 1px solid rgba(0,0,0,.35);
  box-shadow: 0 12px 28px rgba(0,0,0,.3);
  padding: 10px 10px 0;
  display: flex; flex-direction: column;
}
.shade img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #fff; }
.shade figcaption {
  display: flex; flex-direction: column; gap: 8px;
  padding: 11px 2px 13px; margin-top: 9px;
  border-top: 1px solid rgba(0,0,0,.16);
}
.shade__nm { font-size: 13px; font-weight: 700; color: var(--ink); }
.shade .num { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #6A6252; }
.chips { display: flex; gap: 4px; }
.chips i { display: block; width: 20px; height: 12px; background: var(--c); border: 1px solid rgba(0,0,0,.3); }

/* ---- steps ---- */
.steps {
  list-style: none; margin: 52px 0 0; padding: 0;
  counter-reset: step;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid color-mix(in srgb, var(--bone) 30%, transparent);
}
.step {
  counter-increment: step;
  padding: 26px 24px 30px 0;
  border-right: 1px solid color-mix(in srgb, var(--bone) 18%, transparent);
}
.step:last-child { border-right: 0; }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 15px; font-weight: 700; letter-spacing: .1em;
  color: var(--signal);
  margin-bottom: 12px;
}
.step p { margin: 11px 0 0; font-size: 16px; color: color-mix(in srgb, var(--bone) 96%, transparent); max-width: 32ch; }

/* ---- questions ---- */
.qa { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.qa__head { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 110px; }
.qa__list { display: flex; flex-direction: column; }
.q { border-top: 1px solid color-mix(in srgb, var(--bone) 28%, transparent); }
.q:last-child { border-bottom: 1px solid color-mix(in srgb, var(--bone) 28%, transparent); }
.q summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 19px 0;
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: clamp(19px, 1.7vw, 23px); font-weight: 700; letter-spacing: .01em;
  text-transform: uppercase; color: var(--bone);
  min-height: 44px;
  transition: color 160ms var(--ease);
}
.q summary::-webkit-details-marker { display: none; }
.q summary::after {
  content: ""; flex: 0 0 auto;
  width: 14px; height: 14px;
  border-right: 2px solid var(--signal); border-bottom: 2px solid var(--signal);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 260ms var(--ease);
}
.q[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.q summary:hover { color: var(--signal); }
.q p {
  margin: 0 0 22px; max-width: 58ch; font-size: 16px;
  color: color-mix(in srgb, var(--bone) 96%, transparent);
}

/* ---- close ---- */
.lot--close .lede { color: color-mix(in srgb, var(--bone) 97%, transparent); }
.close { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.contact {
  margin: 18px 0 0; width: 100%;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0;
  border-top: 1px solid color-mix(in srgb, var(--bone) 34%, transparent);
}
.contact > div { padding: 16px 20px 18px 0; border-right: 1px solid color-mix(in srgb, var(--bone) 20%, transparent); }
.contact > div:last-child { border-right: 0; }
.contact dt {
  font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: color-mix(in srgb, var(--bone) 92%, transparent); margin-bottom: 6px;
}
.contact dd { margin: 0; font-size: 17px; font-weight: 600; color: var(--bone); }
.contact a { color: var(--bone); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.contact a:hover { text-decoration-thickness: 2px; }

/* ---- footer ---- */
.foot {
  position: relative; z-index: 2;
  background: var(--ink); color: var(--bone);
  padding: clamp(48px, 7vh, 76px) var(--gutter) 26px;
  padding-left: calc(var(--rail-w) + var(--gutter) * .5);
}
.foot__inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 34px;
}
.foot__brand .mono__mk { display: inline-block; margin-bottom: 14px; }
.foot__brand p { margin: 0; font-size: 14px; line-height: 1.55; color: color-mix(in srgb, var(--bone) 88%, transparent); max-width: 34ch; }
.foot__nav, .foot__note { display: flex; flex-direction: column; gap: 9px; }
.foot h2 {
  margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--signal);
}
.foot__nav a { color: var(--bone); text-decoration: none; font-size: 15px; }
.foot__nav a:hover { color: var(--signal); }
.foot__note p { margin: 0; font-size: 13px; line-height: 1.5; color: color-mix(in srgb, var(--bone) 88%, transparent); }
.foot__legal {
  max-width: 1240px; margin: 40px auto 0;
  padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--bone) 16%, transparent);
  display: flex; flex-wrap: wrap; gap: 10px 40px; justify-content: space-between;
}
.foot__legal p { margin: 0; font-size: 12px; line-height: 1.5; color: color-mix(in srgb, var(--bone) 82%, transparent); max-width: 88ch; }

/* ---- scroll reveal: visible by default, enhanced only when JS opts in ---- */
.js-motion [data-rise] {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity 720ms var(--ease), transform 720ms var(--ease), filter 720ms var(--ease);
}
.js-motion [data-rise].is-in {
  opacity: 1; transform: none; filter: none;
}

/* ---- responsive ---- */
@media (max-width: 1080px) {
  .open, .brands, .qa { grid-template-columns: 1fr; }
  .qa__head { position: static; }
  .plate--hero, .plate--tall { max-width: 460px; }
  .check, .step { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--bone) 18%, transparent); padding-right: 0; }
  .check:last-child, .step:last-child { border-bottom: 0; }
}

@media (max-width: 760px) {
  :root { --rail-w: 0px; }
  body { font-size: 16px; }
  .rail { display: none; }
  .lot { padding-left: var(--gutter); padding-right: var(--gutter); }
  .foot { padding-left: var(--gutter); }
  .masthead { padding: 11px 16px; }
  .mono__nm { display: none; }
  .lot--open { padding-top: 96px; min-height: auto; }
  .contact > div { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--bone) 20%, transparent); padding-right: 0; }
  .contact > div:last-child { border-bottom: 0; }
  .record td { font-size: 26px; }
  .key--lg { font-size: 19px; padding: 15px 22px; }
  .keys { width: 100%; }
  .keys .key { flex: 1 1 auto; }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .masthead { transition: none; }
  .vat__b { transition: none; }
  .js-motion [data-rise] { opacity: 1; transform: none; filter: none; transition: none; }
  .rail__nm { transition: none; }
  .key { transition: none; }
  .q summary::after { transition: none; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ---- touch targets: every tap target clears 44px ---- */
.mono { min-height: 44px; }
.foot__nav a {
  display: inline-flex; align-items: center;
  min-height: 44px;
}
.foot__nav { gap: 0; }
.contact dd a,
.foot__legal a {
  display: inline-flex; align-items: center;
  min-height: 44px;
}
.q summary { min-height: 48px; }

/* ---- pattern pieces: the paper shapes a cutter works from, drifting behind the content ---- */
.lot { position: relative; }
.lot__inner { position: relative; z-index: 1; }

.lot__pattern {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.lot__pattern svg {
  position: absolute;
  left: var(--px); top: var(--py);
  width: var(--pw); height: auto;
  overflow: visible;
  transform: translate3d(0, calc(var(--sp, 0) * var(--k, 60px)), 0) rotate(var(--pr, 0deg));
  will-change: transform;
}
/* drawn in dark ink, never light: a stroke that only darkens the ground
   cannot reduce contrast for the bone text sitting over it */
.pp-cut, .pp-seam, .pp-fold, .pp-notch, .pp-grain {
  fill: none;
  stroke: #000;
  vector-effect: non-scaling-stroke;
}
/* the piece drafts itself as the section rises: cut line, then seam allowance,
   then fold lines, then the notches and grainline. Scrubbed by scroll, never timed. */
.pp-cut {
  stroke-width: 3.4; opacity: .50;
  stroke-dasharray: 100;
  stroke-dashoffset: calc((1 - var(--dCut, 1)) * 100);
}
.pp-seam {
  stroke-width: 1.8; opacity: .34;
  stroke-dasharray: 100;
  stroke-dashoffset: calc((1 - var(--dSeam, 1)) * 100);
}
.pp-fold {
  stroke-width: 1.6; opacity: .27;
  stroke-dasharray: 100;
  stroke-dashoffset: calc((1 - var(--dFold, 1)) * 100);
}
.pp-notch { stroke-width: 2.6; opacity: calc(var(--dMark, 1) * .44); }
.pp-grain { stroke-width: 1.8; opacity: calc(var(--dMark, 1) * .34); }
.pp-drill {
  fill: none; stroke: #000; stroke-width: 1.7;
  opacity: calc(var(--dMark, 1) * .34);
  vector-effect: non-scaling-stroke;
}

@media (max-width: 760px) {
  /* the flats are already large; on a phone they only need a nudge */
  .lot__pattern svg { width: calc(var(--pw) * 1.15); }
}

@media (prefers-reduced-motion: reduce) {
  /* flats arrive already drafted, no drift */
  .lot__pattern svg { transform: rotate(var(--pr, 0deg)); }
  .pp-cut, .pp-seam, .pp-fold { stroke-dashoffset: 0; }
  .pp-notch { opacity: .44; }
  .pp-grain, .pp-drill { opacity: .34; }
}
