/* Thread Safe storefront. House style: a hint of real UI, one accent red, JetBrains Mono. */
:root {
  --paper: #F4F3EF;
  --tile: #E9E8E4;
  --ink: #161618;
  --muted: #6B6B70;
  --rule: #D6D4CE;
  --red: #E5484D;
  --green: #3DD68C;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --display: "Archivo Black", "JetBrains Mono", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--mono);
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header: the wordmark sits after a prompt, like a terminal. */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.wordmark { font: 800 18px var(--mono); text-decoration: none; letter-spacing: -0.01em; }
.wordmark .prompt { color: var(--muted); font-weight: 400; margin-right: 0.5ch; }
.site-header nav a { font-size: 13px; color: var(--muted); text-decoration: none; margin-left: 20px; }
.site-header nav a:hover { color: var(--ink); }

/* Home */
.hero { padding: 56px 0 32px; }
.hero h1 { font: 400 clamp(34px, 6vw, 64px)/1.02 var(--display); margin: 0 0 14px; letter-spacing: -0.01em; }
.hero h1 .reveal { color: var(--red); }
.hero p { margin: 0; color: var(--muted); max-width: 52ch; }
.listing-cmd { font-size: 13px; color: var(--muted); margin: 32px 0 14px; }
.listing-cmd b { color: var(--ink); font-weight: 700; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; padding-bottom: 64px; }
.card { text-decoration: none; display: block; }
.card .shot { background: var(--tile); border-radius: 6px; overflow: hidden; aspect-ratio: 1; }
.card .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.card:hover .shot img { transform: scale(1.03); }
.card .meta { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px 0; font-size: 14px; }
.card .name { font-weight: 700; }
.card .price { color: var(--muted); white-space: nowrap; }

/* Product page */
.product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; padding: 32px 0 64px; }
.product .shot { background: var(--tile); border-radius: 6px; overflow: hidden; aspect-ratio: 1; }
.product .shot img { width: 100%; height: 100%; object-fit: cover; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumb a { text-decoration: none; }
.product h1 { font: 400 clamp(28px, 4vw, 40px)/1.08 var(--display); margin: 0 0 8px; }
.product .price { font-size: 20px; font-weight: 700; margin: 0 0 24px; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 8px; }
.label .value { color: var(--ink); text-transform: none; letter-spacing: 0; margin-left: 0.5ch; }

.swatches, .sizes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--rule); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }

/* Sizes read as terminal options: [ M ] */
.size { font: 700 14px var(--mono); background: transparent; color: var(--ink); border: 1px solid var(--rule); border-radius: 4px; min-width: 56px; height: 42px; padding: 0 12px; cursor: pointer; }
.size:hover { border-color: var(--ink); }
.size[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.size .bracket { color: var(--muted); }
.size[aria-pressed="true"] .bracket { color: #9A9AA0; }

.buy { width: 100%; height: 52px; border: 0; border-radius: 4px; background: var(--ink); color: var(--paper); font: 800 15px var(--mono); cursor: pointer; }
.buy:hover:not(:disabled) { background: #2B2D31; }
.buy:disabled { background: var(--tile); color: var(--muted); cursor: not-allowed; }
.buy-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; min-height: 1.5em; }

.facts { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--rule); font-size: 13px; }
.facts li { padding: 10px 0; border-bottom: 1px solid var(--rule); display: flex; gap: 10px; }
.facts .ok { color: var(--green); font-weight: 800; }

details.size-guide { margin-top: 18px; font-size: 13px; }
details.size-guide summary { cursor: pointer; font-weight: 700; }
table { border-collapse: collapse; width: 100%; margin-top: 12px; font-size: 13px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.fine { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

/* Policies */
.prose { max-width: 68ch; padding: 40px 0 64px; }
.prose h1 { font: 400 clamp(30px, 5vw, 44px)/1.05 var(--display); margin: 0 0 24px; }
.prose h2 { font-size: 16px; margin: 32px 0 8px; }
.prose p, .prose li { color: #2B2D31; }

.site-footer { border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 28px; }
.site-footer a { text-decoration: none; margin-right: 18px; white-space: nowrap; display: inline-block; }
.site-footer a:hover { color: var(--ink); }

@media (max-width: 760px) {
  .product { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; }
  .hero { padding-top: 36px; }
  .site-header nav a { margin-left: 14px; }
}
