/* ==========================================================
   Abrams Electrical — main stylesheet
   ========================================================== */

:root {
  --navy: #0d2747;
  --navy-2: #13325a;
  --navy-fg: #eef3f9;
  --yellow: #f8d21c;
  --yellow-dark: #e5be00;
  --primary: #155c9e;
  --primary-dark: #0f4a82;
  --cyan: #2ea6e8;
  --red: #e5484d;
  --text: #13233d;
  --muted-text: #56657a;
  --muted-bg: #eff3f8;
  --accent-bg: #e4ecf5;
  --border: #dde4ed;
  --white: #ffffff;
  --success: #0f8a4b;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(13, 39, 71, .06), 0 1px 3px rgba(13, 39, 71, .08);
  --shadow-md: 0 10px 30px -12px rgba(13, 39, 71, .25);
  --font-head: "Archivo", system-ui, sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --header-h: 82px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: inherit; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); font-weight: 700; color: var(--navy); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.icon {
  width: 1.15em; height: 1.15em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.skip-link {
  position: absolute; left: 1rem; top: -60px; z-index: 100;
  background: var(--yellow); color: var(--navy); padding: .6rem 1rem; border-radius: 8px; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 760px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .7rem 1.25rem; border-radius: 10px; border: 2px solid transparent;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: .95rem 1.5rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.btn-yellow { background: var(--yellow); color: var(--navy); box-shadow: var(--shadow-sm); }
.btn-yellow:hover { background: var(--yellow-dark); color: var(--navy); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: var(--white); color: var(--white); }
.btn-outline { background: var(--white); color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--accent-bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.site-header.scrolled { box-shadow: 0 4px 18px -10px rgba(13,39,71,.35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--navy); }
.brand-logo { width: auto; height: 58px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; color: var(--navy); }
.brand-sub { font-family: var(--font-head); font-size: .66rem; letter-spacing: .16em; color: var(--muted-text); font-weight: 600; margin-top: 3px; }

.main-nav ul { display: flex; gap: 2.25rem; }
.main-nav a { text-decoration: none; color: var(--navy); font-weight: 600; font-size: 1.05rem; position: relative; padding: .25rem 0; }
.main-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.main-nav ul a:hover::after, .main-nav ul a.active::after { transform: scaleX(1); }
.nav-call-mobile { display: none; }
.header-call { padding: .75rem 1.25rem; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--white); cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .25s, opacity .2s; }
.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); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy); color: var(--navy-fg); overflow: hidden; padding: 4rem 0 4.5rem; }
.hero-pattern { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(238,243,249,.07); pointer-events: none; }
.hero-stripe {
  position: absolute; top: -10%; bottom: -10%; right: 2%; width: 26px;
  background: var(--yellow); opacity: .85; transform: skewX(-6deg); pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--yellow); color: var(--navy); font-weight: 600; font-size: .98rem;
  padding: .45rem .95rem; border-radius: 8px; margin-bottom: 1.4rem;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.35rem); font-weight: 800; color: var(--white); letter-spacing: -.01em; margin-bottom: 1.2rem; }
.hero-location { display: flex; gap: .6rem; align-items: flex-start; color: var(--cyan); font-weight: 600; font-size: 1.2rem; line-height: 1.45; margin-bottom: .9rem; }
.hero-location .icon { margin-top: .2em; }
.hero-lead { color: rgba(238,243,249,.9); font-size: 1.12rem; margin-bottom: 1.6rem; }
.hero .btn-row { margin-bottom: 1.5rem; }
.text-link {
  display: inline-flex; align-items: center; gap: .4rem; color: var(--white); font-weight: 600; text-decoration: none;
  border-bottom: 2px solid var(--yellow); padding-bottom: 2px;
}
.text-link:hover { color: var(--yellow); }
.text-link .icon { transition: transform .2s; }
.text-link:hover .icon { transform: translateX(3px); }

.hero-media { position: relative; padding: 0 1rem 1.25rem 0; }
.hero-frame { position: relative; }
.hero-frame::before {
  content: ""; position: absolute; left: -10px; bottom: -14px; width: 78%; height: 82%;
  border-left: 4px solid var(--yellow); border-bottom: 4px solid var(--yellow); border-radius: 0 0 0 28px;
}
.hero-frame img {
  position: relative; border-radius: 28px; width: 100%; aspect-ratio: 1200 / 1008; object-fit: cover;
  box-shadow: 0 30px 60px -25px rgba(0,0,0,.55);
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-muted { background: var(--muted-bg); }
.section-dark { background: var(--navy); color: var(--navy-fg); }
.section-dark h2 { color: var(--white); }
.eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700; color: var(--primary); margin-bottom: .6rem; }
.section-head { text-align: center; margin-bottom: 2.75rem; }
.section-title-center { text-align: center; margin-bottom: 2rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 3.5rem; align-items: start; }
.about-copy p { color: var(--muted-text); }
.info-card {
  margin: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: .5rem 1.5rem;
}
.info-row { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: 0; }
.info-icon {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  background: var(--accent-bg); color: var(--primary);
}
.info-row dt { font-family: var(--font-head); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted-text); }
.info-row dd { margin: .15rem 0 0; font-weight: 600; color: var(--navy); }
.info-row dd a { color: var(--navy); text-decoration: none; }
.info-row dd a:hover { color: var(--primary); }
.license { background: var(--yellow); padding: .15rem .5rem; border-radius: 5px; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; align-items: start; }
.service-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.service-card-head {
  display: flex; align-items: center; gap: .9rem; padding: 1.5rem 1.75rem;
  background: var(--accent-bg); border-bottom: 4px solid var(--yellow);
}
.service-card-head h3 { margin: 0; font-size: 1.35rem; font-weight: 600; color: var(--navy); }
.service-head-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--white); color: var(--primary); border: 1px solid var(--border); }
.service-card-dark .service-card-head { background: var(--navy); }
.service-card-dark .service-card-head h3 { color: var(--white); }
.service-card-dark .service-head-icon { background: var(--yellow); color: var(--navy); border-color: var(--yellow); }
.service-list { padding: .75rem 1.75rem 1.25rem; }
.service-list li { display: flex; gap: 1rem; padding: 1rem 0; }
.service-list h4 { font-size: 1.08rem; font-weight: 600; margin: 0 0 .2rem; color: var(--navy); }
.service-list p { margin: 0; color: var(--muted-text); font-size: 1rem; }
.service-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--accent-bg); color: var(--primary); flex-shrink: 0; }

/* ---------- FAQ accordion ---------- */
.accordion { border-top: 1px solid var(--border); }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item h3 { margin: 0; font-size: inherit; }
.accordion-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: none; border: 0; padding: 1.25rem .25rem; text-align: left; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--navy);
}
.accordion-trigger:hover { color: var(--primary); }
.accordion-trigger .chevron { transition: transform .25s; color: var(--muted-text); }
.accordion-trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.accordion-panel { padding: 0 .25rem 1.25rem; color: var(--muted-text); animation: fadeDown .25s ease; }
.accordion-panel p { margin: 0; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3.5rem; align-items: start; }
.contact-lead { color: rgba(238,243,249,.85); font-size: 1.1rem; margin-bottom: 1.6rem; }
.contact-email a { color: rgba(238,243,249,.85); }
.contact-email a:hover { color: var(--yellow); }
.helpful-title { color: var(--white); font-size: 1.15rem; margin-top: 1.75rem; }
.check-list li { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; color: rgba(238,243,249,.9); }
.check-list .icon { color: var(--cyan); }
.emergency-box {
  margin-top: 1.75rem; background: var(--yellow); color: var(--navy); border-left: 5px solid var(--red);
  border-radius: var(--radius); padding: 1.1rem 1.35rem;
}
.emergency-box p { margin: 0 0 .35rem; }
.emergency-box p:last-child { margin: 0; }
.emergency-box a { color: var(--navy); font-weight: 700; }

/* ---------- Form ---------- */
.form-card { background: var(--white); color: var(--text); border-radius: var(--radius-lg); padding: 2.25rem; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.form-card h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); color: var(--navy); }
.form-intro { color: var(--muted-text); margin-bottom: 1.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.1rem; }
.field { margin: 0 0 1.1rem; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 600; color: var(--navy); margin-bottom: .4rem; padding: 0; }
.req { color: var(--red); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: .7rem .85rem; border: 1px solid #cdd7e3; border-radius: 9px; background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #8a97a8; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,92,158,.18); }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.field.has-error input:focus, .field.has-error textarea:focus { box-shadow: 0 0 0 3px rgba(229,72,77,.18); }
.field-error { color: #c42b31; font-size: .9rem; margin: .3rem 0 0; min-height: 0; }
.field-error:empty { display: none; }
.radio-row { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.radio { display: inline-flex !important; align-items: center; gap: .5rem; font-weight: 400 !important; color: var(--text) !important; cursor: pointer; margin: 0 !important; }
.radio input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }

.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-error {
  background: #fdecec; border: 1px solid #f5c2c4; color: #9b1c22; border-radius: 10px;
  padding: .85rem 1rem; margin-bottom: 1.25rem; font-weight: 600;
}
.form-note { font-size: .93rem; color: var(--muted-text); text-align: center; margin: 1rem 0 0; }

#submitBtn { position: relative; margin-top: .5rem; }
#submitBtn .spinner {
  display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
#submitBtn.loading { pointer-events: none; opacity: .85; }
#submitBtn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-success {
  text-align: center; padding: 2rem 1rem; border: 1px solid #b7e4c9; background: #effaf3; border-radius: var(--radius);
  animation: fadeDown .3s ease;
}
.form-success:focus { outline: none; }
.success-icon { width: 56px; height: 56px; color: var(--success); margin: 0 auto 1rem; }
.form-success h3 { color: var(--navy); font-size: 1.35rem; }
.form-success p { color: var(--muted-text); }

/* ---------- Footer ---------- */
.site-footer { background: #091c34; color: rgba(238,243,249,.82); padding: 2.75rem 0; font-size: .97rem; }
.site-footer p { margin: 0 0 .3rem; }
.site-footer a { color: rgba(238,243,249,.9); text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; align-items: center; }
.footer-brand { display: flex; gap: 1rem; align-items: center; }
.footer-logo { width: auto; height: 64px; background: var(--white); border-radius: 10px; padding: 6px 8px; }
.footer-name { font-family: var(--font-head); font-weight: 700; color: var(--white); font-size: 1.05rem; }
.back-top { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; }

/* ---------- Mobile sticky bar ---------- */
.mobile-bar { display: none; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1024px) {
  .main-nav ul { gap: 1.5rem; }
  .hero-inner { gap: 2.5rem; }
  .about-grid, .contact-grid { gap: 2.5rem; }
}

@media (max-width: 900px) {
  :root { --header-h: 70px; }
  .brand-logo { height: 48px; }
  .brand-name { font-size: 1.25rem; }
  .site-header { background: var(--white); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .header-call { display: none; }
  .nav-toggle { display: inline-flex; }

  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--white);
    border-bottom: 1px solid var(--border); box-shadow: 0 18px 30px -18px rgba(13,39,71,.35);
    padding: .5rem 1.5rem 1.5rem; display: none;
  }
  .main-nav.open { display: block; animation: fadeDown .2s ease; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { display: block; padding: .9rem 0; border-bottom: 1px solid var(--border); }
  .main-nav ul a::after { display: none; }
  .main-nav .nav-call-mobile { display: flex; margin-top: 1.1rem; width: 100%; color: var(--white); }

  .hero { padding: 3rem 0 3.5rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 560px; }
  .hero-stripe { right: -6px; width: 16px; }

  .about-grid, .services-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  body { padding-bottom: 72px; } /* room for sticky bar */
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); border-top: 1px solid var(--border);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .section { padding: 3.75rem 0; }
}

@media (max-width: 600px) {
  .container { padding: 0 1rem; }
  .brand-name { font-size: 1.1rem; }
  .brand-sub { font-size: .6rem; }
  .brand-logo { height: 44px; }
  .hero-location { font-size: 1.08rem; }
  .btn-row .btn { flex: 1 1 100%; }
  .form-card { padding: 1.5rem 1.15rem; }
  .form-grid { grid-template-columns: 1fr; }
  .service-card-head, .service-list { padding-left: 1.15rem; padding-right: 1.15rem; }
  .info-card { padding: .25rem 1.1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .hero-frame img, .hero-frame::before { border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
