/* MJK Electric — service pages in the redesigned look (templates/website/services/low-voltage-systems.html).
   Loaded after css/home_v2.css (tokens, nav, buttons, section heads, statement and stats, the split "live"
   section, ask bar, call to action, footer) and css/services.css (photo header, index strip, check lists,
   city links). See docs/home_v2.md. */

.service h3, .service dl, .service dd, .service dt { margin: 0; padding: 0; }
.service [id] { scroll-margin-top: 64px; }

/* ----------------------------------------------------------------- header */
.service .shero { min-height: min(86vh, 840px); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: clamp(16px, 2.2vw, 26px); color: var(--muted); }
.crumbs a { color: var(--copper-hi); }
.crumbs a:hover { color: #fff; }
/* the copper half of the title on its own line, so the headline stays over the dark side of the photo */
.service .shero__title em { display: block; }
.shero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(26px, 3vw, 38px); }
/* five rows in this header (breadcrumb, eyebrow, title, lede, buttons); services.css times the first three */
.js .service .shero__in > :nth-child(4) { animation-delay: .42s; }
.js .service .shero__in > :nth-child(5) { animation-delay: .54s; }
.js .service .sindex { animation-delay: .68s; }

.sindex--3 .sindex__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* three links stay in one row down to phone width (services.css folds its five into two columns at 900px) */
.sindex--3 .sindex__list li:nth-child(n+2) { grid-column: auto; border-top: 0; border-left: 1px solid var(--line); }
/* four links (Industrial Electrical, CNC installation): one row on a desktop, two by two below 900px */
@media (min-width: 901px) {
    .sindex--4 .sindex__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.sindex__s { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1.5; color: var(--muted); }

/* --------------------------------------------------------------- overview */
.service .sec--identity { padding-bottom: clamp(72px, 9vw, 136px); }

/* ------------------------------------------------ a service: photo + copy */
/* an index link lands with the section's heading just under the fixed nav, not a screen of padding above it */
.service .svc[id] { scroll-margin-top: calc(112px - clamp(84px, 11vw, 168px)); }
.svc { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.svc__tag { flex: none; color: var(--dim); }
.svc__body { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 84px); align-items: start; }
.svc--flip .svc__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
.svc--flip .svc__media { order: 2; }

.svc__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.js .svc__media.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease), border-color .35s, box-shadow .5s; transition-delay: var(--d, 0s); }
.svc__media picture, .svc__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.svc__media img { object-fit: cover; filter: saturate(.92) brightness(.9); transition: transform 1.2s var(--ease), filter .6s; }
.svc__media::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(9, 11, 13, 0) 55%, rgba(9, 11, 13, .5) 100%); }
/* drawing-style corner marks, as on the services page */
.svc__media::before { content: ''; position: absolute; inset: 12px; z-index: 1; pointer-events: none; opacity: .85; background:
    linear-gradient(var(--copper-hi), var(--copper-hi)) left top / 20px 1px no-repeat,
    linear-gradient(var(--copper-hi), var(--copper-hi)) left top / 1px 20px no-repeat,
    linear-gradient(var(--copper-hi), var(--copper-hi)) right bottom / 20px 1px no-repeat,
    linear-gradient(var(--copper-hi), var(--copper-hi)) right bottom / 1px 20px no-repeat; }
.svc__body:hover .svc__media { border-color: rgba(234, 168, 98, .5); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(234, 168, 98, .14); }
.svc__body:hover .svc__media img { transform: scale(1.04); filter: saturate(1) brightness(1); }

.svc__copy, .face__copy { color: var(--muted); font-size: 1.04rem; }
.svc__copy > p, .face__copy > p { max-width: 34em; }
.svc__name { margin-bottom: 18px; font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: clamp(2.1rem, 3.5vw, 3.3rem); line-height: .98; letter-spacing: -.004em; color: #fff; text-wrap: balance; }
.cites { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.svc__copy .checks { margin-bottom: 24px; }
.points .cites { margin: 12px 0 0; }
.cite--plain::before { content: none; }

/* --------------------------------------------------------- cable schedule */
.sched { margin-top: clamp(44px, 5.5vw, 80px); border: 1px solid var(--line-2); border-radius: 6px; background: linear-gradient(180deg, var(--panel), #0e1215); box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .9); overflow: hidden; }
.sched__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 18px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.sched__head .mono { color: var(--copper-hi); font-weight: 600; }
.sched__head h3 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; color: #fff; }
.sched table { width: 100%; border-collapse: collapse; }
.sched th, .sched td { padding: 16px clamp(16px, 2vw, 24px); text-align: left; vertical-align: top; }
.sched thead th { padding-top: 12px; padding-bottom: 12px; font-family: var(--mono); font-weight: 500; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--copper-hi); background: rgba(255, 255, 255, .03); }
.sched tbody th, .sched tbody td { border-top: 1px solid var(--line); }
.sched tbody th { font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; color: #fff; }
.sched tbody td { font-size: .95rem; line-height: 1.5; color: #c9c7c3; }
.sched tbody tr { transition: background .25s; }
.sched tbody tr:hover { background: rgba(234, 168, 98, .05); }
.sched__v, .sched__mhz { display: block; font-family: var(--mono); font-size: .9rem; font-weight: 500; white-space: nowrap; color: #fff; }
.sched td small { display: block; margin-top: 3px; font-size: .78rem; white-space: nowrap; color: var(--dim); }
.sched td:nth-child(3) { white-space: nowrap; }
.sched td:nth-child(4) { width: 19%; min-width: 150px; }
.sched td:last-child { max-width: 26em; }
/* bandwidth, drawn to a log scale so 100 MHz and 2000 MHz both fit */
.sched__bar { display: block; height: 3px; margin-top: 9px; border-radius: 1px; background: rgba(255, 255, 255, .08); position: relative; }
.sched__bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 1px; background: linear-gradient(90deg, #a8651f, #e9a55c); box-shadow: 0 0 12px rgba(226, 150, 74, .4); }
.sched__note { padding: 16px max(clamp(16px, 2vw, 24px), calc(100% - 74em)) 20px clamp(16px, 2vw, 24px); border-top: 1px solid var(--line); font-size: .86rem; line-height: 1.6; color: var(--muted); }

/* ---------------------------------------------------- 02 video security */
.svc-live .display { font-size: clamp(2.5rem, 4.6vw, 4.2rem); }
.svc-live .live__lede { max-width: 34em; }
.svc-live .live__n small { letter-spacing: .02em; }

/* facial recognition: a drawing in place of a photo of a face */
.svc-face { padding: clamp(64px, 8vw, 120px) 0; border-top: 1px solid var(--line); background: var(--bg-2); }
.face { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(28px, 5vw, 84px); align-items: center; }
.face__fig { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line-2); border-radius: 6px; color: #9c6a35;
    background:
        radial-gradient(60% 70% at 50% 42%, rgba(194, 124, 46, .16), transparent 70%),
        linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 12.5%,
        linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 9.375% 100%,
        var(--panel);
    box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .9), 0 0 90px -40px rgba(226, 150, 74, .3); }
.face__fig svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.face__fig .thin { stroke-width: 1.4; }
.face__fig .hot { stroke: var(--copper-hi); stroke-width: 2.4; }
.face__fig .dot { fill: var(--copper-hi); }
.face__fig .mesh { stroke: var(--copper-hi); stroke-width: 1; opacity: .55; }
.face__fig .scan { stroke: #fff4e2; stroke-width: 1.4; opacity: .8; filter: drop-shadow(0 0 6px rgba(234, 168, 98, .9)); animation: faceScan 3.6s var(--ease) infinite alternate; }
@keyframes faceScan { from { transform: translateY(60px); } to { transform: translateY(192px); } }
.face__tag { position: absolute; padding: 4px 8px; border: 1px solid rgba(234, 168, 98, .4); border-radius: 3px; background: rgba(9, 11, 13, .7); font-size: .6rem; color: var(--copper-hi); }
.face__tag--a { left: 14px; bottom: 14px; }
.face__tag--b { right: 14px; top: 14px; }
.face__tag--b::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--copper-hi); box-shadow: 0 0 10px 1px var(--glow); vertical-align: 1px; }
.face__copy .eyebrow { margin-bottom: 18px; }
.service .face__specs { margin: 26px 0 0; border-top: 1px solid var(--line); }
.face__specs > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.face__specs dt { padding-top: 4px; color: var(--copper-hi); }
.face__specs dd { font-size: .98rem; line-height: 1.5; color: #dcd9d4; }
.face__note { margin-top: 24px; padding: 14px 18px; border-left: 2px solid var(--copper); background: rgba(194, 124, 46, .08); font-size: .95rem; line-height: 1.55; color: #dcd9d4; }

/* ---------------------------------------------------- two options, side by side */
/* the two ways to get three-phase (CNC installation page, New River page) */
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 26px 0 22px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel); }
.opts li { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; }
.opts li + li { border-left: 1px solid var(--line); }
.opts__k { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: .64rem; color: var(--copper-hi); }
.opts__tag { color: var(--dim); text-transform: none; }
.opts h3, .opts h4 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(1.35rem, 1.7vw, 1.6rem); line-height: 1.05; text-transform: uppercase; color: #fff; }
.opts p { font-size: .94rem; line-height: 1.55; color: var(--muted); }

/* ------------------------------------------------- 04 how we install it */
.svc-how { border-top: 1px solid var(--line); }
.points--row { margin-top: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 48px); border-top: 0; }
.points--row li { border-top: 1px solid var(--line); border-bottom: 0; }

/* ------------------------------------------------------------ 05 ask mjk */
.svc-ask__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 96px); align-items: end; }
.svc-ask .ask { margin-top: 0; max-width: none; }
.svc-ask .code__lede { margin-top: 22px; }

/* -------------------------------------------------------------- questions */
.svc-faq { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%); }
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; cursor: pointer; list-style: none; font-family: var(--display); font-weight: 600; font-size: clamp(1.3rem, 1.8vw, 1.6rem); letter-spacing: .02em; text-transform: uppercase; line-height: 1.15; color: #fff; transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--copper-hi); }
.faq summary::after { content: ''; flex: none; width: 15px; height: 15px; transition: transform .35s var(--ease); background:
    linear-gradient(var(--copper-hi), var(--copper-hi)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--copper-hi), var(--copper-hi)) center / 1.5px 100% no-repeat; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { max-width: 44em; padding: 0 40px 26px 0; font-size: 1rem; line-height: 1.65; color: var(--muted); }
.faq details .cite { display: flex; width: fit-content; margin: 14px 0 0; }

/* --------------------------------------------------------- related services */
.svc-related { padding: clamp(56px, 7vw, 104px) 0 0; border-top: 1px solid var(--line); }
.svc-related .sec__head { margin-bottom: 0; }
.related { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(20px, 2.4vw, 32px); border-top: 1px solid var(--line); }
.related li { display: flex; border-left: 1px solid var(--line); }
.related li:first-child { border-left: 0; }
.related a { position: relative; flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 28px 24px 34px; transition: background .3s; }
.related li:first-child a { padding-left: 0; }
.related a::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--copper-hi); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.related a:hover::before, .related a:focus-visible::before { transform: scaleX(1); }
.related__name { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 1.8vw, 1.7rem); line-height: 1.05; text-transform: uppercase; color: #fff; }
.related__sum { font-size: .92rem; line-height: 1.55; color: var(--muted); }
.related__go { margin-top: auto; padding-top: 8px; display: inline-flex; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; color: var(--copper-hi); transition: gap .3s var(--ease); }
.related a:hover .related__go { gap: 14px; }
.service .sec--areas { border-top: 0; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
    .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .related li:nth-child(odd) { border-left: 0; }
    .related li:nth-child(odd) a { padding-left: 0; }
    .related li:nth-child(n+3) { border-top: 1px solid var(--line); }
    .sched td:last-child { min-width: 14em; }
}
@media (max-width: 900px) {
    .service .shero { min-height: 0; }
    /* services.css gives its own fifth link a full row */
    .sindex--4 .sindex__list li:last-child { grid-column: auto; }
    .sindex--3 .sindex__list li:nth-child(n+2) a { padding-left: 14px; }
    .svc__body, .svc--flip .svc__body, .face, .faq, .svc-ask__in { grid-template-columns: minmax(0, 1fr); }
    .svc--flip .svc__media { order: 0; }
    .svc-ask__in { align-items: start; }
    .points--row { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .faq details > p { padding-right: 0; }
    /* the schedule becomes one card per category: no sideways scrolling on a phone */
    .sched table, .sched tbody, .sched tr, .sched tbody th, .sched tbody td { display: block; }
    .sched thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
    .sched tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 20px; padding: 20px clamp(16px, 2vw, 24px); border-top: 1px solid var(--line); }
    .sched tbody tr:first-child { border-top: 0; }
    .sched tbody th, .sched tbody td { padding: 0; border: 0; }
    .sched tbody th, .sched tbody td:last-child { grid-column: 1 / -1; }
    .sched td:nth-child(n) { width: auto; min-width: 0; max-width: none; white-space: normal; }
    .sched tbody td::before { content: attr(data-label); display: block; margin-bottom: 4px; font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--copper-hi); }
    .sched td:nth-child(4) { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    /* index strip: one link per row, number beside the name */
    .sindex--3 .sindex__list { grid-template-columns: minmax(0, 1fr); }
    .sindex--3 .sindex__list li:nth-child(n+2) { border-left: 0; border-top: 1px solid var(--line); }
    .sindex--3 .sindex__list li:nth-child(n) a { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 6px; align-items: baseline; padding: 12px 0 13px; }
    .sindex--3 .sindex__s { grid-column: 2; }
}
@media (max-width: 599px) {
    .service .crumbs { gap: 8px; font-size: .64rem; letter-spacing: .08em; }
    .sindex--4 .sindex__s { display: none; }
    .shero__cta .btn { flex: 1 1 100%; }
    .eyebrow__more { display: none; }
    .svc__tag { display: none; }
    .face__specs > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .face__specs dt { padding-top: 0; }
    .related { grid-template-columns: minmax(0, 1fr); }
    .related li { border-left: 0; }
    .related li + li { border-top: 1px solid var(--line); }
    .related a, .related li:first-child a { padding: 22px 0 26px; }
    .faq summary { padding: 18px 0; gap: 16px; }
    .opts { grid-template-columns: minmax(0, 1fr); }
    .opts li + li { border-left: 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
    .face__fig .scan { animation: none; transform: translateY(126px); }
}
