/* ═══════════════════════════════════════════════════
   PROJECT.CSS, case study template
   Anything Studios design system v.04, dark (Oct 2026)
   ═══════════════════════════════════════════════════ */

/* ── HERO ──────────────────────────────────────── */
.project-hero-inner { max-width: var(--container); margin: 0 auto; padding: 28px var(--gutter) 0; }
.project-breadcrumb { font-size: 14px; color: var(--quiet); }
.project-breadcrumb a { color: var(--ink-70); text-decoration: none; border-bottom: 1px solid var(--line-strong); transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.project-breadcrumb a:hover { color: var(--ink); border-color: var(--ink); }
.project-breadcrumb span { margin: 0 6px; }
.project-hero-content { padding: 36px 0 40px; max-width: 820px; }
.project-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(32px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -0.035em; margin-bottom: 22px;
}
.project-subtitle { font-size: 17px; line-height: 1.65; color: var(--ink-70); max-width: 64ch; }
.project-subtitle a { color: var(--ink); }
.hero-cta-row { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.project-live-section { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.project-cover {
  display: block; width: 100%; padding: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface);
  aspect-ratio: 16 / 9;
}
.zoomable { cursor: zoom-in; font: inherit; color: inherit; text-align: left; }
.zoomable:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.project-cover img, .project-cover video { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.project-cover-video { background: #000; }

/* ── META ──────────────────────────────────────── */
.project-meta-bar { margin-top: 40px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.project-meta-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.project-meta-item { padding: 18px 20px 20px 0; border-right: 1px solid var(--line); }
.project-meta-item + .project-meta-item { padding-left: 20px; }
.project-meta-item:last-child { border-right: 0; }
.project-meta-item dt { font-size: 13px; color: var(--quiet); margin-bottom: 4px; }
.project-meta-item dd { font-size: 15px; line-height: 1.5; }

/* ── BODY ──────────────────────────────────────── */
.project-body { max-width: 860px; margin: 0 auto; padding: 56px var(--gutter) 0; }
.project-section { margin-bottom: 64px; }
.project-h2 {
  font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.025em; line-height: 1.1;
  margin-bottom: 22px;
}

.challenge-block { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 32px 36px; border-radius: 8px; }
.challenge-block p { font-size: 16px; line-height: 1.7; color: var(--ink); max-width: 66ch; }

/* steps are a sequence, so they are numbered */
.steps { list-style: none; counter-reset: s; border-top: 1px solid var(--line); }
.step { counter-increment: s; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.step::before {
  content: counter(s);
  font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1; color: var(--accent); padding-top: 3px;
}
.step-content { min-width: 0; }
.step-title { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; margin-bottom: 10px; }
.step-body { font-size: 15.5px; line-height: 1.7; color: var(--ink-70); max-width: 66ch; }
.step-media { display: block; width: 100%; padding: 0; margin-top: 20px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.step-media img, .step-media video { width: 100%; display: block; }
.step-media video { background: #000; }
.step-video { aspect-ratio: 16 / 10; }
.step-video video { width: 100%; height: 100%; object-fit: cover; }
/* tall images (phone screens, long forms) sit letterboxed on the paper tone instead of running the full column */
.step-media.is-tall { background: var(--paper-2); padding: 28px 20px; }
.step-media.is-tall img { width: auto; max-width: 100%; height: 600px; max-height: 70vh; object-fit: contain; margin: 0 auto; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.gc-slide.is-tall img { object-fit: contain; background: var(--paper-2); }

.outcome-text { font-family: var(--display); font-weight: 500; font-size: 21px; line-height: 1.45; letter-spacing: -0.012em; max-width: 60ch; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 28px; border-top: 1px solid var(--line-strong); }
.stat { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 20px; }
.stat:last-child { border-right: 0; }
.stat dd { font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: -0.03em; line-height: 1; margin-bottom: 8px; }
.stat dt { font-size: 13px; color: var(--quiet); line-height: 1.4; }

/* ── CODE ──────────────────────────────────────── */
.code-block { margin: 0 0 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.code-title { font-weight: 600; color: var(--ink); }
.code-lang { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--accent-ink); }
.code-block pre { margin: 0; padding: 16px; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; color: var(--ink); tab-size: 2; }
.code-block code { font: inherit; }
.code-caption { padding: 12px 16px 14px; font-size: 14px; line-height: 1.6; color: var(--ink-70); border-top: 1px solid var(--line); max-width: none; }

/* ── GALLERY ───────────────────────────────────── */
.gallery-carousel { position: relative; }
.gc-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; }
.gc-track::-webkit-scrollbar { display: none; }
.gc-slide { flex: 0 0 78%; scroll-snap-align: center; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in; display: block; }
@media (min-width: 760px) { .gc-slide { flex-basis: 47%; } }
.gc-slide img { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top; display: block; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.gc-slide video { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; border: 1px solid var(--line); border-radius: 8px; background: #000; }
.gc-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--ink); font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.gc-arrow:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.gc-prev { left: -14px; } .gc-next { right: -14px; }
.gc-arrow[disabled] { opacity: 0; pointer-events: none; }
@media (max-width: 759px) { .gc-arrow { display: none; } }
.gc-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.gc-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: var(--line-strong); cursor: pointer; transition: background var(--dur-fast) var(--ease); }
.gc-dot.is-active { background: var(--accent); }

/* lightbox: disclosure recipe, quick exit, medium entrance */
.gc-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,0.94); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity var(--motion-disclosure-out); }
.gc-lightbox.is-open { opacity: 1; pointer-events: auto; transition: opacity var(--motion-disclosure-in); }
.gc-lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; border-radius: 4px; }
.gc-lb-btn { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; opacity: .8; transition: opacity var(--dur-fast); line-height: 1; }
.gc-lb-btn:hover { opacity: 1; }
.gc-lb-close { top: 22px; right: 26px; font-size: 30px; }
.gc-lb-prev, .gc-lb-next { top: 50%; transform: translateY(-50%); font-size: 40px; padding: 12px; }
.gc-lb-prev { left: 14px; } .gc-lb-next { right: 14px; }
.gc-lb-counter { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.7); font-size: 13px; }
body.gc-lb-open { overflow: hidden; }

.project-live-section { text-align: center; padding: 8px 0 24px; }

/* ── NEXT ──────────────────────────────────────── */
.next-project { max-width: var(--container); margin: 24px auto 0; padding: 0 var(--gutter); }
.next-card {
  display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 24px; align-items: baseline;
  padding: 36px 0; border-top: 1px solid var(--line-strong); text-decoration: none; color: inherit;
}
.next-label { font-size: 14px; color: var(--quiet); grid-row: span 2; }
.next-title { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.025em; line-height: 1.1; transition: color var(--dur-fast) var(--ease); }
.next-card:hover .next-title { color: var(--accent-ink); }
.next-type { font-size: 14px; color: var(--ink-70); }

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 900px) {
  .project-meta-inner { grid-template-columns: 1fr 1fr; }
  .project-meta-item:nth-child(2) { border-right: 0; }
  .project-meta-item:nth-child(3) { padding-left: 0; }
  .project-meta-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .project-body { padding-top: 40px; }
  .step { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 600px) {
  .project-hero-inner { padding-top: 20px; }
  .project-hero-content { padding: 20px 0 24px; }
  .project-subtitle { font-size: 15.5px; }
  .hero-cta-row .btn, .project-live-section .btn { flex: 1 1 auto; justify-content: center; }
  .project-body { padding-top: 32px; }
  .project-section { margin-bottom: 44px; }
  .project-h2 { font-size: 22px; }
  .step { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .step::before { font-size: 22px; }
  .step-body { font-size: 15px; }
  .outcome-text { font-size: 18px; }
  .project-meta-inner { grid-template-columns: 1fr; }
  .project-meta-item { border-right: 0; padding: 14px 0; }
  .project-meta-item + .project-meta-item { padding-left: 0; border-top: 1px solid var(--line); }
  .challenge-block { padding: 22px 20px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stat { padding-left: 0; }
  .stat + .stat { padding-left: 16px; }
  .next-card { grid-template-columns: 1fr; }
  .next-label { grid-row: auto; }
}
