:root {
  --wall: #1b1714; --wall2: #241e1a; --cream: #efe3c8; --oat: #d9c9a3; --red: #8a1d29; --gold: #c4912c; --ink: #2b231d;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { background: var(--wall); }
body {
  margin: 0; color: var(--cream); font-family: var(--serif); min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 50% -120px, rgba(255, 214, 160, .10), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.012) 0 2px, transparent 2px 7px),
    linear-gradient(var(--wall2), var(--wall) 600px);
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
/* the page never slides sideways: clip both the root and the body (clip, unlike hidden, makes neither a scroll box, so
   vertical scrolling, the sticky page bar and the gestures are untouched); browsers without clip keep the body's hidden */
@supports (overflow: clip) { html, body { overflow-x: clip; } }
a { color: inherit; }
.vh, .tt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ woven tags: the buttons of this world */
.tag {
  display: inline-block; font: 600 12px/1 var(--serif); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); padding: 9px 14px 8px; border: 0; cursor: pointer; position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.05) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 1px, transparent 1px 3px),
    var(--cream);
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 3px 8px rgba(0,0,0,.45);
}
.tag::after { content: ""; position: absolute; inset: 3px; border: 1px dashed rgba(138, 29, 41, .55); pointer-events: none; }
.tag:hover, .tag:focus-visible { background-color: #fff3da; outline: none; }
.tag:focus-visible::after { border-color: var(--red); border-style: solid; }

#top { position: absolute; top: 0; right: 0; z-index: 5; padding: 14px clamp(10px, 3vw, 60px) 0 0; }
#top nav { display: flex; gap: 10px; }
#top .tag:nth-child(1) { transform: rotate(-1.5deg); }
#top .tag:nth-child(2) { transform: rotate(1.2deg); background-color: #e9d6ac; }
#top .tag:nth-child(3) { transform: rotate(-.8deg); background-color: #dfe3cf; }
#snd[aria-pressed="true"] { background-color: #c4912c; color: #1b1714; }
#snd[aria-pressed="true"]::after { border-color: rgba(27, 23, 20, .6); }
#idxfix { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 6; transform: rotate(-2deg); opacity: 0; pointer-events: none; transition: opacity .25s; }
body.scrolled #idxfix { opacity: 1; pointer-events: auto; }
body.open #idxfix, body.open #top { display: none; }

/* ------------------------------------------------------------ the scarves */
body { padding-top: 64px; }
#knit { position: relative; display: block; transition: opacity .3s; }
body.booting #knit { opacity: 0; }
.scarf { position: absolute; top: 0; }
.scarf::before { /* the shadow the scarf casts on the wall */
  content: ""; position: absolute; left: 4%; right: 2%; top: 10px; bottom: 0; background: rgba(0,0,0,.35);
  filter: blur(14px); transform: translate(10px, 12px); z-index: -1; pointer-events: none;
}
.needle {
  position: absolute; z-index: 2; left: -26px; right: -34px; top: -7px; height: 9px; border-radius: 5px 9px 9px 5px;
  background: linear-gradient(#e7c08a, #b98447 45%, #7a4f23); box-shadow: 0 5px 8px rgba(0,0,0,.5);
  clip-path: polygon(0 50%, 18px 0, 100% 0, 100% 100%, 18px 100%);
}
.needle::after { content: ""; position: absolute; right: -2px; top: -5px; width: 19px; height: 19px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e9c99a, #9c6630 60%, #5e3a17); }
.seg { position: relative; display: block; }
#knit .hit, .seg { touch-action: pan-y; }
.seg canvas { display: block; position: relative; }
#knit .hit { position: absolute; display: block; text-decoration: none; outline: none; cursor: pointer; z-index: 1; }
#knit .hit:focus-visible { box-shadow: 0 0 0 3px var(--gold), 0 0 0 6px rgba(0,0,0,.6); }
.tugging, .tugging * { cursor: grabbing !important; }

/* the woven label sewn onto each picture: the client */
.label {
  position: absolute; right: 9%; transform: rotate(-1.6deg); z-index: 2;
  font: 600 9.5px/1 var(--serif); letter-spacing: .2em; text-transform: uppercase; color: var(--cream); white-space: nowrap;
  padding: 6px 9px 5px; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.07) 0 1px, transparent 1px 2px),
    #1f1b18;
  box-shadow: 0 2px 4px rgba(0,0,0,.55);
}
.label::before, .label::after { content: ""; position: absolute; top: 2px; bottom: 2px; width: 2px;
  background: repeating-linear-gradient(transparent 0 2px, rgba(239,227,200,.65) 2px 4px); }
.label::before { left: 2px; } .label::after { right: 2px; }
.hit .label { transition: opacity .4s; }
.hit:not(.knitted) .label { opacity: 0; }
.label.resewn { animation: resew .7s ease-out; }
@keyframes resew { 0% { transform: rotate(-1.6deg) scale(1.25); background-color: #7b1c27; } 100% { transform: rotate(-1.6deg); } }
body.nolabels .label, body.nolabels #top, body.nolabels #idxfix { display: none; }
.hit.robot .label::after { background: repeating-linear-gradient(transparent 0 2px, #c6e04a 2px 4px); }

/* choosing a panel: it lifts off toward you, the rest of the room dims */
.seg { transition: transform .34s cubic-bezier(.2,.8,.2,1), filter .34s; }
body.leaving .seg:not(.chosen), body.leaving .hit .label { filter: brightness(.45); }
body.leaving .seg.chosen { transform: scale(1.05) translateY(-6px); filter: drop-shadow(0 18px 24px rgba(0,0,0,.6)); z-index: 3; }

/* ------------------------------------------------------------ a page */
body.open #knit { display: none; }
body.open { padding-top: 0; }
#page { position: relative; min-height: 100vh; padding: 0 0 80px; transition: opacity .18s; }
#page.fade { opacity: 0; }
.pbar { position: sticky; top: 0; z-index: 4; display: flex; justify-content: space-between; padding: 12px clamp(10px, 3vw, 40px); pointer-events: none; }
.pbar .tag { pointer-events: auto; }
.pbar .tag:first-child { transform: rotate(-1.2deg); }
.pbar .tag:last-child { transform: rotate(1.4deg); }
.stage { display: flex; justify-content: center; padding: 8px 10px 0; position: relative; }
.stage::after { content: ""; position: absolute; left: 50%; top: 8px; width: min(1100px, 92vw); height: 70%; transform: translate(-46%, 18px);
  background: rgba(0,0,0,.4); filter: blur(22px); z-index: -1; }
.seg.big .needle { display: none; }
.sheet { max-width: 780px; margin: 0 auto; padding: 22px 20px 0; }
.cap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 10px 0 8px; }
.cap h1 { font: 600 clamp(30px, 5vw, 52px)/1.04 var(--serif); margin: 0; letter-spacing: -.01em; outline: none; }
.label.big { position: relative; right: auto; font-size: 11px; padding: 8px 12px 7px; }
.lede { font: 400 clamp(18px, 2.2vw, 21px)/1.5 var(--serif); color: #e9dcc0; margin: 14px 0 18px; }
.care { margin: 0 0 26px; padding: 14px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 18px;
  font: 400 13.5px/1.4 var(--serif); color: #d8c9aa; border: 1px dashed rgba(239,227,200,.28); background: rgba(255,255,255,.02); }
.care dt { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 10.5px; color: var(--oat); }
.care dd { margin: 2px 0 0; }
.sec { margin: 30px 0; }
.sec h2 { font: 600 22px/1.2 var(--serif); margin: 0 0 8px; }
.sec .txt { font: 400 17px/1.55 var(--serif); color: #ddd0b4; margin: 0 0 14px; }
.films { display: grid; gap: 18px; }
.films.vertical { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.film { margin: 0; }
.film .frame { position: relative; aspect-ratio: 16/9; background: #0d0b0a; overflow: hidden; box-shadow: 0 8px 22px rgba(0,0,0,.45); }
.films.vertical .frame { aspect-ratio: 9/16; }
.film .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film .play { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.film .play .pb { width: 66px; height: 66px; border-radius: 50%; background: rgba(239,227,200,.92); box-shadow: 0 4px 14px rgba(0,0,0,.5); position: relative; transition: transform .15s; }
.film .play .pb::after { content: ""; position: absolute; left: 26px; top: 20px; border-left: 20px solid var(--red); border-top: 13px solid transparent; border-bottom: 13px solid transparent; }
.film .play:hover .pb, .film .play:focus-visible .pb { transform: scale(1.08); }
.film .play:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.film figcaption { font: 400 14px/1.3 var(--serif); color: #cdbd9c; margin-top: 7px; }
.group { display: grid; gap: 12px; margin: 12px 0; }
.group.row-2 { grid-template-columns: 1fr 1fr; } .group.row-3 { grid-template-columns: repeat(3, 1fr); }
.shot { margin: 0; } .shot img { width: 100%; height: auto; display: block; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.radio { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.spot { display: grid; grid-template-columns: 44px 1fr auto; grid-template-rows: auto auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border: 1px dashed rgba(239,227,200,.25); }
.spot .pp { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cream); cursor: pointer; position: relative; }
.spot .pp::after { content: ""; position: absolute; left: 17px; top: 13px; border-left: 14px solid var(--red); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.spot.on .pp::after { left: 15px; top: 14px; width: 4px; height: 16px; border: 0; border-left: 4px solid var(--red); border-right: 4px solid var(--red); background: transparent; width: 14px; box-sizing: border-box; }
.spot .t { font: 600 15px/1.2 var(--serif); } .spot .time { font: 400 13px/1 var(--serif); color: #bfae8c; }
.spot .bar { grid-column: 2 / 4; height: 8px; background: rgba(239,227,200,.15); cursor: pointer; position: relative; }
.spot .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold); width: 0; }
.spot audio { display: none; }
.pn { display: flex; justify-content: space-between; gap: 12px; margin-top: 46px; border-top: 1px dashed rgba(239,227,200,.25); padding-top: 18px; }
.pn a { text-decoration: none; display: grid; gap: 4px; max-width: 48%; }
.pn a:last-child { text-align: right; }
.pn small { font: 600 10.5px/1 var(--serif); letter-spacing: .18em; text-transform: uppercase; color: var(--oat); }
.pn span { font: 600 19px/1.2 var(--serif); }
.pn a:hover span, .pn a:focus-visible span { text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 4px; }
.contact { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 400 16px/1.4 var(--serif); }
.xp { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.xp li { display: grid; grid-template-columns: 150px 1fr; gap: 2px 16px; padding-bottom: 12px; border-bottom: 1px dashed rgba(239,227,200,.18); }
.xp .d { font: 400 12px/1.6 var(--serif); letter-spacing: .1em; color: var(--oat); grid-row: 1 / 3; }
.xp .r { font: 600 16px/1.3 var(--serif); } .xp .r em { font-style: normal; font-weight: 400; color: #cdbd9c; margin-left: 8px; font-size: 13px; letter-spacing: .12em; }
.xp .x { font: 400 14.5px/1.45 var(--serif); color: #d6c8aa; }

/* ------------------------------------------------------------ the index: a pattern book */
#idx { position: fixed; inset: 0; z-index: 10; background: rgba(14, 11, 9, .72); overflow-y: auto; opacity: 0; transition: opacity .2s; padding: 26px 12px 60px; }
#idx.in { opacity: 1; }
.book { max-width: 1040px; margin: 0 auto; position: relative; color: var(--ink); padding: 26px clamp(14px, 3vw, 34px) 30px;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.025) 0 1px, transparent 1px 3px), #eadfc6; box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.book h2 { font: 600 30px/1 var(--serif); margin: 0 0 18px; letter-spacing: .01em; }
.book ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 18px; }
.book a { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; text-decoration: none; padding: 4px; }
.book a:hover, .book a:focus-visible { background: rgba(138, 29, 41, .09); outline: none; }
.book a:focus-visible { box-shadow: 0 0 0 2px var(--red); }
.book .sw { width: 96px; height: auto; aspect-ratio: 80 / 43.2; display: block; background: #d6c8a8; }
.book .sw.mark { background: var(--red); position: relative; }
.book .sw.mark::after { content: "MH"; position: absolute; inset: 0; display: grid; place-items: center; font: 600 18px/1 var(--serif); color: var(--cream); letter-spacing: .1em; }
.book .tx { display: grid; gap: 3px; }
.book .n { font: 600 15.5px/1.2 var(--serif); }
.book .c { font: 600 9.5px/1.2 var(--serif); letter-spacing: .18em; text-transform: uppercase; color: #7a6a52; }
.book .shut { position: absolute; top: 18px; right: 18px; }

@media (max-width: 640px) {
  body { padding-top: 58px; }
  #top { padding-top: 10px; }
  .needle { left: -6px; right: -6px; }
  .needle::after { right: 0; width: 15px; height: 15px; top: -3px; }
  .scarf::before { right: 3%; transform: translate(5px, 10px); }
  .label { font-size: 8.5px; padding: 5px 7px 4px; }
  .group.row-3 { grid-template-columns: 1fr 1fr; }
  .xp li { grid-template-columns: 1fr; } .xp .d { grid-row: auto; }
  .book a { grid-template-columns: 80px 1fr; } .book .sw { width: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .seg, #page, #idx, .hit .label { transition: opacity .4s; }
.hit:not(.knitted) .label { opacity: 0; }
.label.resewn { transition: none !important; animation: none !important; }
}
