/* Hi-Tech Electro Design - shared styles.
   Page layout and component styling stays inline (from the approved designs);
   this file holds the base styles, focus/skip-link accessibility and the mobile header. */

/* Self-hosted fonts (same families as before, no Google request) */
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/barlow-condensed-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/barlow-condensed-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/inter-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-latin-600-normal.woff2) format('woff2'); }

body { margin: 0; background: #FFFFFF; font-family: Inter, system-ui, sans-serif; }
a { color: #0B2B23; }
a:hover { color: #4A5868; }
img { max-width: 100%; }
h1, h2, h3 { overflow-wrap: break-word; }
main:focus { outline: none; }
fieldset { min-width: 0; } /* default min-width: min-content overflows on phones */

/* Skip link */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: #0B2B23; color: #FFFFFF; font-family: Inter, system-ui, sans-serif;
  font-weight: 600; font-size: 15px; padding: 12px 18px; text-decoration: none;
}
.skip-link:focus { top: 16px; color: #FFFFFF; }

/* Visible keyboard focus */
:focus-visible { outline: 3px solid #007157; outline-offset: 3px; }
[style*="background: #0B2B23"] :focus-visible,
[style*="background: #007157"] :focus-visible,
[style*="background: #8D2E42"] :focus-visible,
footer :focus-visible { outline-color: #FFFFFF; }
form[style*="background: #FFFFFF"] :focus-visible,
[style*="background: #0B2B23"] [style*="background: #FFFFFF"] :focus-visible { outline-color: #007157; }
a[style*="background: #007157"]:focus-visible,
button[style*="background: #007157"]:focus-visible { outline-color: #0B2B23; }
[style*="background: #0B2B23"] a[style*="background: #007157"]:focus-visible,
[style*="background: #007157"] a[style*="background: #FFFFFF"]:focus-visible { outline-color: #FFFFFF; }

/* Netlify honeypot */
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Menu toggle: hidden on desktop */
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .site-header__inner { padding: 12px 16px !important; gap: 12px 16px !important; }
  .site-logo { order: 1; flex: 0 1 auto; min-width: 0; }
  .site-logo img { height: 40px !important; }
  .menu-toggle {
    order: 2; margin-left: auto;
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; min-width: 44px; padding: 10px 14px; box-sizing: border-box;
    font: inherit; font-size: 15px; font-weight: 600; color: #0B2B23;
    background: #FFFFFF; border: 1px solid #8A96A3; cursor: pointer;
  }
  .menu-toggle .menu-icon-close { display: none; }
  .menu-toggle[aria-expanded="true"] .menu-icon-open { display: none; }
  .menu-toggle[aria-expanded="true"] .menu-icon-close { display: inline; }
  .site-actions { order: 3; width: 100%; justify-content: space-between; }
  .site-nav {
    order: 4; width: 100%;
    flex-direction: column; flex-wrap: nowrap !important; gap: 0 !important;
    border-top: 1px solid #D9DEE4;
  }
  .site-nav a { min-height: 48px; display: flex; align-items: center; border-bottom: 1px solid #D9DEE4; }
  html.js .site-nav { display: none !important; }
  html.js .site-nav.is-open { display: flex !important; }
}
@media (max-width: 360px) {
  .site-logo img { height: 34px !important; }
}
/* No JS: the toggle cannot work, so hide it and keep the nav visible. */
html:not(.js) .menu-toggle { display: none !important; }

/* Phone type scale: the desktop display sizes (60-72px) are too large for a 375px screen. */
@media (max-width: 600px) {
  h1[style*="font-size"] { font-size: 44px !important; line-height: 1.05 !important; }
  h2[style*="font-size: 52px"], h2[style*="font-size: 48px"], h2[style*="font-size: 44px"],
  h3[style*="font-size: 48px"] { font-size: 36px !important; }
  span[style*="font-size: 44px"], span[style*="font-size: 40px"] { font-size: 34px !important; }
  form[style*="padding: 40px"] { padding: 24px !important; }
  form[style*="padding: 32px"] { padding: 24px !important; }
  [style*="padding: 48px 40px"] { padding: 32px 24px !important; }
}
@media (max-width: 380px) {
  h1[style*="font-size"] { font-size: 40px !important; }
}

/* ---- QA pass: tap targets >= 44px, required markers, wrapping ---- */
.nowrap { white-space: nowrap; }
.req { font-size: 13px; font-weight: 400; color: #4A5868; }
.site-logo { min-height: 44px; }
.site-actions a[href^="tel:"] { min-height: 44px; display: inline-flex; align-items: center; }
details > summary { min-height: 44px !important; box-sizing: border-box; padding: 8px 0; }
nav[aria-label="Breadcrumb"] { padding-top: 4px !important; padding-bottom: 4px !important; }
nav[aria-label="Breadcrumb"] a,
.other-services a,
.cross-link a { min-height: 44px; display: inline-flex; align-items: center; }
.other-services { row-gap: 0 !important; }
form[name="home-quote"] fieldset label { min-height: 44px !important; }
/* Quote page "Call us" number */
main a[href^="tel:"][style*="font-size: 22px"] { min-height: 44px; display: inline-flex; align-items: center; align-self: flex-start; }

@media (max-width: 860px) {
  footer nav { gap: 0 !important; }
  footer nav a { min-height: 44px; display: flex; align-items: center; }
  footer p a[href^="tel:"] { display: inline-block; padding: 11px 0; margin: -5px 0; }
}

/* Phones: tighten the 96px section padding */
@media (max-width: 600px) {
  [style*="padding: 96px 24px"] { padding-top: 56px !important; padding-bottom: 56px !important; }
  [style*="24px 96px"] { padding-bottom: 56px !important; }
}
main a[href="tel:+18182424228"] { min-height: 44px; display: inline-flex; align-items: center; align-self: flex-start; }

/* Project photo + gallery */
.project-photo { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.project-photo img { transition: opacity .15s; }
.project-photo:hover img { opacity: .92; }
.project-photo:focus-visible { outline: 3px solid #007157; outline-offset: 3px; }
.photo-count { position: absolute; right: 12px; bottom: 12px; background: rgba(11, 43, 35, .88); color: #FFFFFF; font-size: 14px; font-weight: 600; padding: 8px 12px; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5, 20, 16, .95); display: flex; align-items: center; justify-content: center; padding: 64px 72px; }
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; display: block; }
.lb-cap { color: #D4E3DD; font-size: 14px; text-align: center; }
.lightbox button { position: absolute; width: 52px; height: 52px; border: 0; background: rgba(255, 255, 255, .14); color: #FFFFFF; font: 600 30px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .26); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }
@media (max-width: 640px) {
  .lightbox { padding: 64px 12px 88px; }
  .lb-img { max-height: calc(100vh - 200px); }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
}

/* Full-bleed photo heroes (service pages, For Businesses) */
.hero-pic { display: contents; }
@media (max-width: 1199px) {
  .hero-bleed { display: flex !important; flex-direction: column; align-items: stretch !important; min-height: 0 !important; }
  .hero-bleed .hero-inner { order: 1; }
  .hero-bleed .hero-pic { display: block; order: 2; }
  .hero-bleed .hero-img { position: static !important; display: block; height: auto !important; aspect-ratio: 2.3 / 1; object-position: right center !important; }
  .hero-bleed .hero-fade { display: none; }
  .hero-bleed .hero-copy { max-width: none !important; }
}
/* Photo behind text and form (home page, For Homes) */
@media (max-width: 860px) {
  .hero-bg .hero-ov { background: var(--hero-ov-m) !important; }
}

/* ---- Review fixes (Nov 2026) ---- */
h1, h2, h3 { text-wrap: balance; }
a[href^="tel:"] { white-space: nowrap; }
footer img[src*="logo-white"] { width: auto !important; max-width: 100%; object-fit: contain; object-position: left center; }
.lightbox { font-family: Inter, system-ui, sans-serif; }
@media (max-width: 600px) { input, select, textarea { font-size: 16px !important; } }
/* Header between tablet and desktop: keep it on one row with comfortable tap targets */
@media (min-width: 861px) and (max-width: 1199px) {
  .site-nav { gap: 18px !important; }
  .site-nav a { padding: 12px 0; }
  .site-header__inner { gap: 16px 20px !important; }
}
@media (max-width: 1199px) {
  footer nav { gap: 0 !important; }
  footer nav a { min-height: 44px; display: flex; align-items: center; }
  footer p a { display: inline-block; padding: 11px 0; margin: -5px 0; }
}
/* FAQ blocks line up with the other sections' left edge */
section > div[style^="max-width: 900px; margin: 0 auto; padding: 96px 24px"] { max-width: 1240px !important; box-sizing: border-box; }
section > div[style^="max-width: 900px; margin: 0 auto; padding: 96px 24px"] > * { max-width: 852px; }
/* Card links: "Learn more" sits on the same line in every card of a row */
a[style*="flex-direction: column"] > span[style*="font-weight: 600; font-size: 15px"]:last-child { margin-top: auto; }
/* Quote page: hint under the question */
legend span[style*="font-weight: 400"] { display: block; margin-top: 4px; }
/* Small phones: breadcrumb wraps without the extra-tall gaps */
@media (max-width: 400px) {
  nav[aria-label="Breadcrumb"] a { min-height: 0; display: inline-block; padding: 12px 0; line-height: 20px; }
}

/* Ultrawide screens: keep the top photos near their real size instead of blowing them up */
@media (min-width: 1921px) {
  .hero-bleed .hero-img {
    left: auto !important; right: 0 !important; width: 1920px !important;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 55%);
    mask-image: linear-gradient(90deg, transparent 0, #000 55%);
  }
  .hero-bg .hero-bg-img {
    left: 50% !important; width: 2200px !important; transform: translateX(-50%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
  }
}

/* Phones and tablets: photo strip first, then the headline */
@media (max-width: 1199px) {
  .hero-bleed .hero-pic { order: 0 !important; }
  .hero-bleed .hero-inner { order: 1 !important; }
}

/* Highlighted notes under card sections */
.note-box { margin: 0; max-width: 760px; box-sizing: border-box; background: #EAF3EF; border-left: 3px solid #007157; padding: 10px 16px; color: #0B2B23; font-size: 15px; line-height: 1.5; }
.note-box a { color: #0B2B23; font-weight: 600; }
