.production-fallback { min-height: 100svh; padding-top: 22vh; }
.production-fallback h1 { max-width: 980px; margin: 28px 0; font-size: clamp(52px, 7vw, 108px); line-height: .95; letter-spacing: -.055em; }
.production-fallback p { max-width: 700px; color: var(--muted); font-size: 18px; line-height: 1.7; }

.production-page .site-header { z-index: 80; }
.production-page .factory-film { height: 760svh; }
.production-page .factory-sticky { min-height: 680px; }
.production-page .hero-copy h1 { max-width: 770px; }
.production-page .hero-copy > p { max-width: 500px; }

.production-page .factory-film {
  --part-form: 0;
  --scrap-release: 0;
  --scrap-clear: 0;
  --plasma-cool: 0;
  --bore-open: 0;
  --plug-drop: 0;
  --plug-exit: 0;
  --plug-settle: 0;
  --plasma-tool: 0;
  --plasma-heat: 0;
  --water-tool: 0;
  --water-pressure: 0;
  --milling-tool: 0;
  --milling-pressure: 0;
  --milling-fresh: 0;
  --chip-flight: 0;
  --finish-present: 0;
  --final-light: 0;
}

.production-page .raw-stock {
  opacity: calc((.04 + (var(--material-p) * .96)) * (1 - var(--part-form)));
}

.production-page .part-rig { opacity: var(--part-form); }
.production-page .stock-brush { fill: url(#raw-brush); opacity: .72; pointer-events: none; }
.production-page .raw-direction { opacity: calc(.16 + (var(--material-p) * .38)); }
.production-page .stock-top { stroke-width: 1.4; }
.production-page .stock-wall { stroke-width: 1.2; }
.production-page .stock-edge-light { stroke: #b0bec5; stroke-width: 1; opacity: .44; }
.production-page .stock-wall-front { fill: url(#part-wall); }
.production-page .part-edge-light { stroke: #b9c7ce; stroke-width: 1; opacity: .48; }
.production-page .part-top { stroke-width: 1.1; }
.production-page .part-bevel { stroke-opacity: calc(.5 + (var(--finish-present) * .34)); filter: drop-shadow(0 1px 0 rgba(255,255,255,.18)); }
.production-page .part-top { stroke-opacity: calc(.7 + (var(--finish-present) * .26)); }
.production-page .part-scratches { opacity: calc(.12 + (var(--part-form) * .28) - (var(--finish-p) * .20)); }
.production-page .part-reflection { opacity: calc(.08 + (var(--part-form) * .18) + (var(--mill-p) * .22) + (var(--finish-p) * .24)); }

.plasma-scrap {
  opacity: calc((.02 + (var(--part-form) * .98)) * (1 - var(--scrap-clear)));
  transform-box: fill-box;
  transform-origin: 56% 54%;
  filter: drop-shadow(0 18px 16px rgba(0,0,0,.58));
}

.plasma-scrap path:first-child { fill: url(#part-top); stroke: #929ba0; stroke-width: 1; }
.plasma-scrap path:last-child { fill: url(#part-wall); stroke: #59646a; stroke-width: 1; }
.plasma-scrap-shadow {
  fill: #000;
  opacity: calc(var(--part-form) * var(--scrap-release) * (1 - var(--scrap-clear)) * .46);
  transform-box: fill-box;
  transform-origin: center;
  filter: url(#soft-shadow);
}

.production-page .plasma-kerf,
.production-page .plasma-heat,
.production-page .water-kerf {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.production-page .plasma-kerf {
  stroke: #030506;
  stroke-width: 7.6;
  opacity: calc(var(--cut-p) * .96);
}

.production-page .trace-plasma {
  stroke: #776554;
  stroke-width: 2.35;
  opacity: calc(var(--cut-p) * (.62 + ((1 - var(--plasma-cool)) * .20)));
}

.production-page .plasma-heat {
  stroke: #d97822;
  stroke-width: 4.6;
  opacity: var(--plasma-heat);
  filter: drop-shadow(0 0 5px rgba(231,164,55,.62));
}

.production-page .water-kerf {
  stroke: #030607;
  stroke-width: 5.4;
  opacity: calc(var(--water-p) * .9);
}

.production-page .trace-water {
  stroke: #b7c9cf;
  stroke-width: 1.75;
  opacity: calc(var(--water-p) * .72);
}

.production-page .trace-active.water-active {
  stroke: #e7faff;
  stroke-width: 2.7;
  filter: drop-shadow(0 0 3px rgba(211,236,244,.68));
}

.production-page .material-response { pointer-events: none; }
.production-page .plasma-metal-response { opacity: calc(var(--plasma-active) * .55); }
.production-page .water-metal-response { opacity: calc(var(--water-active) * (.24 + (var(--water-pressure) * .30))); }

.water-bore { opacity: var(--bore-open); }
.bore-walls .water-bore { display: block; }
.production-page .bore-walls .bore-inner-wall { display: block; fill: url(#bore-steel); }
.production-page .bore-walls .bore-machining { display: block; stroke: #a7bac3; stroke-width: .65; opacity: .36; }
.production-page .bore-rim { fill: none; stroke: url(#bevel); stroke-width: 2.2; }
.bore-walls .finish-bore { display: block; opacity: var(--finish-p); }
.bore-walls .water-bore,
.bore-walls .finish-bore {
  transform: scaleY(.38);
  transform-box: fill-box;
  transform-origin: center top;
}
.bores .finish-bore { opacity: var(--finish-p); }
.water-plug {
  opacity: calc(var(--part-form) * (1 - var(--plug-settle)));
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 17px 13px rgba(0,0,0,.55));
}
.water-plug ellipse:first-child { fill: url(#part-wall); opacity: calc(var(--plug-drop) * .92); }
.water-plug ellipse:last-child { fill: url(#part-top); stroke: #a0a8ac; }
.water-plug-shadow {
  fill: #000;
  opacity: calc(var(--plug-drop) * (1 - var(--plug-settle)) * .42);
  transform-box: fill-box;
  transform-origin: center;
  filter: url(#soft-shadow);
}

.milling-pocket {
  opacity: calc(var(--mill-p) * var(--part-form));
}
.milling-pocket .pocket-wall { fill: #101b21; stroke: #899ca6; stroke-width: 1; }
.milling-pocket .pocket-floor { fill: url(#pocket-steel); stroke: #c1c9cc; stroke-opacity: .72; stroke-width: 1; }
.milling-pocket .pocket-marks { stroke: #c3d1d7; stroke-width: .9; opacity: .42; }
.milling-pocket .pocket-highlight { stroke: #e2ecef; stroke-width: 1.25; opacity: .65; }
.production-page .milled-surface { opacity: calc((var(--mill-p) * .78) + (var(--milling-fresh) * .18)); }
.production-page .milled-surface rect { opacity: calc(.52 + (var(--milling-fresh) * .38)); }
.production-page .milled-surface path { stroke-opacity: calc(.16 + (var(--milling-fresh) * .24)); }
.production-page .final-light-sweep { opacity: calc(var(--final-light) * (.78 + (var(--finish-present) * .22))); }
.production-page .foreground-atmosphere { filter: blur(1.1px); }
.production-page .engineering-overlay { opacity: calc(.12 + (var(--blueprint-p) * .48) + (var(--chrome-enter) * .16) - (var(--finish-present) * .24)); }

.production-page .tool-shoulder,
.production-page .tool-nozzle {
  fill: url(#stock-top);
  stroke: #9ca6ab;
  stroke-width: 1;
}

.production-page .tool-shoulder-top { fill: #11171a; }
.production-page .plasma-jet { fill: none !important; stroke: #fff0bd; stroke-width: 2.2; opacity: var(--plasma-active); filter: drop-shadow(0 0 3px rgba(255,194,84,.82)); }
.production-page .plasma-tool { opacity: calc(var(--plasma-tool) + ((1 - var(--hero-exit)) * .76)); filter: drop-shadow(0 25px 18px rgba(0,0,0,.56)); }
.production-page .waterjet-tool { opacity: var(--water-tool); filter: drop-shadow(0 22px 17px rgba(0,0,0,.54)); }
.production-page .milling-tool { opacity: var(--milling-tool); filter: drop-shadow(0 24px 18px rgba(0,0,0,.58)); }
.production-page .impact-halo { opacity: calc(var(--plasma-active) * .88); }
.production-page .impact-core { opacity: var(--plasma-active); }
.production-page .impact-particles { opacity: 1; }
.production-page .impact-particle { stroke-dasharray: .22 1; stroke-dashoffset: 1; stroke-linecap: round; opacity: 0; }
.production-page .water-stream { stroke: #e7faff; stroke-width: calc(1.35 + (var(--water-pressure) * .65)); opacity: var(--water-active); }
.production-page .water-reaction { fill: #e3f5f8; opacity: calc(var(--water-active) * (.22 + (var(--water-pressure) * .28))); }
.production-page .water-mist { opacity: calc(var(--water-active) * .34); }
.production-page .milling-contact { opacity: calc(var(--milling-active) * (.62 + (var(--milling-pressure) * .38))); transform: scaleX(calc(.86 + (var(--milling-pressure) * .16))); transform-box: fill-box; transform-origin: center; }
.production-page .milling-chips { opacity: calc(var(--milling-active) * (.32 + (var(--chip-flight) * .68))); transform-box: fill-box; transform-origin: center; }
.production-page .milling-contact { fill: rgba(224,232,235,.18); stroke: #dce4e7; filter: drop-shadow(0 0 4px rgba(218,228,232,.38)); }
.production-page .milling-chips path { stroke: #c8d0d3; stroke-width: 1.35; }
.production-page .milling-cutter { transform-box: fill-box; transform-origin: center; }
.production-page .cutter-tip { fill: #080b0d; stroke: #aeb7bb; stroke-width: 1; }
.production-page .factory-film .process-tool > path.tool-shell,
.production-page .factory-film .process-tool > path.tool-fluted-core { fill: url(#tool-steel); stroke: #82949e; stroke-width: 1; }
.production-page .factory-film .process-tool > path.tool-copper { fill: url(#tool-copper); stroke: #b6a285; stroke-width: .8; }
.production-page .tool-ring { stroke-opacity: .5; }
.production-page .milling-flute { stroke: #c6d4dc; stroke-width: 2.2; opacity: .8; }
.process-contact-shadow { fill: #000; opacity: .45; }
.water-stream-edge { fill: none !important; stroke: #90acb6 !important; stroke-width: 3.5 !important; stroke-opacity: .25; opacity: var(--water-active); }

.raw-finished-compare {
  position: relative;
  display: grid;
  grid-template-columns: .72fr 1.2fr;
  gap: clamp(46px, 8vw, 140px);
  align-items: center;
  min-height: 92svh;
  padding: 13vh 8vw;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 72% 52%, #12191d, #050809 42%, #030506 72%);
}
.raw-finished-compare h2,
.production-scope h2 { margin: 24px 0; font-size: clamp(52px, 6vw, 96px); font-weight: 400; line-height: .96; letter-spacing: -.055em; }
.raw-finished-compare p,.production-scope p { max-width: 600px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.compare-visual { position: relative; min-height: 520px; }
.compare-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare-labels { position: absolute; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-between; color: var(--dim); font: 10px/1 'SFMono-Regular',Consolas,monospace; letter-spacing: .14em; }
.compare-labels span:last-child { color: var(--amber); }

.production-scope { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; min-height: 68svh; padding: 13vh 8vw; border-bottom: 1px solid var(--line); }
.production-scope ol { margin: 0; padding: 0; list-style: none; }
.production-scope li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 26px 0; border-bottom: 1px solid var(--line); font-size: clamp(20px, 2vw, 30px); }
.production-scope li span { color: var(--amber); font: 10px/2.5 'SFMono-Regular',Consolas,monospace; }

@media (max-width: 900px) {
  .production-page .factory-film { height: 720svh; }
  .raw-finished-compare,.production-scope { grid-template-columns: 1fr; min-height: auto; padding: 100px 22px; }
  .compare-visual { order: -1; min-height: 390px; }
  .raw-finished-compare h2,.production-scope h2 { font-size: clamp(43px, 12vw, 58px); }
  .production-page .hero-copy-shell { padding-top: 5.5vh; }
  .production-page .hero-copy h1 { max-width: 420px; font-size: clamp(40px, 10.7vw, 54px); }
}

@media (max-width: 768px) {
  .production-page .factory-film { height: 500svh; }

  .production-page .factory-sticky {
    height: 100svh;
    min-height: 0;
  }

  .production-page .factory-scene {
    top: clamp(264px, 34svh, 320px);
    left: 0;
    width: 100%;
    max-width: 100%;
    height: min(48svh, 450px);
    transform: translate3d(0, calc((1 - var(--hero-exit)) * 80px), 0);
  }

  .production-page .hero-copy-shell {
    padding-top: clamp(38px, 5svh, 50px);
  }

  .production-page .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(38px, 10.4vw, 48px);
  }

  .production-page .hero-copy > p:not(.section-label) {
    max-width: 260px;
    margin-top: 18px;
  }

  .production-page .operation-rail,
  .production-page #operation-code,
  .production-page .scene-caption > span {
    display: none;
  }

  .production-page .operation-chrome {
    top: calc(var(--header-height) + 22px);
    justify-content: flex-end;
  }

  .production-page #operation-index {
    font-size: 11px;
  }

  .production-page .scene-caption {
    top: calc(var(--header-height) + 56px);
    max-width: calc(100% - 40px);
  }

  .production-page .scene-caption h2 {
    max-width: 340px;
    margin: 0 0 8px;
    font-size: clamp(32px, 9.2vw, 40px);
    line-height: .98;
  }

  .production-page .scene-caption p {
    max-width: 280px;
    font-size: 13px;
  }

  .production-page .film-disclaimer {
    right: 20px;
    bottom: 18px;
    left: 20px;
    max-width: 350px;
  }
}

html.runtime-lite .production-page .engineering-overlay,
html.runtime-lite .production-page .factory-grid,
html.runtime-lite .production-page .part-scratches,
html.runtime-lite .production-page .part-reflection,
html.runtime-lite .production-page .final-light-sweep,
html.runtime-lite .production-page .foreground-atmosphere,
html.runtime-lite .production-page .material-response,
html.runtime-lite .production-page .water-mist,
html.runtime-lite .production-page .milling-chips,
html.runtime-lite .production-page .plasma-scrap-shadow,
html.runtime-lite .production-page .water-plug-shadow {
  display: none;
}

html.runtime-lite .production-page .contact-shadow,
html.runtime-lite .production-page .part-bevel,
html.runtime-lite .production-page .plasma-scrap,
html.runtime-lite .production-page .water-plug,
html.runtime-lite .production-page .plasma-heat,
html.runtime-lite .production-page .trace-active,
html.runtime-lite .production-page .impact-halo,
html.runtime-lite .production-page .plasma-tool,
html.runtime-lite .production-page .waterjet-tool,
html.runtime-lite .production-page .milling-tool,
html.runtime-lite .production-page .milling-contact {
  filter: none;
}

html.runtime-lite .production-page .impact-particle:nth-child(n+3) { display: none; }

/* Keep the local machining mask in lite mode: removing it exposed the whole
   pocket before the cutter visited it. The existing SVG mask is static. */

@media (max-width: 430px) {
  .production-page .hero-copy > p:not(.section-label) { max-width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .production-page .factory-film { height: auto; min-height: 100svh; }
}

html[data-motion='reduce'] .production-page .factory-film { height: auto; min-height: 100svh; }
