/* ============================================================
   project.css — every project page. Loaded after base.css.
   Styles unique to ONE project live in /css/<slug>.css
   ============================================================ */

/* ---- Hero ------------------------------------------------- */

.hero { margin-bottom: var(--s7); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
}

.hero h1 { margin-bottom: var(--s4); }

.hero .summary {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  max-width: 62ch;
}

.hero .btn-row { margin-top: var(--s5); }

/* Live status pip */
.pip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* ---- Sections -------------------------------------------- */

.section { margin-bottom: var(--s7); }

.section > h2 {
  font-size: var(--text-xl);
  padding-bottom: var(--s2);
  border-bottom: var(--border) solid var(--line);
  margin-bottom: var(--s5);
}

/* Body copy. Spacing lives here so you never hand-tune paragraph
   margins on individual pages again. */
.prose > * + * { margin-top: var(--s4); }

.prose p,
.prose li {
  color: var(--ink-soft);
  max-width: 68ch;
}

.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: var(--s5); }
.prose li + li { margin-top: var(--s2); }

.prose a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: var(--border) solid var(--accent);
}
.prose a:hover { color: var(--accent); }

/* ---- Numbered steps -------------------------------------- */

.steps {
  display: grid;
  gap: var(--s5);
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s4);
  counter-increment: step;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
}

.step h3 { margin-bottom: var(--s2); }
.step p { color: var(--ink-soft); max-width: 62ch; }

/* ---- Code ------------------------------------------------- */

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-raised);
  border: 1px solid var(--line-soft);
  padding: 1px 5px;
}

pre {
  font-family: var(--mono);
  font-size: var(--text-sm);
  background: var(--bg-raised);
  border: var(--border) solid var(--line);
  padding: var(--s4);
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

/* ---- Media frames ---------------------------------------- */

.frame {
  background: var(--bg-raised);
  border: var(--border-thick) solid var(--line);
  box-shadow: 8px 8px 0 var(--shadow);
  overflow: hidden;
  margin-inline: auto;
}

.frame--portrait { max-width: 320px; }
.frame--wide { max-width: 100%; }

figure { margin-bottom: var(--s5); }

figcaption {
  font-family: var(--mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-top: var(--s3);
  text-align: center;
}

/* ---- Flow diagram ---------------------------------------- */

/* Three boxes with arrows between them. Used to show how data moves. */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: var(--s3);
}

.flow-node {
  background: var(--bg-raised);
  border: var(--border) solid var(--line);
  padding: var(--s4);
}

.flow-node--key {
  border-color: var(--accent);
  border-width: var(--border-thick);
  box-shadow: 5px 5px 0 var(--accent);
}

.flow-kicker {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-bottom: var(--s2);
}

.flow-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: var(--s2);
}

.flow-sub { font-size: 0.9375rem; color: var(--ink-soft); }

.flow-arrow {
  align-self: center;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ink-faint);
}

@media (max-width: 700px) {
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); text-align: center; }
}

/* ---- Spec table ------------------------------------------ */

.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.spec th, .spec td {
  text-align: left;
  padding: var(--s3);
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.spec th {
  font-family: var(--mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-weight: 700;
}

.spec td:first-child { font-weight: 600; }

/* ---- Callout --------------------------------------------- */

.callout {
  border: var(--border) solid var(--line);
  border-left: 6px solid var(--accent);
  background: var(--bg-raised);
  padding: var(--s4) var(--s5);
}

.callout .eyebrow { margin-bottom: var(--s2); }
.callout p { color: var(--ink-soft); max-width: 64ch; }

/* ---- Pager ----------------------------------------------- */

.pager {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-top: var(--s8);
  padding-top: var(--s5);
  border-top: var(--border) solid var(--line);
  font-family: var(--mono);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pager a { text-decoration: none; border-bottom: var(--border) solid transparent; }
.pager a:hover { color: var(--accent); border-bottom-color: var(--accent); }
