/* =========================================================
   321 Enterprise — /work/<slug>/ project detail pages
   LAB-301 (A2). Loaded AFTER style.css by every page that
   _build/work/build-detail.js generates. Built only on the
   shared tokens in style.css — no new colours except the
   status/roadmap greens already used on work.html.

   Contract: the pages are semantic HTML first. Everything
   here is enhancement — with this file (or style.css)
   missing, the page must still read top to bottom.
   ========================================================= */

/* ---------- Hero ---------- */
.hero--detail { padding-block: clamp(40px, 6vh, 72px) clamp(48px, 7vh, 88px); }
.hero--detail .hero-headline {
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 14px 0 12px;
}
.detail-descriptor {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 18px;
  max-width: 640px;
}
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 28px; }
.detail-credit { margin: 0; font-size: 14px; color: var(--text-secondary); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 40px; }
.detail-actions .btn .ext { width: 12px; height: 12px; }
.btn--quiet { --btn-bg: transparent; }

.detail-hero-media {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-elev-1);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.55);
}
.detail-hero-media img { display: block; width: 100%; height: auto; }

/* ---------- Status badge (same look as the work.html cards; keep in sync) ---------- */
.work-status {
  display: inline-flex; align-items: center; gap: 7px; margin: 0;
  font-family: var(--font-display); font-weight: 600; font-size: 11px;
  letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-secondary);
}
.work-status-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none;
  box-sizing: border-box; border: 1.5px solid var(--text-secondary);
}
.work-status--production { color: #5fc985; }
.work-status--production .work-status-dot { background: #5fc985; border-color: #5fc985; box-shadow: 0 0 0 3px rgba(95, 201, 133, 0.18); }
.work-status--idea .work-status-dot { border-style: dashed; }

/* ---------- Sections ---------- */
.detail-section { padding-block: clamp(56px, 9vh, 104px); }
.detail-section .section-header { margin-bottom: clamp(28px, 5vh, 48px); }
.detail-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0;
}
.detail-prose { max-width: 68ch; }
.detail-prose p {
  font-size: 17px; line-height: 1.7; color: var(--text-secondary); margin: 0 0 1.1em;
}
.detail-prose p:last-child { margin-bottom: 0; }

/* Problem → Approach → Outcome: label column + prose column */
.story { display: grid; gap: clamp(28px, 4vh, 44px); }
.story-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 12px 40px;
  padding-top: clamp(24px, 3vh, 32px);
  border-top: 1px solid var(--border-subtle);
}
.story-row:first-child { border-top: 0; padding-top: 0; }
.story-label {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.01em; color: var(--text-primary); margin: 0;
}
.story-label .step {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand-blue-light); margin-bottom: 6px;
}
@media (max-width: 760px) { .story-row { grid-template-columns: 1fr; } }

/* Features */
.feature-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
@media (max-width: 760px) { .feature-list { grid-template-columns: 1fr; } }
.feature-list li {
  position: relative;
  padding: 18px 20px 18px 50px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 15.5px; line-height: 1.55; color: var(--text-secondary);
}
.feature-list li::before {
  content: ""; position: absolute; left: 20px; top: 22px;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(101, 162, 208, 0.16);
  box-shadow: inset 0 0 0 1.5px var(--brand-blue-light);
}

/* Gallery */
.detail-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .detail-gallery { grid-template-columns: 1fr; } }
.detail-gallery figure { margin: 0; }
.detail-gallery img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elev-1);
}
.detail-gallery figcaption { margin-top: 10px; font-size: 13.5px; color: var(--text-secondary); }

/* Stack */
.stack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.stack-list li {
  padding: 9px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--bg-elev-1);
  font-size: 14px; color: var(--text-primary);
}

/* Roadmap */
.roadmap { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 820px; }
.roadmap li {
  display: grid; grid-template-columns: 110px 1fr; gap: 6px 20px; align-items: baseline;
  padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg-elev-1);
}
@media (max-width: 560px) { .roadmap li { grid-template-columns: 1fr; } }
.roadmap-status {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.10em; text-transform: uppercase; color: var(--text-secondary);
}
.roadmap-status--shipped { color: #5fc985; }
.roadmap-status--next { color: var(--brand-blue-light); }
.roadmap-title { margin: 0; font-weight: 600; color: var(--text-primary); font-size: 16px; }
.roadmap-note { margin: 4px 0 0; color: var(--text-secondary); font-size: 14.5px; line-height: 1.55; }

/* Related */
.related-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .related-list { grid-template-columns: 1fr; } }
.related-list a {
  display: block; height: 100%; padding: 20px; text-decoration: none; color: inherit;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elev-1);
  transition: border-color var(--t-base) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.related-list a:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.related-list a:focus-visible { outline: 2px solid var(--brand-blue-light); outline-offset: 3px; }
.related-name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--text-primary); margin: 8px 0 4px; }
.related-desc { display: block; font-size: 14px; color: var(--text-secondary); }

/* Closing CTA */
.detail-cta { text-align: center; }
.detail-cta .detail-prose { margin-inline: auto; }
.detail-cta .detail-actions { justify-content: center; margin: 28px 0 0; }

/* Screen-reader-only text (e.g. "opens in new tab") */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Live email embeds (LAB-328) — real HTML emails in empty-sandbox iframes */
.detail-note { margin: 0 0 20px; color: var(--text-secondary); max-width: 62ch; }
.detail-emails { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .detail-emails { grid-template-columns: 1fr; } }
.detail-emails figure { margin: 0; }
.detail-emails iframe {
  display: block; width: 100%; border: 1px solid var(--border);
  border-radius: var(--r-md); background: var(--bg-elev-1);
}
.detail-emails figcaption { margin-top: 10px; font-size: 13.5px; color: var(--text-secondary); }
