/* ── Process page ── */

.process-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 48px 120px;
}

.process-hero {
  padding: 80px 0 64px;
  max-width: 100%;
}

.process-hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-top: 20px;
  max-width: 560px;
}

/* ── Steps container ── */
.steps { display: flex; flex-direction: column; }

/* ── Single step ── */
.step {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.step:last-child { border-bottom: 1px solid var(--border); }

/* ── Side-by-side body ── */
.step-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

/* ── Content column ── */
.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-number {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.step-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 10px;
  border-radius: 20px;
}

.step-content h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.step-content > p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 18px;
  max-width: 480px;
}

/* ── Instruction blocks ── */
.step-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.step-block-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.step-block ol,
.step-block ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.step-block li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-block li strong { color: var(--text-primary); }

.step-block pre {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 8px;
  overflow-x: auto;
}

.step-block code,
pre code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--success);
  line-height: 1.75;
  white-space: pre;
}

.step-content p code,
.step-callout code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}

.muted {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Callout ── */
.step-callout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--primary-soft);
  border: 1px solid rgb(107 145 204 / 0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--primary);
  line-height: 1.6;
}

.callout-icon { font-size: 13px; flex-shrink: 0; margin-top: 1px; }
.step-callout strong { color: var(--text-primary); }

/* ════════════════════════════════════════════
   IMAGE COLUMN — smart collage by data-count
   ════════════════════════════════════════════ */

.step-images {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Collage grid containers ── */
.step-images[data-count="1"] .img-collage {
  display: block;
}

.step-images[data-count="2"] .img-collage:not([class*="img-collage--"]) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* 3 images: 1 wide on top, 2 below */
.step-images[data-count="3"] .img-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
}

.step-images[data-count="3"] .img-slot:first-child {
  grid-column: 1 / -1;
}

/* 4 images: 2×2 grid */
.step-images[data-count="4"] .img-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ── Image slot ── */
.img-slot {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  margin: 0;
}

.img-slot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 1px);
  transition: transform var(--duration) var(--ease);
}

.img-slot:hover img { transform: scale(1.015); }

/* Caption */
.img-slot figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-muted);
  background: linear-gradient(to top, rgba(7,16,31,0.85) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
  border-radius: 0 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px);
}

.img-slot:hover figcaption {
  opacity: 1;
  transform: none;
}

/* ── Collage wrapper (used when multiple images) ── */
.img-collage {
  width: 100%;
}

/* Single image — no wrapper needed, slot directly in .step-images */
.step-images[data-count="1"] > .img-slot {
  width: 100%;
}

/* Caption always visible for single image */
.step-images[data-count="1"] > .img-slot figcaption {
  opacity: 1;
  transform: none;
}

/* ── Step 1 collage — landscape on top, portrait below left ── */
.img-collage--s1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
}

.img-collage--s1 .img-slot--landscape {
  grid-column: 1 / -1;
}

.img-collage--s1 .img-slot--portrait {
  grid-column: 1 / 2;
}

/* ── Step 2 collage — stacked full width ── */
.img-collage--s2 {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.img-collage--s2 .img-slot {
  width: 100%;
}

/* ── Step 3 collage — folder on top, claude + terminal side by side below ── */
.img-collage--s3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.img-collage--s3 .img-slot--top {
  grid-column: 1 / -1;
}

.img-collage--s3 .img-slot--bl,
.img-collage--s3 .img-slot--br {
  height: 280px;
  overflow: hidden;
}

.img-collage--s3 .img-slot--bl img,
.img-collage--s3 .img-slot--br img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ── Step 4 collage — claude branch on top, switcher below left ── */
.img-collage--s4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.img-collage--s4 .img-slot--top {
  grid-column: 1 / -1;
}

.img-collage--s4 .img-slot--bl {
  grid-column: 1 / 2;
}

/* ── Step 5 collage — design file on top, claude response below ── */
.img-collage--s5 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.img-collage--s5 .img-slot {
  width: 100%;
}

/* ── Step 7 collage — push success on top, commit process below ── */
.img-collage--s7 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.img-collage--s7 .img-slot {
  width: 100%;
}

/* ── Step 6 collage — before/after stacked ── */
.img-collage--s6 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.img-collage--s6 .img-slot {
  width: 100%;
}

/* ── End section ── */
.process-end {
  text-align: center;
  padding: 100px 48px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.process-end-quote {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
  max-width: 680px;
}

.process-end-quote::before { content: '\201C'; color: var(--border-strong); }
.process-end-quote::after  { content: '\201D'; color: var(--border-strong); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .img-slot img,
  .img-slot figcaption { transition: none; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .step-body {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .step-images {
    position: static;
  }

  .process-main { padding: 0 24px 80px; }
  .process-hero { padding: 48px 0 40px; }
}

@media (max-width: 600px) {
  .step { padding: 40px 0; }
  .step-content h2 { font-size: 18px; }
  .process-main { padding: 0 20px 60px; }

  .step-images[data-count="2"] .img-collage,
  .step-images[data-count="3"] .img-collage,
  .step-images[data-count="4"] .img-collage {
    grid-template-columns: 1fr;
  }

  .step-images[data-count="3"] .img-slot:first-child {
    grid-column: 1;
  }
}
