/*
 * Obsidian Shelf stylesheet.
 *
 * Self-contained on purpose: no web fonts, no CDN, no external request of any
 * kind. Under SPEC 9 the URL Inspection "blocked resources" list has to be
 * empty for a clean reading, and a third-party asset would be one more thing
 * Cloudflare could interfere with.
 */

:root {
  --ink: #10100f;
  --ink-2: #171716;
  --ink-3: #22211f;
  --line: #33322e;
  --paper: #eceae4;
  --muted: #a29d92;
  --brass: #c39b4a;
  --brass-dim: #8d6f31;
  --rust: #b4553a;
  --green: #6f8f5f;
  --radius: 3px;
  --measure: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1,
h2,
h3 {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

a {
  color: var(--paper);
  text-decoration-color: var(--brass-dim);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--brass);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.visually-hidden,
.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip:focus {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  padding: 0.5rem 1rem;
  background: var(--brass);
  color: var(--ink);
}

/* --- header --------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--ink-2);
}

.bar {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex: 0 0 auto;
}

.wordmark .mark {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--brass) 0 50%, var(--ink-3) 50% 100%);
  border: 1px solid var(--brass-dim);
  transform: rotate(45deg);
}

.wordmark .name {
  font-family: ui-serif, Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.search {
  display: flex;
  flex: 1 1 260px;
  gap: 0.4rem;
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  font: inherit;
}

.search input:focus-visible,
.checkout-form :is(input, select):focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}

button,
.button {
  font: inherit;
  padding: 0.5rem 1rem;
  border: 1px solid var(--brass-dim);
  border-radius: var(--radius);
  background: var(--brass);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.button:hover {
  background: #d5ad5c;
}

button[disabled] {
  background: var(--ink-3);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.cart-link {
  flex: 0 0 auto;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}

.categories {
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.categories ul {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  gap: 1.25rem;
  list-style: none;
  white-space: nowrap;
}

.categories a {
  font-size: 0.87rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.categories a:hover,
.categories a[aria-current] {
  color: var(--brass);
}

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

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--line);
}

.breadcrumbs a {
  color: var(--muted);
}

.hero {
  padding: 1rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 62ch;
  margin: 0 0 0.75rem;
}

.stat,
.shelf-note {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 70ch;
}

section + section {
  margin-top: 3rem;
}

section > h2 {
  font-size: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

/* --- departments ---------------------------------------------------------- */

.dept-grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.dept-grid a {
  display: grid;
  gap: 0.35rem;
  padding: 1.1rem;
  background: var(--ink-2);
  height: 100%;
  text-decoration: none;
}

.dept-grid a:hover {
  background: var(--ink-3);
}

.dept-name {
  font-family: ui-serif, Georgia, serif;
  font-size: 1.1rem;
}

.dept-count {
  font-size: 0.78rem;
  color: var(--brass);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dept-blurb {
  font-size: 0.88rem;
  color: var(--muted);
}

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

.grid {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}

.card a {
  text-decoration: none;
  display: grid;
  gap: 0.4rem;
}

.card img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--ink-2);
}

.card-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass);
}

.card-title {
  font-size: 0.93rem;
  line-height: 1.4;
}

.card-meta {
  margin: 0.5rem 0 0.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.card-price {
  margin: 0;
  font-size: 1.02rem;
}

.card-price s,
.price s {
  color: var(--muted);
  margin-right: 0.4rem;
  font-size: 0.9em;
}

.sale {
  color: var(--rust);
}

.chip {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.chip-new {
  color: var(--green);
  border-color: #3d4c35;
}

.chip-in_stock {
  color: var(--paper);
}

.chip-out_of_stock {
  color: var(--rust);
  border-color: #5a2f22;
}

.chip-preorder,
.chip-single {
  color: var(--brass);
  border-color: var(--brass-dim);
}

/* --- listings ------------------------------------------------------------- */

.listing-head {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.listing-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.pager {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.empty {
  color: var(--muted);
  padding: 2rem 0;
}

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

.product {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
  .product {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
}

.product-media img {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--ink-2);
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
}

.product-info h1 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
}

.price {
  font-size: 1.9rem;
  font-family: ui-serif, Georgia, serif;
  margin: 0 0 0.4rem;
}

.price-note {
  display: block;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--muted);
}

.ship-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
  max-width: 52ch;
}

.buy button {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}

.variants,
.identifiers {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.variants h2,
.identifiers h2,
.description h2,
.specs h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: inherit;
  color: var(--muted);
  border: 0;
}

.variants ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.variants li {
  display: grid;
  gap: 0.15rem;
  font-size: 0.9rem;
}

.variants span {
  color: var(--muted);
  font-size: 0.82rem;
}

.identifiers dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.25rem;
  font-size: 0.9rem;
}

.identifiers dt {
  color: var(--muted);
}

.identifiers dd {
  margin: 0;
}

.description {
  max-width: 74ch;
}

.description p {
  color: #d5d1c7;
}

.specs table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 1rem;
}

.specs th,
.specs td,
.cart-table th,
.cart-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.specs th {
  color: var(--muted);
  font-weight: 400;
  width: 34%;
}

/* --- cart & checkout ------------------------------------------------------ */

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.93rem;
}

.cart-table thead th {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cart-sku {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.cart-table .grand td,
.cart-table .grand th {
  font-size: 1.1rem;
  border-bottom: 0;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
}

.cart-actions {
  margin-top: 1.75rem;
}

.checkout {
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 860px) {
  .checkout {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

.checkout-form fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 0 0 1.5rem;
}

.checkout-form legend {
  padding: 0 0.5rem;
  color: var(--brass);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checkout-form label {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.checkout-form :is(input, select) {
  padding: 0.55rem 0.7rem;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  font: inherit;
}

.notice {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.order-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--ink-2);
  align-self: start;
}

.order-summary h2 {
  font-size: 1rem;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.order-summary ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.6rem;
  font-size: 0.88rem;
}

.order-summary li,
.order-summary .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
}

.order-summary .row {
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.order-summary .grand {
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  color: var(--paper);
  font-size: 1.1rem;
}

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

.prose {
  max-width: 70ch;
}

.prose h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.prose h2 {
  font-size: 1.15rem;
  margin-top: 2.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

.prose p,
.prose li {
  color: #d5d1c7;
}

/* --- footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink-2);
  padding: 2.5rem 1.25rem 2rem;
}

.site-footer .cols {
  max-width: var(--measure);
  margin: 0 auto;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.site-footer h2 {
  font-family: inherit;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.site-footer p {
  font-size: 0.9rem;
  color: var(--muted);
}

.fineprint {
  font-size: 0.8rem !important;
}

.legal {
  max-width: var(--measure);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
