/*
 * Colours, fonts and sizes are set from site-data.js (via the editor) as the
 * CSS variables below — the values here are just fallbacks.
 */
:root {
  --bg: #06412f;
  --ink: #f1ede4;
  --ink-dim: color-mix(in srgb, var(--ink) 55%, transparent);
  --font-body: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-heading: var(--font-body);
  --weight-body: 300;
  --size-text: 14px;
  --size-heading: 40px;
  --size-ui: 11px;          /* navigation + player */
  --logo-width: 280px;
  --logo-width-mobile: 39vw;
  --gutter: clamp(16px, 3vw, 28px);
  --chrome: 84px;           /* space kept clear for the fixed nav + player */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: var(--size-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 3px; }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* ---------- background image ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop::before {
  content: "";
  position: absolute;
  inset: calc(var(--bg-blur, 0px) * -2);   /* oversize so blurred edges don't fade in */
  background: var(--bg-image) var(--bg-position, center) / var(--bg-size, cover) var(--bg-repeat, no-repeat);
  filter: blur(var(--bg-blur, 0px));
}

/* tint with the background colour so text stays readable */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: var(--bg-overlay, 0.3);
}

/* ---------- glowing blobs (above the background image, below the content) ---------- */

.blobs {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- pages ---------- */

/*
 * Layers, bottom to top:
 *   background image / blobs (0) → photos, logo (page) → edge fades (1–2) → grain + scanlines (10)
 *   → text blocks (12) → menu + player (14) → photo viewer (15) → contact form, cart (16)
 * The page itself has no z-index, so its text blocks can rise above the grain while the logo stays below.
 */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--chrome) var(--gutter);
}

.page--center { justify-content: center; }
.page--top { justify-content: flex-start; }

.page__inner {
  width: 100%;
  max-width: var(--page-width, 720px);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.page--align-center .page__inner { text-align: center; --justify: center; }
.page--align-left .page__inner { text-align: left; --justify: flex-start; }

/* ---------- blocks ---------- */

.block { margin: 0; }

/* text sits above the grain/scanlines (the logo and photos stay in the page layer) */
.block-heading,
.block-text,
.block-highlights,
.block-links,
.block-shop,
.block-product,
.block-placeholder { z-index: 12; }

.block-logo { will-change: transform; }

.block-logo img {
  display: block;
  width: min(var(--logo-width), var(--logo-width-mobile));
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.page--align-center .block-logo img { margin-inline: auto; }

.logo-text {
  font-family: var(--font-heading);
  font-size: var(--size-heading);
  line-height: 1.1;
}

.block-heading {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.block-heading--large { font-size: min(var(--size-heading), 12vw); }
.block-heading--medium { font-size: max(calc(var(--size-heading) * 0.6), var(--size-text)); }
.block-heading--small { font-size: max(calc(var(--size-heading) * 0.4), var(--size-text)); }

.block-text p { margin: 0 0 1em; }
.block-text p:last-child { margin-bottom: 0; }

.block-image img { display: block; max-width: 100%; height: auto; }
.page--align-center .block-image img { margin-inline: auto; }

.block-links { display: flex; flex-direction: column; gap: 0.5em; align-items: var(--justify); }
.block-links a { text-decoration: none; }
.block-links a:hover { text-decoration: underline; }
.block-links--inline { flex-direction: row; flex-wrap: wrap; gap: 0.5em 1.6em; justify-content: var(--justify); }
.block-links--buttons { flex-direction: row; flex-wrap: wrap; gap: 0.75em; justify-content: var(--justify); }
.block-links--buttons a {
  border: 1px solid var(--ink);
  padding: 0.7em 1.4em;
  transition: background 0.2s, color 0.2s;
}
.block-links--buttons a:hover { background: var(--ink); color: var(--bg); text-decoration: none; }

.block-embed iframe { display: block; width: 100%; border: 0; }

.block-divider { border: 0; border-top: 1px solid var(--ink-dim); width: 100%; }

/* shown only in the editor preview, for blocks that aren't filled in yet */
.block-placeholder {
  border: 1px dashed var(--ink-dim);
  padding: 1.2em;
  font-size: 12px;
  color: var(--ink-dim);
  text-align: center;
}

/* ---------- editorial blocks: label headings, text sizes, logo link ---------- */

html, body { overflow-x: clip; }  /* full-width photos can't cause sideways scrolling */

.block-heading--label {
  margin-top: 3.5rem;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 14px;
}
.block-heading--label::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.page--align-center .block-heading--label::before { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--ink) 18%, transparent); }

.block-text { max-width: 36em; }
.page--align-center .block-text { margin-inline: auto; }
.block-text--large { font-size: calc(var(--size-text) * 1.45); line-height: 1.5; max-width: 28em; }
.block-text--small { font-size: 12px; color: var(--ink-dim); }

.block-logo--small img { width: min(calc(var(--logo-width) * 0.5), calc(var(--logo-width-mobile) * 0.7)); }
.block-logo__home { display: inline-block; }
.block-logo__home:focus-visible { outline-offset: 8px; }

/* clickable photos */
.photo {
  display: block;
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.photo img { display: block; width: 100%; height: auto; }
.page--align-center .block-image:not(.block-image--full) .photo { margin-inline: auto; }

/* full-width hero photo */
.block-image--full {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}
.block-image--full .photo {
  width: 100%;
  height: min(78vh, 58vw);
  overflow: hidden;
}
.block-image--full .photo img {
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  scale: 1.14; /* room for the slow drift (js/site.js limits the drift to this 7% margin) */
}

/* layered photo collage (layout values are set per photo by js/site.js) */
.block-collage {
  position: relative;
  isolation: isolate; /* its photos' stacking stays inside the collage */
  margin: 4.5rem 0;
  padding-bottom: calc(var(--pb, 0%) + 2rem); /* room for a photo that hangs below the last one */
}
.collage__item {
  position: relative;
  width: var(--w);
  margin-left: var(--x);
  margin-top: var(--mt);
  z-index: calc(var(--i) + 1);
}
.collage__item .photo {
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.2);
}
.collage__item .photo img { transition: filter 0.6s; }
.collage__item .photo:hover img { filter: brightness(1.06); }

@media (max-width: 640px) {
  .collage__item { width: var(--wm); margin-left: var(--xm); margin-top: var(--mtm); }
  .block-image--full .photo { height: 92vw; }
  .block-collage { padding-bottom: calc(var(--pbm, 0%) + 1.5rem); }
  .block-collage { margin: 3rem 0; }
}

/* highlights: big lines with numbers */
.block-highlights {
  list-style: none;
  margin: 0.5rem 0 1rem;
  padding: 0;
  counter-reset: none;
}
.block-highlights li {
  padding: 1.1rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  text-align: left;
}
.block-highlights li:first-child { border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.hl__line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hl__text {
  display: block;
  font-family: var(--font-heading);
  font-size: max(min(var(--hl-size, 44px), 7.5vw), min(var(--hl-size, 44px), 20px)); /* shrinks on phones */
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* ---------- scroll reveal (js/motion.js adds .reveal, then .is-in when visible) ---------- */

.reveal {
  opacity: 0;
  translate: 0 32px;
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), translate 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-in { opacity: 1; translate: none; }

/* collages: each photo rises in turn and uncovers like a print sliding out */
.block-collage.reveal { opacity: 1; translate: none; }
.block-collage.reveal .collage__item {
  opacity: 0;
  translate: 0 70px;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), translate 1.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i) * 140ms);
}
.block-collage.reveal .photo img {
  clip-path: inset(100% 0 0 0);
  scale: 1.12;
  transition: clip-path 1.3s cubic-bezier(0.77, 0, 0.18, 1), scale 1.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s;
  transition-delay: calc(var(--i) * 140ms + 80ms);
}
.block-collage.reveal.is-in .collage__item { opacity: 1; translate: none; }
.block-collage.reveal.is-in .photo img { clip-path: inset(0 0 0 0); scale: 1; }

/* hero: uncovers from the top */
.block-image--full.reveal { opacity: 1; translate: none; }
.block-image--full.reveal .photo { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s cubic-bezier(0.77, 0, 0.18, 1); }
.block-image--full.reveal.is-in .photo { clip-path: inset(0 0 0 0); }

/* highlights: each line slides up out of a mask */
.block-highlights.reveal { opacity: 1; translate: none; }
.block-highlights.reveal li { opacity: 0; transition: opacity 0.8s ease-out; transition-delay: calc(var(--i) * 110ms); }
.block-highlights.reveal .hl__text {
  translate: 0 105%;
  transition: translate 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i) * 110ms);
}
.block-highlights.reveal.is-in li { opacity: 1; }
.block-highlights.reveal.is-in .hl__text { translate: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal * { transition: none !important; }
}

/* soft fade at the screen edges under the fixed menu/player, on scrolling pages */
html.has-edge-fade body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, var(--bg) 15%, color-mix(in srgb, var(--bg) 0%, transparent));
}
@media (max-width: 640px) {
  html.has-edge-fade body::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 80px;
    z-index: 2; /* above the page, still under the menu (which comes later) */
    pointer-events: none;
    background: linear-gradient(to bottom, var(--bg) 20%, color-mix(in srgb, var(--bg) 0%, transparent));
  }
}

/* ---------- photo viewer (js/lightbox.js), above the grain so photos show clean ---------- */

html.lightbox-open { overflow: hidden; }

.lightbox { position: fixed; inset: 0; z-index: 15; } /* above the grain (10), text (12) and menu (14) */
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 30%, rgba(0, 0, 0, 0.9));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.lightbox__stage { position: absolute; inset: 0; }
.lightbox__img {
  position: absolute;
  object-fit: contain;
  transform-origin: 0 0;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox__chrome { position: absolute; inset: 0; pointer-events: none; }
.lightbox__chrome > * { pointer-events: auto; }

.lightbox__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  font-size: 11px;
  letter-spacing: 0.16em;
}
.lightbox__count { color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.lightbox__actions { display: flex; align-items: center; gap: 10px; }

.lightbox__download,
.lightbox__close,
.lightbox__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 40%, rgba(0, 0, 0, 0.35));
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox__download { padding: 0 16px 0 12px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.lightbox__close, .lightbox__nav { width: 38px; padding: 0; }
.lightbox__download:hover, .lightbox__close:hover, .lightbox__nav:hover {
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  border-color: color-mix(in srgb, var(--ink) 50%, transparent);
}
.lightbox__close:hover { transform: rotate(90deg); }
.lightbox svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.lightbox__nav { position: absolute; top: 50%; margin-top: -19px; width: 46px; height: 46px; }
.lightbox__nav--prev { left: var(--gutter); }
.lightbox__nav--next { right: var(--gutter); }
.lightbox__nav--prev:hover { transform: translateX(-3px); }
.lightbox__nav--next:hover { transform: translateX(3px); }

.lightbox__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  margin: 0;
  padding: 0 var(--gutter);
  text-align: center;
  font-size: 12px;
  color: var(--ink-dim);
}

@media (max-width: 640px) {
  .lightbox__nav { display: none; } /* swipe instead */
  .lightbox__download span { display: none; }
  .lightbox__download { width: 38px; padding: 0; }
}

/* ---------- shop (js/shop.js) ---------- */

.block-shop { margin: 1rem 0 2rem; }

.shop__grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: clamp(28px, 5vw, 64px);
  text-align: left;
}
@media (max-width: 640px) { .shop__grid { grid-template-columns: 1fr; gap: 44px; } }

.product { display: flex; flex-direction: column; gap: 18px; height: 100%; }
.product .photo { width: 100%; aspect-ratio: 1; overflow: hidden; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.product .photo img { height: 100%; object-fit: cover; transition: scale 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s; }
.product .photo:hover img { scale: 1.035; }
.product a.photo { cursor: pointer; }
.product__title a { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.product__title a:hover, .product__title a:focus-visible { background-size: 100% 1px; }
.product.is-sold-out .photo img { filter: grayscale(0.6) brightness(0.8); }

.product__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 70%, rgba(0, 0, 0, 0.4));
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
}

.product__info { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex: 1; }
.product__info .product__add { margin-top: auto; } /* buttons line up along the bottom of each row */
.product__title { margin: 0; font-family: var(--font-heading); font-weight: 400; font-size: calc(var(--size-text) * 1.35); line-height: 1.25; }
.product__price { margin: 0; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.product__was { margin-left: 6px; opacity: 0.7; }
.product__desc { font-size: 0.92em; line-height: 1.6; color: var(--ink-dim); max-width: 32em; max-height: 4.8em; overflow: hidden; } /* 3-line preview */
.product__desc.is-clamped { -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent); mask-image: linear-gradient(to bottom, #000 45%, transparent); }
.product__desc.is-open { max-height: none; }
.product__more {
  margin: -4px 0 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  opacity: 0.8;
}
.product__more:hover { opacity: 1; }
.product__desc p { margin: 0 0 0.9em; }
.product__desc p:last-child { margin-bottom: 0; }
.product__desc strong { color: var(--ink); font-weight: 500; }
.product__desc ul, .product__desc ol { margin: 0 0 0.9em; padding-left: 1.2em; }
.product__desc a { color: var(--ink); }

.product__variant {
  appearance: none;
  padding: 8px 32px 8px 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 8px center / 14px no-repeat;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.product__variant option { color: #000; }

.product__add,
.cart__checkout {
  margin-top: 6px;
  padding: 0.9em 2em;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--size-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, opacity 0.2s;
}
.product__add:hover:not(:disabled),
.cart__checkout:hover:not(.is-disabled) { background: var(--ink); color: var(--bg); }
.product__add:disabled { opacity: 0.45; cursor: default; }

/* loading placeholders */
.product--skeleton {
  aspect-ratio: 1 / 1.3;
  background: linear-gradient(100deg, color-mix(in srgb, var(--ink) 5%, transparent) 30%, color-mix(in srgb, var(--ink) 11%, transparent) 50%, color-mix(in srgb, var(--ink) 5%, transparent) 70%) 0 0 / 300% 100%;
  animation: shop-shimmer 1.6s linear infinite;
}
@keyframes shop-shimmer { to { background-position: -150% 0; } }

/* products rise in when they arrive */
.shop__grid:not(.is-loading) .product { animation: shop-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 120ms); }
@keyframes shop-in { from { opacity: 0; translate: 0 30px; } }
@media (prefers-reduced-motion: reduce) { .shop__grid .product, .product--skeleton { animation: none !important; } }

.shop__empty { color: var(--ink-dim); }

/* a shop item's own page (js/shop.js renderProduct) */
.block-product { margin: 0.5rem 0 3rem; }
.pp__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  color: var(--ink-dim);
  font-size: var(--size-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.25s;
}
.pp__back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: translate 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.pp__back:hover { color: var(--ink); }
.pp__back:hover svg { translate: -4px 0; }

.pp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.pp.pp--no-photo, .pp > .shop__empty { grid-template-columns: minmax(0, 1fr); }
.pp > .shop__empty { grid-column: 1 / -1; }
@media (max-width: 760px) { .pp { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* gallery: a strip of photos that snaps one at a time */
.pp__gallery { min-width: 0; }
.pp__stage { position: relative; }
.pp__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  outline: none;
}
.pp__track::-webkit-scrollbar { display: none; }
.pp__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  aspect-ratio: var(--ratio, 1);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.pp__slide img { width: 100%; height: 100%; object-fit: contain; }
.pp__gallery .product__badge { pointer-events: none; }
.pp__arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.35s, background 0.25s, translate 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.pp__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.pp__arrow--prev { left: 14px; translate: 6px 0; }
.pp__arrow--next { right: 14px; translate: -6px 0; }
.pp__stage:hover .pp__arrow:not(:disabled), .pp__arrow:focus-visible:not(:disabled) { opacity: 1; translate: 0 0; }
.pp__arrow:hover { background: color-mix(in srgb, var(--bg) 80%, transparent); }
.pp__arrow:disabled { cursor: default; }
@media (hover: none) { .pp__arrow { display: none; } } /* swipe instead */

.pp__thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pp__thumb {
  width: 64px;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  cursor: pointer;
  opacity: 0.45;
  outline: 1px solid transparent;
  outline-offset: 3px;
  transition: opacity 0.35s, outline-color 0.35s;
}
.pp__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pp__thumb:hover { opacity: 0.8; }
.pp__thumb[aria-current="true"] { opacity: 1; outline-color: color-mix(in srgb, var(--ink) 55%, transparent); }
@media (max-width: 760px) { .pp__thumb { width: 52px; } }

/* details */
.pp__info { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
@media (min-width: 761px) { .pp__info { position: sticky; top: 40px; } }
.pp__title { margin: 0; font-family: var(--font-heading); font-weight: 400; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15; letter-spacing: -0.01em; }
.pp__info .product__price { font-size: 1.15em; }
.pp__soldout { margin: 0; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
.pp__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 6px 0 10px; }
.pp__actions .product__add { margin-top: 0; }
.pp__desc { padding-top: 22px; border-top: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); line-height: 1.7; color: var(--ink-dim); max-width: 34em; width: 100%; }
.pp__desc p { margin: 0 0 1em; }
.pp__desc p:last-child { margin-bottom: 0; }
.pp__desc strong { color: var(--ink); font-weight: 500; }
.pp__desc ul, .pp__desc ol { margin: 0 0 1em; padding-left: 1.2em; }
.pp__desc a { color: var(--ink); }

/* loading, then the photos and details rise in */
.pp__gallery--skeleton, .pp__info--skeleton {
  background: linear-gradient(100deg, color-mix(in srgb, var(--ink) 5%, transparent) 30%, color-mix(in srgb, var(--ink) 11%, transparent) 50%, color-mix(in srgb, var(--ink) 5%, transparent) 70%) 0 0 / 300% 100%;
  animation: shop-shimmer 1.6s linear infinite;
}
.pp__gallery--skeleton { aspect-ratio: 1; }
.pp__info--skeleton { height: 220px; }
.pp:not(.is-ready) > .pp__gallery:not(.pp__gallery--skeleton),
.pp:not(.is-ready) > .pp__info:not(.pp__info--skeleton) > * { opacity: 0; }
.pp.is-ready > .pp__gallery { animation: shop-in 1s cubic-bezier(0.16, 1, 0.3, 1) both; }
.pp.is-ready > .pp__info > * { animation: shop-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.pp.is-ready > .pp__info > :nth-child(1) { animation-delay: 120ms; }
.pp.is-ready > .pp__info > :nth-child(2) { animation-delay: 190ms; }
.pp.is-ready > .pp__info > :nth-child(3) { animation-delay: 260ms; }
.pp.is-ready > .pp__info > :nth-child(4) { animation-delay: 330ms; }
.pp.is-ready > .pp__info > :nth-child(n+5) { animation-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  .pp > *, .pp__info > *, .pp__gallery--skeleton, .pp__info--skeleton { animation: none !important; opacity: 1 !important; }
}

/* cart link in the menu */
.nav .nav__cart { opacity: 1; }

/* ---------- cart panel (above the grain, like all text) ---------- */

html.cart-open { overflow: hidden; }

.cart { position: fixed; inset: 0; z-index: 16; }
.cart__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 40%, rgba(0, 0, 0, 0.5));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.cart__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--bg) 80%, #000);
  border-left: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s;
}
.cart__panel.is-busy { opacity: 0.7; pointer-events: none; }

.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 18px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.cart__title { margin: 0; font-family: var(--font-heading); font-weight: 400; font-size: calc(var(--size-ui) * 1.4); letter-spacing: 0.06em; }
.cart__close {
  width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: none; color: var(--ink); opacity: 0.7; cursor: pointer;
  transition: opacity 0.2s, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart__close:hover { opacity: 1; transform: rotate(90deg); }
.cart__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

.cart__lines { flex: 1; overflow-y: auto; padding: 8px 24px; }
.cart__empty { color: var(--ink-dim); padding: 24px 0; }

.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.cart-line__img { width: 64px; height: 64px; object-fit: cover; background: color-mix(in srgb, var(--ink) 8%, transparent); display: block; }
.cart-line__info { min-width: 0; }
.cart-line__title { margin: 0 0 2px; font-size: 14px; line-height: 1.35; }
.cart-line__variant { margin: 0 0 4px; font-size: 12px; color: var(--ink-dim); }
.cart-line__qty { display: inline-flex; align-items: center; margin-top: 8px; border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.cart-line__step { width: 30px; height: 28px; border: 0; background: none; color: var(--ink); cursor: pointer; font-size: 15px; }
.cart-line__step:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.cart-line__n { min-width: 26px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.cart-line__side { text-align: right; }
.cart-line__price { margin: 0 0 8px; font-size: 14px; font-variant-numeric: tabular-nums; }
.cart-line__remove { border: 0; background: none; padding: 0; color: var(--ink-dim); font: inherit; font-size: 11px; letter-spacing: 0.08em; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cart-line__remove:hover { color: var(--ink); }

.cart__foot { padding: 18px 24px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.cart__status { margin: 0 0 10px; font-size: 12px; color: #ff9a8b; }
.cart__status:empty { display: none; }
.cart__subtotal { display: flex; justify-content: space-between; font-size: 15px; font-variant-numeric: tabular-nums; }
.cart__note { margin: 6px 0 16px; font-size: 12px; color: var(--ink-dim); }
.cart__checkout { display: block; width: 100%; margin: 0; text-align: center; }
.cart__checkout.is-disabled { opacity: 0.4; cursor: default; }

/* ---------- navigation ---------- */

.nav {
  position: fixed;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: var(--size-ui);
  z-index: 14; /* above the grain */
}

.nav--top-left { top: var(--gutter); left: var(--gutter); }
.nav--top-center { top: var(--gutter); left: 0; right: 0; justify-content: center; }
.nav--top-right { top: var(--gutter); right: var(--gutter); }
.nav--bottom-left { bottom: var(--gutter); left: var(--gutter); }
.nav--bottom-right { bottom: var(--gutter); right: var(--gutter); }

.nav a {
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.nav a:hover,
.nav a[aria-current="page"] { opacity: 1; text-decoration: underline; }

/* ---------- player ---------- */

.player {
  position: fixed;
  bottom: var(--gutter);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(340px, calc(100vw - 2 * var(--gutter)));  /* fits its content; long titles trim with … */
  font-size: var(--size-ui);
  z-index: 14; /* above the grain */
}

.player--bottom-left { left: var(--gutter); }
.player--bottom-right { right: var(--gutter); }

.player__btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}

.player__btn svg { width: 14px; height: 14px; fill: currentColor; }
.player__btn:disabled { opacity: 0.35; cursor: default; }

/* artwork: tap to open the playlist */
.player__art-btn {
  position: relative;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
}
.player__art-btn:hover { transform: scale(1.06); }
.player__art-btn[aria-expanded="true"] { box-shadow: 0 0 0 1px var(--ink), 0 2px 10px rgba(0, 0, 0, 0.25); }
.player__art { display: block; width: 100%; height: 100%; object-fit: cover; }
.player__art-icon { position: absolute; inset: 0; display: grid; place-items: center; }
.player__art:not([hidden]) + .player__art-icon { display: none; }
.player__art-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

/* the playlist, floating just above the player */
.playlist {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: 250px;
  max-width: calc(100vw - 2 * var(--gutter));
  max-height: min(60vh, 360px);
  overflow-y: auto;
  padding: 6px;
  background: color-mix(in srgb, var(--bg) 78%, #000);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transform-origin: 21px calc(100% + 33px); /* grows out of the artwork */
}
.player--bottom-right .playlist { left: auto; right: 0; }

.playlist__item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-dim);
  font: inherit;
  font-size: var(--size-ui);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.playlist__item:hover,
.playlist__item:focus-visible { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); outline: none; }
.playlist__item.is-current { color: var(--ink); }

.playlist__thumb { display: block; width: 32px; height: 32px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.playlist__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.playlist__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.player__play { width: 28px; height: 28px; }
.player__play svg { width: 22px; height: 22px; }
.player__play .icon-pause { display: none; }
.player.is-playing .icon-play { display: none; }
.player.is-playing .icon-pause { display: block; }

.player__body { flex: 0 1 auto; min-width: 0; }


.player__title {
  display: block;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}





.player__skip { display: flex; gap: 10px; }

/* ---------- contact form popup (above the grain, like all text) ---------- */

html.contact-open { overflow: hidden; }

.contact {
  position: fixed;
  inset: 0;
  z-index: 16;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}

.contact__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 45%, rgba(0, 0, 0, 0.55));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.contact__panel {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100dvh - 2 * var(--gutter));
  overflow-y: auto;
  padding: 26px 28px 24px;
  background: color-mix(in srgb, var(--bg) 78%, #000);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 8px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
  will-change: transform, opacity;
}

.contact__body { overflow: hidden; }

.contact__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
}
.contact__close:hover { opacity: 1; transform: rotate(90deg); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.contact__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

.contact__title {
  margin: 0 40px 6px 0;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: calc(var(--size-ui) * 1.5);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.contact__intro { margin: 0 0 6px; color: var(--ink-dim); font-size: 14px; line-height: 1.5; }

.contact__form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }

.contact__field { display: flex; flex-direction: column; gap: 6px; }
.contact__field > span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.2s;
}
.contact__field:focus-within > span { color: var(--ink); }

.contact__field input,
.contact__field textarea {
  width: 100%;
  padding: 6px 0 8px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;          /* 16px stops phones zooming in on focus */
  line-height: 1.45;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.contact__field textarea { resize: vertical; min-height: 84px; }
.contact__field input:focus,
.contact__field textarea:focus { border-color: var(--ink); box-shadow: 0 1px 0 0 var(--ink); }

.contact__field.is-invalid > span { color: #ff9a8b; }
.contact__field.is-invalid input,
.contact__field.is-invalid textarea { border-color: #ff9a8b; box-shadow: 0 1px 0 0 #ff9a8b; }

/* hidden spam trap */
.contact__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.contact__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; }
.contact__status { margin: 0; font-size: 12px; line-height: 1.4; color: var(--ink-dim); }
.contact__status.is-error { color: #ff9a8b; }

.contact__send {
  flex: none;
  margin-left: auto;
  padding: 0.85em 2em;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--size-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, opacity 0.2s;
}
.contact__send:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.contact__send:disabled { opacity: 0.55; cursor: progress; }

.contact__done { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px 0 4px; }
.contact__done .contact__send { margin-left: 0; }
.contact__done-text { margin: 0; font-size: 15px; line-height: 1.5; }

.contact__tick { width: 46px; height: 46px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.contact__tick circle { stroke-dasharray: 151; stroke-dashoffset: 151; }
.contact__tick path { stroke-dasharray: 36; stroke-dashoffset: 36; }
.contact__done:not([hidden]) .contact__tick circle { animation: contact-draw 0.7s 0.15s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
.contact__done:not([hidden]) .contact__tick path { animation: contact-draw 0.45s 0.7s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
@keyframes contact-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .contact__tick circle, .contact__tick path { stroke-dashoffset: 0; animation: none !important; }
}

/* phones: a sheet that slides up from the bottom */
@media (max-width: 640px) {
  .contact { place-items: end center; padding: 0; }
  .contact__panel {
    width: 100%;
    max-height: 92dvh;
    border-radius: 14px 14px 0 0;
    border-bottom: 0;
    padding: 26px 20px calc(22px + env(safe-area-inset-bottom));
  }
}

/* ---------- grain overlay ---------- */

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 10;
}

/* ---------- small screens: nav on top, player centred at the bottom ---------- */

@media (max-width: 640px) {
  .nav {
    top: var(--gutter);
    bottom: auto;
    left: var(--gutter);
    right: var(--gutter);
    justify-content: center;
  }
  .player {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}
