:root {
  --black: #071724;
  --panel: #0d2232;
  --panel-2: #102a3e;
  --line: #3b566b;
  --gold: #f5ae19;
  --gold-dark: #d89209;
  --white: #f7f8f8;
  --muted: #aeb8be;
}

html { scroll-behavior: smooth; }
body.professional-site { margin: 0; background: var(--black); color: var(--white); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.55; }
.professional-site *, .professional-site *::before, .professional-site *::after { box-sizing: border-box; }
.professional-site a { transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease; }
.professional-site img { max-width: 100%; }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 9999; padding: 12px 18px; color: #111; background: var(--gold); }
.skip-link:focus { top: 12px; }
.navbar-shell::before, .navbar-shell::after, .proof-grid::before, .proof-grid::after, .split-layout::before, .split-layout::after, .cta-inner::before, .cta-inner::after, .footer-grid::before, .footer-grid::after, .footer-bottom::before, .footer-bottom::after { display: none !important; content: none !important; }

.professional-site .sticky-wrapper { height: 76px !important; position: relative; z-index: 1000; }
.professional-site #masthead { min-height: 76px; margin: 0; border: 0; border-radius: 0; background: rgba(6,19,31,.98); box-shadow: 0 1px 0 rgba(255,255,255,.1); }
.professional-site .navbar-shell { min-height: 76px; display: flex; align-items: center; justify-content: space-between; }
.professional-site .navbar-header { float: none; }
.professional-site .navbar-brand { height: auto; padding: 0; display: flex; align-items: center; gap: 13px; color: var(--white) !important; }
.brand-logo { width: 58px; height: 58px; padding: 6px; object-fit: contain; background: var(--white); border: 0; border-radius: 3px; filter: none; }
.brand-divider { width: 2px; height: 34px; display: block; background: var(--gold); }
.brand-copy, .footer-brand a > span:last-child { display: flex; flex-direction: column; line-height: 1; text-transform: uppercase; }
.brand-copy strong, .footer-brand strong { color: var(--white); font-size: 14px; font-weight: 800; letter-spacing: .08em; }
.brand-copy small, .footer-brand small { margin-top: 5px; color: var(--white); font-size: 11px; font-weight: 700; letter-spacing: .13em; }
.professional-site .main-navbar { padding: 0; }
.professional-site .navbar-nav { display: flex; align-items: center; gap: 7px; margin: 0; }
.professional-site .navbar-nav > li > a { padding: 12px 13px; color: #dbe0e3; background: transparent !important; font-size: 13px; font-weight: 700; }
.professional-site .navbar-nav > li > a:hover, .professional-site .navbar-nav > li.active > a { color: var(--gold); }
.professional-site .navbar-nav > li.active > a::after { content: ""; position: absolute; right: 13px; bottom: 3px; left: 13px; height: 2px; background: var(--gold); }
.professional-site .navbar-nav > li > a.nav-cta { margin-left: 8px; padding: 12px 18px; color: #111; background: var(--gold) !important; border-radius: 5px; }
.professional-site .navbar-nav > li > a.nav-cta:hover { color: #111; background: #ffc84a !important; }
.professional-site .dropdown-menu { min-width: 310px; padding: 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); box-shadow: 0 20px 45px rgba(1,8,15,.48); }
.professional-site .dropdown-menu > li > a { padding: 10px 12px; color: #dbe0e3; font-size: 13px; font-weight: 600; }
.professional-site .dropdown-menu > li > a:hover { color: var(--gold); background: var(--panel-2); }

.professional-site main { display: flex; flex-direction: column; }
.hero-section { order: 1; position: relative; min-height: 560px; display: flex; align-items: center; overflow: hidden; background: var(--black); }
.hero-media, .hero-shade { position: absolute; inset: 0; }
.hero-media { background: url("../images/Engineering-Photos-20.jpg") 68% center / cover no-repeat; filter: saturate(.78) contrast(1.08); }
.hero-shade { background: linear-gradient(90deg, rgba(4,16,28,.97) 0%, rgba(4,16,28,.84) 42%, rgba(4,16,28,.24) 75%, rgba(4,16,28,.1)); }
.hero-inner { position: relative; z-index: 2; width: 100%; padding-right: clamp(30px, 4vw, 72px); padding-left: clamp(30px, 4vw, 72px); }
.hero-content { max-width: 720px; padding: 95px 0 105px; }
.eyebrow { margin: 0 0 14px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.hero-content h1 { margin: 0; color: var(--white); font-size: clamp(46px, 5vw, 72px); line-height: 1.03; letter-spacing: -.045em; font-weight: 900; text-transform: uppercase; }
.hero-content h1 span { color: var(--gold); }
.hero-lead { max-width: 560px; margin: 22px 0 0; color: #e0e4e6; font-size: 19px; line-height: 1.55; }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 23px; border: 1px solid transparent; border-radius: 4px; font-size: 13px; font-weight: 800; text-decoration: none !important; text-transform: capitalize; }
.button-primary { color: #111 !important; background: var(--gold); }
.button-primary:hover { background: #ffc84a; transform: translateY(-2px); }
.button-ghost { color: var(--white) !important; border-color: #8298a8; background: rgba(7,23,36,.45); }
.button-ghost:hover { color: var(--gold) !important; border-color: var(--gold); }
.hero-detail, .proof-strip { display: none; }

.section-block { padding: 72px 0; }
.services-section { order: 2; background: var(--black); }
.heading-row { margin-bottom: 28px; display: flex; align-items: end; justify-content: space-between; gap: 35px; }
.section-heading h2, .content-panel h2, .contact-cta h2 { margin: 0; color: var(--white); font-size: clamp(32px, 3.7vw, 49px); line-height: 1.1; letter-spacing: -.035em; font-weight: 900; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.service-card { position: relative; min-height: 175px; padding: 24px 52px 22px 72px; display: flex; flex-direction: column; color: var(--white); background: linear-gradient(145deg, var(--panel-2), #0a1d2c); border: 1px solid var(--line); border-radius: 6px; }
.service-card:hover { color: var(--white); border-color: var(--gold); text-decoration: none; transform: translateY(-3px); }
.service-card > i { position: absolute; top: 25px; left: 24px; color: var(--gold); font-size: 29px; }
.service-card h3 { margin: 0 0 9px; color: var(--white); font-size: 17px; line-height: 1.25; font-weight: 800; }
.service-card p { margin: 0; color: #c5ccd0; font-size: 13px; line-height: 1.45; }
.card-number { display: none; }
.card-link { position: absolute; top: 25px; right: 20px; color: var(--gold); font-size: 0; }
.card-link i { font-size: 15px; }

.projects-section { order: 3; padding-top: 18px; background: var(--black); }
.projects-section .heading-row { align-items: center; }
.light-link { margin: 0; padding-bottom: 3px; color: var(--gold); border-bottom: 1px solid var(--gold); font-size: 12px; font-weight: 700; text-transform: none; }
.light-link:hover { color: #ffd067; text-decoration: none; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 320px; gap: 15px; }
.project-card, .project-card.project-large, .project-card.project-wide { position: relative; grid-row: auto; grid-column: auto; display: block; overflow: hidden; color: var(--white); background: var(--panel); border: 1px solid #38434a; border-radius: 6px; }
.project-card.project-wide { display: none; }
.project-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.78); transition: .4s ease; }
.project-card:hover img { transform: scale(1.035); filter: saturate(1); }
.project-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4,16,28,.97), rgba(4,16,28,0) 62%); }
.project-card > div { position: absolute; right: 22px; bottom: 18px; left: 22px; }
.project-card small { display: none; }
.project-card h3 { margin: 0; color: var(--white); font-size: 18px; font-weight: 800; }
.project-card > div > span { position: absolute; right: 0; bottom: 2px; color: var(--gold); font-size: 0; }
.project-card > div > span i { font-size: 15px; }

.intro-section { order: 4; padding-top: 50px; background: var(--black); }
.split-layout { display: grid; grid-template-columns: 1.18fr .9fr; align-items: center; gap: 55px; }
.image-panel { position: relative; }
.image-panel::before { content: ""; position: absolute; inset: -1px; border: 1px solid rgba(245,174,25,.35); pointer-events: none; }
.image-panel img { width: 100%; aspect-ratio: 1.55 / 1; object-fit: cover; filter: saturate(.72) contrast(1.05); }
.content-panel .section-lead { margin: 18px 0 25px; color: #c6cdd1; font-size: 16px; line-height: 1.55; }
.content-panel .button { color: var(--white) !important; }
.image-badge { display: none; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); }

.contact-cta { order: 5; margin: 0 auto 28px; width: calc(100% - 40px); max-width: 1170px; padding: 22px 0; color: var(--white); background: linear-gradient(90deg, var(--panel), #11191e); border: 1px solid var(--gold); border-radius: 7px; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.contact-cta h2 { font-size: clamp(27px, 3vw, 39px); }

.site-footer { padding: 24px 0; background: #06131f; border-top: 1px solid #203b4f; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr .8fr 1.3fr; gap: 45px; }
.footer-brand > a { display: flex; align-items: center; gap: 12px; color: var(--white); }
.footer-brand .brand-logo { width: 52px; height: 52px; padding: 5px; }
.footer-brand > a:hover { text-decoration: none; }
.site-footer h3 { margin: 5px 0 13px; color: var(--white); font-size: 11px; text-transform: uppercase; }
.site-footer p, .site-footer a { color: #9ca7ad; font-size: 12px; line-height: 1.55; }
.site-footer a { display: block; margin-bottom: 5px; }
.site-footer a:hover { color: var(--gold); text-decoration: none; }
.footer-brand p { margin-top: 14px; }
.footer-bottom { min-height: 42px; margin-top: 18px; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #203b4f; }
.footer-bottom p, .footer-bottom a { margin: 0; font-size: 11px; }

/* Keep the inner legacy pages coherent with the dark BPE direction. */
body:not(.professional-site) { background: #071724 !important; color: #dce1e4; font-family: Inter, "Segoe UI", Arial, sans-serif; }
body:not(.professional-site) #masthead { background: #06131f !important; box-shadow: 0 1px 0 rgba(255,255,255,.1); }
body:not(.professional-site) .navbar-brand, body:not(.professional-site) .main-navbar a { color: #f3f5f5 !important; font-weight: 700; }
body:not(.professional-site) .main-navbar > ul > li > a:hover { color: var(--gold) !important; }
body:not(.professional-site) .section.swatch-gray { background: #0d2232; color: #dce1e4; }
body:not(.professional-site) .swatch-black { background: #071724; }
body:not(.professional-site) h1, body:not(.professional-site) h2, body:not(.professional-site) h3 { color: #f5f7f7; font-weight: 800; }
body:not(.professional-site) footer .section { background: #06131f; }

@media (max-width: 991px) {
  .professional-site .navbar-shell { display: block; }
  .professional-site .navbar-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; }
  .professional-site .navbar-toggle { margin: 0; border-color: #3f4a50; }
  .professional-site .navbar-toggle .icon-bar { background: var(--white); }
  .professional-site .main-navbar { position: absolute; top: 76px; right: 0; left: 0; background: #06131f; box-shadow: 0 18px 35px rgba(1,8,15,.5); }
  .professional-site .navbar-nav { display: block; padding: 10px 18px 20px; }
  .professional-site .navbar-nav > li > a.nav-cta { margin: 8px 0 0; text-align: center; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: 270px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 1 / 4; }
}

@media (max-width: 767px) {
  .professional-site .sticky-wrapper, .professional-site #masthead, .professional-site .navbar-header { height: 68px !important; min-height: 68px; }
  .professional-site .main-navbar { top: 68px; }
  .professional-site .navbar-brand { gap: 8px; }
  .professional-site .navbar-brand .brand-logo { width: 48px; height: 48px; padding: 5px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy small { font-size: 9px; }
  .hero-inner { padding-right: 24px; padding-left: 24px; }
  .brand-divider { height: 30px; }
  .hero-section { min-height: 550px; }
  .hero-media { background-position: 64% center; }
  .hero-shade { background: linear-gradient(90deg, rgba(4,16,28,.95), rgba(4,16,28,.68)); }
  .hero-content { padding: 75px 0 85px; }
  .hero-content h1 { font-size: 42px; }
  .hero-lead { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .section-block { padding: 58px 0; }
  .heading-row { display: block; }
  .section-heading h2, .content-panel h2 { font-size: 34px; }
  .service-grid, .project-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 165px; }
  .project-grid { grid-template-rows: repeat(3, 280px); }
  .split-layout { grid-template-columns: 1fr; gap: 30px; }
  .intro-section { padding-top: 28px; }
  .contact-cta { width: calc(100% - 24px); padding: 24px 10px; }
  .cta-inner { display: block; }
  .cta-inner .button { margin-top: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid > div:last-child { grid-column: auto; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
