/* ==========================================================================
   MERIDIAN — design system + components
   --------------------------------------------------------------------------
   Type: one grotesque (Inter) for everything, one mono (IBM Plex Mono) for
   technical metadata only. No serif. Premium apparel sites studied in
   _research/brand-teardown.md §E are overwhelmingly grotesque-only; the mono
   is the one deliberate voice, and it carries the "archive plate" idea.

   Colour: neutral by rule (§F). Exactly one accent, used only for state
   (low stock, error). Colour comes from the garments, never from the UI.
   ========================================================================== */

/* ---------- tokens ------------------------------------------------------- */
:root {
  --ink:        #14130F;
  --ink-soft:   #3B3830;
  --muted:      #6B6559;
  --faint:      #9C968A;
  --line:       #DFDBD1;
  --line-soft:  #EBE8E0;
  --surface:    #F2F0E9;
  --paper:      #FBFAF7;
  --white:      #FFFFFF;
  --accent:     #9C3B1E;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --s1: 4px;  --s2: 8px;  --s3: 16px; --s4: 24px;
  --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px; --s9: 128px;

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1560px;
  --nav-h: 62px;
  --bar-h: 34px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 480ms;

  --radius: 2px;
}

/* ---------- reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: 'ss01' 1, 'cv05' 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- type scale --------------------------------------------------- */
.display {
  font-size: clamp(38px, 7.4vw, 104px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-weight: 500;
}
.h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 500; }
.h2 { font-size: clamp(21px, 2.4vw, 30px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; }
.h3 { font-size: 17px; line-height: 1.3; letter-spacing: -0.012em; font-weight: 500; }
.lede { font-size: clamp(16px, 1.5vw, 20px); line-height: 1.55; color: var(--ink-soft); letter-spacing: -0.01em; }
.body { font-size: 15px; line-height: 1.65; color: var(--ink-soft); }
.small { font-size: 13px; line-height: 1.55; color: var(--muted); }

/* the one mono voice: eyebrows, specs, SKUs, prices in tables */
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--muted);
}
.mono--ink { color: var(--ink); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- layout ------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 760px; }
.section { padding-block: clamp(48px, 8vw, 112px); }
.section--tight { padding-block: clamp(32px, 5vw, 64px); }
.stack > * + * { margin-top: var(--s3); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5);
  padding-bottom: var(--s3); border-bottom: 1px solid var(--line);
}

/* ---------- buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  border-radius: var(--radius);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), opacity 200ms;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.btn--light:hover { background: transparent; color: var(--paper); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.32; pointer-events: none; }

.link-u {
  border-bottom: 1px solid var(--line); padding-bottom: 1px;
  transition: border-color 200ms var(--ease);
}
.link-u:hover { border-color: var(--ink); }

/* ---------- announcement bar + nav -------------------------------------- */
.bar {
  height: var(--bar-h); background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.bar__track { position: relative; height: 100%; width: 100%; }
.bar__msg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  opacity: 0; transition: opacity 600ms var(--ease); text-align: center; padding-inline: 12px;
}
.bar__msg.is-on { opacity: 1; }

.nav {
  position: sticky; top: 0; z-index: 60;
  background: var(--paper); border-bottom: 1px solid var(--line);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__inner {
  height: var(--nav-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter);
}
.nav__links, .nav__util { display: flex; align-items: center; gap: var(--s4); }
.nav__util { justify-content: flex-end; }
.nav a.nav__item, .nav button.nav__item {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase;
  position: relative; padding-block: 4px;
}
.nav__item::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 340ms var(--ease);
}
.nav__item:hover::after, .nav__item[aria-current='page']::after { transform: scaleX(1); }

.logo {
  font-size: 19px; font-weight: 600; letter-spacing: 0.34em; text-transform: uppercase;
  padding-left: 0.34em; /* optical: cancel the trailing tracking */
  white-space: nowrap;
}
.cart-btn { display: inline-flex; align-items: center; gap: 6px; }
.cart-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 10px; line-height: 18px; text-align: center;
  transition: transform 300ms var(--ease);
}
.cart-count.is-bump { transform: scale(1.35); }
.nav--over .cart-count { background: var(--paper); color: var(--ink); }

/* transparent nav over a hero, until scrolled */
.nav--over { background: transparent; border-color: transparent; color: var(--paper); }
.nav--over .logo, .nav--over .nav__item { color: var(--paper); }

.nav__burger { display: none; }

/* ---------- hero --------------------------------------------------------- */
.hero { position: relative; min-height: min(86vh, 820px); display: flex; align-items: flex-end; overflow: hidden; margin-top: calc(var(--nav-h) * -1); }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,19,15,.42) 0%, rgba(20,19,15,0) 34%, rgba(20,19,15,.10) 60%, rgba(20,19,15,.62) 100%);
}
.hero__body { position: relative; z-index: 2; color: var(--paper); width: 100%; padding-block: clamp(36px, 6vw, 76px) clamp(32px, 5vw, 64px); }
.hero__body .mono { color: rgba(251,250,247,.8); }
.hero__title { max-width: 16ch; }
.hero__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; margin-top: var(--s5); }
.hero__note { max-width: 34ch; color: rgba(251,250,247,.86); font-size: 14px; line-height: 1.6; }

/* ---------- product grid ------------------------------------------------- */
.grid-products {
  display: grid; gap: clamp(20px, 2.4vw, 40px) clamp(12px, 1.6vw, 26px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-products--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card { position: relative; }
.card__media {
  display: block;                 /* it is an <a>: without this aspect-ratio is ignored */
  position: relative; aspect-ratio: 4 / 5; background: var(--surface);
  overflow: hidden; border-radius: var(--radius);
}
.card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity 420ms var(--ease), transform 900ms var(--ease);
}
.card__img--alt { opacity: 0; }
.card:hover .card__img--main { opacity: 0; }
.card:hover .card__img--alt { opacity: 1; }
.card:hover .card__media img { transform: scale(1.028); }

.card__flag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--paper); padding: 4px 8px; border-radius: var(--radius);
}
.card__body { padding-top: var(--s3); display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; }
.card__price { font-size: 14px; white-space: nowrap; }
.card__meta { margin-top: 2px; }
.card__swatches { display: flex; gap: 6px; margin-top: 10px; }
.swatch-dot {
  width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--line);
  box-shadow: inset 0 0 0 2px var(--paper);
}

/* quick-add strip: revealed on hover (desktop) — never hidden on touch */
.card__quick {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3;
  display: flex; gap: 4px; padding: 6px; background: rgba(251,250,247,.94);
  backdrop-filter: blur(6px); border-radius: var(--radius);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}
.card:hover .card__quick, .card:focus-within .card__quick { opacity: 1; transform: none; pointer-events: auto; }
.card__quick button {
  flex: 1; height: 30px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  border: 1px solid transparent; border-radius: var(--radius); transition: background 180ms, color 180ms;
}
.card__quick button:hover:not([disabled]) { background: var(--ink); color: var(--paper); }
.card__quick button[disabled] { color: var(--faint); text-decoration: line-through; cursor: not-allowed; }
@media (hover: none) { .card__quick { display: none; } }

/* ---------- editorial blocks -------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 56px); align-items: center; }
.split__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); border-radius: var(--radius); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__body { max-width: 46ch; }

.band { position: relative; min-height: 62vh; display: flex; align-items: flex-end; overflow: hidden; border-radius: var(--radius); }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,19,15,0) 40%, rgba(20,19,15,.6) 100%); }
.band__body { position: relative; z-index: 2; color: var(--paper); padding: clamp(20px, 3vw, 44px); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 24px); }
.tile { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface); border-radius: var(--radius); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1000ms var(--ease); }
.tile:hover img { transform: scale(1.04); }
.tile__label { position: absolute; left: 14px; bottom: 14px; z-index: 2; color: var(--paper); }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,19,15,0) 55%, rgba(20,19,15,.55) 100%); }

/* ---------- marquee ------------------------------------------------------ */
.marquee { border-block: 1px solid var(--line); padding-block: 14px; overflow: hidden; }
.marquee__track { display: flex; gap: var(--s7); width: max-content; animation: slide 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- PDP ---------------------------------------------------------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr); gap: clamp(24px, 4vw, 72px); align-items: start; }
.pdp__gallery { min-width: 0; }

/* The gallery is one frame at a time. The stack it replaced ran to roughly
 * four screens on a phone before the price was reached, and it printed every
 * shot whether or not anyone wanted to see it.
 *
 * The frame's height is set in pixels by app.js, transitioned, and equal to
 * the ACTIVE shot's own ratio. That is why `contain` is right here where
 * `cover` was right in the old grid: at rest the frame IS the image's shape,
 * so contain fills it exactly and crops nothing. It only letterboxes mid-swipe
 * while the height is still travelling — for ~400ms, against the same surface
 * colour the flats already sit on. `cover` would instead permanently cut the
 * hem off a 2:3 back view or a person out of a 3:2 pair shot, and the print is
 * the subject.
 *
 * touch-action: pan-y hands vertical scrolling back to the page. Without it
 * the frame eats a downward flick that started on the image, which reads as a
 * broken page rather than as a gallery. */
.gal { display: grid; gap: 10px; min-width: 0; }
.gal__frame {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--surface); touch-action: pan-y; cursor: grab;
  transition: height 420ms var(--ease);
}
.gal__frame:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.gal__track { display: flex; height: 100%; will-change: transform; transition: transform 460ms var(--ease); }
.gal__slide { flex: 0 0 100%; height: 100%; margin: 0; }
.gal__slide img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}

/* Chevrons are drawn from a rotated corner rather than set as a glyph: the
 * arrow characters that render as a flat stroke on a Mac come out as an emoji
 * on Android, and this is a customer-facing surface. */
.gal__nav {
  /* A 2:3 shot in a 700px column is ~1050px tall, so a frame centred at 50%
   * puts the arrows below the fold on a laptop — visible only after scrolling
   * past the thing they control. They are pinned to whichever is higher. */
  position: absolute; top: min(50%, 40vh); width: 42px; height: 42px; margin-top: -21px;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: pointer; opacity: 0; transition: opacity 200ms var(--ease), background 200ms var(--ease);
}
.gal__nav::before {
  content: ''; width: 9px; height: 9px;
  border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
}
.gal__nav--prev { left: 12px; }
.gal__nav--next { right: 12px; }
.gal__nav--prev::before { transform: rotate(45deg) translate(1px, -1px); }
.gal__nav--next::before { transform: rotate(-135deg) translate(1px, -1px); }
.gal__frame:hover .gal__nav, .gal__frame:focus-within .gal__nav { opacity: 1; }
.gal__nav:hover { background: var(--paper); }
.gal__nav[disabled] { opacity: 0; pointer-events: none; }
.gal__count {
  position: absolute; right: 12px; bottom: 12px; margin: 0;
  font-size: 10px; letter-spacing: 0.1em; color: var(--ink);
  background: rgba(255, 255, 255, 0.82); padding: 5px 9px; border-radius: 999px;
}
.gal__thumbs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gal__thumbs::-webkit-scrollbar { display: none; }
.gal__thumb {
  flex: 0 0 auto; width: 68px; aspect-ratio: 4 / 5; padding: 0;
  border: 1px solid transparent; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); cursor: pointer; opacity: 0.5;
  transition: opacity 200ms var(--ease), border-color 200ms var(--ease);
}
.gal__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal__thumb:hover { opacity: 0.85; }
.gal__thumb.is-on { opacity: 1; border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .gal__frame, .gal__track { transition: none; }
}

/* On a wide screen the rail moves alongside the frame and pins.
 *
 * Under the frame it was unreachable: the shots are portrait, the column is
 * ~700px, so the frame runs to roughly 1050-1300px and the rail sat below the
 * fold of a 900px laptop. A visitor would have had to scroll past the picture
 * to discover that five more existed — which is the same failure as the stack
 * this replaced, just moved. Pinned to the left it is on screen from the first
 * paint and stays there for the whole height of a tall shot. */
@media (min-width: 861px) {
  .gal { grid-template-columns: 68px minmax(0, 1fr); gap: 12px; align-items: start; }
  .gal__frame { grid-column: 2; grid-row: 1; }
  .gal__thumbs {
    grid-column: 1; grid-row: 1; flex-direction: column;
    position: sticky; top: calc(var(--nav-h) + 20px); align-self: start;
    max-height: calc(100vh - var(--nav-h) - 40px);
    overflow-x: hidden; overflow-y: auto;
  }
}
/* The buy panel pins only when it actually fits the viewport. A sticky element
 * taller than the screen pins on the first scroll and its lower half — here the
 * "Composition & care" accordion — can never be scrolled into view on a 900px
 * laptop. app.js measures on load/resize and toggles .is-pinned. */
.pdp__panel { position: static; top: calc(var(--nav-h) + 20px); }
.pdp__panel.is-pinned { position: sticky; }

.opt-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: 10px; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size-btn {
  min-width: 54px; height: 44px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  transition: border-color 180ms, background 180ms, color 180ms;
}
.size-btn:hover:not([disabled]) { border-color: var(--ink); }
.size-btn[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.size-btn[disabled] { color: var(--faint); border-style: dashed; cursor: not-allowed; text-decoration: line-through; }

.colours { display: flex; flex-wrap: wrap; gap: 10px; }
.colour-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  position: relative; transition: transform 200ms var(--ease);
}
.colour-btn span { position: absolute; inset: 4px; border-radius: 50%; }
.colour-btn[aria-pressed='true'] { border-color: var(--ink); }
.colour-btn:hover { transform: scale(1.06); }

.stock-note { color: var(--accent); }

.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 17px 0; text-align: left;
}
.acc__btn .mono { color: var(--ink); }
.acc__sign { width: 12px; height: 12px; position: relative; flex: none; }
.acc__sign::before, .acc__sign::after { content: ''; position: absolute; background: var(--ink); transition: transform 300ms var(--ease); }
.acc__sign::before { left: 0; right: 0; top: 5px; height: 1px; }
.acc__sign::after { top: 0; bottom: 0; left: 5px; width: 1px; }
.acc__btn[aria-expanded='true'] .acc__sign::after { transform: scaleY(0); }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 340ms var(--ease); }
.acc__panel > div { overflow: hidden; }
.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
.acc__body { padding-bottom: var(--s4); }

.spec-list { display: grid; gap: 6px; list-style: none; }
.spec-list div, .spec-list li { display: flex; justify-content: space-between; gap: var(--s3); border-bottom: 1px dotted var(--line); padding-bottom: 5px; }
.spec-list li > .small { text-align: right; max-width: 62%; }

/* ---------- the plate ---------------------------------------------------- */
.plate { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr); gap: clamp(24px, 4vw, 72px); align-items: center; }
.plate__sheet {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 56px); display: grid; place-items: center;
}
.plate__sheet img { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }

/* sticky add-to-cart */
.sticky-atc {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: var(--paper); border-top: 1px solid var(--line);
  padding: 10px var(--gutter); display: flex; align-items: center; gap: var(--s3);
  transform: translateY(102%); transition: transform 380ms var(--ease);
}
.sticky-atc.is-on { transform: none; }
.sticky-atc__info { flex: 1; min-width: 0; }
.sticky-atc__info strong { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-atc .btn { min-height: 44px; padding-inline: var(--s4); }

/* ---------- collection / filters ---------------------------------------- */
.filters { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding-block: var(--s3); border-bottom: 1px solid var(--line); }
.chip {
  height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 17px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 7px; transition: border-color 180ms, background 180ms, color 180ms;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip__dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,.16); }
.filters__spacer { flex: 1; }

/* ---------- drawer / modal ---------------------------------------------- */
.scrim {
  position: fixed; inset: 0; z-index: 70; background: rgba(20,19,15,.42);
  opacity: 0; pointer-events: none; transition: opacity 340ms var(--ease);
}
.scrim.is-on { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(430px, 100vw);
  background: var(--paper); display: flex; flex-direction: column;
  transform: translateX(101%); transition: transform 420ms var(--ease);
  box-shadow: -1px 0 0 var(--line);
}
.drawer.is-on { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4); border-bottom: 1px solid var(--line); }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--s4); }
.drawer__foot { border-top: 1px solid var(--line); padding: var(--s4); }

.line-item { display: grid; grid-template-columns: 72px 1fr auto; gap: var(--s3); padding-block: var(--s3); border-bottom: 1px solid var(--line-soft); }
.line-item__img { aspect-ratio: 4/5; background: var(--surface); overflow: hidden; border-radius: var(--radius); }
.line-item__img img { width: 100%; height: 100%; object-fit: cover; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 8px; }
.qty button { width: 28px; height: 28px; line-height: 1; }
.qty span { min-width: 26px; text-align: center; font-family: var(--mono); font-size: 11px; }

.modal {
  position: fixed; z-index: 80; inset: auto; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.98);
  width: min(660px, calc(100vw - 32px)); max-height: min(84vh, 760px); overflow-y: auto;
  background: var(--paper); border-radius: var(--radius); padding: var(--s5);
  opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease), transform 300ms var(--ease);
}
.modal.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal__close { position: absolute; top: 12px; right: 14px; }

.size-table th, .size-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
.size-table th { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }

/* ---------- checkout ----------------------------------------------------- */
.checkout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.steps { display: flex; gap: var(--s3); margin-bottom: var(--s5); flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; color: var(--faint); }
.step.is-on { color: var(--ink); }
.step.is-done { color: var(--muted); }
.step__n { width: 22px; height: 22px; border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-size: 10px; }

.field { display: block; margin-bottom: var(--s3); }
.field > span { display: block; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; height: 46px; padding: 0 13px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 180ms;
}
.field input:focus, .field select:focus { border-color: var(--ink); outline: none; }
.field.has-error input, .field.has-error select { border-color: var(--accent); }
/* specificity must beat `.field > span` above, or every error shows on load */
.field > .field__err { display: none; color: var(--accent); margin-top: 5px; margin-bottom: 0; }
.field.has-error > .field__err { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }

.summary { background: var(--surface); padding: var(--s4); border-radius: var(--radius); position: sticky; top: calc(var(--nav-h) + 20px); }
.summary__row { display: flex; justify-content: space-between; gap: var(--s3); padding-block: 7px; }
.summary__row--total { border-top: 1px solid var(--line); margin-top: var(--s2); padding-top: var(--s3); font-size: 17px; }

.ship-opt { display: flex; gap: var(--s3); align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); margin-bottom: 10px; cursor: pointer; transition: border-color 180ms; }
.ship-opt:hover { border-color: var(--muted); }
.ship-opt.is-on { border-color: var(--ink); }
.ship-opt input { margin-top: 3px; }

/* The review step. A definition list, not a form: nothing here is editable,
   which is the whole point of the step. */
.review { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); }
.review__row { display: flex; gap: var(--s4); justify-content: space-between; padding-block: 11px; border-bottom: 1px solid var(--line); }
.review__row:last-child { border-bottom: 0; }
.review__row dt { flex: 0 0 auto; }
.review__row dd { margin: 0; text-align: right; max-width: 34ch; line-height: 1.5; }
.review__edit { margin-top: var(--s3); }

/* Says what will and will not happen next. Reserved for statements of fact
   about money — never used for marketing. */
.notice { border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: var(--radius);
  padding: var(--s3) var(--s4); margin-top: var(--s3); font-size: 14px; line-height: 1.6; }
.notice strong { font-weight: 500; }
.notice--warn { border-left-color: #A4462F; }
.is-busy { opacity: .55; pointer-events: none; }

/* ---------- footer ------------------------------------------------------- */
.foot { background: var(--ink); color: var(--paper); padding-block: var(--s7) var(--s5); margin-top: var(--s6); }
.foot a:hover { opacity: .66; }
.foot .mono { color: rgba(251,250,247,.56); }
.foot__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--s5); }
.foot__cols { display: grid; gap: 9px; font-size: 14px; }
.foot__bottom { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid rgba(251,250,247,.16); }
.sub { display: flex; gap: 8px; margin-top: var(--s3); max-width: 380px; }
.sub input {
  flex: 1; height: 44px; padding: 0 12px; background: transparent;
  border: 1px solid rgba(251,250,247,.3); color: var(--paper); border-radius: var(--radius);
}
.sub input::placeholder { color: rgba(251,250,247,.45); }
.sub input:focus { border-color: var(--paper); outline: none; }

/* ---------- toast -------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 90;
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: var(--radius);
  opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease), transform 300ms var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- scroll reveal ------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive --------------------------------------------------- */
@media (max-width: 1000px) {
  .pdp { grid-template-columns: 1fr; }
  .plate { grid-template-columns: 1fr; }
  .pdp__panel, .pdp__panel.is-pinned { position: static; }
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --nav-h: 56px; }
  .nav__inner { grid-template-columns: auto 1fr auto; }
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; }
  .grid-products, .grid-products--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; }
  /* No hover on touch, so the arrows would either never appear or sit there
   * permanently over the photograph. The swipe and the rail are the controls
   * on a phone; the counter tells you how far along you are. */
  .gal__nav { display: none; }
  .gal__thumb { width: 56px; }
}
@media (max-width: 560px) {
  .foot__grid { grid-template-columns: 1fr; gap: var(--s4); }
  .section-head { margin-bottom: var(--s4); }
  .modal { padding: var(--s4); }
}

/* mobile nav sheet */
.sheet {
  position: fixed; inset: 0; z-index: 80; background: var(--paper);
  padding: var(--s4) var(--gutter); display: flex; flex-direction: column; gap: var(--s4);
  transform: translateY(-101%); transition: transform 420ms var(--ease);
}
.sheet.is-on { transform: none; }
.sheet a { font-size: 26px; letter-spacing: -0.02em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- about / studio page ------------------------------------------ */
/* Anchored sections sit under the sticky nav + announcement bar; without this
 * an href="#shipping" parks the heading behind the chrome. */
[id]:target, .acc__item[id], section[id] { scroll-margin-top: calc(var(--nav-h) + var(--bar-h) + 16px); }

/* NOTE: named .process, not .steps — .steps/.step are already taken by the
 * checkout progress indicator above (display:flex, colour:faint). Reusing them
 * here silently laid every heading out beside its own paragraph. */
.process {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2.4vw, 40px);
}
.process__step { display: block; border-top: 1px solid var(--ink); padding-top: var(--s3); color: var(--ink); }
.process__step .body { color: var(--ink-soft); }

.size-panel {
  margin-top: var(--s4);
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(20px, 3vw, 56px);
  align-items: start;
}
.size-panel__note { border-left: 1px solid var(--line); padding-left: clamp(16px, 2vw, 32px); }

.info-acc { margin-top: var(--s3); }
.info-acc .acc__body { max-width: 74ch; }

@media (max-width: 900px) {
  .process { grid-template-columns: repeat(2, 1fr); }
  .size-panel { grid-template-columns: 1fr; }
  .size-panel__note { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: var(--s4); }
}
@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; }
}
