/* ═══════════════════════════════════════════════════════════════
   PIPELINE CINEMA — Cinematic 5-Stage Deployment Sequence
   Sentinel AI — Scroll-driven operating sequence
   
   Stages: Briefing → Recon → Identity → Compile → Deploy
   Visual arc: intake → analysis → synthesis → assembly → activation
   Art direction: Product film / operating system / cinematic precision
   ═══════════════════════════════════════════════════════════════ */

/* ── Pipeline Container ── */
.pipeline {
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* ── Pipeline Intro ── */
.pipeline-intro {
    text-align: center;
    padding: 120px 24px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.pipeline-intro h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-bright);
    margin-bottom: 20px;
}

.pipeline-intro p {
    font-size: var(--text-lg);
    color: var(--text-dim);
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════
   SCROLL REVEAL SYSTEM — .sr
   GPU-friendly: opacity + transform only
   ═══════════════════════════════════════════════════ */
.sr {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--sr-d, 0) * 130ms);
    will-change: opacity, transform;
}

.sr.visible {
    opacity: 1;
    transform: translateY(0);
}

.sr-blur {
    filter: blur(6px);
}

.sr-blur.visible {
    filter: blur(0);
}

.sr-scale {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--sr-d, 0) * 130ms);
    will-change: opacity, transform;
}

.sr-scale.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ═══════════════════════════════════════════════════
   PIPELINE TRACKER — Fixed sidebar navigation
   Desktop only — shows scroll progress through stages
   ═══════════════════════════════════════════════════ */
.pipeline-tracker {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.pipeline-tracker.visible {
    opacity: 1;
}

.tracker-spine {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1px;
    overflow: hidden;
}

.tracker-spine-fill {
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--purple), var(--emerald));
    border-radius: 1px;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tracker-node {
    position: relative;
    display: flex;
    align-items: center;
    padding: 14px 0;
    z-index: 1;
}

.tracker-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: var(--bg);
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.tracker-node.active .tracker-dot {
    border-color: var(--purple-light);
    background: var(--purple);
    box-shadow: 0 0 12px rgba(var(--purple-rgb), 0.5);
}

.tracker-node.completed .tracker-dot {
    border-color: var(--emerald);
    background: var(--emerald);
    box-shadow: 0 0 8px rgba(var(--emerald-rgb), 0.3);
}

.tracker-tag {
    position: absolute;
    right: 22px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(4px);
    transition: opacity 0.3s, transform 0.3s, color 0.3s;
}

.tracker-node.active .tracker-tag {
    opacity: 1;
    transform: translateX(0);
    color: var(--text-dim);
}

@media (max-width: 1200px) {
    .pipeline-tracker { display: none; }
}

/* ═══════════════════════════════════════════════════
   PIPELINE STAGE — Common layout
   ═══════════════════════════════════════════════════ */
.pipeline-stage {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 100px;
    overflow: hidden;
}

.stage-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 900px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.8s ease;
    filter: blur(60px);
}

.pipeline-stage.in-view .stage-glow {
    opacity: 1;
}

/* Stage-specific ambient glows */
.pipeline-stage[data-stage="0"] .stage-glow {
    background: radial-gradient(ellipse at center, rgba(var(--cyan-rgb), 0.08) 0%, transparent 70%);
}
.pipeline-stage[data-stage="1"] .stage-glow {
    background: radial-gradient(ellipse at center, rgba(var(--purple-rgb), 0.1) 0%, transparent 70%);
}
.pipeline-stage[data-stage="2"] .stage-glow {
    background: radial-gradient(ellipse at center, rgba(var(--pink-rgb), 0.08) 0%, transparent 70%);
}
.pipeline-stage[data-stage="3"] .stage-glow {
    background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
}
.pipeline-stage[data-stage="4"] .stage-glow {
    background: radial-gradient(ellipse at center, rgba(var(--emerald-rgb), 0.1) 0%, transparent 70%);
}

.stage-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease 0.2s;
}

.pipeline-stage.in-view .stage-grid {
    opacity: 1;
}

.stage-inner {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

/* ── Stage Text Block ── */
.stage-text {
    text-align: center;
    margin-bottom: 56px;
}

.stage-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.stage-number {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-faint);
    letter-spacing: 0.2em;
}

.stage-sep {
    width: 28px;
    height: 1px;
    background: var(--border-hover);
}

.stage-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

/* Per-stage accent colors */
.pipeline-stage[data-stage="0"] .stage-tag { color: var(--cyan); }
.pipeline-stage[data-stage="1"] .stage-tag { color: var(--purple-light); }
.pipeline-stage[data-stage="2"] .stage-tag { color: var(--pink); }
.pipeline-stage[data-stage="3"] .stage-tag { color: var(--amber); }
.pipeline-stage[data-stage="4"] .stage-tag { color: var(--emerald); }

/* ── Stage Agent Badges — shows which agents power each stage ── */
.stage-agents {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stage-agent-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--badge-color);
    padding: 4px 12px;
    border: 1px solid var(--badge-color);
    border-radius: var(--radius-full);
    background: rgba(0,0,0,0.3);
    position: relative;
    transition: box-shadow 0.4s ease, background 0.4s ease;
}

.stage-agent-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--badge-color);
    box-shadow: 0 0 6px var(--badge-color);
    flex-shrink: 0;
}

.pipeline-stage.in-view .stage-agent-badge {
    box-shadow: 0 0 10px color-mix(in srgb, var(--badge-color) 20%, transparent);
    background: color-mix(in srgb, var(--badge-color) 6%, transparent);
}

.stage-headline {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--text-bright);
    margin-bottom: 18px;
}

.stage-body {
    font-size: var(--text-base);
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Stage Confirm Bar ── */
.stage-confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    padding: 14px 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.015);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.02em;
}

.confirm-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pipeline-stage[data-stage="0"] .confirm-dot { background: var(--cyan); box-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.5); }
.pipeline-stage[data-stage="1"] .confirm-dot { background: var(--purple-light); box-shadow: 0 0 8px rgba(var(--purple-rgb), 0.5); }
.pipeline-stage[data-stage="2"] .confirm-dot { background: var(--pink); box-shadow: 0 0 8px rgba(var(--pink-rgb), 0.5); }
.pipeline-stage[data-stage="3"] .confirm-dot { background: var(--amber); box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.pipeline-stage[data-stage="4"] .confirm-dot {
    background: var(--emerald);
    box-shadow: 0 0 10px rgba(var(--emerald-rgb), 0.6);
    animation: confirmPulse 2s ease-in-out infinite;
}

/* ── Pipeline Connector ── */
.pipeline-connector {
    position: relative;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pipeline-connector::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, var(--border-hover) 30%, var(--border-hover) 70%, transparent 100%);
}

.connector-node {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(var(--purple-rgb), 0.4);
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════
   STAGE 01 — INTAKE TERMINAL
   Feels like: System receiving data
   ═══════════════════════════════════════════════════ */
.intake-terminal {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* Scanline effect */
.intake-terminal::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, rgba(var(--cyan-rgb), 0.3) 50%, transparent 90%);
    top: -1px;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.pipeline-stage.in-view .intake-terminal::after {
    opacity: 1;
    animation: scanlineDown 4s linear 0.8s infinite;
}

.intake-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.intake-bar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.intake-bar-title {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
    letter-spacing: 0.08em;
    margin-left: 8px;
    text-transform: uppercase;
}

.intake-rows {
    padding: 8px 0;
}

.intake-row {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.intake-row.typed {
    opacity: 1;
    transform: translateX(0);
}

.intake-row:last-child {
    border-bottom: none;
}

.intake-field {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    min-width: 140px;
    flex-shrink: 0;
}

.intake-val {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--cyan-light);
    position: relative;
}

.intake-cursor {
    display: inline-block;
    width: 1px;
    height: 14px;
    background: var(--cyan);
    margin-left: 2px;
    vertical-align: middle;
    animation: cursorBlink 0.8s step-end infinite;
    opacity: 0;
}

.intake-row.typing .intake-cursor {
    opacity: 1;
}

.intake-total {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: rgba(var(--cyan-rgb), 0.03);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.intake-total.visible {
    opacity: 1;
}

.intake-total-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 6px var(--cyan);
}

.intake-total-num {
    color: var(--cyan-light);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════
   STAGE 02 — INTELLIGENCE GAUGE
   Feels like: System scanning and scoring
   ═══════════════════════════════════════════════════ */
.intel-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    align-items: start;
    max-width: 760px;
    margin: 0 auto;
}

.intel-gauge-wrap {
    position: relative;
    width: 240px;
    height: 240px;
    margin: 0 auto;
}

.intel-gauge-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.intel-gauge-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 6;
}

.intel-gauge-fill {
    fill: none;
    stroke: url(#gaugeGrad);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    transition: stroke-dashoffset 2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pipeline-stage.in-view .intel-gauge-fill {
    stroke-dashoffset: 19;
}

.intel-gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.intel-score {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.intel-score-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 4px;
}

/* Radar sweep */
.intel-radar {
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease 0.5s;
}

.pipeline-stage[data-stage="1"].in-view .intel-radar {
    opacity: 1;
}

.intel-radar::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, rgba(var(--purple-rgb), 0.6), transparent);
    transform-origin: left center;
    animation: radarSweep 4s linear infinite;
}

.intel-data-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.intel-metric-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.intel-metric-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.intel-metric-name {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.intel-metric-val {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-bright);
}

.intel-bar-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.intel-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--purple), var(--purple-light));
    width: 0%;
    transition: width 1.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--bar-d, 0) * 200ms + 400ms);
}

.pipeline-stage.in-view .intel-bar-fill {
    width: var(--bar-w);
}

.intel-comp-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.intel-comp-title {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.intel-comp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    font-size: 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: calc(var(--comp-d, 0) * 150ms + 800ms);
}

.pipeline-stage.in-view .intel-comp-row {
    opacity: 1;
    transform: translateY(0);
}

.intel-comp-name {
    color: var(--text-dim);
    font-family: var(--font-body);
}

.intel-comp-score {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--purple-light);
}

/* ═══════════════════════════════════════════════════
   STAGE 03 — DESIGN SYNTHESIS
   Feels like: Identity being generated
   ═══════════════════════════════════════════════════ */
.design-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.design-left {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Palette */
.design-palette {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.design-chip {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    opacity: 0;
    transform: scale(0.6) translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: calc(var(--chip-d, 0) * 100ms + 600ms);
    cursor: default;
}

.pipeline-stage.in-view .design-chip {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.design-chip:first-child {
    width: 56px;
    height: 64px;
}

.design-chip-hex {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-faint);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.design-chip:hover .design-chip-hex {
    opacity: 1;
}

/* Typography */
.design-type {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.design-type-display {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--text-2xl);
    color: var(--text-bright);
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.8s ease, filter 1.2s ease;
    transition-delay: 0.9s;
}

.pipeline-stage.in-view .design-type-display {
    opacity: 1;
    filter: blur(0);
}

.design-type-body {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-dim);
    line-height: 1.6;
    opacity: 0;
    filter: blur(6px);
    transition: opacity 0.8s ease, filter 1s ease;
    transition-delay: 1.15s;
}

.pipeline-stage.in-view .design-type-body {
    opacity: 1;
    filter: blur(0);
}

.design-type-meta {
    display: flex;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-faint);
    letter-spacing: 0.06em;
    opacity: 0;
    transition: opacity 0.6s ease;
    transition-delay: 1.4s;
}

.pipeline-stage.in-view .design-type-meta {
    opacity: 1;
}

/* Wireframe / Blueprint */
.design-blueprint {
    position: relative;
    aspect-ratio: 4 / 5;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-lg);
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

/* Blueprint grid overlay */
.design-blueprint::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(var(--pink-rgb), 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--pink-rgb), 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.8s ease 0.6s;
    pointer-events: none;
}

.pipeline-stage.in-view .design-blueprint::before {
    opacity: 1;
}

.wire-block {
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    transition: border-color 0.8s ease, background 0.8s ease;
    transition-delay: calc(var(--wire-d, 0) * 180ms + 0.8s);
}

.pipeline-stage.in-view .wire-block {
    border-color: rgba(var(--pink-rgb), 0.2);
    background: rgba(var(--pink-rgb), 0.03);
}

.wire-hero {
    height: 40%;
    border-radius: var(--radius-sm);
}

.wire-features {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    flex: 1;
}

.wire-feat {
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    transition: border-color 0.6s ease, background 0.6s ease;
    transition-delay: calc(var(--wire-d, 0) * 120ms + 1.3s);
}

.pipeline-stage.in-view .wire-feat {
    border-color: rgba(var(--pink-rgb), 0.15);
    background: rgba(var(--pink-rgb), 0.02);
}

.wire-cta {
    height: 18%;
}

.wire-footer {
    height: 10%;
}

/* ═══════════════════════════════════════════════════
   STAGE 04 — BUILD ASSEMBLY
   Feels like: Machine compiling in real time
   This is the technical apex — most impressive stage
   ═══════════════════════════════════════════════════ */
.build-assembly {
    max-width: 720px;
    margin: 0 auto;
}

.build-frame {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
    position: relative;
}

/* Glow sweep across browser frame */
.build-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(var(--purple-rgb), 0.04) 50%, transparent 60%);
    background-size: 200% 100%;
    animation: glowSweepBuild 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.6s ease 1s;
}

.pipeline-stage.in-view .build-frame::before {
    opacity: 1;
}

.build-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.build-bar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.build-bar-url {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-faint);
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.build-bar-lock {
    font-size: 10px;
}

.build-canvas {
    padding: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.build-block {
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--build-d, 0) * 300ms + 0.6s);
}

.pipeline-stage.in-view .build-block {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Shimmer effect on blocks as they "compile" */
.build-block::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: shimmerBuild 2.5s ease-in-out infinite;
    pointer-events: none;
}

.build-hero-block {
    height: 120px;
}

.build-feat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.build-feat-block {
    height: 72px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    opacity: 0;
    transition: opacity 0.5s ease;
    transition-delay: calc(var(--build-d, 0) * 200ms + 1.2s);
}

.pipeline-stage.in-view .build-feat-block {
    opacity: 1;
}

.build-content-block {
    height: 64px;
}

.build-cta-block {
    height: 56px;
}

/* Build progress bar */
.build-progress {
    padding: 0 20px 16px;
}

.build-progress-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.build-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-main);
    border-radius: 2px;
    transition: width 2.5s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.8s;
}

.pipeline-stage.in-view .build-progress-fill {
    width: 100%;
}

/* Build stats row */
.build-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.build-stat {
    text-align: center;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.build-stat-num {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1;
    margin-bottom: 6px;
}

.build-stat-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ═══════════════════════════════════════════════════
   STAGE 05 — DEPLOYMENT / LIVE
   Feels like: System locking in and going live
   ═══════════════════════════════════════════════════ */
.deploy-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: 820px;
    margin: 0 auto;
}

.deploy-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deploy-check {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 13px;
    color: var(--text-dim);
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.5s ease, background 0.5s ease;
    transition-delay: calc(var(--check-d, 0) * 200ms + 0.5s);
}

.pipeline-stage.in-view .deploy-check {
    opacity: 1;
    transform: translateX(0);
}

.pipeline-stage.in-view .deploy-check.checked {
    border-color: rgba(var(--emerald-rgb), 0.2);
    background: rgba(var(--emerald-rgb), 0.03);
}

.deploy-check-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: transparent;
    flex-shrink: 0;
    transition: all 0.4s ease;
    transition-delay: calc(var(--check-d, 0) * 200ms + 0.8s);
}

.pipeline-stage.in-view .deploy-check-icon {
    border-color: var(--emerald);
    background: rgba(var(--emerald-rgb), 0.15);
    color: var(--emerald);
}

.deploy-preview {
    position: relative;
}

.deploy-browser {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.deploy-browser-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.deploy-browser-url {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--emerald);
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.deploy-site-mock {
    height: 220px;
    background: linear-gradient(180deg, rgba(var(--emerald-rgb), 0.03) 0%, rgba(0, 0, 0, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.08);
    letter-spacing: 0.1em;
}

.deploy-live-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(var(--emerald-rgb), 0.3);
    background: rgba(var(--emerald-rgb), 0.06);
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: 1.6s;
}

.pipeline-stage.in-view .deploy-live-badge {
    opacity: 1;
    transform: scale(1);
}

.deploy-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 10px var(--emerald);
    animation: confirmPulse 2s ease-in-out infinite;
}

.deploy-live-text {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--emerald);
    letter-spacing: 0.2em;
}

/* ═══════════════════════════════════════════════════
   KEYFRAME ANIMATIONS
   ═══════════════════════════════════════════════════ */
@keyframes scanlineDown {
    0% { top: -1px; opacity: 0; }
    5% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: calc(100% + 1px); opacity: 0; }
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes radarSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes confirmPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px currentColor; }
    50% { opacity: 0.6; box-shadow: 0 0 16px currentColor; }
}

@keyframes glowSweepBuild {
    0%, 100% { background-position: -100% 0; }
    50% { background-position: 200% 0; }
}

@keyframes shimmerBuild {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .pipeline-stage {
        min-height: auto;
        padding: 80px 20px 60px;
    }

    .pipeline-intro {
        padding: 80px 20px 32px;
    }

    .pipeline-connector {
        height: 60px;
    }

    .stage-text {
        margin-bottom: 40px;
    }

    /* Intake */
    .intake-terminal {
        max-width: 100%;
    }

    .intake-field {
        min-width: 100px;
        font-size: 10px;
    }

    .intake-val {
        font-size: 12px;
    }

    /* Intel */
    .intel-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .intel-gauge-wrap {
        width: 200px;
        height: 200px;
    }

    /* Design */
    .design-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .design-chip {
        width: 40px;
        height: 40px;
    }

    .design-chip:first-child {
        width: 48px;
        height: 52px;
    }

    /* Build */
    .build-feat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .build-stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .build-stat {
        padding: 16px 12px;
    }

    /* Deploy */
    .deploy-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .pipeline-stage {
        padding: 60px 16px 48px;
    }

    .stage-headline {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
    }

    .build-stats-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .build-stat {
        padding: 12px;
    }
}

/* ── Reduce Motion ── */
@media (prefers-reduced-motion: reduce) {
    .sr, .sr-scale {
        opacity: 1;
        transform: none;
        transition: none;
        filter: none;
    }

    .intake-terminal::after,
    .intel-radar::after,
    .build-frame::before {
        animation: none;
    }

    .intel-gauge-fill {
        transition-duration: 0.01ms;
    }

    .build-progress-fill {
        transition-duration: 0.01ms;
    }
}

/* ── Stage Panel (missed in initial build) ── */
.stage-panel {
    position: relative;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}
