/* Shared look for the project pages under /projects/<name>/.
   Same night palette and pixel headings as the front page; each page sets
   its own --hue (and --hue-soft) on <body> so the four projects feel distinct. */
:root {
  --night: #1d1712;
  --night-raised: #282019;
  --night-card: #30261e;
  --night-line: #0d0907;
  --cream: #f6ead3;
  --cream-soft: #cdb894;
  --tag-on-dark: #ff8a7e;
  --link-on-dark: #ffd27a;
  --paper: #fff6e3;
  --ink: #4a3426;
  --hue: #ff8a7e;
  --hue-soft: rgba(255, 138, 126, 0.14);
  --wide: 1120px;
  --text: 680px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font: 17px/1.65 Nunito, system-ui, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link-on-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--hue); outline-offset: 3px; }
h1, h2, h3 { font-family: 'Pixelify Sans', monospace; line-height: 1.1; }
code, .mono { font: 0.92em ui-monospace, 'SF Mono', Menlo, monospace; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 32px; }
.tag {
  font: 700 13px 'Pixelify Sans', monospace;
  color: var(--hue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(29, 23, 18, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--night-line);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font: 700 15px 'Pixelify Sans', monospace;
  color: var(--cream);
  text-decoration: none;
  background: var(--night-card);
  border: 3px solid var(--night-line);
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--night-line);
}
.btn:hover { background: var(--night-raised); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--night-line); }
.topbar nav { margin-left: auto; display: flex; gap: 4px; overflow-x: auto; }
.topbar nav a {
  padding: 4px 10px;
  border-radius: 8px;
  font: 700 14px 'Pixelify Sans', monospace;
  color: var(--cream-soft);
  text-decoration: none;
  white-space: nowrap;
}
.topbar nav a:hover { color: var(--cream); background: var(--night-card); }
.topbar nav a[aria-current="page"] { color: var(--night); background: var(--hue); }

/* ---------------------------------------------------------------- hero */
.hero {
  background:
    radial-gradient(900px 420px at 85% 10%, var(--hue-soft), transparent 70%),
    var(--night-raised);
  border-bottom: 3px solid var(--night-line);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
}
.hero h1 { margin: 8px 0 14px; font-size: clamp(44px, 7vw, 76px); font-weight: 700; }
.hero .lead { margin: 0 0 28px; font-size: 21px; line-height: 1.5; color: var(--cream); max-width: 32em; }
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin: 0;
  max-width: 520px;
  border: 3px solid var(--night-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--night-line);
}
.facts div { padding: 12px 16px; background: var(--night-card); }
.facts dt { font: 700 12px 'Pixelify Sans', monospace; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cream-soft); }
.facts dd { margin: 2px 0 0; font-weight: 700; line-height: 1.35; }
.hero-art { display: flex; justify-content: center; gap: 20px; }
.hero-art img, .shot {
  border: 3px solid var(--night-line);
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--night-line);
  background: #fff;
}
.hero-art .phone { width: min(46%, 230px); }
.hero-art .phone:nth-child(1) { transform: rotate(-3deg); }
.hero-art .phone:nth-child(2) { transform: rotate(2.5deg) translateY(28px); }

/* ---------------------------------------------------------------- page sections */
.section { padding: 72px 0; border-bottom: 3px solid var(--night-line); }
.section:nth-of-type(even) { background: var(--night-raised); }
.section-head { max-width: var(--text); margin-bottom: 32px; }
.section-head h2 { margin: 6px 0 0; font-size: clamp(30px, 4vw, 40px); }
.section-head p { margin: 12px 0 0; color: var(--cream-soft); font-size: 18px; }

.prose { max-width: var(--text); }
.prose p { margin: 0 0 18px; }
.prose h3 { font-size: 22px; margin: 34px 0 10px; }
.prose ul { padding-left: 1.2em; margin: 0 0 18px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--hue); }

.pull {
  margin: 30px 0;
  padding: 18px 22px;
  border-left: 6px solid var(--hue);
  background: var(--night-card);
  border-radius: 0 14px 14px 0;
  font: 500 22px/1.4 'Pixelify Sans', monospace;
}

/* two columns: text next to a figure */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.split.flip > :first-child { order: 2; }
figure { margin: 0; }
figcaption { margin-top: 14px; font-size: 15px; color: var(--cream-soft); }
figcaption strong { color: var(--cream); }

/* ---------------------------------------------------------------- numbered steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 18px 16px 66px;
  background: var(--night-card);
  border: 3px solid var(--night-line);
  border-radius: 14px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font: 700 18px 'Pixelify Sans', monospace;
  color: var(--night);
  background: var(--hue);
  border-radius: 10px;
}
.steps strong { display: block; font: 700 18px 'Pixelify Sans', monospace; margin-bottom: 2px; }
.steps p { margin: 0; color: var(--cream-soft); }

/* ---------------------------------------------------------------- feature cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.card {
  padding: 20px;
  background: var(--night-card);
  border: 3px solid var(--night-line);
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--night-line);
}
.card .icon { font-size: 26px; line-height: 1; }
.card h3 { margin: 10px 0 6px; font-size: 19px; }
.card p { margin: 0; font-size: 15.5px; color: var(--cream-soft); }

/* ---------------------------------------------------------------- flow diagram (boxes and arrows) */
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; margin: 8px 0 0; padding: 0; list-style: none; }
.flow li { display: flex; align-items: center; }
.flow li + li::before {
  content: '→';
  padding: 0 10px;
  font: 700 22px 'Pixelify Sans', monospace;
  color: var(--hue);
}
.flow .box {
  padding: 12px 14px;
  min-width: 120px;
  background: var(--night-card);
  border: 3px solid var(--night-line);
  border-radius: 12px;
}
.flow .box b { display: block; font: 700 16px 'Pixelify Sans', monospace; }
.flow .box span { font-size: 14px; color: var(--cream-soft); }
.flow .box.hot { border-color: var(--hue); }

/* ---------------------------------------------------------------- stack chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 4px 12px;
  font: 700 14px 'Pixelify Sans', monospace;
  background: var(--night-card);
  border: 2px solid var(--night-line);
  border-radius: 999px;
}

/* ---------------------------------------------------------------- timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 3px dashed var(--night-card); max-width: var(--text); }
.timeline li { position: relative; padding: 0 0 22px 8px; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--hue);
  border: 3px solid var(--night-line);
  border-radius: 4px;
}
.timeline time { font: 700 14px 'Pixelify Sans', monospace; color: var(--hue); }
.timeline p { margin: 2px 0 0; }

/* ---------------------------------------------------------------- next / previous project */
.more { padding: 64px 0 80px; }
.more h2 { font-size: 28px; margin: 0 0 20px; }
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.more-grid a {
  display: block;
  padding: 20px 22px;
  color: var(--cream);
  text-decoration: none;
  background: var(--night-card);
  border: 3px solid var(--night-line);
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--night-line);
  transition: transform 0.12s;
}
.more-grid a:hover { transform: translateY(-3px); }
.more-grid small { font: 700 12px 'Pixelify Sans', monospace; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cream-soft); }
.more-grid strong { display: block; margin-top: 4px; font: 700 22px 'Pixelify Sans', monospace; }
.more-grid span { color: var(--cream-soft); font-size: 15px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .hero .wrap, .split { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .hero .wrap { padding-top: 40px; padding-bottom: 56px; gap: 40px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topbar nav { display: none; }
  .section { padding: 52px 0; }
  .hero .lead { font-size: 18px; }
  .flow { flex-direction: column; }
  .flow li { flex-direction: column; align-items: stretch; }
  .flow li + li::before { content: '↓'; text-align: center; padding: 4px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .more-grid a { transition: none; }
}

/* ---------------------------------------------------------------- screenshot strip */
.gallery {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 6px 0 18px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.gallery li { flex: 0 0 min(62vw, 230px); scroll-snap-align: start; }
.gallery img { border: 3px solid var(--night-line); border-radius: 22px; box-shadow: 0 6px 0 var(--night-line); }
.gallery figcaption { margin-top: 12px; font-size: 14px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}
