/* product.css — shared layout for /products/<slug> detail pages ("builds").
   Depends on styles.css (the shared "Engineer's Almanac" design system).
   No hardcoded colours — everything reads from the theme tokens in styles.css
   so light + dark + reduced-motion all work for free.

   Used by every page under /products/<slug>/index.html. To add a new build
   page, copy an existing slug folder and edit the content — see README.md. */

/* ---- Page shell ----------------------------------------------------------- */
.product { padding-block: clamp(2.4rem, 6vw, 4rem) clamp(3rem, 8vw, 5.5rem); }
.product-wrap { max-width: 880px; }

/* ---- Top bar: back link + status badge ------------------------------------ */
.product-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: clamp(1.8rem, 5vw, 3rem); flex-wrap: wrap;
}
/* arrow link with the tip on the left (mirrors .arrow from styles.css) */
.back-link {
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .02em;
  color: var(--ink-2); display: inline-flex; align-items: center; gap: .5em;
  transition: color .2s var(--ease);
}
.back-link .tip { color: var(--accent); transition: transform .25s var(--ease); }
.back-link:hover { color: var(--accent); }
.back-link:hover .tip { transform: translateX(-.3em); }

/* ---- Header --------------------------------------------------------------- */
.product-head { margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.product-head .eyebrow { margin-bottom: var(--sp-3); }
.product-title {
  font-family: var(--font-display); font-weight: 430;
  font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.04; letter-spacing: -.025em;
  font-optical-sizing: auto; max-width: 20ch; margin-bottom: 1.3rem;
}
.product-head .lede { max-width: 44ch; margin-bottom: 2rem; }

/* ---- Meta strip (mono): status + stack ------------------------------------ */
.product-meta {
  font-family: var(--font-mono); font-size: .74rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; gap: 0;
}
.product-meta .meta-row {
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 0; border-bottom: 1px solid var(--line-2);
}
.product-meta .meta-row:last-child { border-bottom: 0; }
.product-meta .meta-key {
  color: var(--ink-3); letter-spacing: .14em; text-transform: uppercase;
  font-size: .64rem; flex-shrink: 0; width: 5.5rem;
}
.product-meta .meta-val { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }

/* ---- Body sections -------------------------------------------------------- */
.product-section {
  display: grid; grid-template-columns: minmax(0, 9rem) 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(2rem, 5vw, 3.2rem);
  border-top: 1px solid var(--line);
}
.section-label {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
  padding-top: .35rem;
}
.section-label .num { color: var(--accent); margin-right: .5em; }
.product-section .prose { max-width: 60ch; }
.product-section .tags { margin-top: .2rem; }

/* ---- Closing CTA ---------------------------------------------------------- */
.product-cta {
  margin-top: clamp(2.4rem, 6vw, 3.6rem); padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
}
.product-cta h2 { margin-bottom: 1.2rem; max-width: 18ch; }
.product-cta .hero-cta { display: flex; flex-wrap: wrap; gap: .85rem; }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 760px) {
  .product-section { grid-template-columns: 1fr; gap: .75rem; }
  .section-label { padding-top: 0; }
}
