/* ─── /process ─────────────────────────────────────────── */

.proc-eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary);
}

/* Hero */
.proc-hero { padding: 7rem 1rem 4rem; }
.proc-hero .container { max-width: 56rem; }
.proc-title {
  margin: 1rem 0 1.5rem; font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(2.25rem, 6vw, 4.25rem); line-height: 1.05;
}
.proc-lead { font-size: clamp(1rem, 2.2vw, 1.2rem); line-height: 1.7; color: var(--muted-fg); max-width: 40rem; }

/* Time strip: calendar time to scale (~4 weeks vs ~8 hours ≈ 1.2%). */
.proc-time { margin-top: 3.5rem; }
.proc-time-bar {
  display: flex; height: .75rem; border-radius: 9999px; overflow: hidden;
  background: var(--secondary);
}
.proc-time-wait  { flex: 98.8; background: repeating-linear-gradient(135deg, hsl(220 8% 24%) 0 6px, hsl(220 8% 20%) 6px 12px); }
.proc-time-bench { flex: 1.2; min-width: 6px; background: var(--grad-primary); box-shadow: 0 0 12px hsl(35 84% 62% / .6); }
.proc-time-legend {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem;
  margin-top: 1rem; font-size: .95rem; color: var(--muted-fg);
}
.proc-time-legend strong { color: var(--foreground); font-weight: 600; margin-right: .25rem; }
.proc-time-legend .dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 9999px; margin-right: .5rem; vertical-align: .05em; }
.proc-time-legend .dot-wait  { background: hsl(220 8% 30%); }
.proc-time-legend .dot-bench { background: var(--primary); }
.proc-time-note { margin-top: .5rem; font-size: .8rem; color: hsl(220 5% 50%); }

/* Chapters */
.proc-chapters { padding: 2rem 1rem 6rem; }
.proc-chapter {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center; padding: clamp(3rem, 8vw, 6rem) 0;
}
.proc-chapter + .proc-chapter { border-top: 1px solid hsl(220 8% 16%); }
.proc-chapter.is-portrait { grid-template-columns: 5fr 6fr; }
.proc-chapter.is-flipped { grid-template-columns: 5fr 7fr; }
.proc-chapter.is-flipped.is-portrait { grid-template-columns: 6fr 5fr; }
.proc-chapter.is-flipped .proc-figure { order: 2; }

.proc-figure {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-elev); background: var(--card);
}
.proc-figure img { display: block; width: 100%; height: auto; }
.proc-chapter.is-portrait .proc-figure { max-width: 30rem; justify-self: center; }

.proc-text { position: relative; max-width: 30rem; }
.proc-num {
  display: block; margin-bottom: .5rem;
  font-size: clamp(4rem, 9vw, 7rem); font-weight: 700; line-height: .9; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1px hsl(35 84% 62% / .55);
}
.proc-text h2 { margin: .5rem 0 1rem; font-size: clamp(1.6rem, 3.2vw, 2.25rem); font-weight: 700; line-height: 1.15; }
.proc-body { color: var(--muted-fg); line-height: 1.75; }
.proc-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--border);
  font-size: .85rem; color: var(--muted-fg);
}
.proc-meta strong { color: var(--primary); font-size: 1.1rem; font-weight: 600; white-space: nowrap; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* CTA */

@media (max-width: 900px) {
  .proc-hero { padding-top: 5.5rem; }
  .proc-chapter, .proc-chapter.is-portrait, .proc-chapter.is-flipped, .proc-chapter.is-flipped.is-portrait { grid-template-columns: 1fr; gap: 2rem; }
  .proc-chapter.is-flipped .proc-figure { order: 0; }
  .proc-num { font-size: 3.5rem; margin-bottom: .25rem; }
  .proc-chapter.is-portrait .proc-figure { max-width: 26rem; }
}

/* ─── Story with 3D stage (only when process-assembly.js adds .has-3d) ─── */
.proc-stage { display: none; }

.proc-story.has-3d {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 4vw, 4rem);
  max-width: 1440px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2.5rem);
}
.has-3d .proc-chapters { padding: 0 0 4rem; }
.has-3d .proc-chapters .container { padding: 0; max-width: none; }
.has-3d .proc-chapter,
.has-3d .proc-chapter.is-portrait,
.has-3d .proc-chapter.is-flipped,
.has-3d .proc-chapter.is-flipped.is-portrait {
  grid-template-columns: 1fr; gap: 2rem; align-content: center;
  min-height: 100vh; padding: 4rem 0;
}
.has-3d .proc-chapter.is-flipped .proc-figure { order: 0; }
.has-3d .proc-figure { max-width: 34rem; }
.has-3d .proc-chapter.is-portrait .proc-figure { max-width: 22rem; justify-self: start; }
.has-3d .proc-figure img { max-height: 48vh; object-fit: cover; }
.has-3d .proc-num { font-size: clamp(3.5rem, 6vw, 5rem); }

.has-3d .proc-stage { display: block; }
.proc-stage-view {
  position: sticky; top: 4.25rem; height: calc(100vh - 4.25rem);
  border-radius: calc(var(--radius) * 1.5); overflow: hidden;
  background: #14161b;
}
.proc-stage-view canvas {
  display: block; width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.2s ease;
}
.proc-stage-view.is-ready canvas { opacity: 1; }
/* Soft vignette so the render sits into the page. */
.proc-stage-view::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(10, 11, 14, .55) 100%);
}

.proc-stage-hud {
  position: absolute; left: 1.5rem; right: 1.5rem; bottom: 1.25rem; z-index: 1;
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: .25rem .75rem;
  font-size: .8rem; color: var(--muted-fg);
}
.proc-stage-num { font-weight: 700; color: var(--primary); letter-spacing: .05em; }
.proc-stage-label { text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }
.proc-stage-track {
  grid-column: 1 / -1; height: 2px; margin-top: .5rem;
  background: hsl(220 8% 22%); border-radius: 2px; overflow: hidden;
}
.proc-stage-bar {
  display: block; height: 100%; background: var(--grad-primary);
  transform-origin: left; transform: scaleX(0);
}

/* Narrow screens: the stage becomes a sticky band above the chapters. */
@media (max-width: 1000px) {
  .proc-story.has-3d { grid-template-columns: 1fr; gap: 0; }
  .has-3d .proc-stage { order: -1; position: sticky; top: 4rem; z-index: 5; height: 44vh; margin: 0 -1rem; }
  .has-3d .proc-stage-view { position: relative; top: 0; height: 100%; border-radius: 0; }
  .has-3d .proc-chapter,
  .has-3d .proc-chapter.is-portrait,
  .has-3d .proc-chapter.is-flipped,
  .has-3d .proc-chapter.is-flipped.is-portrait { min-height: 0; padding: 3rem 0; }
  .has-3d .proc-figure img { max-height: 40vh; }
  .proc-stage-hud { left: 1rem; right: 1rem; bottom: .75rem; }
}
