/* Empire Electric & Maintenance: v2 mockup
   One family (Archivo, self-hosted), two widths: expanded for headings to echo the
   wordmark, normal for reading. Palette comes from the logo and the job site. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --blue: #1fa8e0;        /* Empire blue, from the logo */
  --blue-text: #0a6f9a;   /* same hue, dark enough for text on white */
  --black: #0b0d10;       /* panel black */
  --steel: #59626c;       /* secondary text */
  --galv: #b4bcc4;        /* galvanized conduit */
  --line: #d9dee3;
  --concrete: #eef0f1;
  --white: #ffffff;
  --max: 1180px;
  --gutter: 24px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55; color: var(--black); background: var(--white); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue-text); text-underline-offset: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-stretch: 125%; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2rem, 3.7vw, 3rem); font-weight: 800; letter-spacing: -.015em; }
h2 { font-size: clamp(1.55rem, 2.7vw, 2.3rem); font-weight: 750; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; font-weight: 700; font-stretch: 112%; line-height: 1.25; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--steel); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--black); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Buttons: square shoulders, like the gear */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; padding: 14px 22px; border-radius: 3px; border: 2px solid var(--blue); background: var(--blue); color: var(--black); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--black); border-color: var(--black); color: #fff; }
.btn-line { background: transparent; border-color: var(--black); color: var(--black); }
.btn-line:hover { background: var(--black); color: #fff; }
.btn-small { padding: 9px 16px; font-size: .95rem; }
.on-dark .btn:hover { background: #fff; border-color: #fff; color: var(--black); }
.on-dark .btn-line { border-color: rgba(255,255,255,.55); color: #fff; }
.on-dark .btn-line:hover { background: #fff; border-color: #fff; color: var(--black); }

/* Engraved nameplate, as on a disconnect or panel cover */
.plate { display: inline-block; background: var(--black); color: #fff; font-size: .72rem; font-weight: 700; font-stretch: 112%; letter-spacing: .09em; text-transform: uppercase; line-height: 1; padding: 7px 9px 6px; border-radius: 2px; white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--black); flex: none; }
.brand img { width: 40px; height: 40px; }
.brand-name { font-stretch: 125%; font-weight: 800; font-size: .86rem; letter-spacing: .2em; text-transform: uppercase; line-height: 1.3; }
.brand-name small { display: block; font-size: .64rem; font-weight: 600; letter-spacing: .26em; color: var(--steel); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--black); text-decoration: none; font-weight: 600; font-size: .96rem; }
.nav a:not(.btn):hover { color: var(--blue-text); }
.nav .nav-phone { font-weight: 700; white-space: nowrap; padding-left: 26px; border-left: 1px solid var(--line); }
.header-tools { display: none; align-items: center; gap: 8px; }
.menu-toggle { font: inherit; font-weight: 700; font-size: .95rem; background: none; border: 2px solid var(--black); border-radius: 3px; padding: 8px 14px; cursor: pointer; color: var(--black); }

/* Hero */
.hero { background: var(--concrete); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr); gap: 56px; align-items: center; padding-block: 72px 56px; }
.hero .lead { font-size: 1.16rem; max-width: 34em; margin: 22px 0 0; color: #2a3138; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-photos { display: grid; grid-template-columns: 1.55fr 1fr; gap: 10px; }
.hero-photos figure { margin: 0; position: relative; overflow: hidden; border-radius: 3px; background: var(--galv); }
.hero-photos img { width: 100%; height: 100%; object-fit: cover; }
.hero-photos .wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.hero-photos .a { aspect-ratio: 4 / 3; }
.hero-photos .b { aspect-ratio: auto; }
.hero-photos .plate { position: absolute; left: 10px; bottom: 10px; }

/* Conduit rack: six parallel runs with a matched offset */
.conduit { display: block; height: 120px; overflow: hidden; position: relative; }
.conduit svg { position: absolute; left: 50%; top: 0; width: 2400px; height: 120px; transform: translateX(-50%); }
.conduit path { fill: none; stroke: var(--galv); stroke-width: 6; stroke-linecap: butt; stroke-dasharray: 1; stroke-dashoffset: 0; }
.conduit path.live { stroke: var(--blue); }
@media (prefers-reduced-motion: no-preference) {
  .conduit path { animation: pull 1.5s cubic-bezier(.6, 0, .2, 1) both; animation-delay: calc(var(--i) * 70ms); }
  @keyframes pull { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
}

/* Facts under the hero */
.facts { background: var(--concrete); padding: 4px 0 44px; }
.facts + .section { padding-top: 72px; }
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--black); }
.facts dl > div { padding: 18px 22px 0 0; }
.facts dl > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.facts dt { font-weight: 700; font-stretch: 112%; }
.facts dd { margin: 4px 0 0; color: var(--steel); font-size: .95rem; }

/* Sections */
.section { padding-block: 96px; }
.section-concrete { background: var(--concrete); }
.section-dark { background: var(--black); color: rgba(255,255,255,.8); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: #fff; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 40px; }
.section-head p { margin: 14px 0 0; max-width: 38em; color: var(--steel); }
.section-dark .section-head p { color: rgba(255,255,255,.7); }

/* Projects */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr); gap: 12px; align-items: stretch; }
.feature figure, .project figure, .field figure { margin: 0; position: relative; overflow: hidden; border-radius: 3px; background: var(--concrete); }
.feature figure { aspect-ratio: 16 / 10; }
.feature img, .project img, .field img { width: 100%; height: 100%; object-fit: cover; }
.feature figcaption, .field figcaption { position: absolute; left: 10px; bottom: 10px; }
.feature-text { background: var(--black); color: rgba(255,255,255,.82); border-radius: 3px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.feature-text h3 { color: #fff; font-size: 1.35rem; font-stretch: 125%; }
.feature-text p { margin: 10px 0 0; font-size: .98rem; }
.feature-text .when { font-size: .88rem; color: var(--galv); margin: 0; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.project figure { aspect-ratio: 4 / 4.6; }
.project h3 { margin-top: 14px; }
.project p { margin: 4px 0 0; color: var(--steel); font-size: .96rem; }
.field { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; }
.field-title { margin: 64px 0 0; font-size: 1.12rem; font-weight: 700; font-stretch: 112%; }
/* flex-grow follows each photo's width:height, so every tile lands at the same height uncropped */
.field .tall { aspect-ratio: 9 / 16; flex: 0.5625 1 0; }
.field .wide4 { aspect-ratio: 4 / 3; flex: 1.3333 1 0; }
.more { margin-top: 28px; font-weight: 600; }

/* Capabilities table */
.scope { width: 100%; border-collapse: collapse; border-top: 2px solid var(--black); }
.scope th, .scope td { text-align: left; vertical-align: top; padding: 20px 24px 20px 0; border-bottom: 1px solid var(--line); }
.scope thead th { font-size: .86rem; font-weight: 600; color: var(--steel); padding-block: 12px; }
.scope tbody th { font-weight: 700; font-stretch: 112%; font-size: 1.08rem; width: 28%; }
.scope td { color: #2a3138; }
.scope td:last-child { color: var(--steel); width: 26%; padding-right: 0; }

/* Portal teaser */
.portal { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 56px; align-items: center; }
.portal ul { list-style: none; margin: 24px 0 30px; padding: 0; border-top: 1px solid rgba(255,255,255,.18); }
.portal li { padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.portal li strong { color: #fff; font-weight: 700; }
.portal-shot { border-radius: 4px; overflow: hidden; border: 1px solid rgba(255,255,255,.2); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.portal-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* About + careers */
.two { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.two .body p { max-width: 36em; }
.docs { margin: 26px 0 0; padding: 18px 20px; border-left: 4px solid var(--blue); background: var(--concrete); max-width: 36em; }
.docs p { margin: 0; }
.benefits { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; border-top: 2px solid var(--black); max-width: 36em; }
.benefits li { padding: 11px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.apply { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.apply span { color: var(--steel); font-size: .95rem; overflow-wrap: anywhere; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
.contact .intro { margin: 16px 0 0; max-width: 30em; }
.contact-list { margin: 30px 0 0; display: grid; grid-template-columns: 120px 1fr; border-top: 1px solid rgba(255,255,255,.18); }
.contact-list dt, .contact-list dd { margin: 0; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.contact-list dt { color: var(--galv); font-size: .92rem; }
.contact-list dd { color: #fff; font-weight: 600; }
.bid-form { background: #fff; color: var(--black); border-radius: 4px; padding: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bid-form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.bid-form .full { grid-column: 1 / -1; }
.bid-form input, .bid-form select, .bid-form textarea { font: inherit; font-weight: 400; width: 100%; padding: 11px 12px; border: 1px solid #b9c1c9; border-radius: 3px; background: #fff; color: var(--black); }
.bid-form input:focus, .bid-form select:focus, .bid-form textarea:focus { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--black); }
.bid-form .btn:hover { background: var(--black); border-color: var(--black); color: #fff; }
.form-note { margin: 0; font-size: .86rem; color: var(--steel); align-self: center; }
.optional { font-weight: 400; color: var(--steel); }

/* Footer */
.site-footer { background: var(--black); color: rgba(255,255,255,.65); border-top: 1px solid rgba(255,255,255,.14); padding-block: 36px; font-size: .93rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.site-footer .brand { color: #fff; }
.site-footer .brand-name small { color: var(--galv); }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* Responsive */
@media (max-width: 1080px) {
  .nav { gap: 18px; }
  .nav .nav-phone { display: none; }
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding-block: 56px 40px; }
  .hero-photos { max-width: 640px; }
  .facts dl { grid-template-columns: 1fr 1fr; }
  .facts dl > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts dl > div:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 18px; }
  .feature { grid-template-columns: 1fr 1fr; }
  .feature-text { grid-column: 1 / -1; order: -1; }
  .portal, .two, .contact { grid-template-columns: 1fr; gap: 36px; }
  .section-head { display: block; }
  .section-head .btn { margin-top: 20px; }
}
@media (max-width: 820px) {
  .header-tools { display: flex; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 4px var(--gutter) 20px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav .nav-phone { display: block; padding-left: 0; border-left: 0; }
  .nav .btn { margin-top: 14px; }
}
@media (max-width: 640px) {
  :root { --gutter: 18px; }
  .section { padding-block: 64px; }
  .header-inner { gap: 10px; }
  .brand { gap: 9px; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: .66rem; letter-spacing: .12em; }
  .brand-name small { font-size: .54rem; letter-spacing: .16em; }
  .header-tools .btn-small, .menu-toggle { padding: 8px 12px; font-size: .9rem; }
  .conduit, .conduit svg { height: 84px; }
  .conduit svg { width: 1680px; }
  .facts dl { grid-template-columns: 1fr; }
  .facts dl > div, .facts dl > div + div { padding: 14px 0 0; border-left: 0; }
  .facts dl > div + div { border-top: 1px solid var(--line); margin-top: 14px; }
  .feature { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; gap: 28px; }
  .project figure { aspect-ratio: 4 / 3.4; }
  .field { flex-wrap: wrap; gap: 8px; }
  .field .tall { flex: 1 1 calc(50% - 4px); }
  .field .wide4 { flex: 1 1 100%; }
  .scope, .scope tbody, .scope tr, .scope th, .scope td { display: block; width: auto; }
  .scope thead { display: none; }
  .scope tbody th { width: auto; padding: 18px 0 4px; border-bottom: 0; }
  .scope td { padding: 0 0 6px; border-bottom: 0; }
  .scope td:last-child { width: auto; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
  .benefits { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; }
  .contact-list dt { border-bottom: 0; padding-bottom: 0; }
  .contact-list dd { padding-top: 2px; }
  .bid-form { grid-template-columns: 1fr; padding: 22px; }
  .bid-form label { grid-column: 1 / -1; }
}

/* ---- Motion (v2.1) ---- */
/* Hero slideshow: photos cross-fade with a slow push-in */
.hero-show { position: relative; }
.slides { position: relative; aspect-ratio: 4 / 3; border-radius: 3px; overflow: hidden; background: var(--black); box-shadow: 0 18px 50px rgba(11,13,16,.18); }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease; }
.slide.is-on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide .plate { position: absolute; left: 12px; bottom: 12px; transform: translateY(8px); opacity: 0; transition: transform .6s .5s, opacity .6s .5s; }
.slide.is-on .plate { transform: none; opacity: 1; }
.show-dots { display: flex; gap: 8px; margin-top: 12px; }
.show-dots button { width: 28px; height: 4px; padding: 0; border: 0; border-radius: 1px; background: var(--galv); cursor: pointer; }
.show-dots button[aria-current] { background: var(--blue); }

/* Photo hover */
.feature img, .project img, .field img { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.feature figure:hover img, .project:hover img, .field figure:hover img { transform: scale(1.05); }
.project h3 { transition: color .2s; }
.project:hover h3 { color: var(--blue-text); }

@media (prefers-reduced-motion: no-preference) {
  .slide.is-on img { animation: push 6.2s ease-out both; }
  @keyframes push { from { transform: scale(1); } to { transform: scale(1.09); } }
  .motion .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
  .motion .reveal.in { opacity: 1; transform: none; }
}
