/* MJK Electric — services page (templates/website/services.html). Loaded after css/home_v2.css,
   which supplies the tokens, nav, buttons, section heads, the split "live" section, city chips,
   call to action and footer. See docs/home_v2.md. */

/* ----------------------------------------------------------------- header */
.shero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-height: min(80vh, 780px); border-bottom: 1px solid var(--line); }
.shero__media { position: absolute; inset: 0; z-index: -3; }
.shero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; animation: heroDrift 28s var(--ease) both; transform-origin: 70% 45%; }
.shero__shade { position: absolute; inset: 0; z-index: -2; background:
    linear-gradient(90deg, rgba(9, 11, 13, .96) 0%, rgba(9, 11, 13, .84) 32%, rgba(9, 11, 13, .38) 66%, rgba(9, 11, 13, .2) 100%),
    linear-gradient(180deg, rgba(9, 11, 13, .72) 0%, rgba(9, 11, 13, 0) 24%, rgba(9, 11, 13, 0) 58%, rgba(9, 11, 13, .88) 100%); }
.shero__in { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--nav-h) + clamp(40px, 6vw, 88px)); padding-bottom: clamp(36px, 5vw, 72px); }
.shero__title { margin-top: clamp(16px, 2.2vw, 28px); max-width: 12.5em; font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: clamp(2.7rem, 6.6vw, 6.4rem); line-height: .92; letter-spacing: -.01em; color: #fff; text-wrap: balance; }
.shero__title em { font-style: normal; background: linear-gradient(100deg, #f6c58c 0%, #e09544 40%, #b06a1f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.shero__lede { margin-top: clamp(18px, 2.2vw, 28px); max-width: 34em; font-size: clamp(1.02rem, 1.25vw, 1.2rem); line-height: 1.6; color: #c9c7c3; font-weight: 350; }

.js .shero__in > *, .js .sindex { opacity: 0; animation: fadeUp .9s var(--ease) forwards; }
.js .shero__in > :nth-child(1) { animation-delay: .05s; }
.js .shero__in > :nth-child(2) { animation-delay: .15s; }
.js .shero__in > :nth-child(3) { animation-delay: .3s; }
.js .sindex { animation-delay: .5s; }

/* index strip: one link per service on the page */
.sindex { border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(9, 11, 13, .4), rgba(9, 11, 13, .74)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sindex__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sindex__list li { border-left: 1px solid var(--line); }
.sindex__list li:first-child { border-left: 0; }
.sindex a { position: relative; display: flex; flex-direction: column; gap: 5px; height: 100%; padding: 18px 22px 20px; }
.sindex__list li:first-child a { padding-left: 0; }
.sindex 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); }
.sindex a:hover::before, .sindex a:focus-visible::before { transform: scaleX(1); }
.sindex__k { font-family: var(--mono); font-size: .66rem; font-weight: 600; letter-spacing: .14em; color: var(--copper-hi); }
.sindex__v { font-family: var(--display); font-weight: 500; font-size: 1.2rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.15; color: #e4e1dc; transition: color .25s; }
.sindex a:hover .sindex__v { color: #fff; }

/* ---------------------------------------------------- services on one bus */
.sec--circuits { padding-bottom: clamp(72px, 9vw, 136px); background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.sec--circuits .oneline__intro { margin-bottom: clamp(40px, 5vw, 72px); }

/* --rail: width of the gutter the bus runs in; --bus-x: where the bus sits in it; --sym: the source symbol */
.circuits { --rail: 96px; --bus-x: 22px; --sym: 44px; --head: 28px; position: relative; padding-left: var(--rail); }

/* the bus is drawn in pieces (one per block) so it can stop at the last tap. The moving highlight is
   fixed to the viewport, which keeps it in step from one piece to the next. */
.circuits__source::before, .circuit::before {
    content: ''; position: absolute; top: 0; bottom: 0; width: 4px; border-radius: 1px;
    background:
        linear-gradient(180deg, transparent 0, transparent 43%, rgba(255, 244, 226, .85) 50%, transparent 57%, transparent 100%) 0 0 / 100% 720px repeat-y fixed,
        linear-gradient(90deg, #e9a55c, #a8651f);
    box-shadow: 0 0 24px rgba(226, 150, 74, .28);
    animation: busFlow 5.5s linear infinite;
}
@keyframes busFlow { from { background-position: 0 0, 0 0; } to { background-position: 0 720px, 0 0; } }

.circuits__source { position: relative; display: flex; align-items: center; gap: 16px; margin-left: calc(var(--rail) * -1); padding-bottom: clamp(34px, 4vw, 56px); color: var(--copper-hi); }
.circuits__source::before { left: calc(var(--bus-x) - 2px); top: var(--sym); }
.circuits__source svg { flex: none; width: var(--sym); height: var(--sym); margin-left: calc(var(--bus-x) - var(--sym) / 2); }
.circuits__source .mono { flex: none; }
.circuits__rating { color: var(--copper-hi); }

.circuit { position: relative; padding-bottom: clamp(72px, 9vw, 136px); scroll-margin-top: 92px; }
.circuit::before { left: calc(var(--bus-x) - var(--rail) - 2px); }
.circuit--last { padding-bottom: 0; }
.circuit--last::before { bottom: auto; height: calc(var(--head) / 2); }

.circuit__head { position: relative; display: flex; align-items: center; gap: 16px; height: var(--head); margin-bottom: clamp(22px, 3vw, 40px); }
.circuit__head .sec__label { white-space: nowrap; }
/* the node on the bus, and the tap from it to the row */
.circuit__head::before { content: ''; position: absolute; z-index: 1; left: calc(var(--bus-x) - var(--rail) - 5px); top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--copper-hi); box-shadow: 0 0 0 4px var(--bg), 0 0 20px 4px var(--glow); }
.circuit__tap { position: absolute; left: calc(var(--bus-x) - var(--rail)); top: 50%; width: 74px; height: 24px; margin-top: -12px; overflow: visible; color: #9c6a35; transition: color .35s; }
.circuit:hover .circuit__tap { color: var(--copper-hi); }
.circuit__tag { flex: none; color: var(--dim); }

.circuit__body { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 84px); align-items: start; }
.circuit--flip .circuit__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
.circuit--flip .circuit__media { order: 2; }

.circuit__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.js .circuit__media.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease), border-color .35s, box-shadow .5s; transition-delay: var(--d, 0s); }
.circuit__media picture, .circuit__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.circuit__media img { object-fit: cover; filter: saturate(.9) brightness(.86); transition: transform 1.2s var(--ease), filter .6s; }
.circuit__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 */
.circuit__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; }
.circuit:hover .circuit__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); }
.circuit:hover .circuit__media img { transform: scale(1.04); filter: saturate(1) brightness(.98); }

.circuit__copy { color: var(--muted); font-size: 1.04rem; }
.circuit__copy > p { max-width: 34em; }
.circuit__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; }
.checks { margin: 26px 0 30px; border-top: 1px solid var(--line); }
.checks li { position: relative; padding: 13px 0 13px 34px; border-bottom: 1px solid var(--line); font-size: .98rem; line-height: 1.45; color: #dcd9d4; }
.checks li::before, .checks li::after { content: ''; position: absolute; background: var(--copper-hi); }
.checks li::before { left: 0; top: calc(13px + .72em); width: 18px; height: 1px; }
.checks li::after { left: 18px; top: calc(13px + .72em - 3px); width: 1px; height: 7px; }

/* ----------------------------------------------- 05 machine troubleshooting */
.sec--trouble { scroll-margin-top: 64px; }
.sec--trouble .display { font-size: clamp(2.5rem, 4.6vw, 4.2rem); }
.sec--trouble .live__lede { max-width: 34em; }
.faults { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; margin: 30px 0 34px; border-top: 1px solid var(--line); }
.faults li { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .96rem; line-height: 1.4; color: #dcd9d4; }
.faults li::before { content: ''; width: 7px; height: 7px; margin-top: .48em; border-radius: 50%; background: var(--copper-hi); box-shadow: 0 0 10px 1px var(--glow); }
.trouble__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------------------------------------------------------- service areas */
.sec--areas { padding: clamp(64px, 8vw, 120px) 0; border-top: 1px solid var(--line); }
.areas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(28px, 6vw, 96px); align-items: end; }
.areas__head .eyebrow { margin-bottom: 20px; }
.areas__body > .mono { margin-bottom: 16px; }

/* -------------------------------------------------- circuit directory */
/* one row per service, as on the inside of a panel door: the About page and the service areas page */
.sec--work { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%); }
.dir { border-top: 1px solid var(--line-2); }
.dir li { border-bottom: 1px solid var(--line); }
.dir a { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr) minmax(0, 1.25fr) 28px; column-gap: clamp(14px, 2.6vw, 44px); align-items: center; padding: 24px 0; transition: background .3s, padding .35s var(--ease); }
.dir 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 .45s var(--ease); }
.dir a:hover, .dir a:focus-visible { background: linear-gradient(90deg, rgba(234, 168, 98, .07), transparent 70%); padding-left: 14px; }
.dir a:hover::before, .dir a:focus-visible::before { transform: scaleX(1); }
.dir__k { color: var(--copper-hi); white-space: nowrap; }
.dir__name { font-family: var(--display); font-weight: 600; font-size: clamp(1.55rem, 2.3vw, 2.15rem); line-height: 1; letter-spacing: .005em; text-transform: uppercase; color: #fff; }
.dir__sum { font-size: .97rem; line-height: 1.55; color: var(--muted); }
.dir__go { justify-self: end; font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--copper-hi); transition: transform .3s var(--ease); }
.dir a:hover .dir__go { transform: translateX(6px); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
    .circuits { --rail: 44px; --bus-x: 12px; --sym: 36px; }
    .circuit__tap { display: none; }
    .circuit__head::after { content: ''; position: absolute; left: calc(var(--bus-x) - var(--rail)); top: 50%; width: calc(var(--rail) - var(--bus-x) - 8px); height: 1px; background: #9c6a35; }
    .sindex__v { font-size: 1.06rem; }
    .sindex a { padding: 16px 16px 18px; }
}
@media (max-width: 900px) {
    .shero { min-height: 0; }
    .shero__shade { background:
        linear-gradient(90deg, rgba(9, 11, 13, .9) 0%, rgba(9, 11, 13, .66) 60%, rgba(9, 11, 13, .5) 100%),
        linear-gradient(180deg, rgba(9, 11, 13, .7) 0%, rgba(9, 11, 13, 0) 24%, rgba(9, 11, 13, .2) 58%, rgba(9, 11, 13, .9) 100%); }
    .sindex__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sindex__list li:nth-child(odd) { border-left: 0; }
    .sindex__list li:nth-child(odd) a { padding-left: 0; }
    .sindex__list li:nth-child(n+3) { border-top: 1px solid var(--line); }
    .sindex__list li:last-child { grid-column: 1 / -1; }
    .sindex a { padding: 13px 14px 14px; }
    .sindex a::before { display: none; }
    .circuit__body, .circuit--flip .circuit__body, .areas { grid-template-columns: minmax(0, 1fr); }
    .circuit--flip .circuit__media { order: 0; }
    .areas { align-items: start; }
    .dir a { grid-template-columns: 64px minmax(0, 1fr) 24px; row-gap: 8px; align-items: baseline; padding: 20px 0; }
    .dir a:hover, .dir a:focus-visible { padding-left: 0; background: none; }
    .dir__sum { grid-column: 2; grid-row: 2; }
    .dir__go { grid-column: 3; grid-row: 1; }
}
@media (max-width: 599px) {
    .shero .eyebrow { letter-spacing: .14em; line-height: 1.6; align-items: flex-start; }
    .shero .eyebrow .tick { margin-top: .7em; width: 20px; }
    .circuits { --rail: 26px; --bus-x: 6px; --sym: 32px; }
    .circuits__rating { display: none; }
    .circuit__tag { display: none; }
    .circuit__head { gap: 12px; }
    .circuit__head .sec__label { letter-spacing: .14em; }
    .faults { grid-template-columns: minmax(0, 1fr); }
    .trouble__cta .btn { flex: 1 1 100%; }
    .dir a { grid-template-columns: 54px minmax(0, 1fr) 20px; column-gap: 10px; }
    .dir__k { font-size: .64rem; letter-spacing: .08em; }
}
@media (prefers-reduced-motion: reduce) {
    .circuits__source::before, .circuit::before { animation: none; background: linear-gradient(90deg, #e9a55c, #a8651f); }
}
