@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --space: #000;
  --star: #fff;
  --dust: #8a8a8a;
  --nebula: #2a2a2a;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--space);
  color: var(--star);
  font: 400 15px/1.6 var(--mono);
  letter-spacing: 0.01em;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 1px solid var(--star); outline-offset: 4px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-weight: 500; margin: 0; }

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

.skip { position: absolute; left: -9999px; top: 8px; padding: 10px 14px; background: var(--star); color: var(--space); z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px var(--gutter);
  padding-top: max(24px, env(safe-area-inset-top));
  min-height: var(--header-h);
}
.logo { display: inline-flex; padding: 4px 0; }
.logo img { width: 116px; height: auto; }
.site-nav { display: flex; gap: clamp(4px, 2.4vw, 32px); }
.site-nav a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 8px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dust);
  transition: color .2s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--star); }
.sort { position: relative; display: flex; }
.sort-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 8px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dust); transition: color .2s ease;
}
.sort-btn:hover, .sort-btn[aria-expanded="true"], .sort-btn.is-filtered { color: var(--star); }
.sort-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 5;
  list-style: none; margin: 4px 0 0; padding: 6px 0; min-width: 132px;
  background: var(--space); border: 1px solid var(--nebula);
}
.sort-menu[hidden] { display: none; }
.site-nav .sort-menu a { display: flex; justify-content: flex-start; width: 100%; padding: 0 18px; }
.filter-note { text-align: center; margin: -16px 0 32px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--star); }
.filter-note a { margin-left: 12px; color: var(--dust); border-bottom: 1px solid var(--nebula); }
.filter-note a:hover { color: var(--star); }
.card[hidden] { display: none; }
.cart-count { margin-left: 6px; color: var(--star); }

main { flex: 1; width: 100%; }

/* Shop */
.shop { padding: 8px var(--gutter) 120px; max-width: 1440px; margin: 0 auto; }
.shop-intro { text-align: center; margin-bottom: clamp(28px, 6vh, 64px); font-weight: 400; color: var(--dust); }
.shop-intro span { white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shop-intro i { font-style: normal; }
.shop-intro, .label, .crumbs, .card-name, .card-price, .specs dt {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em;
}

.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 6vw, 120px); row-gap: clamp(48px, 9vh, 96px);
}
.card a { display: block; text-align: center; }
.card-media { position: relative; display: block; aspect-ratio: 1 / 1; margin-bottom: 18px; overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 69%; transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.card-alt { opacity: 0; }
@media (hover: hover) {
  .card a:hover .card-alt { opacity: 1; }
}
.card-name { display: block; color: var(--star); }
.card-price { display: block; margin-top: 4px; color: var(--dust); }

/* Product */
.product {
  max-width: 1280px; margin: 0 auto; padding: clamp(24px, 6vh, 72px) var(--gutter) 120px;
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  column-gap: clamp(32px, 8vw, 140px); row-gap: 32px; align-items: start;
}
.crumbs { grid-column: 1 / -1; display: flex; gap: 10px; color: var(--dust); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; margin: -12px 0; }
.crumbs a:hover { color: var(--star); }
.product-stage { position: relative; aspect-ratio: 4 / 5; }
.product-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .4s ease; }
.product-stage img.is-active { opacity: 1; }
/* A faint rim of light around every shirt, so black and navy ones don't vanish into the black page */
.product-stage img, .thumb img, .line img {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .65)) drop-shadow(0 0 28px rgba(255, 255, 255, .32));
}
.thumb img, .line img { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .7)) drop-shadow(0 0 6px rgba(255, 255, 255, .34)); }
.thumbs { display: flex; gap: 12px; margin-top: 16px; }
.thumb { width: 64px; min-height: 80px; padding: 0; opacity: .6; transition: opacity .2s ease; border-bottom: 1px solid transparent; }
.thumb[aria-pressed="true"] { opacity: 1; border-bottom-color: var(--star); }
.thumb img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; }
.product-info { position: sticky; top: 32px; padding-top: 8px; }
.product-info h1 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.4; }
.price { margin: 6px 0 24px; color: var(--dust); }
.muted { color: var(--dust); }
.small { font-size: 13px; }
.muted a, .prose a:not(.btn) { color: var(--star); border-bottom: 1px solid var(--nebula); }
.muted a:hover, .prose a:not(.btn):hover { border-bottom-color: var(--star); }
.field { margin: 32px 0 24px; }
.label { margin: 0 0 12px; color: var(--dust); }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.size {
  min-height: 44px; border: 1px solid var(--nebula); font-size: 13px; letter-spacing: 0.06em;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.size:hover { border-color: var(--dust); }
.size[aria-checked="true"] { background: var(--star); color: var(--space); border-color: var(--star); }
.field-color { margin-bottom: 0; }
.field-color + .field-size { margin-top: 20px; }
.label [data-color-name] { color: var(--star); margin-left: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 4px; margin-left: -5px; }
.swatch {
  width: 44px; height: 44px; padding: 5px; border-radius: 50%; border: 1px solid transparent;
  background: var(--c); background-clip: content-box; transition: border-color .2s ease;
  box-shadow: inset 0 0 0 5px var(--space), inset 0 0 0 6px rgba(255, 255, 255, .35);
}
.swatch:hover { border-color: var(--dust); }
.swatch[aria-checked="true"] { border-color: var(--star); }
.field.is-invalid .sizes { animation: nudge .3s ease; }
.field.is-invalid .label { color: var(--star); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0 24px;
  background: var(--star); color: var(--space); font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em;
  transition: opacity .2s ease;
}
.btn:hover { opacity: .85; }
.btn[disabled] { opacity: .5; cursor: progress; }
.btn-ghost { width: auto; background: none; color: var(--star); border: 1px solid var(--nebula); }
.btn-ghost:hover { opacity: 1; border-color: var(--star); }
.status { min-height: 24px; margin: 12px 0 0; font-size: 13px; color: var(--dust); }
.status a { color: var(--star); border-bottom: 1px solid var(--dust); }
.blurb { margin: 0; }

.specs { margin: 32px 0 20px; border-top: 1px solid var(--nebula); }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--nebula); }
.specs dt { color: var(--dust); }
.specs dd { margin: 0; text-align: right; font-size: 13px; }

/* Cart */
.cart { max-width: 760px; margin: 0 auto; padding: clamp(40px, 10vh, 100px) var(--gutter) 120px; }
.cart h1, .prose h1 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 48px; }
.cart-empty { text-align: center; padding: 40px 0; }
.cart-empty .btn { margin-top: 16px; }
.cart-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--nebula); }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--nebula); }
.line img { width: 72px; aspect-ratio: 4 / 5; object-fit: contain; }
.line-name { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.line-name a:hover { color: var(--dust); }
.line-meta { color: var(--dust); font-size: 13px; margin-top: 2px; }
.line-controls { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.qty-btn { width: 44px; height: 44px; border: 1px solid var(--nebula); font-size: 15px; }
.qty-btn:hover { border-color: var(--dust); }
.qty { min-width: 32px; text-align: center; }
.remove { min-height: 44px; padding: 0 8px; margin-left: 8px; color: var(--dust); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; }
.remove:hover { color: var(--star); }
.line-total { font-size: 13px; }
.cart-summary { margin-top: 40px; margin-left: auto; max-width: 360px; }
.cart-summary .specs { margin-top: 0; }

/* Prose pages */
.prose { max-width: 640px; margin: 0 auto; padding: clamp(40px, 10vh, 100px) var(--gutter) 120px; }
.prose.center { text-align: center; }
.prose .lead { color: var(--star); font-size: 15px; margin: -24px 0 56px; }
.prose section { margin-bottom: 48px; }
.prose h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--dust); margin-bottom: 12px; }
.prose p { margin: 0 0 16px; }
.prose .btn-ghost { margin-top: 24px; }
section[id] { scroll-margin-top: 24px; }
.faq { border-bottom: 1px solid var(--nebula); }
.faq:first-of-type { border-top: 1px solid var(--nebula); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 52px; padding: 12px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--dust); }
.faq[open] summary::after { content: "\2212"; }
.faq h3 { font-size: 15px; font-weight: 400; }
.faq p { color: var(--dust); padding-bottom: 8px; }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px;
  padding: 32px var(--gutter); padding-bottom: max(32px, env(safe-area-inset-bottom));
  color: var(--dust); font-size: 12px; letter-spacing: 0.06em;
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--star); }

@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }

@media (prefers-reduced-motion: reduce) {
  .card-media img, .product-stage img { transition: none; }
  .field.is-invalid .sizes { animation: none; }
}

@media (max-width: 699px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  :root { --header-h: 80px; }
  .site-header { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: 16px; gap: 12px; }
  .logo img { width: 92px; }
  .site-nav { gap: 0; }
  .site-nav a, .sort-btn { padding: 0 7px; font-size: 11px; letter-spacing: 0.08em; }
  .grid { column-gap: 16px; row-gap: 56px; }
  .card-name, .card-price { font-size: 11px; letter-spacing: 0.08em; }
  .shop { padding-top: 0; }
  .shop-intro i { display: none; }
  .shop-intro span { display: block; }
  .product { grid-template-columns: 1fr; padding-top: 0; row-gap: 12px; }
  .crumbs { display: none; }
  .product-stage { aspect-ratio: 1 / 1; width: min(100%, 50vh); margin: 0 auto; }
  .product-stage img { object-fit: cover; object-position: 50% 69%; }
  .thumbs { margin-top: 8px; }
  .thumb { width: 40px; min-height: 50px; }
  .product-info { position: static; padding-top: 0; display: flex; flex-direction: column; }
  .price { margin-bottom: 0; }
  .field { margin: 20px 0 16px; }
  .field-color { margin: 12px 0 0; }
  .field-color + .field-size { margin-top: 12px; }
  .field-color .label { margin-bottom: 4px; }
  .sizes { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .blurb { order: 1; margin-top: 8px; }
  .specs { order: 2; margin-top: 24px; }
  .product-info > .small { order: 3; }
  .small { font-size: 15px; }

  .line { grid-template-columns: 64px 1fr; }
  .line img { width: 64px; }
  .line-total { grid-column: 2; }
  .cart-summary { max-width: none; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 359px) {
  .site-nav a, .sort-btn { padding: 0 5px; font-size: 10.5px; letter-spacing: 0.04em; }
  .logo img { width: 78px; }
}
