/* ─────────────────────────────────────────
   PROJECT PAGES — pure black, no canvas
───────────────────────────────────────── */

body {
  background: #000;
  cursor: auto;
}
nav { background: #000; }

.project-main {
  padding: 120px var(--pad-x) 0;
  position: relative;
  z-index: 1;
}

/* ── HERO ── */
.project-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: start;
  margin-bottom: 80px;
  padding-bottom: 60px;
  border-bottom: 1px solid #1a1a1a;
}

.project-tag {
  font-size: 11px;
  font-weight: 400;
   letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 18px;
}
.project-title {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 20px;
}
.project-subtitle {
  font-size: clamp(13px, 1.2vw, 15px);
  font-weight: 300;
  line-height: 1.8;
  max-width: 560px;
  letter-spacing: 0.02em;
}

/* meta column */
.project-meta {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 160px;
}
.meta-label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.meta-value,
.meta-list li {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.5;
}
.meta-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }

/* ── COVER ── */
.project-cover {
  width: 100%;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  margin-bottom: 100px;
  border-radius: 20px;
}
.project-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* shared placeholder style */
.project-cover-placeholder,
.project-image-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  color: rgba(255,255,255,0.12);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.project-image-placeholder { aspect-ratio: 16 / 9; }

/* ── SECTIONS ── */
.project-section { margin-bottom: 100px; }

.project-section-label {
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 32px;
}
.project-body-text {
  font-size: clamp(13px, 1.2vw, 15px);
  font-weight: 300;
  line-height: 1.9;
  max-width: 680px;
  letter-spacing: 0.02em;
}

/* ── VIDEO ── */
.project-video-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  overflow: hidden;
  position: relative;
}
.project-video-wrap iframe { width: 100%; height: 100%; border: none; display: block; }
.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255,255,255,0.2);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.video-play-icon {
  width: 52px; height: 52px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play-icon::after {
  content: '';
  width: 0; height: 0;
  border: 9px solid transparent;
  border-left: 14px solid rgba(255,255,255,0.25);
  margin-left: 3px;
}

/* ── IMAGES ── */
.project-image {
  width: 100%;
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 20px;
}
.project-image img { width: 100%; display: block; object-fit: cover; }
.project-image-caption {
  font-size: 12px;
  font-weight: 300;
  opacity: 0.35;
  letter-spacing: 0.06em;
  margin-top: 10px;
}

/* ── INLINE VIDEO (case study) ── */
.project-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  background: #0a0a0a;
  margin-bottom: 120px;
}
.project-video video,
.project-video iframe {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  border: none;
}

/* ── CASE STUDY STORY ── */
:root { --ergo: #8b8cf6; }   /* ErgoScan's purple, lifted for the black page */

.case-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 60px;
  align-items: end;
}
.case-split .project-section-label { margin-bottom: 0; max-width: 520px; line-height: 1.25; }
.case-split + .screen-row,
.case-split + .compare { margin-top: 64px; }

.case-step {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ergo);
  margin-bottom: 18px;
}
.case-kicker {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.06em;
  opacity: 0.45;
  margin-bottom: 24px;
}

/* light diagram on the black page */
.project-image--light { background: #f4f4f4; }

/* three barriers */
.barrier-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.barrier {
  border: 1px solid #1f1f1f;
  border-radius: 20px;
  padding: 32px 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 56px;
  background: #070707;
}
.barrier-num {
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ergo);
  line-height: 1;
}
.barrier p {
  font-size: clamp(13px, 1.15vw, 15px);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

/* phone screens — every phone on the page shares one width */
.project-main { --phone-w: clamp(120px, 16vw, 232px); }

.screen-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(12px, 2.4vw, 36px);
}
.screen {
  flex: 0 0 var(--phone-w);
  width: var(--phone-w);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.screen img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 24px 40px rgba(139, 140, 246, 0.12));
}
.screen-row--3 { gap: clamp(16px, 5vw, 80px); }

/* includes the magnifier bubble: the phone itself is 80.2% of this image,
   so widen the figure until the phone matches the others            */
.screen--magnifier { flex-basis: calc(var(--phone-w) / 0.802); width: calc(var(--phone-w) / 0.802); }

/* CSS phone around screen recordings and raw screenshots,
   matched to the cut-out mockups (bezel 1.77% of width, corner radius 16.5%) */
.phone-frame {
  width: 100%;
  aspect-ratio: 0.4719;
  padding: 1.77%;
  background: #000;
  border-radius: 16.5% / 7.8%;
  filter: drop-shadow(0 24px 40px rgba(139, 140, 246, 0.12));
}
.phone-frame video,
.phone-frame img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
  border-radius: 15.3% / 7.1%;
  background: #111;
  filter: none;
}

/* mockup with slightly different proportions: match the frame exactly */
.screen--fit img { aspect-ratio: 0.4719; object-fit: fill; }

.screen-label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: center;
  opacity: 0.6;
}

/* before / after */
.compare {
  display: grid;
  grid-template-columns: 1fr auto 1.6fr;
  gap: 40px;
  align-items: start;
}
.compare:has(.compare-col--wide:first-child) { grid-template-columns: 1.6fr auto 1fr; }
.compare--even { grid-template-columns: 1fr auto 1fr; }
.compare-col { display: flex; flex-direction: column; gap: 28px; }
.compare-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.5;
}
.compare-tag--after { color: var(--ergo); opacity: 1; }
.compare-arrow {
  align-self: center;
  font-size: 28px;
  font-weight: 300;
  color: var(--ergo);
}
.compare-notes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.compare-notes li {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.03em;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(139, 140, 246, 0.45);
  color: var(--fg);
}
.compare-notes--before li { border-color: rgba(240, 120, 110, 0.45); }

.case-outcome {
  margin: 56px 0 0 auto;
  padding-left: 24px;
  border-left: 1px solid var(--ergo);
  max-width: 620px;
}

/* ── MERGED SCREENSHOT + SIDE NOTES (project 2) ── */
.stitch {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 40px;
  margin-bottom: 100px;
}
.stitch-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}
.stitch-notes { list-style: none; position: relative; margin: 0; padding: 0; }
.stitch-note {
  position: absolute;
  top: var(--top);
  left: 0; right: 0;
  padding-top: 24px;
  border-top: 1px solid #1f1f1f;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.02em;
}
.stitch-note:first-child { border-top: none; padding-top: 0; }
.stitch-num {
  display: block;
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.stitch-note strong {
  display: block;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

/* ── REFLECTION: award feedback ── */
.feedback {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin: 0;
  padding: 36px 40px;
  border: 1px solid #1f1f1f;
  border-radius: 20px;
  background: #070707;
  max-width: 860px;
}
.feedback-logo {
  width: 72px; height: 72px;
  flex-shrink: 0;
  border-radius: 22%;
  display: block;
}
.feedback-quote {
  margin: 0 0 16px;
  font-size: clamp(17px, 1.8vw, 24px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
}
.feedback-source {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ergo);
}

/* ── BOTTOM NAV ── */
.project-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px 0 80px;
  border-top: 1px solid #1a1a1a;
  margin-top: 60px;
}
.btn-all-works {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--fg);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.btn-all-works::before { content: '←'; font-size: 14px; }
.btn-all-works:hover { opacity: 1; }

.btn-back-top {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--fg);
  font-family: inherit;   /* buttons don't inherit the page font by default */
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.btn-back-top::after { content: '↑'; font-size: 14px; }
.btn-back-top:hover { opacity: 1; }

/* footer override for project pages */
footer { padding: 0 var(--pad-x) 52px; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 900px) {
  .project-main { padding: 100px var(--pad-x-sm) 0; }
  .project-hero { grid-template-columns: 1fr; gap: 40px; }
  .project-meta { flex-direction: row; flex-wrap: wrap; gap: 28px 48px; }
  footer { padding: 0 var(--pad-x-sm) 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; margin-bottom: 48px; }
  .footer-right { align-items: flex-start; }
}
@media (max-width: 900px) {
  /* phones: image first, notes listed underneath */
  .stitch { grid-template-columns: 1fr; gap: 32px; }
  .stitch-note { position: static; padding: 20px 0; border-top: 1px solid #1f1f1f; }
  .stitch-note:first-child { border-top: none; padding-top: 0; }
  .case-split { grid-template-columns: 1fr; }
  .barrier-grid { grid-template-columns: 1fr; gap: 14px; }
  .barrier { gap: 28px; }
  .compare,
  .compare:has(.compare-col--wide:first-child) { grid-template-columns: 1fr; gap: 28px; }
  .compare-arrow { transform: rotate(90deg); justify-self: center; }
  .case-outcome { margin-left: 0; }

  .project-main { --phone-w: 42vw; }
  .compare--even { grid-template-columns: 1fr; }

  /* rows wider than the screen: swipe sideways instead of shrinking */
  .screen-row--5,
  .screen-row--3 {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--pad-x-sm));
    padding: 0 var(--pad-x-sm) 12px;
    scrollbar-width: none;
  }
  .screen-row--5::-webkit-scrollbar,
  .screen-row--3::-webkit-scrollbar { display: none; }
  .screen-row--5 .screen,
  .screen-row--3 .screen { scroll-snap-align: center; }
}
@media (max-width: 600px) {
  .project-section { margin-bottom: 64px; }
  .project-video { margin-bottom: 72px; border-radius: 14px; }
  .feedback { padding: 24px; gap: 18px; }
  .feedback-logo { width: 52px; height: 52px; }
  .project-cover   { aspect-ratio: 4 / 3; margin-bottom: 64px; }
}