/*
Theme Name: Electrical Plus
Theme URI: https://electricalplusnj.com/
Author: Electrical Plus LLC
Description: Custom block theme for Electrical Plus LLC.
Version: 1.0.7
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: electrical-plus
*/

:root {
  --ep-navy: #322f47;
  --ep-navy-dark: #242235;
  --ep-gold: #f6b01a;
  --ep-gold-dark: #c98200;
  --ep-cream: #fbfaf7;
  --ep-white: #ffffff;
  --ep-ink: #282735;
  --ep-muted: #666573;
  --ep-line: #e5e3e7;
  --ep-shell: min(1120px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ep-white);
  color: var(--ep-ink);
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; }
.ep-shell { width: var(--ep-shell); margin-inline: auto; }
.ep-section { padding: clamp(76px, 9vw, 112px) 0; }

.ep-form-notice {
  margin: 0;
  color: var(--ep-muted);
}

.ep-utility {
  min-height: 36px;
  display: flex;
  align-items: center;
  background: var(--ep-navy);
  color: rgba(255,255,255,.82);
  font-size: .82rem;
}
.ep-utility p { width: var(--ep-shell); margin: 0 auto; }

.ep-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--ep-line);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
}
.admin-bar .ep-header { top: 32px; }
.ep-header-inner {
  min-height: 82px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}
.ep-brand,
.ep-footer-brand {
  display: block;
  flex: 0 1 335px;
  width: min(335px, 39vw);
  background-position: left center;
  background-repeat: no-repeat;
  background-size: contain;
}
.ep-brand {
  height: 60px;
  background-image: url("assets/ElectricalPlusMainLogo_Color.png");
}
.ep-footer-brand {
  width: min(330px, 100%);
  height: 68px;
  background-image: url("assets/ElectricalPlusMainLogo_White.png");
}
.ep-nav { color: var(--ep-navy); font-size: .93rem; font-weight: 600; }
.ep-nav .wp-block-navigation__container {
  column-gap: clamp(20px, 2.2vw, 32px);
  row-gap: 12px;
}
.ep-nav .wp-block-navigation-item { margin: 0; }
.ep-nav a { text-decoration: none; }
.ep-nav a:hover { color: var(--ep-gold-dark); }
.ep-site-nav { margin-left: auto; }
.ep-site-nav-desktop {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.2vw, 32px);
}
.ep-site-nav a {
  color: var(--ep-navy);
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
}
.ep-site-nav a:hover { color: var(--ep-gold-dark); }
.ep-site-nav-mobile { display: none; }

.ep-eyebrow {
  margin: 0 0 17px;
  color: var(--ep-gold-dark);
  font-size: .76rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.ep-eyebrow-light { color: var(--ep-gold); }
.ep-title,
.ep-heading {
  margin-top: 0;
  color: var(--ep-navy);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -.045em;
  line-height: 1.06;
}
.ep-title { margin-bottom: 24px; font-size: clamp(3rem, 6vw, 5.6rem); }
.ep-heading { margin-bottom: 0; font-size: clamp(2.15rem, 4vw, 3.6rem); }

.ep-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(74px, 10vw, 132px) 0;
  background: var(--ep-cream);
}
.ep-hero::after,
.ep-page-hero::after {
  content: "+";
  position: absolute;
  right: max(3vw, 24px);
  bottom: -76px;
  color: rgba(246,176,26,.12);
  font: 800 italic clamp(190px, 30vw, 380px)/1 "Inter", sans-serif;
}
.ep-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr);
  align-items: center;
  gap: clamp(48px, 7vw, 90px);
}
.ep-hero-copy > p:not(.ep-eyebrow) {
  max-width: 690px;
  margin: 0 0 31px;
  color: var(--ep-muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}
.ep-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ep-button .wp-block-button__link {
  min-height: 50px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 21px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--ep-navy);
  background: var(--ep-gold);
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.ep-button .wp-block-button__link:hover { transform: translateY(-2px); background: #ffc13b; }
.ep-button-outline .wp-block-button__link { background: transparent; border-color: #b9b5c1; }
.ep-button-outline .wp-block-button__link:hover { background: transparent; border-color: var(--ep-navy); }
.ep-button-white .wp-block-button__link { background: var(--ep-white); }
.ep-button-navy .wp-block-button__link { color: var(--ep-white); background: var(--ep-navy); }
.ep-button-navy .wp-block-button__link:hover { background: var(--ep-navy-dark); }
.ep-hero-image {
  align-self: stretch;
  min-height: 480px;
  margin: 0;
  overflow: hidden;
  border-bottom: 8px solid var(--ep-gold);
  box-shadow: 0 20px 50px rgba(50,47,71,.15);
}
.ep-hero-image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 48%; }

.ep-section-heading { max-width: 620px; margin-bottom: 42px; }
.ep-service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ep-service-card { overflow: hidden; border-top: 4px solid var(--ep-gold); background: var(--ep-cream); }
.ep-service-card figure { aspect-ratio: 4 / 3; margin: 0; overflow: hidden; background: #e8e7e4; }
.ep-service-card figure img { width: 100%; height: 100%; object-fit: cover; }
.ep-service-card h3 { margin: 26px 29px 10px; color: var(--ep-navy); font-size: 1.22rem; }
.ep-service-card > p { margin: 0; padding: 0 29px 31px; color: var(--ep-muted); }

.ep-about-band { background: var(--ep-navy); color: var(--ep-white); }
.ep-two-column { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(55px, 9vw, 120px); align-items: center; }
.ep-about-band .ep-heading { color: var(--ep-white); }
.ep-about-copy p { color: rgba(255,255,255,.78); font-size: 1.08rem; }
.ep-about-copy p:nth-child(2) { color: var(--ep-white); font-weight: 600; }
.ep-text-link { color: var(--ep-gold); font-weight: 700; text-underline-offset: 5px; }
.ep-local-copy { margin: 0; color: var(--ep-muted); font-size: 1.06rem; }

.ep-cta-wrap { padding: 0 0 86px; }
.ep-cta {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 50px;
  padding: clamp(38px, 6vw, 68px);
  background: var(--ep-gold);
}
.ep-cta .ep-eyebrow { color: var(--ep-navy); }

.ep-page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 112px) 0;
  background: var(--ep-cream);
}
.ep-page-hero-inner { position: relative; z-index: 1; max-width: 830px; }
.ep-page-hero .ep-title { margin-bottom: 25px; font-size: clamp(3rem, 6vw, 5.4rem); }
.ep-page-hero-copy { max-width: 720px; margin: 0; color: var(--ep-muted); font-size: clamp(1.08rem, 1.8vw, 1.24rem); }
.ep-team-intro { max-width: 700px; margin-bottom: 44px; }
.ep-team-intro .ep-heading { margin-bottom: 16px; }
.ep-team-intro > p:last-child { margin: 0; color: var(--ep-muted); font-size: 1.06rem; }
.ep-field-team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.ep-profile { padding: clamp(29px, 4vw, 43px); border-top: 4px solid var(--ep-gold); background: var(--ep-cream); }
.ep-initial {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin: 0 0 27px;
  border-radius: 50%;
  color: var(--ep-navy);
  background: var(--ep-gold);
  font-size: 1.55rem;
  font-weight: 800;
  font-style: italic;
}
.ep-role { margin: 0 0 10px; color: var(--ep-gold-dark); font-size: .73rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.ep-profile h3,
.ep-support h3 { margin: 0 0 13px; color: var(--ep-navy); font-size: 1.55rem; }
.ep-profile > p:last-child,
.ep-support-copy > p:last-child { margin-bottom: 0; color: var(--ep-muted); }
.ep-support { display: grid; grid-template-columns: auto 1fr; gap: 27px; align-items: center; margin-top: 22px; padding: 30px clamp(29px, 4vw, 43px); border: 1px solid var(--ep-line); }
.ep-support .ep-initial { margin: 0; color: var(--ep-white); background: var(--ep-navy); }
.ep-values { padding: clamp(50px, 6vw, 70px) 0; background: var(--ep-navy); color: var(--ep-white); }
.ep-values-heading { max-width: 660px; margin-bottom: 27px; }
.ep-values-heading .ep-heading { color: var(--ep-white); font-size: clamp(1.9rem, 3vw, 2.65rem); }
.ep-values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ep-value { padding: 23px 25px; border-top: 2px solid rgba(246,176,26,.78); background: rgba(255,255,255,.035); }
.ep-value-number { margin: 0 0 10px; color: var(--ep-gold); font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.ep-value h3 { margin: 0 0 6px; color: var(--ep-white); font-size: 1.08rem; }
.ep-value p { margin: 0; color: rgba(255,255,255,.72); font-size: .94rem; line-height: 1.55; }
.ep-about-cta { padding-top: clamp(62px, 8vw, 90px); }

.ep-contact-grid { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr); gap: clamp(45px, 7vw, 84px); align-items: start; }
.ep-contact-intro .ep-heading { margin-bottom: 18px; font-size: clamp(2.1rem, 4vw, 3.25rem); }
.ep-contact-intro > p { color: var(--ep-muted); }
.ep-direct-contact { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--ep-line); }
.ep-direct-contact h3 { margin-bottom: 8px; color: var(--ep-navy); font-size: 1.1rem; }
.ep-direct-contact p { margin-bottom: 17px; color: var(--ep-muted); }
.ep-form-shell { padding: clamp(28px, 4vw, 45px); border-top: 4px solid var(--ep-gold); background: var(--ep-cream); }
.ep-form-placeholder { padding: 30px; border: 1px dashed #b9b5c1; background: var(--ep-white); text-align: center; }
.ep-form-placeholder h3 { margin-bottom: 8px; color: var(--ep-navy); }
.ep-form-placeholder p { margin-bottom: 0; color: var(--ep-muted); }
.ep-privacy { margin: 18px 0 0; color: var(--ep-muted); font-size: .8rem; }

/* WPForms styling after the form block is inserted. */
.ep-form-shell .wpforms-container { margin: 0; }
.ep-form-shell .wpforms-form .wpforms-field-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.ep-form-shell .wpforms-form .wpforms-field { min-width: 0; padding: 0; }
.ep-form-shell .wpforms-form .wpforms-field:nth-child(n+5) { grid-column: 1 / -1; }
.ep-form-shell .wpforms-form .wpforms-field-label,
.ep-form-shell .wpforms-form legend { color: var(--ep-navy); font-size: .9rem; font-weight: 700; }
.ep-form-shell .wpforms-form input[type="text"],
.ep-form-shell .wpforms-form input[type="email"],
.ep-form-shell .wpforms-form input[type="tel"],
.ep-form-shell .wpforms-form select,
.ep-form-shell .wpforms-form textarea {
  width: 100%;
  max-width: none;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid #c9c6ce;
  border-radius: 4px;
  color: var(--ep-ink);
  background: var(--ep-white);
  font: inherit;
}
.ep-form-shell .wpforms-form textarea { min-height: 150px; }
.ep-form-shell .wpforms-form input:focus,
.ep-form-shell .wpforms-form select:focus,
.ep-form-shell .wpforms-form textarea:focus { border-color: var(--ep-navy); outline: 3px solid rgba(246,176,26,.34); outline-offset: 1px; }
.ep-form-shell .wpforms-form button[type="submit"] {
  min-height: 50px;
  padding: 12px 21px;
  border: 0;
  border-radius: 5px;
  color: var(--ep-navy);
  background: var(--ep-gold);
  font: inherit;
  font-weight: 700;
}
.ep-form-shell .wpforms-form button[type="submit"]:hover { color: var(--ep-navy); background: #ffc13b; }

.ep-footer { padding: 57px 0 23px; background: var(--ep-navy-dark); color: rgba(255,255,255,.72); }
.ep-footer-grid { display: grid; grid-template-columns: 1.25fr .8fr .95fr; gap: 50px; align-items: start; }
.ep-footer p { margin: 0 0 4px; font-size: .9rem; }
.ep-footer a { color: var(--ep-white); font-weight: 600; text-decoration: none; }
.ep-footer-bottom { margin-top: 40px; padding-top: 19px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; }

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

@media (max-width: 850px) {
  :root { --ep-shell: min(100% - 32px, 720px); }
  .admin-bar .ep-header { top: 46px; }
  .ep-header { backdrop-filter: none; }
  .ep-header-inner { min-height: 74px; gap: 16px; }
  .ep-brand { width: min(300px, 62vw); }
  .ep-site-nav-desktop { display: none; }
  .ep-site-nav-mobile {
    display: block;
    margin: 0;
  }
  .ep-site-nav-mobile > summary {
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 100002;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--ep-line);
    border-radius: 5px;
    color: var(--ep-navy);
    background: var(--ep-white);
    cursor: pointer;
    list-style: none;
  }
  .ep-site-nav-mobile > summary::-webkit-details-marker { display: none; }
  .ep-site-nav-mobile > summary::marker { content: ""; }
  .ep-menu-icon {
    width: 25px;
    height: 20px;
    position: relative;
    display: block;
  }
  .ep-menu-icon span {
    position: absolute;
    left: 0;
    width: 25px;
    height: 2px;
    display: block;
    border-radius: 2px;
    background: currentColor;
    transition: top .18s ease, transform .18s ease, opacity .18s ease;
  }
  .ep-menu-icon span:nth-child(1) { top: 1px; }
  .ep-menu-icon span:nth-child(2) { top: 9px; }
  .ep-menu-icon span:nth-child(3) { top: 17px; }
  .ep-site-nav-mobile[open] > summary {
    position: fixed;
    top: max(22px, env(safe-area-inset-top));
    right: max(22px, env(safe-area-inset-right));
    border-color: rgba(255,255,255,.25);
    color: var(--ep-white);
    background: transparent;
  }
  .ep-site-nav-mobile[open] .ep-menu-icon span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
  }
  .ep-site-nav-mobile[open] .ep-menu-icon span:nth-child(2) { opacity: 0; }
  .ep-site-nav-mobile[open] .ep-menu-icon span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
  }
  .ep-mobile-panel {
    position: fixed;
    inset: 0;
    z-index: 100001;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    padding: max(26px, env(safe-area-inset-top)) 28px 40px;
    background: var(--ep-navy-dark);
  }
  .ep-mobile-brand {
    width: min(235px, calc(100vw - 110px));
    height: 52px;
    display: block;
    background: url("assets/ElectricalPlusMainLogo_White.png") left center / contain no-repeat;
  }
  .ep-mobile-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 46px;
  }
  .ep-mobile-links a {
    width: 100%;
    display: block;
    padding: 17px 2px;
    border-bottom: 1px solid rgba(255,255,255,.15);
    color: var(--ep-white);
    font-size: 1.25rem;
    font-weight: 700;
    text-align: left;
  }
  .ep-mobile-links a:last-child {
    margin-top: 20px;
    padding: 14px 18px;
    border: 0;
    border-radius: 5px;
    color: var(--ep-navy);
    background: var(--ep-gold);
    text-align: center;
  }
  body:has(.ep-site-nav-mobile[open]) { overflow: hidden; }
  .ep-hero-grid,
  .ep-two-column,
  .ep-cta,
  .ep-contact-grid { grid-template-columns: 1fr; }
  .ep-hero-grid { align-items: start; }
  .ep-hero-image { width: min(100%, 560px); min-height: 520px; }
  .ep-service-grid { grid-template-columns: 1fr; }
  .ep-two-column { gap: 35px; }
  .ep-footer-grid { grid-template-columns: 1fr 1fr; }
  .ep-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --ep-shell: calc(100% - 28px); }
  .ep-utility p { text-align: center; }
  .ep-header-inner { min-height: 72px; }
  .ep-brand { height: 52px; }
  .ep-hero { padding: 64px 0; }
  .ep-title { font-size: clamp(2.7rem, 13vw, 3.75rem); }
  .ep-actions,
  .ep-actions .wp-block-button,
  .ep-actions .wp-block-button__link { width: 100%; }
  .ep-section { padding: 72px 0; }
  .ep-field-team,
  .ep-values-grid { grid-template-columns: 1fr; }
  .ep-form-shell .wpforms-form .wpforms-field-container { grid-template-columns: 1fr; }
  .ep-form-shell .wpforms-form .wpforms-field:nth-child(n) { grid-column: auto; }
  .ep-support { grid-template-columns: 1fr; align-items: start; }
  .ep-hero-image { width: 100%; min-height: 440px; }
  .ep-cta-wrap { padding-bottom: 50px; }
  .ep-cta { width: calc(100% - 20px); padding: 35px 25px; }
  .ep-footer-grid { grid-template-columns: 1fr; gap: 25px; }
  .ep-footer-brand { grid-column: auto; }
  .ep-footer-bottom { margin-top: 30px; }
}

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