/* ==========================================================================
   McCurley Enterprises Inc. — site styles
   Palette sampled from the MEI logo:  red #D10F2B  /  navy #143D8E
   Structure mirrors the GridTek Utility Services site.
   ========================================================================== */

:root {
  --navy:        #143D8E;
  --navy-deep:   #0C2557;
  --navy-mid:    #17357A;
  --red:         #D10F2B;
  --red-dark:    #A80C22;
  --ink:         #171B26;
  --body:        #4C5364;
  --muted:       #7B8395;
  --line:        #DCE1EA;
  --wash:        #F4F6FA;
  --white:       #FFFFFF;

  --display: "Barlow Condensed", "Trebuchet MS", Arial, sans-serif;
  --text:    "Inter", "Segoe UI", Arial, sans-serif;

  --shell: 1240px;
  --gut: 24px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 120px; }

body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  margin: 0 0 .5em;
  line-height: 1.05;
  letter-spacing: .012em;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 12px 18px; z-index: 999;
}
.skip:focus { left: 0; color: #fff; }

/* ---------- shared type helpers ---------- */
.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow.is-centered { justify-content: center; }
.eyebrow svg { flex: none; }

.h-xl { font-size: clamp(40px, 6vw, 68px); font-weight: 700; text-transform: uppercase; }
.h-lg { font-size: clamp(32px, 4.4vw, 50px); font-weight: 700; text-transform: uppercase; }
.h-md { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; text-transform: uppercase; }
.h-sm { font-size: 23px; font-weight: 600; text-transform: uppercase; }

.lede { font-size: 19px; line-height: 1.7; }
.center { text-align: center; }
.measure { max-width: 780px; margin-left: auto; margin-right: auto; }

/* the bolt rule: signature divider lifted from the logo mark.
   Left-aligned = bolt then short rule. Centered = rule, bolt, rule. */
.bolt-rule {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 30px;
  color: var(--red);
}
.bolt-rule svg { flex: none; }
.bolt-rule::before,
.bolt-rule::after { content: ""; height: 3px; background: var(--navy); flex: 1 1 auto; }
.bolt-rule::before { display: none; }
.bolt-rule::after { max-width: none; }
.bolt-rule.is-centered { justify-content: center; }
.bolt-rule.is-centered::before { display: block; max-width: none; }
.bolt-rule.is-centered::after { max-width: none; }
.bolt-rule.on-dark { color: #fff; }
.bolt-rule.on-dark::before,
.bolt-rule.on-dark::after { background: rgba(255,255,255,.45); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 15px 40px;
  border: 2px solid var(--navy);
  color: var(--navy);
  background: transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { background: var(--navy); color: #fff; }

.btn.btn-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.btn-solid:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }

.btn.btn-ghost { border-color: #fff; color: #fff; }
.btn.btn-ghost:hover { background: #fff; color: var(--navy); }

/* ---------- utility bar ---------- */
.utility {
  background: var(--navy-deep);
  color: rgba(255,255,255,.82);
  font-size: 13.5px;
  letter-spacing: .04em;
}
.utility .shell {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 42px; flex-wrap: wrap;
}
.utility a { color: rgba(255,255,255,.82); }
.utility a:hover { color: #fff; }
.utility .parent-tag { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
.utility .parent-tag strong { color: #fff; font-weight: 600; }

/* ---------- header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(12,37,87,.06);
}
.masthead .shell {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 104px;
}
.brand img { height: 130px; width: auto; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  font-family: var(--display); font-size: 17px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--navy);
  align-items: center; gap: 9px; padding: 10px 4px;
}
.nav-toggle .bars { display: block; width: 24px; height: 2px; background: var(--navy); position: relative; }
.nav-toggle .bars::before,
.nav-toggle .bars::after { content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: var(--navy); }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }

.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 34px; }
.mainnav > ul > li { position: relative; }
.mainnav > ul > li > a {
  font-family: var(--display); font-weight: 600; font-size: 18px;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink);
  display: block; padding: 38px 0; position: relative;
}
.mainnav > ul > li > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 30px;
  height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.mainnav > ul > li > a:hover::after,
.mainnav > ul > li.current > a::after { transform: scaleX(1); }
.mainnav > ul > li.current > a { color: var(--navy); }

.mainnav .submenu {
  position: absolute; top: 100%; left: -18px; min-width: 268px;
  background: var(--navy); padding: 10px 0; display: block;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  flex-direction: column; gap: 0;
}
.mainnav li:hover > .submenu,
.mainnav li:focus-within > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.mainnav .submenu a {
  display: block; padding: 11px 24px; color: rgba(255,255,255,.86);
  font-size: 15px; letter-spacing: .04em;
}
.mainnav .submenu a:hover { background: var(--navy-deep); color: #fff; }

.nav-cta { margin-left: 6px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 640px;
  display: flex; align-items: center;
  background: var(--navy-deep) center/cover no-repeat;
  text-align: center;
  color: #fff;
  padding: 110px 0;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,37,87,.86) 0%, rgba(12,37,87,.74) 45%, rgba(20,61,142,.86) 100%);
}
.hero .shell { position: relative; }
.hero-mark { width: 128px; margin: 0 auto 34px; }
.hero h1 {
  color: #fff;
  font-size: clamp(31px, 3.9vw, 46px);
  font-weight: 600;
  line-height: 1.18;
  max-width: 1000px;
  margin: 0 auto 14px;
  text-transform: none;
}
.hero p {
  color: rgba(255,255,255,.9);
  max-width: 760px; margin: 0 auto 38px;
  font-size: 18.5px;
}
.hero .bolt-rule { justify-content: center; margin: 26px auto 30px; max-width: 300px; }

/* interior page banner */
.pagehead {
  position: relative;
  background: var(--navy) center/cover no-repeat;
  color: #fff;
  padding: 96px 0 88px;
  text-align: center;
}
.pagehead::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,37,87,.9), rgba(20,61,142,.86));
}
.pagehead .shell { position: relative; }
.pagehead h1 { color: #fff; margin-bottom: 10px; }
.pagehead p { color: rgba(255,255,255,.88); max-width: 720px; margin: 0 auto; }

/* ---------- sections ---------- */
.section { padding: 50px 0; !important}
.section.tight { padding: 68px 0; }
.section.wash { background: var(--wash); }
.section.navy { background: var(--navy); color: rgba(255,255,255,.9); }
.section.navy h2, .section.navy h3 { color: #fff; }
.section.navy .eyebrow { color: #fff; }

.split {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 66px; align-items: center;
}
.split.flip .split-media { order: 2; }
.split-media img { width: 100%; height: 100%; object-fit: cover; min-height: 340px; }
.split-media { position: relative; }
.split-media::after {
  content: ""; position: absolute; left: -14px; bottom: -14px;
  width: 116px; height: 116px; border-left: 6px solid var(--red); border-bottom: 6px solid var(--red);
}

/* ---------- stat band ---------- */
.stats { background: var(--navy); color: #fff; padding: 60px 0; }
.stats .grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 14px 20px; position: relative; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,.22); }
.stat .num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(42px, 4.6vw, 62px); line-height: 1; color: #fff;
  display: block;
}
.stat .num em { font-style: normal; color: #fff; }
.stat .label {
  display: block; margin-top: 12px;
  font-family: var(--display); font-weight: 600; font-size: 16px;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.78);
}
.stat .tick { width: 34px; height: 4px; background: var(--red); margin: 16px auto 0; }

/* ---------- service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(12,37,87,.13); border-color: transparent; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-deep); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 28px 28px 32px; }
.card-body h3 { margin-bottom: 12px; font-size: 22px; text-transform: uppercase; }
.card-body p { font-size: 16px; margin: 0; }
.card-rule { width: 46px; height: 4px; background: var(--red); margin: 0 0 16px; }

/* ---------- leadership ---------- */
.leader-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.leader { background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.leader-photo { aspect-ratio: 1 / 1; overflow: hidden; background: var(--wash); }
.leader-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.leader-photo.is-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: rgba(255,255,255,.28);
}
.leader-ph-mark { width: 62px; height: auto; }
.leader-body { padding: 26px 28px 30px; }
.leader-name { font-size: 24px; text-transform: uppercase; margin: 0 0 4px; }
.leader-title {
  font-family: var(--display); font-weight: 600; font-size: 16px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--red);
  margin: 0 0 16px;
}
.leader-bio { font-size: 16px; margin: 0; }

/* ---------- feature list ---------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  position: relative; padding: 0 0 14px 34px; font-size: 16.5px;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 12px; height: 12px; background: var(--red); transform: rotate(45deg);
}
.section.navy .checklist li::before { background: #fff; }

/* ---------- client grid ---------- */
.client-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.client {
  background: #fff; border-top: 5px solid var(--navy);
  padding: 34px 26px; text-align: center;
}
.client h3 { font-size: 20px; margin: 0; text-transform: uppercase; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.gallery a { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--navy-deep); }
.gallery a:nth-child(1), .gallery a:nth-child(2) { grid-column: span 3; aspect-ratio: 16 / 9; }
.gallery a:nth-child(n+3) { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.06); }

/* ---------- CTA band ---------- */
.cta {
  position: relative; text-align: center; color: #fff;
  padding: 96px 0; background: var(--navy) center/cover no-repeat;
}
.cta::before { content: ""; position: absolute; inset: 0; background: rgba(12,37,87,.88); }
.cta .shell { position: relative; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.88); max-width: 620px; margin: 0 auto 34px; }

/* ---------- contact / forms ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.info-block { margin-bottom: 34px; }
.info-block h3 { font-size: 19px; letter-spacing: .12em; margin-bottom: 8px; text-transform: uppercase; }
.info-block p { margin: 0; }

.form-field { margin-bottom: 20px; }
.form-field label {
  display: block; font-family: var(--display); font-weight: 600;
  font-size: 16px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 7px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; padding: 13px 15px; font-family: var(--text); font-size: 16px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--navy); outline: 2px solid rgba(20,61,142,.18); }
.form-note { font-size: 14px; color: var(--muted); }

.map-embed { width: 100%; height: 380px; border: 0; filter: grayscale(.25); }

/* ---------- footer ---------- */
.sitefoot { background: var(--navy-deep); color: rgba(255,255,255,.74); padding: 72px 0 0; font-size: 15.5px; }
.sitefoot a { color: rgba(255,255,255,.74); }
.sitefoot a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.25fr 1fr 1.2fr; gap: 54px; padding-bottom: 56px; }
.foot-logo { width: 210px; margin-bottom: 22px; }
.sitefoot h4 {
  color: #fff; font-size: 19px; letter-spacing: .16em; text-transform: uppercase;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 3px solid var(--red);
  display: inline-block;
}
.foot-nav { list-style: none; margin: 0; padding: 0; }
.foot-nav li { margin-bottom: 11px; }
.foot-contact { list-style: none; margin: 0; padding: 0; }
.foot-contact li { margin-bottom: 14px; padding-left: 26px; position: relative; }
.foot-contact li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 9px; height: 9px; background: var(--red); transform: rotate(45deg);
}
.foot-bar {
  border-top: 1px solid rgba(255,255,255,.16);
  padding: 22px 0; font-size: 13.5px; display: flex; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; color: rgba(255,255,255,.6);
}

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.flip .split-media { order: 0; }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .stats .grid { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .stat:nth-child(3) { border-left: 0; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .leader-grid { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .masthead .shell { min-height: 84px; }
  .brand img { height: 50px; }
  .mainnav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(12,37,87,.14);
    display: none; padding: 8px 0 18px;
  }
  .mainnav.open { display: block; }
  .mainnav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .mainnav > ul > li > a { padding: 15px 24px; }
  .mainnav > ul > li > a::after { display: none; }
  .mainnav .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: var(--wash); padding: 4px 0 10px;
  }
  .mainnav .submenu a { color: var(--body); padding: 9px 40px; }
  .mainnav .submenu a:hover { background: transparent; color: var(--red); }
  .nav-cta { margin: 14px 24px 0; }
  .nav-cta .btn { display: block; text-align: center; }
}

@media (max-width: 780px) {
  .section { padding: 62px 0; }
  .hero { min-height: 520px; padding: 84px 0; }
  .stats .grid { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid rgba(255,255,255,.22); margin-top: 22px; padding-top: 30px; }
  .cards, .cards.two { grid-template-columns: 1fr; }
  .leader-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery a:nth-child(1), .gallery a:nth-child(2),
  .gallery a:nth-child(n+3) { grid-column: span 1; aspect-ratio: 4 / 3; }
  .foot-grid { grid-template-columns: 1fr; gap: 36px; }
  .utility .shell { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

