:root {
  --bg: #fdfdfb;
  --ink: #111;
  --muted: #6f6f6a;
  --line: #e2e2dc;
  --panel: #f4f3ef;
  --header-h: 56px;
  --gutter: clamp(16px, 2.2vw, 32px);
  --font: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, p, ul, figure, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
legend { padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* The wordmark is a mask, so it takes whatever colour its parent has. */
.logo {
  display: block;
  width: 100%;
  aspect-ratio: 1783 / 195;
  background: currentColor;
  -webkit-mask: url(/img/logo.png) center / contain no-repeat;
  mask: url(/img/logo.png) center / contain no-repeat;
}

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  color: #fff;
  mix-blend-mode: difference; /* white over photos, near-black over the page */
}
.nav { display: flex; gap: 24px; }
.nav-right { justify-content: flex-end; }
.nav a, .bag-toggle { padding: 8px 0; }
.nav a:hover, .bag-toggle:hover, .link:hover, .footer-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.brand { width: clamp(132px, 15vw, 190px); transition: opacity .3s; }
.home .brand { opacity: 0; pointer-events: none; }
.home.is-scrolled .brand { opacity: 1; pointer-events: auto; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 520px;
  display: grid; grid-template-columns: 1fr 1fr;
  background: #1a1a1a; overflow: hidden;
}
.hero-panel { min-width: 0; min-height: 0; }
.hero-panel img, .hero-media { width: 100%; height: 100%; object-fit: cover; }
.hero-panel:first-child img { object-position: 50% 62%; }
.hero-panel:last-child img { object-position: 50% 30%; }
.hero-video { display: block; }
.hero-logo, .hero-cta { position: absolute; color: #fff; }
.hero-logo { mix-blend-mode: difference; }
.hero-cta { text-shadow: 0 0 18px rgba(0, 0, 0, .55); }
.hero-logo { left: var(--gutter); right: var(--gutter); bottom: clamp(64px, 10vh, 110px); }
.hero-cta {
  left: var(--gutter); bottom: 24px;
  text-decoration: underline; text-underline-offset: 5px;
}

/* ---------- home ---------- */
.statement { padding: clamp(80px, 16vh, 180px) var(--gutter); }
.statement p { font-size: clamp(30px, 5vw, 76px); line-height: 1.02; letter-spacing: -0.035em; max-width: 14ch; }

.feature {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  border-top: 1px solid var(--line);
}
.feature-flip { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.feature-flip .feature-media { order: 2; }
.feature-media { display: block; overflow: hidden; background: var(--panel); height: min(96vh, 62vw); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.feature:hover .feature-media img { transform: scale(1.025); }
.feature-packshot .feature-media { background: #fff; }
.feature-packshot .feature-media img { object-fit: contain; padding: 6%; }
.feature-text {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  gap: 10px; padding: var(--gutter); padding-bottom: clamp(24px, 5vw, 56px);
}
.eyebrow { color: var(--muted); }
.feature-text h2 { font-size: clamp(34px, 4.6vw, 68px); font-weight: 400; line-height: 1; letter-spacing: -0.035em; }
.feature-blurb { max-width: 34ch; color: var(--muted); }
.link { text-decoration: underline; text-underline-offset: 5px; }
.feature-text .link { margin-top: 10px; }

/* ---------- product ---------- */
.product-page main, .text-page main, .checkout-page main { padding-top: var(--header-h); }
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.gallery { display: grid; grid-template-columns: minmax(0, 1fr) 68px; gap: 12px; padding-left: var(--gutter); }
.gallery-main { background: var(--panel); }
.gallery-slide { display: none; }
.gallery-slide.is-active { display: block; }
.gallery-slide img { width: 100%; }
.product-packshot .gallery-main { background: #fff; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 8px; }
.thumb { border: 1px solid transparent; opacity: .55; transition: opacity .2s; background: var(--panel); }
.thumb img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.product-packshot .thumb { background: #fff; }
.product-packshot .thumb img { object-fit: contain; }
.thumb:hover, .thumb.is-active { opacity: 1; }
.thumb.is-active { border-color: var(--ink); }

.info { position: sticky; top: var(--header-h); padding: clamp(24px, 6vh, 72px) var(--gutter) 48px; }
.info-inner { max-width: 500px; margin: 0 auto; }
.info h1 { font-size: 20px; font-weight: 400; line-height: 1.25; }
.price { margin-top: 6px; }
.blurb { margin-top: 18px; color: var(--muted); max-width: 44ch; }
.field { margin-top: 26px; }
.label { margin-bottom: 10px; }
.swatch { display: block; width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 1px var(--bg), 0 0 0 2px var(--ink); }
.size-row { display: flex; flex-wrap: wrap; gap: 8px; }
.size { position: relative; cursor: pointer; }
.size input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.size span { display: grid; place-items: center; min-width: 68px; height: 44px; padding: 0 14px; border: 1px solid var(--line); transition: border-color .15s, background .15s, color .15s; }
.size:hover span { border-color: var(--ink); }
.size input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.size input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 3px; }

.buy { display: flex; gap: 10px; margin-top: 26px; }
.qty { display: grid; grid-template-columns: 44px 36px 44px; align-items: center; height: 52px; border: 1px solid var(--ink); text-align: center; }
.qty button { height: 100%; font-size: 16px; }
.btn {
  flex: 1; height: 52px; padding: 0 24px;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink);
  transition: background .15s, color .15s;
}
.btn:hover { background: transparent; color: var(--ink); }
.hint { min-height: 21px; margin-top: 10px; color: var(--muted); }

.accordions { margin-top: 26px; border-bottom: 1px solid var(--line); }
details { border-top: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 16px; line-height: 1; }
details[open] summary::after { content: "−"; }
details > :not(summary) { padding-bottom: 18px; color: var(--muted); }
details li + li { margin-top: 4px; }
details a { text-decoration: underline; text-underline-offset: 4px; }

.related { padding: clamp(64px, 12vh, 128px) var(--gutter) clamp(48px, 8vh, 96px); }
.related h2 { font-size: 20px; font-weight: 400; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; }
.card-media { display: block; aspect-ratio: 3 / 4; background: var(--panel); overflow: hidden; margin-bottom: 10px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-packshot .card-media { background: #fff; }
.card-packshot .card-media img { object-fit: contain; padding: 8%; }
.card-price { color: var(--muted); }

/* ---------- text pages ---------- */
.text { max-width: 760px; padding: clamp(48px, 12vh, 140px) var(--gutter) 120px; min-height: 70vh; }
.text h1, .checkout h1 { font-size: clamp(34px, 5vw, 68px); font-weight: 400; line-height: 1; letter-spacing: -0.035em; margin-bottom: 28px; }
.text .lead { font-size: 20px; line-height: 1.35; margin-bottom: 20px; }
.text p + p { margin-top: 14px; }
.text p:not(.lead) { color: var(--muted); max-width: 56ch; }

/* ---------- checkout ---------- */
.checkout { padding: clamp(48px, 10vh, 110px) var(--gutter) 120px; min-height: 80vh; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.checkout-form { display: grid; gap: 16px; max-width: 560px; }
.checkout-form label { display: grid; gap: 6px; }
.checkout-form label { min-width: 0; }
.checkout-form input, .checkout-form textarea { width: 100%; min-width: 0; height: 48px; padding: 0 12px; border: 1px solid var(--line); background: transparent; border-radius: 0; }
.checkout-form textarea { height: auto; padding: 12px; resize: vertical; }
.checkout-form input:focus, .checkout-form textarea:focus { outline: 0; border-color: var(--ink); }
.checkout-form .row { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.checkout-form .btn { flex: none; }
.notice { padding: 14px 16px; background: var(--panel); }
.summary { position: sticky; top: calc(var(--header-h) + 24px); }
.summary h2 { font-size: 20px; font-weight: 400; margin-bottom: 8px; }

/* ---------- bag ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(17, 17, 17, .35); opacity: 0; transition: opacity .3s; }
.scrim.is-open { opacity: 1; }
.bag {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(440px, 100vw);
  display: flex; flex-direction: column;
  background: var(--bg);
  transform: translateX(100%); transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.bag.is-open { transform: none; }
.bag-head { display: flex; justify-content: space-between; align-items: center; height: var(--header-h); padding: 0 20px; border-bottom: 1px solid var(--line); }
.bag-head h2 { font-size: 14px; font-weight: 400; }
.bag-body { flex: 1; overflow-y: auto; padding: 0 20px; }
.bag-foot { padding: 20px; border-top: 1px solid var(--line); }
.bag-foot:empty { display: none; }
.bag-empty { padding: 40px 0; color: var(--muted); }
.line { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.line-media { aspect-ratio: 3 / 4; background: var(--panel); overflow: hidden; }
.line-media img { width: 100%; height: 100%; object-fit: cover; }
.line-media.is-packshot { background: #fff; }
.line-media.is-packshot img { object-fit: contain; padding: 6%; }
.line-meta { display: flex; flex-direction: column; gap: 2px; }
.line-meta .muted, .line-remove { color: var(--muted); }
.line-qty { display: inline-grid; grid-template-columns: 30px 26px 30px; align-items: center; text-align: center; height: 32px; border: 1px solid var(--line); margin-top: auto; width: max-content; }
.line-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.line-remove { text-decoration: underline; text-underline-offset: 4px; }
.total { display: flex; justify-content: space-between; margin-bottom: 14px; }
.bag-foot .btn, .summary .btn { display: grid; place-items: center; width: 100%; }
.total-note { color: var(--muted); margin-top: 10px; }

/* ---------- footer ---------- */
.site-footer {
  display: grid; grid-template-columns: 1fr auto; gap: 32px var(--gutter); align-items: end;
  padding: clamp(48px, 9vh, 96px) var(--gutter) 28px;
  border-top: 1px solid var(--line);
}
.footer-logo { grid-column: 1 / -1; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-legal { color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 899px) {
  .nav { gap: 16px; }
  .brand { width: 118px; }
  .hero { display: block; }
  .hero-panel { height: 100%; }
  .hero-panel:last-child { display: none; }
  .hero::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); pointer-events: none; }
  .hero-logo { bottom: 72px; mix-blend-mode: normal; z-index: 1; }
  .hero-cta { z-index: 1; }

  .feature { grid-template-columns: 1fr; }
  .feature-flip .feature-media { order: 0; }
  .feature-media { height: auto; aspect-ratio: 4 / 5; }
  .feature-packshot .feature-media { aspect-ratio: 1; }
  .feature-text { padding-top: 20px; padding-bottom: 40px; }

  .product { grid-template-columns: 1fr; }
  .gallery { display: block; padding: 0; }
  .gallery-main { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .gallery-main::-webkit-scrollbar { display: none; }
  .gallery-slide, .gallery-slide.is-active { display: block; flex: 0 0 100%; scroll-snap-align: start; }
  .gallery-thumbs { flex-direction: row; justify-content: center; gap: 6px; padding: 10px 0 0; }
  .thumb { width: 22px; height: 2px; border: 0; background: var(--ink); opacity: .2; }
  .thumb.is-active { opacity: 1; }
  .thumb img { display: none; }
  .info { position: static; padding-top: 22px; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .checkout-grid { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; order: -1; }
  .site-footer { grid-template-columns: 1fr; }
}

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