/* Afuera Studio — production stylesheet
   Faithful rebuild of the Claude Design prototype (design/project/Afuera.dc.html),
   converted from inline styles to a stylesheet and made responsive. */

:root {
  --bg: #efeadf;
  --fg: #1c1a15;
  --muted: #5a5548;
  --accent: #a3402a;
  --border-soft: #cfc6ae;
  --body-text: #33302a;
  --serif: 'PT Serif', Georgia, serif;
  --mono: 'IBM Plex Mono', monospace;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
}

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

a { color: inherit; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 0 10px;
  border-bottom: 1px solid var(--fg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 6px 16px;
}
.topbar span { white-space: nowrap; }

/* ---------- Masthead ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 26px 0 22px;
  border-bottom: 1px solid var(--fg);
  flex-wrap: wrap;
  gap: 16px;
}

.wordmark {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1;
  margin: 0;
}
.wordmark a { text-decoration: none; color: inherit; }

.tagline {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.site-nav {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .03em;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-nav a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px dotted var(--fg);
  padding-bottom: 1px;
}
.site-nav a.muted {
  color: var(--muted);
  border-bottom-color: var(--muted);
}
.site-nav .sep {
  color: var(--accent);
  margin: 0 9px;
}

/* ---------- Section headers ---------- */

section { margin-bottom: 48px; }
main > section:first-of-type { margin-top: 44px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.section-head.simple { display: block; }

.section-title {
  font-size: 22px;
  margin: 0;
  font-weight: 700;
}
.section-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.section-count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Image slots ----------
   Empty by default (styled placeholder + label). Drop a file at the
   referenced path in /images and it renders automatically — no markup
   or code changes needed. See js/image-slot.js. */

.img-slot {
  position: relative;
  overflow: hidden;
  background: rgba(28, 26, 21, .05);
  border: 1px dashed var(--border-soft);
}
.img-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-slot-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.img-slot.has-image { border-style: solid; border-color: transparent; }
.img-slot.has-image .img-slot-label { display: none; }

.img-slot--catalog,
.img-slot--concept { width: 200px; height: 150px; }
.img-slot--shop { width: 100%; height: 170px; }
.img-slot--detail { width: 100%; aspect-ratio: 4 / 3; }
.img-slot--thumb { width: 100%; aspect-ratio: 1 / 1; }

/* Clickable listing rows/cards (catalog, concepts, shop) link out to
   item.html. Block-level wrapper keeps the inner grid/flex markup
   untouched; color/decoration reset so it doesn't look like a normal link. */
.row-link { display: block; color: inherit; text-decoration: none; }
.row-link:hover { background: rgba(163, 64, 42, .04); }

/* ---------- Catalog + Concepts rows ---------- */

.catalog-row,
.concept-row {
  display: grid;
  gap: 24px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-soft);
}
.catalog-row { grid-template-columns: 80px 200px 1fr 160px; }
.concept-row {
  grid-template-columns: 80px 200px 1fr;
  border-bottom-style: dotted;
}

.item-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  padding-top: 4px;
}
.item-name {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 4px;
}
.item-category {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.item-desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--body-text);
  max-width: 420px;
}
.concept-row .item-desc { max-width: 460px; }
.item-price {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  padding-top: 4px;
  white-space: nowrap;
}

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

.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.shop-item-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .05em;
  color: var(--accent);
  margin-top: 8px;
}
.shop-item-name {
  font-size: 16px;
  font-weight: 700;
  margin: 3px 0 0;
}
.shop-item-price {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* E-commerce hook: this button is a placeholder (mailto). Swap its
   contents for a Stripe Payment Link / Buy Button or a Shopify Buy
   Button embed — the surrounding .buy-slot and the item's
   data-product-id / data-price-usd are already there to target. */
.buy-slot { margin-top: 10px; }
.buy-button {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .03em;
  text-decoration: none;
  color: var(--fg);
  border: 1px solid var(--fg);
  padding: 7px 12px;
  background: transparent;
  cursor: pointer;
}
.buy-button:hover { background: var(--fg); color: var(--bg); }

/* ---------- Archive rows ---------- */

.archive-row {
  display: grid;
  grid-template-columns: 100px 140px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px dotted var(--border-soft);
  align-items: baseline;
}
.archive-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}
.archive-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.archive-title {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 3px;
}
.archive-note {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--body-text);
}

/* ---------- Inquire ---------- */

.inquire-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  font-size: 14.5px;
  line-height: 1.6;
}
.inquire-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--fg);
  padding: 16px 0 28px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 6px 16px;
}

/* ---------- About page prose ---------- */

.prose { font-size: 15px; line-height: 1.7; max-width: 640px; }
.prose p { margin: 0 0 18px; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Item detail page ---------- */

.item-detail-back {
  font-family: var(--mono);
  font-size: 11px;
  margin: 44px 0 22px;
}
.item-detail-back a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  padding-bottom: 1px;
}
.item-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.item-detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.item-detail-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 8px;
}
.item-detail-name { font-size: 28px; font-weight: 700; margin: 0 0 6px; }
.item-detail-category {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.item-detail-price { font-family: var(--mono); font-size: 16px; margin-bottom: 18px; }
.item-detail-desc { font-size: 15px; line-height: 1.6; color: var(--body-text); margin: 0 0 14px; }
.item-detail-details {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--body-text);
  white-space: pre-line;
  margin: 0;
}
.item-detail-body .buy-slot { margin-top: 22px; }

/* ================= Responsive ================= */

@media (max-width: 860px) {
  .container { padding: 0 22px; }

  .wordmark { font-size: 34px; }
  .site-nav {
    white-space: normal;
    line-height: 2;
    width: 100%;
    flex-shrink: 1;
  }

  .img-slot--catalog,
  .img-slot--concept { width: 100%; height: auto; aspect-ratio: 4 / 3; }

  .catalog-row,
  .concept-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .item-price { text-align: left; padding-top: 0; }
  .item-desc { max-width: none; }

  .shop-grid { grid-template-columns: repeat(2, 1fr); }

  .archive-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .archive-date::after { content: ' \00b7 '; color: var(--accent); }

  .inquire-grid { grid-template-columns: 1fr; gap: 24px; }

  .item-detail-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .wordmark { font-size: 28px; }
  .topbar { font-size: 10px; }
  .shop-grid { grid-template-columns: 1fr; }
}
