/* Deadwash preview site.
   One idea: a quiet, grainy lookbook (Chrome Hearts restraint) set in raw Times.
   The page ground is the photo studio grey (#f3f3f3) so the product shots melt into it.
   Motion is deliberately small and slow: one loupe, soft fades, nothing that loops. */
:root {
  color-scheme: light;
  --bg: #f3f3f3;
  --paper: #ffffff;
  --ink: #111111;
  --mute: #555555;
  --red: #a8001a;
  --gut: max(4vw, 16px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --serif: "Tinos", "Times New Roman", Times, serif;
  --goth: "UnifrakturMaguntia", "Tinos", serif;
}
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--serif); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
button { font: inherit; color: inherit; }
.caps { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.mute { color: var(--mute); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Preview bar */
.devbar { background: var(--ink); color: var(--bg); text-align: center; padding: 7px var(--gut); }

/* Header */
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px 24px; padding: 16px var(--gut) 14px; }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.top nav a { text-decoration: none; }
.top nav a:hover, .top nav a[aria-current="page"] { text-decoration: underline; }
.top .right { justify-content: flex-end; }
.mark { font-family: var(--goth); font-size: clamp(36px, 3.8vw, 52px); line-height: 1; text-decoration: none; letter-spacing: 0; text-transform: none; }
@media (max-width: 640px) {
  .top { grid-template-columns: 1fr auto; grid-template-areas: "mark mark" "l r"; }
  .top .mark { grid-area: mark; justify-self: center; }
  .top .left { grid-area: l; gap: 6px 16px; }
  .top .right { grid-area: r; }
}

/* Hero: a two-up lookbook spread with a loupe */
.hero { display: grid; grid-template-columns: 1fr 1fr; }
.shot { position: relative; margin: 0; overflow: hidden; transition: --r .7s var(--ease); }
.shot img { width: 100%; height: min(86vh, 62.5vw); object-fit: cover; object-position: 50% 22%; animation: settle 2.6s var(--ease) both; }
/* Under the loupe: the colour photo, gently magnified. */
.shot .c { position: absolute; inset: 0; transform-origin: var(--x, 50%) var(--y, 40%); scale: 1; transition: scale .7s var(--ease); }
.shot.on .c { scale: 1.35; }
.shot .g {
  position: relative;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--x, 50%) var(--y, 40%), transparent 97%, #000 100%);
  mask-image: radial-gradient(circle var(--r) at var(--x, 50%) var(--y, 40%), transparent 97%, #000 100%);
}
.shot::after { content: ""; position: absolute; left: var(--x, 50%); top: var(--y, 40%); width: calc(var(--r) * 2); height: calc(var(--r) * 2); translate: -50% -50%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .7); pointer-events: none; opacity: 0; transition: opacity .5s var(--ease); }
.shot.on::after { opacity: 1; }
@property --r { syntax: "<length>"; inherits: true; initial-value: 0px; }
@media (hover: hover) { .shot { cursor: zoom-in; } }
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  .shot img { height: auto; aspect-ratio: 4 / 5; }
  .shot + .shot { display: none; }
}
@keyframes settle { from { transform: scale(1.03); opacity: .85; } }

/* The status row under the hero */
.bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 28px; padding: 13px var(--gut); border-block: 1px solid var(--ink); }
.bar span { white-space: nowrap; }
[data-countdown] { font-variant-numeric: tabular-nums; }

/* Section frame */
.sec { padding: clamp(48px, 7vw, 104px) var(--gut); }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-bottom: 10px; margin-bottom: 24px; border-bottom: 1px solid var(--ink); }
.head h2 { margin: 0; font: inherit; }

/* Product grid */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 14px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid, .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { display: block; text-decoration: none; }
.ph { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
/* Hover: the back view crossfades in, slowly. */
.ph .alt { position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease); }
.card:hover .alt, .card:focus-visible .alt { opacity: 1; }
.cap { display: grid; gap: 1px; padding-top: 12px; }
.cap .row { display: flex; justify-content: space-between; gap: 12px; }
.card:hover .nm { text-decoration: underline; }
.st { margin-top: 4px; }
/* Scroll: photos fade up once as they arrive (only with JS, so nothing hides without it). */
.js .dev { opacity: 0; transform: translateY(10px); transition: opacity 1.1s var(--ease), transform 1.3s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .dev.in { opacity: 1; transform: none; }

/* Print detail band */
.detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border-block: 1px solid var(--ink); }
.detail img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 5 / 4; }
.detail .txt { padding: clamp(32px, 5vw, 80px) var(--gut); display: flex; flex-direction: column; justify-content: center; gap: 16px; border-left: 1px solid var(--ink); }
.detail p { margin: 0; max-width: 34ch; }
.lede { font-size: clamp(30px, 3vw, 44px); line-height: 1.08; font-style: italic; }
@media (max-width: 760px) { .detail { grid-template-columns: 1fr; } .detail .txt { border-left: 0; border-top: 1px solid var(--ink); } }

/* Made to order */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.how div { border-top: 1px solid var(--ink); padding-top: 12px; }
.how h3 { margin: 0 0 6px; font: 400 13px/1.4 var(--serif); text-transform: uppercase; letter-spacing: .08em; }
.how p { margin: 0; max-width: 34ch; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; gap: 20px; } }

/* Private access */
.list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px 48px; align-items: end; border-top: 1px solid var(--ink); padding-top: 24px; }
.list p { margin: 8px 0 0; max-width: 40ch; }
.big { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; margin: 0; font-weight: 400; }
form.wl { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.fld { flex: 1 1 200px; display: grid; gap: 4px; }
.fld input { font: 16px var(--serif); height: 46px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); }
form.wl .btn { width: auto; min-height: 46px; }
.note { margin: 10px 0 0; }
@media (max-width: 760px) { .list { grid-template-columns: 1fr; } form.wl .btn { width: 100%; } }

/* Footer */
.foot { border-top: 1px solid var(--ink); padding: 24px var(--gut) 30px; display: grid; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot .fine { max-width: 80ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; width: 100%; background: var(--ink); color: var(--bg); border: 1px solid var(--ink); border-radius: 0; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; text-decoration: none; cursor: pointer; transition: background .3s var(--ease); }
.btn:hover { background: #333; }
.btn:disabled { background: #dcdcdc; color: #444; border-color: #c4c4c4; cursor: not-allowed; }

/* Product page */
.crumb { padding: 6px var(--gut) 0; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.pdp { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 28px clamp(24px, 4vw, 64px); padding: 16px var(--gut) clamp(48px, 7vw, 96px); }
.gal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.gal img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--bg); }
.info { position: sticky; top: 16px; align-self: start; display: grid; gap: 18px; }
.info h1 { margin: 0; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; font-weight: 400; text-transform: uppercase; letter-spacing: .04em; }
.price { font-size: 19px; }
.cols { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.cols a { text-decoration: none; }
.cols a[aria-current="true"] { text-decoration: underline; }
.box { border: 1px solid var(--ink); padding: 11px 13px; background: var(--paper); }
fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; width: 100%; display: flex; justify-content: space-between; margin-bottom: 8px; }
.sizes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.sz { height: 46px; border: 1px solid var(--ink); background: var(--paper); border-radius: 0; cursor: pointer; font-size: 14px; transition: background .25s var(--ease), color .25s var(--ease); }
.sz[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.sz:disabled { background: transparent; color: #6b6b6b; border-color: #b5b5b5; text-decoration: line-through; cursor: not-allowed; }
.stock { min-height: 1.5em; margin: 0; }
details { border-top: 1px solid var(--ink); }
details:last-of-type { border-bottom: 1px solid var(--ink); }
summary { cursor: pointer; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; }
details[open] summary::after { content: "\2212"; }
details > div { padding: 0 0 14px; }
details p { margin: 0; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border: 1px solid var(--ink); padding: 6px 8px; text-align: left; white-space: nowrap; }
th { font-weight: 400; text-transform: uppercase; letter-spacing: .06em; font-size: 12.5px; }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; } .info { position: static; } }

/* Bag */
.bag { padding: 12px var(--gut) clamp(48px, 7vw, 96px); display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 32px clamp(24px, 4vw, 64px); align-items: start; }
.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ink); align-items: start; }
.line img { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--ink); margin-top: 8px; }
.qty button { width: 40px; height: 40px; background: var(--paper); border: 0; cursor: pointer; font-size: 18px; }
.qty button:disabled { color: #9a9a9a; cursor: not-allowed; }
.qty span { min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; }
.rm { background: none; border: 0; padding: 0; margin-top: 8px; text-decoration: underline; cursor: pointer; }
.sum { display: grid; gap: 12px; position: sticky; top: 16px; }
.sum .row { display: flex; justify-content: space-between; gap: 12px; }
.err { color: var(--red); margin: 0; min-height: 1.5em; }
@media (max-width: 860px) { .bag { grid-template-columns: 1fr; } .sum { position: static; } }

/* Added-to-bag note */
.toast { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; gap: 16px; align-items: center; background: var(--ink); color: var(--bg); padding: 13px 18px; max-width: calc(100vw - 32px); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.toast.on { opacity: 1; transform: none; pointer-events: auto; }
.toast a { color: var(--bg); }

/* Page to page: a soft crossfade; the product photo carries over from the grid */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; }
.gal img:first-child { view-transition-name: pimg; }

@media (prefers-reduced-motion: reduce) {
  .shot img { animation: none; }
  .shot, .shot .c, .shot::after, .ph .alt, .toast, .btn, .sz { transition: none; }
  .js .dev { opacity: 1; transform: none; transition: none; }
  @view-transition { navigation: none; }
}
