/* =========================================================================
   Phase One Electric — Design System
   ========================================================================= */

:root {
  --brand-blue: #1A5DAA;
  --brand-blue-deep: #0F3F77;
  --brand-blue-soft: #E8F0FA;
  --brand-green: #8BDB01;
  --brand-green-deep: #6FB003;
  --brand-green-soft: #F1FAE0;

  --ink: #111418;
  --ink-soft: #4B5563;
  --ink-mute: #6B7280;
  --line: #E5E7EB;
  --line-soft: #F1F3F6;

  --bg: #FFFFFF;
  --bg-soft: #F7F8FA;
  --bg-deep: #0E1620;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --shadow: 0 8px 24px rgba(15, 23, 42, .08), 0 2px 6px rgba(15, 23, 42, .04);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, .14), 0 6px 16px rgba(15, 23, 42, .06);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Inter, Arial, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.2rem, 5.5vw, 4.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); font-weight: 700; }
p  { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--brand-blue); text-decoration: none; }
a:hover { color: var(--brand-blue-deep); text-decoration: underline; }

::selection { background: var(--brand-blue); color: white; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: white; padding: 12px 16px; border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; color: white; text-decoration: none; }

/* Wrap */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Eyebrow */
.eyebrow {
  display: inline-block;
  font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-blue); margin: 0 0 .8em;
}

/* Section head */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head h2 { margin-bottom: .4em; }
.section-lede { font-size: 1.1rem; color: var(--ink-soft); }

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  padding: 14px 22px; border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:focus-visible { outline: 3px solid var(--brand-green); outline-offset: 2px; }

.btn-primary { background: var(--brand-blue); color: white; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-blue-deep); color: white; box-shadow: var(--shadow); }

.btn-ghost { background: transparent; color: white; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: white; border-color: white; }

.btn-link { background: transparent; color: var(--brand-blue); padding: 14px 0; }
.btn-link:hover { color: var(--brand-blue-deep); text-decoration: underline; }

.btn-lg { padding: 18px 28px; font-size: 1.06rem; }
.btn-sm { padding: 10px 16px; font-size: .92rem; }
.btn-block { width: 100%; }

/* ========== Header ========== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 12px; padding-bottom: 12px;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 44px; width: auto; }

.site-nav { display: none; }
.site-nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 28px; }
.site-nav a { color: var(--ink); font-weight: 600; font-size: .98rem; }
.site-nav a:hover { color: var(--brand-blue); text-decoration: none; }

.header-cta { display: none; align-items: center; gap: 14px; }
.phone-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); font-weight: 700; font-size: 1rem;
}
.phone-link:hover { color: var(--brand-blue); text-decoration: none; }
.phone-icon { color: var(--brand-green); font-size: 1.2em; }

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  width: 44px; height: 44px; padding: 12px;
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, opacity .15s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { border-top: 1px solid var(--line); background: white; }
.mobile-nav[hidden] { display: none; }
.mobile-nav ul { list-style: none; padding: 12px var(--gutter) 20px; margin: 0; display: grid; gap: 4px; }
.mobile-nav a { display: block; padding: 14px 8px; color: var(--ink); font-weight: 600; border-radius: 8px; }
.mobile-nav a:hover { background: var(--bg-soft); text-decoration: none; }
.mobile-nav .btn { padding: 14px; margin-top: 6px; }

@media (min-width: 920px) {
  .site-nav { display: block; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
  .brand-logo { height: 52px; }
}

/* ========== Hero ========== */
.hero {
  position: relative; isolation: isolate;
  color: white;
  padding: clamp(72px, 12vw, 140px) 0 clamp(80px, 14vw, 160px);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(125, 185, 66, .35), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(26, 93, 170, .55), transparent 60%),
    linear-gradient(135deg, #0F3F77 0%, #1A5DAA 55%, #0E1620 100%);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: .6;
}
.hero .eyebrow { color: var(--brand-green); }
.hero h1 { color: white; max-width: 16ch; }
.hero h1 .accent { color: var(--brand-green); }
.hero .lede {
  color: rgba(255,255,255,.88); font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  max-width: 56ch; margin-bottom: 32px;
}
.hero .lede strong { color: white; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-trust {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  font-size: .92rem; color: rgba(255,255,255,.78);
}
.hero-trust li { position: relative; }
.hero-trust li::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-green); margin-right: 10px; vertical-align: middle;
}
.hero-trust strong { color: white; }

/* ========== Counters ========== */
.counters { background: var(--bg-soft); padding: 36px 0 28px; border-bottom: 1px solid var(--line); }
.counter-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
.counter {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 12px;
}
.counter .num {
  font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; color: var(--brand-blue);
  letter-spacing: -.02em; line-height: 1;
}
.counter .num .plus { color: var(--brand-green); }
.counter .label { font-size: .9rem; color: var(--ink-soft); margin-top: 8px; }
.counter-foot { font-size: .82rem; color: var(--ink-mute); margin-top: 12px; text-align: center; }

@media (min-width: 720px) {
  .counter-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ========== Generic section ========== */
.services, .specialties, .why, .area, .schedule, .faq {
  padding: clamp(64px, 9vw, 110px) 0;
}
.specialties { background: var(--bg-soft); }
.why { background: var(--bg); }
.area { background: var(--bg-soft); }
.faq { background: var(--bg-soft); }

/* ========== Services (3 pillars) ========== */
.service-grid {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
}
.service-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s ease, border-color .15s ease;
}
.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-blue); }
.service-card.featured { border-color: var(--brand-blue); }
.service-icon {
  width: 56px; height: 56px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-blue-soft); color: var(--brand-blue);
  margin-bottom: 18px;
}
.service-card.featured .service-icon { background: var(--brand-blue); color: white; }
.service-card h3 { font-size: 1.4rem; margin-bottom: .4em; }
.service-card > p { font-size: .98rem; }
.service-card ul {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: grid; gap: 8px;
}
.service-card ul li {
  position: relative; padding-left: 22px; font-size: .95rem; color: var(--ink);
}
.service-card ul li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-green);
}

@media (min-width: 820px) {
  .service-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ========== Specialties ========== */
.spec-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
.spec-card {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: transform .15s ease, box-shadow .2s ease, border-color .15s ease;
}
.spec-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-green); }
.spec-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-green-soft); color: var(--brand-green-deep);
  margin-bottom: 14px;
}
.spec-card h3 { font-size: 1.15rem; margin-bottom: .4em; }
.spec-card p { font-size: .94rem; margin: 0; }

@media (min-width: 640px) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .spec-grid { grid-template-columns: repeat(3, 1fr); } }

/* ========== Why ========== */
.why-wrap { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: center; }
.why-copy h2 { max-width: 16ch; }
.why-copy .why-promises {
  margin-top: 16px; padding: 18px 22px;
  border-left: 4px solid var(--brand-green);
  background: var(--brand-blue-soft);
  color: var(--ink); font-weight: 600; border-radius: 0 12px 12px 0;
}
.why-ctas { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; align-items: center; }
.why-badges {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.badge {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; text-align: center; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 4px;
}
.badge strong { color: var(--brand-blue); font-size: 1rem; letter-spacing: .04em; }
.badge span { color: var(--ink-soft); font-size: .85rem; }

@media (min-width: 820px) {
  .why-wrap { grid-template-columns: 1.3fr 1fr; gap: 64px; }
  .why-badges { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .why-badges { grid-template-columns: repeat(3, 1fr); }
}

/* ========== Area ========== */
.area-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
.area-counties ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.area-counties li {
  position: relative; padding-left: 26px; font-weight: 600; color: var(--ink);
}
.area-counties li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 14px; height: 14px; border-radius: 4px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
}
.city-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.city-list span {
  background: white; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: .9rem; color: var(--ink-soft);
}
.area-counties h3, .area-cities h3 {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--brand-blue); margin-bottom: 16px;
}

@media (min-width: 820px) { .area-grid { grid-template-columns: 1fr 2fr; gap: 56px; } }

/* ========== Schedule / Contact ========== */
.schedule-wrap { display: grid; gap: 40px; grid-template-columns: 1fr; }
.schedule-intro h2 { max-width: 14ch; }
.contact-block { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.contact-block li { display: grid; grid-template-columns: 80px 1fr; gap: 16px; align-items: start; }
.contact-label {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--brand-blue); font-weight: 700; padding-top: 3px;
}
.contact-value { color: var(--ink); font-weight: 600; }
a.contact-value { color: var(--ink); }
a.contact-value:hover { color: var(--brand-blue); }

.schedule-form {
  background: white; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow);
}
.schedule-form h3 { margin-bottom: 18px; font-size: 1.3rem; }
.field { margin-bottom: 16px; }
.field label {
  display: block; font-weight: 600; font-size: .9rem;
  color: var(--ink); margin-bottom: 6px;
}
.field .req { color: var(--brand-green); margin-left: 2px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit; font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: white; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px var(--brand-blue-soft);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: #C53030; box-shadow: 0 0 0 4px rgba(197, 48, 48, .08);
}
.row { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row { grid-template-columns: 1fr 1fr; } }

.form-actions { margin-top: 8px; }
.form-fine { font-size: .88rem; color: var(--ink-mute); margin: 12px 0 0; text-align: center; }
.form-fine a { font-weight: 700; }
.form-status { margin: 14px 0 0; font-size: .95rem; min-height: 1.4em; }
.form-status.ok { color: var(--brand-green-deep); font-weight: 600; }
.form-status.err { color: #C53030; font-weight: 600; }

@media (min-width: 920px) { .schedule-wrap { grid-template-columns: 1fr 1.1fr; gap: 56px; } }

/* ========== FAQ ========== */
.faq-list { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.faq-list details {
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 4px 22px; box-shadow: var(--shadow-sm);
  transition: border-color .15s ease;
}
.faq-list details[open] { border-color: var(--brand-blue); }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 18px 0;
  font-weight: 700; color: var(--ink); font-size: 1.05rem;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--brand-blue);
  transition: transform .2s ease;
  line-height: 1;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin: 0 0 18px; color: var(--ink-soft); }

/* ========== Footer ========== */
.site-footer { background: var(--bg-deep); color: rgba(255,255,255,.78); padding: 56px 0 28px; }
.footer-grid {
  display: grid; gap: 32px;
  grid-template-columns: 1fr; padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-mono { width: 56px; height: 56px; flex-shrink: 0; }
.footer-brand p { color: rgba(255,255,255,.85); margin: 0; }
.footer-brand strong { color: white; font-weight: 700; display: block; margin-bottom: 4px; }
.footer-col h4 { color: white; font-size: .78rem; letter-spacing: .16em; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: rgba(255,255,255,.78); font-size: .94rem; }
.footer-col a:hover { color: white; text-decoration: underline; }
.footer-col li { font-size: .94rem; }
.footer-fine { padding-top: 24px; font-size: .85rem; color: rgba(255,255,255,.55); text-align: center; }
.footer-fine a { color: rgba(255,255,255,.78); }
.footer-fine a:hover { color: white; }

@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; }
}

/* ========== Mobile floating call button ========== */
.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  background: var(--brand-green); color: var(--ink); font-weight: 700;
  border-radius: 999px; box-shadow: var(--shadow-lg);
}
.fab:hover { color: var(--ink); background: var(--brand-green-deep); text-decoration: none; }
.fab span[aria-hidden] { font-size: 1.2rem; }
@media (min-width: 920px) { .fab { display: none; } }

/* ========== Body lock when mobile menu open ========== */
body.menu-open { overflow: hidden; }

/* ========== Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
