/* Work (v5). Every project hangs on a rail, the old rack's motion (rack.js: drag with momentum, coverflow
   angles, a push and an elastic swing on hover), dressed in the homepage's paper, ink and red. A plain list is one
   click away, and is what reduced motion gets. */
/* Georgia, resized to Newsreader's measurements, stands in while Newsreader loads, so the text doesn't jump when it
   arrives (measured from the Latin files with fontTools: width, ascent and descent) */
@font-face { font-family: "Newsreader Fallback"; src: local("Georgia"); size-adjust: 92.2%; ascent-override: 79.72%; descent-override: 28.74%; line-gap-override: 0%; }
@font-face { font-family: "Newsreader Fallback"; font-style: italic; src: local("Georgia Italic"), local("Georgia-Italic"); size-adjust: 84.61%; ascent-override: 86.87%; descent-override: 31.32%; line-gap-override: 0%; }
:root {
  --paper: #F6F6F3; --sheet: #FFFFFF; --ink: #121418; --ink-2: #4A4F57; --hair: rgba(18, 20, 24, .12);
  --red: #E0301E; --red-ink: #C42412;
  --serif: "Newsreader", "Newsreader Fallback", Georgia, serif; --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace; --pen: "Caveat", cursive;
  --g: clamp(16px, 3.4vw, 48px); --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--red); outline-offset: 3px; }
.meta { font: 400 13px/1.4 var(--mono); color: var(--ink-2); }

.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; padding: 0 var(--g); background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.mark { font: italic 500 26px/1 var(--serif); text-decoration: none; padding: 6px 0; }
.mark span { color: var(--red); }
.nav { display: flex; gap: clamp(14px, 2.2vw, 30px); font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; padding: 8px 0; }
.nav a[aria-current] { box-shadow: inset 0 -1.5px 0 currentColor; }
.nav .email { color: var(--red-ink); }

.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 32px; margin: clamp(24px, 4vw, 48px) var(--g) 0; padding-bottom: 14px; border-bottom: 3px solid var(--ink); }
.head h1 { font: italic 600 clamp(64px, 10vw, 150px)/.85 var(--serif); font-variation-settings: "opsz" 72; letter-spacing: -.04em; }
.head .side { display: grid; gap: 12px; justify-items: end; text-align: right; max-width: 30em; }
.head .side p { color: var(--ink-2); }
.views { display: inline-flex; border: 1px solid var(--ink); }
.views button { min-height: 40px; padding: 6px 16px; border: 0; background: transparent; cursor: pointer; font-size: 15px; font-weight: 500; }
.views button + button { border-left: 1px solid var(--ink); }
.views button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
@media (max-width: 640px) { .head .side { justify-items: start; text-align: left; } }

/* ---------- the rack ---------- */
.rack { margin-top: 18px; }
.rail { position: relative; height: 520px; overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline-offset: -3px; }
.rail.is-dragging { cursor: grabbing; }
.rod { position: absolute; left: 0; right: 0; top: 27px; height: 5px; pointer-events: none; background: linear-gradient(#5A5E66, var(--ink) 60%, #000); box-shadow: 0 3px 6px rgba(18, 20, 24, .25); }
.track { position: absolute; top: 16px; left: 0; margin: 0; padding: 0; display: flex; align-items: flex-start; will-change: transform; }
.garment { --w: 240px; --h: 320px; --t: 20px; --slot: 124px; flex: 0 0 var(--slot); height: 500px; position: relative; list-style: none; }
.garment.tier-selected { --w: 200px; --h: 268px; --slot: 108px; }
.hang { position: absolute; top: 0; left: 50%; width: var(--w); margin-left: calc(var(--w) / -2); display: block; transform-origin: 50% 8px; -webkit-user-drag: none; text-decoration: none; }
.hanger { display: block; width: 70%; margin: 0 auto -3px; overflow: visible; }
.hanger path { stroke: var(--ink); stroke-width: 2.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; fill: none; }
.piece { position: relative; display: block; width: var(--w); height: var(--h); transform-style: preserve-3d; filter: drop-shadow(0 22px 18px rgba(18, 20, 24, .22)); }
.face { position: absolute; display: block; }
.f-front { inset: 0; overflow: hidden; backface-visibility: hidden; transform: translateZ(calc(var(--t) / 2)); background: var(--sheet); padding: 8px 8px 0; display: grid; grid-template-rows: 1fr auto; }
.f-front .ph { position: relative; overflow: hidden; background: #E9EAE6; }
.f-front .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.f-front .tt { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 8px 2px 9px; }
.f-front .tt b { font: 500 19px/1.05 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-front .tt i { font: normal 400 11.5px/1 var(--mono); color: var(--ink-2); }
.side-l, .side-r { top: 0; width: var(--t); height: 100%; overflow: hidden; writing-mode: vertical-rl; display: flex; align-items: center; justify-content: space-between; padding: 10px 0; white-space: nowrap; background: var(--ink); color: var(--paper); font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.featured-spine { background: var(--red); }
.side-l { left: 0; transform-origin: left center; transform: translateZ(calc(var(--t) / -2)) rotateY(-90deg); }
.side-r { right: 0; transform-origin: right center; transform: translateZ(calc(var(--t) / -2)) rotateY(90deg); }
.piece .tag { position: absolute; right: 10px; top: calc(100% - 14px); z-index: 2; white-space: nowrap; opacity: 0; transition: opacity .3s; background: var(--sheet); color: var(--red); font: 600 20px/1 var(--pen); padding: 4px 10px 6px; box-shadow: 0 8px 16px -8px rgba(18, 20, 24, .45); rotate: -3deg; }
.garment.is-focus .tag, .hang:hover .tag, .hang:focus-visible .tag { opacity: 1; }
[data-rack-caption] { text-align: center; min-height: 150px; margin: 0 var(--g); padding-top: 6px; }
.cap-title { font: 500 clamp(32px, 3vw, 46px)/1.05 var(--serif); letter-spacing: -.02em; }
.cap-title a { text-decoration: none; }
.cap-title a:hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.cap-sum { margin-top: 8px; color: var(--ink-2); }
.cap-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin-top: 10px; }
.cap-meta a { font: 500 15px/1.4 var(--sans); color: var(--red-ink); text-underline-offset: 4px; }
.hint { text-align: center; margin: 2px var(--g) 0; font-size: 14px; color: var(--ink-2); }

/* ---------- the list ---------- */
.list { display: none; list-style: none; margin: 0 var(--g); padding: 0; }
.rack[data-mode="list"] .rail, .rack[data-mode="list"] [data-rack-caption], .rack[data-mode="list"] .hint { display: none; }
.rack[data-mode="list"] .list { display: block; }
.list a { display: grid; grid-template-columns: 88px minmax(0, 1.1fr) minmax(0, 1.6fr) 13em; gap: 6px 24px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hair); text-decoration: none; }
.list img { width: 88px; height: 60px; object-fit: cover; border-radius: 6px; background: #E9EAE6; }
.list b { font: 500 clamp(21px, 1.9vw, 27px)/1.15 var(--serif); }
.list span { color: var(--ink-2); }
.list i { font-style: normal; text-align: right; }
.list a:hover b { color: var(--red-ink); }
@media (max-width: 760px) { .list a { grid-template-columns: 72px minmax(0, 1fr); } .list img { width: 72px; height: 54px; grid-row: span 3; align-self: start; } .list i { text-align: left; } }
@media (max-width: 700px) {
  .rail { height: 420px; }
  .garment { --w: 190px; --h: 254px; --slot: 100px; height: 400px; }
  .garment.tier-selected { --w: 164px; --h: 220px; --slot: 88px; }
}
footer { display: flex; justify-content: space-between; gap: 12px; padding: 72px var(--g) 40px; color: var(--ink-2); font-size: 14px; }

/* footer links (the site's other pages) */
footer .foot-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
footer a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
footer a:hover { color: var(--red-ink, var(--red)); }

/* shared with Home: skip link, hidden text, the short nav */
.skip { position: absolute; left: 12px; top: -60px; padding: 10px 14px; background: #121418; color: #fff; z-index: 100; }
.skip:focus { top: 12px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) { .nav .hide-s { display: none; } }
/* the four links left from 380 px down: tighter, and under 340 px Writing waits in the page (Home shows it a scroll away) */
@media (max-width: 380px) { .nav { gap: 12px; font-size: 14px; } }
@media (max-width: 340px) { .nav .hide-xs { display: none; } }

/* without JavaScript (or before it decides) the list is the page */
html:not(.js) .rack .rail, html:not(.js) .rack [data-rack-caption], html:not(.js) .rack .hint, html:not(.js) .views { display: none; }
html:not(.js) .rack .list { display: block; }
.cap-meta .meta { align-self: center; }

/* touch: every small link and button gets at least a 24px-tall target (WCAG 2.5.8) without changing how it looks */
footer a { display: inline-block; padding-block: 6px; }
/* very wide screens: the page stops growing at 1760px and sits in the middle */
main, footer { max-width: 1760px; margin-inline: auto; }
.top { padding-inline: max(var(--g), calc((100% - 1760px) / 2 + var(--g))); }   /* lines up with the capped page */
