/* V4 layer, loaded last. Spacing 8/12/16/24/32/48/64/96 · radii 12/16/20/28 · motion 180 / 320 / 420 ms */

/* ---------- finder: two light cards, vehicle and part number ---------- */
.fd { display: grid; grid-template-columns: minmax(0, 7fr) auto minmax(0, 5fr); gap: 24px; align-items: stretch; overflow: visible; padding: 0; border-radius: 0; background: none; color: var(--ink); }
.fd-arc { display: none; }
.fd :focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.fd-reply { grid-column: 1 / -1; margin: 0; color: var(--ink-2); }
.fd-reply .ask { background: var(--well); color: var(--ink); }
.fd-card { display: flex; flex-direction: column; gap: 24px; min-width: 0; padding: 24px; border-radius: 28px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .04); transition: box-shadow .22s var(--ease-ui); }
.fd-card.is-on { box-shadow: 0 0 0 1.5px var(--navy), 0 16px 40px -24px rgba(10, 43, 110, .4); }
.fd-head { display: flex; align-items: flex-start; gap: 16px; }
.fd-ico { display: grid; flex: none; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--navy-tint); color: var(--navy); }
.fd-ico .ico { width: 24px; height: 24px; }
.fd-head h3 { margin: 0; color: var(--ink); font-size: 22px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.fd-head p { margin: 4px 0 0; max-width: 46ch; color: var(--ink-3); font-size: 15px; line-height: 1.45; text-wrap: pretty; }
.fd-path { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fd-path li + li::before { display: none; }
.fd-dot { box-shadow: inset 0 0 0 1.5px #a1a1a6; }
.fd-path [data-state="now"] .fd-dot { box-shadow: inset 0 0 0 2px var(--navy); }
.fd-path [data-state="done"] .fd-dot { background: var(--gold); box-shadow: none; }
.fd-path label { color: var(--ink-3); }
.fd-path [data-state="now"] label { color: var(--ink); }
.fd-path .ctl { height: 52px; border-radius: 16px; background: var(--well); color: var(--ink); box-shadow: none; transition: background-color .18s var(--ease-ui), box-shadow .18s var(--ease-ui); }
.fd-path [data-state="now"] .ctl { background: #fff; box-shadow: inset 0 0 0 1.5px var(--navy); }
.fd-path select:disabled { color: #8e8e93; }
.fd-next { margin-top: auto; }
.fd-next p { color: var(--ink-3); }
.fd-link { color: var(--navy); }
.fd-car { gap: 12px; min-height: 0; padding: 12px 16px; border-radius: 20px; background: var(--navy-tint); color: var(--ink); }
.fd-car-t { display: grid; flex: 1; gap: 8px; min-width: 0; }
.fd-car-t small { color: var(--ink-3); font-size: 13px; }
.fd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fd-chip { min-height: 36px; padding: 0 12px; border: 0; border-radius: 12px; background: #fff; color: var(--ink); font: 600 15px/1 var(--font); cursor: pointer; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .18s var(--ease-ui), transform .18s var(--ease-ui); }
.fd-chip:hover { box-shadow: 0 0 0 1.5px var(--navy); }
.fd-chip:active { transform: scale(.97); }
.fd-num { gap: 12px; }
.fd-num input { height: 52px; padding: 0 20px; border-radius: 16px; background: var(--well); color: var(--ink); transition: background-color .18s var(--ease-ui), box-shadow .18s var(--ease-ui); }
.fd-num input:focus, .fd-num input:focus-visible { outline: 0; background: #fff; box-shadow: inset 0 0 0 2px var(--navy); }
.fd-num p { color: var(--ink-3); line-height: 1.45; }
.fd-num input::placeholder { color: var(--ink-3); font-weight: 500; letter-spacing: .02em; text-transform: none; }
#finder .sec-head { align-items: flex-end; margin-bottom: 32px; }
#finder .sec-head h2 { margin: 0; }
.fd-num a { color: var(--navy); font-weight: 600; text-underline-offset: 3px; }
.fd-or { display: grid; align-self: center; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--well); color: var(--ink-3); font-size: 14px; font-weight: 600; }
.fd-eg { display: flex; align-items: center; gap: 16px; margin-top: auto; padding: 16px; border-radius: 16px; background: var(--well); color: var(--ink); text-decoration: none; transition: background-color .18s var(--ease-ui); }
.fd-eg:hover { background: var(--navy-tint); }
.fd-eg:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.fd-eg-ph { display: flex; flex: none; }
.fd-eg-ph img { width: 56px; height: 56px; border-radius: 12px; background: #fff; object-fit: cover; box-shadow: 0 0 0 2px var(--well); }
.fd-eg-ph img + img { margin-left: -16px; }
.fd-eg b { display: block; font-size: 15px; font-weight: 600; }
.fd-eg small { display: block; margin-top: 4px; color: var(--ink-3); font-size: 13px; line-height: 1.4; }

/* ---------- system explorer: air, fuel, spark ---------- */
.sx { padding: 96px 0; background: var(--cyc); }
.sx-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px 48px; align-items: end; margin-bottom: 48px; }
.sx-head h2 { margin: 0; color: var(--navy); font-size: clamp(40px, 4.3vw, 64px); font-weight: 600; line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.sx-head p { margin: 0; max-width: 44ch; color: var(--ink-2); font-size: 18px; line-height: 1.45; text-wrap: pretty; }
.sx-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.sx-stage { --sx-x: 0; --sx-y: 0; position: relative; margin: 0; padding: 24px 24px 0; border-radius: 28px; background: linear-gradient(180deg, #fff 0%, #f7f7f9 100%); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.sx-tilt { position: relative; aspect-ratio: 800 / 520; }
.sx-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: translate .32s var(--ease-ui); }
.sx-back { translate: calc(var(--sx-x) * -10px) calc(var(--sx-y) * -8px); }
.sx-mid, .sx-spots { translate: calc(var(--sx-x) * 8px) calc(var(--sx-y) * 6px); }
.sx-block { fill: #ececef; stroke: #86868b; stroke-width: 2; }
.sx-bore { fill: #f8f8fa; stroke: #86868b; stroke-width: 2; }
.sx-crank { fill: none; stroke: #a1a1a6; stroke-width: 2; stroke-dasharray: 4 6; }
.sx-duct { fill: #e3e3e8; }
.sx-rail { fill: #c9ced8; }
.sx-part { fill: #8f9bb3; transition: fill .32s var(--ease-ui); }
.sx-hole { fill: #f3f5f9; }
.sx-thin { fill: none; stroke: rgba(255, 255, 255, .7); stroke-width: 2; }
.sx-plate { stroke: #5b6b8c; stroke-width: 5; stroke-linecap: round; transform-box: fill-box; transform-origin: center; }
.sx-flow { fill: none; stroke: #6d87b5; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 10; }
.sx-out { stroke: #a1a1a6; }
.sx-spray path { fill: none; stroke: #4a6390; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 3 5; }
.sx-plug { fill: #8e8e93; }
.sx-bolt { fill: var(--gold); }
.sx-valve { fill: #a1a1a6; }
.sx-piston > path:first-child { fill: #c9ced8; }
.sx-piston > path:last-child { fill: none; stroke: #b4b4ba; stroke-width: 10; stroke-linecap: round; }
.sx-svg text { fill: var(--ink-3); font: 600 16px var(--font); }
.sx-g { opacity: .6; transition: opacity .32s var(--ease-ui); }
[data-on="air"] [data-g="air"], [data-on="fuel"] [data-g="fuel"], [data-on="spark"] [data-g="spark"] { opacity: 1; }
[data-on="air"] [data-g="air"] .sx-part, [data-on="fuel"] [data-g="fuel"] .sx-part, [data-on="spark"] [data-g="spark"] .sx-part { fill: var(--navy); }
[data-on="air"] .sx-plate { stroke: var(--gold); }
.sx-spots { position: absolute; top: 24px; left: 24px; right: 24px; aspect-ratio: 800 / 520; pointer-events: none; transition: translate .32s var(--ease-ui); }
.sx-spot { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; pointer-events: auto; translate: -50% -50%; }
.sx-spot i { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--navy), 0 2px 6px rgba(0, 0, 0, .18); transition: scale .18s var(--ease-ui), background-color .18s var(--ease-ui), box-shadow .18s var(--ease-ui); }
.sx-spot:hover i { scale: 1.15; }
.sx-spot.is-on i { background: var(--gold); box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgba(251, 182, 0, .35), 0 2px 6px rgba(0, 0, 0, .18); }
.sx-spot span { position: absolute; bottom: calc(100% - 2px); left: 50%; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; translate: -50% 4px; transition: opacity .18s var(--ease-ui), translate .18s var(--ease-ui); }
.sx-spot:hover span, .sx-spot.is-on span { opacity: 1; translate: -50% 0; }
.sx-stage figcaption { padding: 12px 0 20px; color: var(--ink-3); font-size: 13px; }
.sx-side { display: grid; gap: 24px; }
.sx-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 20px; background: #e8e8ec; }
.sx-tabs button { display: grid; gap: 2px; min-height: 64px; padding: 10px 12px; border: 0; border-radius: 16px; background: none; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; transition: background-color .18s var(--ease-ui), box-shadow .18s var(--ease-ui); }
.sx-tabs b { color: var(--ink); font-size: 17px; font-weight: 600; }
.sx-tabs span { color: var(--ink-3); font-size: 13px; }
.sx-tabs button:hover { background: rgba(255, 255, 255, .6); }
.sx-tabs [aria-selected="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.sx-tabs [aria-selected="true"] b { color: var(--navy); }
.sx-tabs button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.sx-panel { display: grid; gap: 16px; }
.sx-panel img { display: block; width: 100%; height: 208px; padding: 16px; border-radius: 20px; background: linear-gradient(180deg, #fff 0%, #f0f0f3 100%); box-shadow: 0 0 0 1px var(--line); object-fit: contain; }
.sx-panel h3 { margin: 8px 0 0; color: var(--ink); font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.sx-panel p { margin: 0; color: var(--ink-2); font-size: 17px; line-height: 1.5; text-wrap: pretty; }
.sx-facts { display: grid; grid-template-columns: auto minmax(0, 1.6fr) auto; gap: 16px; margin: 8px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); }
.sx-facts dt { color: var(--ink-3); font-size: 13px; }
.sx-facts dd { margin: 4px 0 0; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.35; }
.sx-panel .text-btn { justify-self: start; }
@media (prefers-reduced-motion: no-preference) {
  .sx-panel:not([hidden]) { animation: sx-in .32s var(--ease-ui); }
  .sx.is-live .sx-flow { animation: sx-flow 1.2s linear infinite; }
  .sx.is-live .sx-piston { animation: sx-piston 1.6s ease-in-out infinite; }
  .sx.is-live [data-on="air"] .sx-plate { animation: sx-plate 3.2s ease-in-out infinite; }
  .sx.is-live [data-on="fuel"] .sx-spray { animation: sx-pulse 1.6s ease-out infinite; }
  .sx.is-live [data-on="spark"] .sx-bolt { animation: sx-spark 1.6s steps(1) infinite; }
}
@keyframes sx-in { from { opacity: 0; translate: 0 8px; } }
@keyframes sx-flow { to { stroke-dashoffset: -24; } }
@keyframes sx-piston { 50% { translate: 0 28px; } }
@keyframes sx-plate { 0%, 100% { rotate: 0deg; } 45%, 60% { rotate: 62deg; } }
@keyframes sx-pulse { 0%, 55%, 100% { opacity: .15; } 8%, 30% { opacity: 1; } }
@keyframes sx-spark { 0%, 100% { opacity: .2; } 50% { opacity: 1; } 58% { opacity: .2; } 62% { opacity: 1; } 70% { opacity: .2; } }

/* ---------- number lens: five real parts, four steps ---------- */
.numb { padding: 96px 0; }
.numb-in { gap: 48px 64px; }
.numb-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 32px 0; }
.numb-list button { gap: 12px; height: 100%; padding: 8px 12px 8px 8px; border-radius: 20px; text-align: left; transition: background-color .18s var(--ease-ui), color .18s var(--ease-ui); }
.numb-list img { flex: none; width: 56px; height: 56px; border-radius: 12px; }
.numb-list button > span { gap: 2px; min-width: 0; }
.numb-list b { font-size: 15px; line-height: 1.25; }
.numb-list small { font-size: 13px; line-height: 1.35; }
.numb-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 64px 0 0; padding: 32px 0 0; border-top: 1px solid var(--line); list-style: none; counter-reset: numb; }
.numb-steps li { display: grid; align-content: start; gap: 8px; counter-increment: numb; }
.numb-steps li::before { content: counter(numb); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 8px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: 15px; font-weight: 700; }
.numb-steps b { color: var(--ink); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.numb-steps span { color: var(--ink-2); font-size: 15px; line-height: 1.5; text-wrap: pretty; }

/* ---------- company: steps run the full width ---------- */
.us { padding: 96px 0; }
.us-top { gap: 48px 64px; }
.us-steps { gap: 32px; margin-top: 64px; }
.us-steps::before, .us-steps::after { right: calc(33.333% - 49px); }
.us-steps span { max-width: none; }

/* ---------- ring cards: one studio plate, parts rest on the floor ---------- */
.wc-art, .wc-art.group, .wc-soon .wc-art, .shop .wc-tool .wc-art {
  background:
    radial-gradient(120% 70% at var(--mx, 50%) 0%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #fafafb 0%, #f1f1f4 56%, #e5e5e9 74%, #ededf0 100%);
}
.wc-art::before { content: ""; position: absolute; left: 50%; bottom: 13%; width: 56%; height: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)); translate: -50% 50%; pointer-events: none; }
.wc-art.trio::before { width: 72%; }
.wc-art.group::before { width: 80%; bottom: 12%; }
.wc-art img { top: auto; bottom: 14%; height: 72%; object-position: 50% 100%; }
.wc-art.trio img { top: auto; bottom: 15%; height: 58%; }
.shop .wc-tool { background: #fff; color: var(--w-ink); }
.shop .wc-tool .wc-media { background: #ededf0; }
.shop .wc-tool .wc-icon { color: var(--navy); opacity: 1; }
.shop .wc-tool .wc-sub { color: var(--w-ink-2); }
.shop .wc-tool .wc-art::before { display: none; }
/* number card: our real macro of a printed part number (90919-A2001 coil), filling the stage, cut edge on the floor */
.shop .wc-tool .wc-art img { left: 0; top: 0; bottom: auto; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

/* ---------- narrow screens ---------- */
@media (max-width: 1100px) {
  .numb-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .fd { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .fd-or { justify-self: center; }
  .fd-card { padding: 24px; }
  .sx { padding: 64px 0; }
  .sx-head, .sx-in { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sx-head { margin-bottom: 32px; }
  .sx-in { gap: 32px; }
  .sx-stage { padding: 16px 16px 0; }
  .sx-spots { top: 16px; left: 16px; right: 16px; }
  .sx-spot span { display: none; }
  .numb, .us { padding: 64px 0; }
  .numb-steps { margin-top: 48px; gap: 24px; }
}
@media (max-width: 560px) {
  .fd-path { grid-template-columns: minmax(0, 1fr); }
  .sx-tabs button { min-height: 56px; padding: 8px 10px; }
  .sx-tabs span { display: none; }
  .sx-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .numb-list button { flex-direction: column; align-items: flex-start; }
  .numb-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .fd-card, .fd-chip, .fd-path .ctl, .fd-num input, .sx-svg, .sx-spots, .sx-g, .sx-part, .sx-spot i, .sx-spot span, .sx-tabs button, .numb-list button, .fd-eg { transition: none; }
}

/* ---------- ChatGPT critique round (2026-11-22) ---------- */
.fitbox-top .fit span { display: grid; gap: 2px; }
.fitbox-top .fit small { color: var(--ink-3); font-size: 13.5px; font-weight: 500; }

/* Category openings: Higgsfield film of the real part (start frame is our studio photo). It holds the face,
   then hands over to the 3D for the chapters. The edges feather into the studio sweep. */
.sc-film-wrap { position: absolute; inset: 0; pointer-events: none; opacity: var(--fv, 1); scale: calc(1 + (1 - var(--fv, 1)) * .04);
  -webkit-mask-image: radial-gradient(ellipse 74% 80% at 50% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 74% 80% at 50% 50%, #000 58%, transparent 100%); }
.sc-film-wrap > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc-film { opacity: 0; transition: opacity .2s var(--ease-ui); }
.sc-film-wrap.is-playing .sc-film { opacity: 1; }
.has-film:not(.gl-live) .sc-poster, .has-film .gl-host { opacity: calc(1 - var(--fv, 1)); }
@media (max-width: 1023px) {
  /* on phones the part spans the width; feather only top and bottom so the ends stay crisp */
  .sc-film-wrap { -webkit-mask-image: linear-gradient(#0000, #000 14%, #000 86%, #0000); mask-image: linear-gradient(#0000, #000 14%, #000 86%, #0000); }
}

/* ---------- studio photos (img/s: our real cut-outs, built by studio.py) on the Studio Silver sweep ----------
   Cards, the part gallery, its thumbs and the buy bar all lead with the same studio image, so the
   card-to-gallery view transition lands on a matching picture. Listing photos follow in the gallery. */
:root {
  --studio-sweep:
    radial-gradient(60% 46% at 50% 64%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, var(--cyc-top) 0%, var(--cyc) 48%, var(--cyc-floor) 74%, var(--cyc) 100%);
}
.pc-ph, .gal-stage, .thumbs button, .bar > img, .fd-eg-ph img { background: var(--studio-sweep); }
.pc-ph img, .gal-cam img, .thumbs img, .bar > img { object-fit: contain; }
/* company: one part of each kind we sell, a still life of our real cut-outs (src/still.py) */
.us-still { grid-column: 1 / -1; aspect-ratio: 16 / 10; object-fit: contain; background: var(--studio-sweep); }
/* number lens: the same Studio Silver sweep, and once zoomed a sharp 1160 px cut of the window (src/lens.py)
   takes over from the CSS-enlarged photo; the fifth part spans the list's two columns */
.lens { background: var(--studio-sweep); }
.lens-cam .lens-crisp { position: absolute; height: auto; aspect-ratio: 1; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.lens.is-crisp .lens-crisp { opacity: 1; }
.numb-list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (prefers-reduced-motion: reduce) { .lens-cam .lens-crisp { transition: none; } }
