/* MJK Electric — CNC, Lathe & Mill Installation page (templates/website/services/cnc-machine-installation.html).
   Loaded after css/home_v2.css (tokens, nav, buttons, section heads, statement and stats, the split "live"
   section and its steps, ask bar, call to action, footer), css/services.css (photo header, index strip,
   check lists, city links) and css/service_detail.css (photo blocks, questions, related services).
   See docs/home_v2.md. */

/* ----------------------------------------------------------------- header */
/* the lathe and its disconnect sit just right of centre in the photo */
.cnc .shero__media img { object-position: 64% 50%; }
@media (min-width: 901px) {
    /* the longest headline of the service pages: a size down, and the photo moved right (its left edge is
       black, like the page behind it), so the second line ends before the disconnect switch */
    .cnc .shero__title { font-size: clamp(2.7rem, 5.6vw, 5.6rem); }
    .cnc .shero__media { transform: translateX(12%) scale(1.12); transform-origin: 0 58%; }
}
@media (min-width: 901px) and (max-width: 1200px) {
    .cnc .shero__media { transform: translateX(18%) scale(1.12); }
}
.cnc .stat__n small { letter-spacing: .02em; }

/* --------------------------------------------------------- 01 equipment */
.cnc-equip .svc__name { margin-bottom: 0; }
.cnc-equip .checks { margin-top: 24px; }

/* ----------------------------------------------------- 02 the installation */
.cnc-install { border-top: 1px solid var(--line); }
.install { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 84px); align-items: start; }

/* the machine drop: this page's drawing. A one-line from the building's panel down to the machine, drawn as
   rows (symbol on the line, name beside it); the numbered keys are links to the steps beside it. The sheet
   is one flat colour so the shapes that sit on the line can cover it (.mask, .solid). */
.drop { --key: 32px; --dev: 56px; --gap: 14px; --wire: #a8651f;
    padding: clamp(18px, 2.2vw, 28px) clamp(16px, 2.2vw, 30px) clamp(20px, 2.4vw, 30px); border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel);
    box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .9), 0 0 90px -40px rgba(226, 150, 74, .3); }
.drop__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-bottom: clamp(22px, 2.6vw, 34px); }
.drop__head .mono:first-child { color: var(--copper-hi); font-weight: 600; }
.drop__sheet { color: var(--dim); }

.drop__row { position: relative; display: grid; grid-template-columns: var(--key) var(--dev) minmax(0, 1fr); column-gap: var(--gap); align-items: center; min-height: 82px; }
/* the conductor, behind every symbol */
.drop__row::before { content: ''; position: absolute; left: calc(var(--key) + var(--gap) + var(--dev) / 2 - 1px); top: 0; bottom: 0; width: 2px; background: var(--wire); }
.drop__row--bus::before { content: none; }
.drop__row--end::before { bottom: 50%; }

/* the building's bus across the top, its name above it */
.drop__row--bus { align-items: end; min-height: 0; }
.drop__source { grid-column: 2 / -1; display: grid; gap: 12px; }
.drop__bus { position: relative; display: block; height: 6px; border-radius: 1px; overflow: hidden; background: linear-gradient(180deg, #e9a55c, #a8651f); box-shadow: 0 0 24px rgba(226, 150, 74, .28); }
.drop__row--bus .drop__keys { transform: translateY(13px); }

.drop__keys { position: relative; z-index: 1; display: grid; gap: 6px; justify-items: start; }
.drop__keys a { display: grid; place-items: center; width: var(--key); height: var(--key); border: 1px solid rgba(234, 168, 98, .55); border-radius: 50%; background: var(--panel); font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .04em; color: var(--copper-hi); transition: background .25s, color .25s, box-shadow .25s; }
.drop__keys a:hover, .drop__keys a:focus-visible { background: var(--copper-hi); color: var(--copper-ink); box-shadow: 0 0 18px 2px var(--glow); }

.drop__sym { position: relative; width: var(--dev); height: var(--dev); color: var(--copper-hi); transition: filter .35s; }
.drop__sym .mask { fill: var(--panel); stroke: none; }
.drop__sym .solid { fill: var(--panel); }
.drop__row:hover .drop__sym { filter: drop-shadow(0 0 9px rgba(226, 150, 74, .55)); }

.drop__text { display: grid; gap: 5px; }
.drop__v { font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 1.6vw, 1.5rem); line-height: 1.05; letter-spacing: .01em; text-transform: uppercase; color: #fff; }
.drop__s { font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; line-height: 1.55; color: var(--muted); }

/* the seven steps (the .steps list of home_v2.css) */
.msteps { margin: 0; }
.service .msteps li[id] { scroll-margin-top: 92px; }
.msteps li { transition: background .4s; }
.js .msteps li.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease), background .4s; transition-delay: var(--d, 0s); }
.msteps li:target { background: linear-gradient(90deg, rgba(234, 168, 98, .1), transparent 70%); }
.msteps h3 { font-size: clamp(1.38rem, 1.7vw, 1.6rem); }
.msteps p { max-width: 38em; font-size: .98rem; line-height: 1.6; }
.msteps strong { font-weight: 600; color: #dcd9d4; }

.codenote { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 24px; align-items: start; margin-top: clamp(40px, 5vw, 72px); padding: 20px 24px; border-left: 2px solid var(--copper); background: rgba(194, 124, 46, .08); }
.codenote .cite { margin-top: 2px; white-space: nowrap; }
.codenote p { max-width: 56em; font-size: .98rem; line-height: 1.6; color: #dcd9d4; }
.codenote strong { font-weight: 600; color: #fff; }

/* --------------------------------------------------------- 03 voltage & phase */
.cnc-volt .svc__copy > p + p { margin-top: 14px; }
.volt__point { color: #dcd9d4; }
.cnc-volt .svc__copy .link-arrow { margin-top: 28px; }
.volt__second { margin-top: clamp(64px, 8vw, 120px); padding-top: clamp(64px, 8vw, 120px); border-top: 1px solid var(--line); }
.service .volt__second[id] { scroll-margin-top: 0; }
/* a bright doorway and a dusk sky on a dark page: held back a little until it is pointed at */
.volt__second .svc__media img { filter: saturate(.9) brightness(.84); }
.volt__second .svc__body:hover .svc__media img { filter: saturate(1) brightness(.98); }

/* the two ways to get three-phase, side by side: .opts, in css/service_detail.css */

/* ------------------------------------------------------ 04 moves and layouts */
/* the empty bay and its drop sit in the left third of the photo */
.cnc-moves .live__media img { object-position: 22% 50%; }

/* ------------------------------------------------------------- responsive */
@media (min-width: 901px) and (min-height: 800px) {
    /* the drawing stays beside the steps while they scroll past */
    .drop { position: sticky; top: calc(var(--nav-h) + 24px); }
}
@media (max-width: 900px) {
    .install { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .cnc .shero__media img { object-position: 60% 50%; }
}
@media (max-width: 599px) {
    .drop { --key: 28px; --dev: 46px; --gap: 10px; }
    .drop__sheet { display: none; }
    .drop__row { min-height: 74px; }
    .drop__keys a { font-size: .62rem; }
    .drop__row--bus .drop__keys { transform: translateY(11px); }
    .codenote { grid-template-columns: minmax(0, 1fr); padding: 18px 18px 20px; }
    .codenote .cite { width: fit-content; }
}
