/* Vitek Electric — shared styles */

/* Self-hosted fonts, Latin subset (SIL Open Font License). See docs/design/style-guide.md. */
@font-face { font-family: "Oswald"; src: url("../fonts/oswald-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --dark: #18191c;
  --dark-2: #26282d;
  --ink: #1d1e22;
  --muted: #5f6166;
  --line: #e4e2de;
  --paper: #f7f6f4;
  --white: #ffffff;
  --red: #d22b23;
  --red-bright: #ff5b50;  /* red for text and icons on dark backgrounds */
  --red-dark: #a91e17;
  --gold: #f5b400;
  --radius: 10px;
  --max: 1120px;
  /* Fonts: docs/design/style-guide.md. Oswald for headings, Plex Mono for the panel directory and data plate only. */
  --font-head: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --shadow: 0 1px 2px rgba(24, 25, 28, .06), 0 8px 24px rgba(24, 25, 28, .08);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red-dark);
  margin-bottom: .75rem;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--red); color: var(--white); padding: 8px 12px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* Placeholder text the owner must fill in before launch */
.todo {
  background: #fff1a8;
  outline: 1px dashed #c9a400;
  padding: 0 4px;
  border-radius: 3px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.4em;
  border-radius: 3px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); }
.btn-dark { background: var(--dark); color: var(--white); }
.btn-dark:hover { background: var(--dark-2); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Header ---------- */
/* White header so the logo appears exactly as designed */
.site-header {
  background: var(--white);
  color: var(--ink);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 48px; width: auto; }
.site-footer .brand img { height: 56px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; padding: 8px 12px; border-radius: 6px;
  font-weight: 600; font-size: .95rem; opacity: .85;
}
.nav a:hover, .nav a[aria-current] { opacity: 1; background: rgba(24,25,28,.06); }
.nav a[aria-current] { color: var(--red); }
.nav .btn { margin-left: 8px; opacity: 1; padding: .6em 1.1em; color: var(--white); }
.nav .btn:hover { background: var(--red-dark); }

.menu-toggle {
  display: none;
  background: none; border: 0; color: var(--ink); padding: 8px; cursor: pointer;
}
.menu-toggle svg { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(210,43,35,.22), transparent 60%),
    linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
  color: var(--white);
  padding: 88px 0 96px;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: rgba(255,255,255,.82); max-width: 36ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero h1 .hl { color: var(--red-bright); }
.hero .eyebrow { color: var(--red-bright); }

.rating-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 28px;
  backdrop-filter: blur(4px);
}
.rating-card .score { font-size: 3.2rem; font-weight: 800; line-height: 1; }
.stars { color: var(--gold); letter-spacing: 2px; font-size: 1.3rem; }
.rating-card ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.rating-card li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255,255,255,.88); }
.rating-card li svg { width: 20px; height: 20px; color: var(--red-bright); flex: none; margin-top: 3px; }

.page-hero { padding: 64px 0 56px; }
.page-hero p.lead { max-width: 52ch; }

/* ---------- Trust strip ---------- */
.trust {
  background: var(--red);
  color: var(--white);
  font-weight: 700;
}
.trust ul {
  list-style: none; margin: 0 auto; padding: 14px 20px;
  display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: center;
}
.trust li { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.trust svg { width: 18px; height: 18px; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.alt { background: var(--white); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: box-shadow .2s, transform .2s;
}
.alt .card { background: var(--paper); }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card .icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--dark); color: var(--red-bright);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card .icon svg { width: 24px; height: 24px; }
.card p { color: var(--muted); margin: 0; }

.center { text-align: center; }
.mt { margin-top: 36px; }

/* Services detail page */
.service-list { display: grid; gap: 20px; }
.service {
  display: grid; grid-template-columns: 56px 1fr; gap: 20px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
  scroll-margin-top: 90px;
}
.service .icon {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--dark); color: var(--red-bright);
  display: grid; place-items: center;
}
.service .icon svg { width: 28px; height: 28px; }
.service ul { margin: .25em 0 0; padding-left: 1.2em; color: var(--muted); columns: 2; column-gap: 32px; }
.service li { break-inside: avoid; margin-bottom: 4px; }

.service .more { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--red-dark); }

/* Single-service pages */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.ticks svg { width: 22px; height: 22px; color: var(--red); margin-top: 3px; }

.panel-box {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px;
}
.alt .panel-box { background: var(--paper); }
.panel-box h3 { margin-bottom: 16px; }

.warning {
  background: #fff4f3; border: 1px solid #f3c7c4; border-left: 4px solid var(--red);
  border-radius: var(--radius); padding: 20px 24px; margin-top: 28px;
}
.warning p { margin: 0; }

.quote-note {
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--red);
  border-radius: var(--radius); padding: 24px 28px; margin-bottom: 32px;
}
.alt .quote-note { background: var(--paper); }
.quote-note .headline { font-size: 1.6rem; font-weight: 800; display: block; margin-bottom: 6px; }
.quote-note p { color: var(--muted); margin: 0; }

/* How it works */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps li {
  counter-increment: step;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.alt .steps li { background: var(--paper); }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--red); color: var(--white); font-weight: 800; margin-bottom: 14px;
}
.steps p { color: var(--muted); margin: 0; }

/* FAQ */
.faq { max-width: 820px; display: grid; gap: 12px; }
.faq + h2, .faq-group + .faq-group { margin-top: 48px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 24px; }
.alt .faq details { background: var(--paper); }
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 1.05rem; padding: 18px 0;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--red); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 20px; color: var(--muted); }
.faq details > div p:last-child { margin-bottom: 0; }
.faq details a { color: var(--ink); font-weight: 600; }

.pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pills a {
  display: block; background: var(--white); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px; font-weight: 600; text-decoration: none;
}
.pills a:hover { border-color: var(--ink); }

/* Why-us / split layouts */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.checks li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.checks svg { width: 28px; height: 28px; color: var(--red); }
.checks strong { display: block; }
.checks span { color: var(--muted); }

.photo-ph {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background:
    repeating-linear-gradient(45deg, rgba(24,25,28,.04) 0 12px, transparent 12px 24px),
    var(--white);
  border: 2px dashed #c9c3b5;
  display: grid; place-items: center; text-align: center;
  color: var(--muted); font-weight: 600; padding: 24px;
}

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.g-item { margin: 0; }
.g-item button { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; background: none; }
/* Square corners, no overlay or hover zoom, caption below (style guide: Photos) */
.g-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.g-item figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.g-placeholder {
  aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; padding: 16px;
  border: 1px dashed #c9c6c0; color: var(--muted); font-size: .9rem;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters button {
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
}
.filters button[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: var(--white); }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6, 11, 20, .92);
  display: none; align-items: center; justify-content: center; padding: 56px 16px;
}
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: min(1100px, 100%); text-align: center; }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { color: rgba(255,255,255,.85); margin-top: 12px; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.1); color: var(--white);
  border: 0; width: 48px; height: 48px; border-radius: 50%;
  font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.review {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin: 0;
}
.review blockquote { margin: 0 0 16px; font-size: 1.15rem; font-weight: 500; }
.review figcaption { color: var(--muted); font-size: .95rem; }

/* ---------- Service area ---------- */
.areas {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.areas li {
  background: var(--white); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px; font-weight: 600;
}

/* ---------- CTA band ---------- */
.cta {
  background: var(--dark); color: var(--white);
  padding: 64px 0;
}
.cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { margin: 0 0 .25em; }
.cta p { margin: 0; color: rgba(255,255,255,.75); }
.cta .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px;
}
.contact-card.primary { background: var(--dark); color: var(--white); border-color: var(--dark); }
.contact-card.primary p { color: rgba(255,255,255,.8); }
.contact-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; }
.contact-card dt { font-weight: 700; }
.contact-card dd { margin: 0; color: var(--muted); }
.contact-card dd a { color: var(--ink); font-weight: 600; }
.big-phone { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; text-decoration: none; color: var(--red-bright); }

/* ---------- Footer ---------- */
.site-footer {
  background: #0f1012; color: rgba(255,255,255,.7);
  padding: 56px 0 100px;
  font-size: .95rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: var(--white); font-size: 1rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer .brand { color: var(--white); margin-bottom: 12px; }
.legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards, .gallery, .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  section { padding: 56px 0; }
  .hero { padding: 56px 0 64px; }
  .cards, .reviews, .steps { grid-template-columns: 1fr; }
  .service { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
  .service ul { columns: 1; }

  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--white); padding: 8px 16px 20px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .brand img { height: 40px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .btn { margin: 8px 0 0; }

  .call-bar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    box-shadow: 0 -4px 16px rgba(0,0,0,.15);
  }
  .call-bar a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 16px 8px; font-weight: 800; text-decoration: none;
  }
  .call-bar a:first-child { background: var(--red); color: var(--white); }
  .call-bar a:last-child { background: var(--dark); color: var(--white); }
  .call-bar svg { width: 20px; height: 20px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero .actions .btn { flex: 1 1 100%; }
}

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

/* ---------- Home page (docs/design/style-guide.md) ---------- */
.page-home { background: var(--white); }
.page-home main section { padding: 0; }
.page-home a:not(.btn) { text-decoration-color: var(--red); text-underline-offset: 3px; }
.page-home a:not(.btn):hover { text-decoration-thickness: 2px; }
.page-home :focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.text-link { font-weight: 600; }

.home-hero-text {
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end;
  padding-top: 72px; padding-bottom: 72px;
}
.home-hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.05; max-width: 18ch; margin-bottom: .4em; }
.home-hero .lead { font-size: 1.15rem; max-width: 46ch; color: var(--muted); }
.hero-photo { width: 100%; aspect-ratio: 3 / 2; max-height: 58vh; object-fit: cover; }
.home-phone { margin: 0; text-align: right; color: var(--muted); line-height: 1.3; }
.home-phone a {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 4vw, 3rem);
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.home-phone a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.home-phone span { font-size: .9rem; }

.home-section { border-top: 1px solid var(--line); padding: 56px 0 !important; }
.home-section h2 { max-width: 26ch; }
.home-two { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }

/* Panel directory: the services as a breaker-panel circuit directory */
.panel-directory { width: 100%; border-collapse: collapse; border: 2px solid var(--ink); margin-bottom: 20px; }
.panel-directory caption {
  caption-side: top; text-align: left; font-family: var(--font-mono); font-size: .8rem;
  padding: 6px 10px; border: 2px solid var(--ink); border-bottom: 0;
}
.panel-directory th {
  font-family: var(--font-mono); font-weight: 500; font-size: .78rem; text-align: left;
  padding: 6px 10px; border-bottom: 2px solid var(--ink); color: var(--muted);
}
.panel-directory td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.panel-directory tr:last-child td { border-bottom: 0; }
.panel-directory td.no { font-family: var(--font-mono); width: 3.5em; }
.panel-directory td:nth-child(2) a { font-weight: 700; color: var(--ink); }
.panel-directory td:nth-child(3) { color: var(--muted); font-size: .95rem; }

/* Data plate: verifiable business facts, like an equipment rating plate */
.data-plate { border: 2px solid var(--ink); margin-top: 3.4rem; }
.data-plate-title {
  margin: 0; padding: 8px 12px; border-bottom: 2px solid var(--ink);
  font-family: var(--font-head); font-weight: 700; font-size: 1.2rem;
}
.data-plate dl { margin: 0; }
.data-plate dl div { display: grid; grid-template-columns: 6.5em 1fr; border-bottom: 1px solid var(--line); }
.data-plate dl div:last-child { border-bottom: 0; }
.data-plate dt, .data-plate dd { margin: 0; padding: 8px 12px; font-size: .9rem; }
.data-plate dt { font-family: var(--font-mono); color: var(--muted); border-right: 1px solid var(--line); }

.page-home .gallery { gap: 28px 20px; margin: 8px 0 24px; }

.home-reviews figure { margin: 0 0 28px; max-width: 40em; }
.home-reviews blockquote { margin: 0; font-size: 1.35rem; line-height: 1.4; }
.home-reviews figcaption { color: var(--muted); margin-top: 6px; }

.home-towns { font-size: 1.15rem; max-width: 50em; }
.home-end-actions span { margin-left: 16px; color: var(--muted); }

@media (max-width: 860px) {
  .home-hero-text, .home-two { grid-template-columns: 1fr; gap: 24px; }
  .home-hero-text { padding-top: 48px; padding-bottom: 48px; }
  .home-phone { text-align: left; }
  .data-plate { margin-top: 0; }
  .panel-directory th:nth-child(3), .panel-directory td:nth-child(3) { display: none; }
  .home-end-actions span { display: block; margin: 12px 0 0; }
}
