/* retard.ink storefront
   Monochrome by design: one bone accent, no hue anywhere except the garments
   themselves. Tokens only — nothing below hardcodes a colour. */

:root {
  --bg: #000000;
  --bg-raise: #0a0a0a;
  --bg-panel: #0d0d0d;
  /* Product tiles are a studio-light surface: a black tee has to read as a
     black tee, and it cannot do that on a black page. */
  --bg-plate: #dbd8d1;
  --border: #1c1c1c;
  --border-strong: #2c2c2c;
  --text: #f2f0ea;
  --text-muted: #8a8a86;
  --text-dim: #5c5c58;
  --accent: #e9e4d8;
  --accent-soft: rgba(233, 228, 216, 0.08);
  --ok: #8fbf8a;
  --warn: #c4b89a;
  --danger: #c47a7a;
  --radius: 10px;
  --radius-sm: 6px;
  --header-h: 60px;
  --gutter: clamp(1.1rem, 3.5vw, 3rem);
  --max: 1800px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.95rem; }
p { margin: 0 0 0.8em; }

::selection { background: var(--accent); color: #000; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 200; background: var(--accent); color: #000; padding: 0.5rem 1rem; }

.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0;
}
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

/* --------------------------------------------------------------- chrome --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-inline: var(--gutter);
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.mark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.05em;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.mark i { font-style: normal; color: var(--text-dim); }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.7rem);
  font-size: 0.82rem;
}
.site-nav a { color: var(--text-muted); transition: color 0.15s var(--ease); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.34rem 0.72rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text) !important;
}
.cart-link:hover { border-color: var(--accent); }
.cart-count { font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim); }
.cart-link[data-filled="1"] .cart-count { color: var(--accent); }

.site-footer {
  margin-top: auto;
  padding: 2.4rem var(--gutter) 2.8rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.6rem;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; }
.site-footer a:hover { color: var(--text); }
.site-footer .fine { margin-left: auto; max-width: 34ch; text-align: right; line-height: 1.5; }

/* ---------------------------------------------------------------- layout -- */

main { width: 100%; max-width: var(--max); margin-inline: auto; padding: 0 var(--gutter) 4rem; }

.strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.5rem var(--gutter);
  border-bottom: 1px solid var(--border);
  background: var(--bg-raise);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.1rem;
  padding: 2.4rem 0 1.4rem;
}
.page-head p { margin: 0; color: var(--text-muted); max-width: 62ch; }

.hero {
  display: grid;
  gap: 1.6rem;
  padding: clamp(2.2rem, 6vw, 4rem) 0 2.2rem;
  border-bottom: 1px solid var(--border);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 3rem; } }
.hero-copy h1 { font-size: clamp(1.25rem, 2vw, 1.45rem); margin-bottom: 0.7rem; }
.hero-copy p { color: var(--text-muted); max-width: 52ch; }
.hero-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.hero-shots a {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: var(--bg-plate);
  border: 1px solid var(--border);
  padding: 6%;
  transition: border-color 0.18s var(--ease);
}
.hero-shots a:hover { border-color: var(--border-strong); }
.hero-shots img { width: 100%; height: 100%; object-fit: contain; }

/* ----------------------------------------------------------------- grid --- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 1.3rem 0 1.6rem;
  border-bottom: 1px solid var(--border);
}
.chip {
  padding: 0.34rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--text-dim); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #000; }

.grid {
  display: grid;
  gap: clamp(0.9rem, 1.6vw, 1.5rem);
  padding-top: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  overflow: hidden;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card-shot {
  aspect-ratio: 1;
  background: var(--bg-plate);
  display: grid;
  place-items: center;
  padding: 6%;
  border-bottom: 1px solid var(--border);
}
.card-shot img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 0.8rem 0.9rem 0.95rem; display: flex; flex-direction: column; gap: 0.28rem; flex: 1; }
.card-title { font-size: 0.88rem; font-weight: 600; line-height: 1.3; }
.card-sub { font-size: 0.76rem; color: var(--text-dim); }
.card-foot { margin-top: auto; padding-top: 0.5rem; display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.price { font-family: var(--mono); font-size: 0.82rem; }
.swatches { display: flex; gap: 0.25rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.22); }

.empty {
  padding: 3.5rem 1rem;
  text-align: center;
  color: var(--text-dim);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  margin-top: 1.6rem;
}

/* -------------------------------------------------------------- product --- */

.product {
  display: grid;
  gap: clamp(1.4rem, 4vw, 3.2rem);
  padding-top: 1.8rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 940px) { .product { grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr); align-items: start; } }

.shot {
  background: var(--bg-plate);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 5%;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}
.shot img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 939px) { .shot { position: static; } }

.buy { display: flex; flex-direction: column; gap: 1.25rem; }
.buy h1 { font-size: 1.15rem; }
.buy-price { font-family: var(--mono); font-size: 1.05rem; }
.buy-blurb { color: var(--text-muted); margin: 0; }

.field { display: flex; flex-direction: column; gap: 0.55rem; }
.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.field-label b { font-weight: 500; letter-spacing: 0.04em; text-transform: none; color: var(--text-muted); font-size: 0.76rem; }

.opts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.opt {
  min-width: 3rem;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: all 0.15s var(--ease);
}
.opt:hover { color: var(--text); border-color: var(--text-dim); }
.opt[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #000; }

.color-opts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.color-opt {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  position: relative;
  transition: transform 0.15s var(--ease);
}
.color-opt:hover { transform: scale(1.08); }
.color-opt[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.qty button { width: 2.1rem; height: 2.1rem; color: var(--text-muted); }
.qty button:hover { color: var(--text); }
.qty output { min-width: 2.2rem; text-align: center; font-family: var(--mono); font-size: 0.85rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.15s var(--ease);
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #fff; }
.btn-primary:disabled { background: var(--border-strong); color: var(--text-dim); cursor: not-allowed; }
.btn-ghost { border-color: var(--border-strong); color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-block { width: 100%; }

.spec {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: grid;
  gap: 0.5rem;
  font-size: 0.8rem;
}
.spec div { display: flex; gap: 1rem; justify-content: space-between; }
.spec dt { color: var(--text-dim); }
.spec dd { margin: 0; color: var(--text-muted); text-align: right; }

/* ----------------------------------------------------------------- cart --- */

.cart-layout { display: grid; gap: 2rem; padding-top: 1.6rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 880px) { .cart-layout { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr); align-items: start; } }

.line {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.line-shot { background: var(--bg-plate); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6%; }
.line-name { font-size: 0.88rem; font-weight: 600; }
.line-meta { font-size: 0.76rem; color: var(--text-dim); }
.line-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.line-remove { font-size: 0.74rem; color: var(--text-dim); }
.line-remove:hover { color: var(--danger); }

.summary {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}
.summary-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.85rem; }
.summary-row span:last-child { font-family: var(--mono); }
.summary-total { border-top: 1px solid var(--border); padding-top: 0.75rem; font-weight: 600; font-size: 0.95rem; }
.summary-note { font-size: 0.74rem; color: var(--text-dim); line-height: 1.5; margin: 0; }

/* ---------------------------------------------------------------- prose --- */

.prose { max-width: 74ch; padding-top: 1.6rem; }
.prose h2 { margin: 2rem 0 0.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-muted); }
.prose ul { padding-left: 1.1rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; }
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.prose a:hover { text-decoration-color: var(--accent); }

/* ---------------------------------------------------------------- toast --- */
/* The only overlay on any page, so it can never collide with something else. */

.toast-host {
  position: fixed;
  left: 50%;
  bottom: max(1.2rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.6rem 0.7rem 0.6rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #0e0e0e;
  font-size: 0.82rem;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.65);
  animation: toast-in 0.22s var(--ease);
}
.toast[data-kind="error"] { border-color: var(--danger); }
.toast a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.toast button { color: var(--text-dim); padding: 0 0.4rem; }
.toast button:hover { color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

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