/* Giverr Electric — giverrelectric.com
   One stylesheet for every page. Charcoal + Giverr yellow, carried over from
   the 2023 WordPress site; Bebas Neue display + DM Sans body. */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --color-bg: #ffffff;
  --color-surface: #f4f3ef;
  --color-dark: #2c2c2c;
  --color-darker: #1f1f1f;
  --color-primary: #333333;
  --color-accent: #ffb600;
  --color-accent-deep: #e0a000;
  --color-text: #2c2c2c;
  --color-text-muted: #5f5f5f;
  --color-on-dark: #f5f5f5;
  --color-on-dark-muted: #b9b9b9;
  --color-line: #e2e0d9;

  --font-display: 'Archivo', 'Helvetica Neue', sans-serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;

  --step-hero: clamp(2.1rem, 1.4rem + 2.3vw, 3.3rem);
  --step-h2: clamp(1.9rem, 1.4rem + 1.9vw, 3rem);
  --step-h3: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
  --step-body: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);

  --space-section: clamp(4rem, 3rem + 5vw, 7.5rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Reset + base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
  text-transform: uppercase;
}
h1 { font-size: var(--step-hero); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); line-height: 1.2; letter-spacing: 0.01em; }
h2 .hl, h1 .hl { color: var(--color-accent); }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--color-accent); color: #000; padding: 0.6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space-section) 0; position: relative; }
.section--dark { background: var(--color-dark); color: var(--color-on-dark); }
.section--dark p { color: var(--color-on-dark-muted); }
.section--surface { background: var(--color-surface); }
.lede { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.25rem); color: var(--color-text-muted); max-width: 60ch; }
.section--dark .lede { color: var(--color-on-dark-muted); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-deep);
  margin-bottom: 0.9rem;
}
.section--dark .eyebrow, .hero .eyebrow { color: var(--color-accent); }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem); }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose a { color: var(--color-text); text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.section--dark .prose a { color: var(--color-on-dark); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  background: var(--color-accent); color: #111;
  font-family: var(--font-body); font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  border: 2px solid var(--color-accent);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
  cursor: pointer;
}
.btn:hover { transform: translateY(-3px); background: #111; color: var(--color-accent); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: var(--color-accent); color: #111; border-color: var(--color-accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }

/* ── Header + nav ───────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(44, 44, 44, 0.97);
  color: var(--color-on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 1.5rem; }
.logo img { width: 170px; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(0.9rem, 1.6vw, 1.8rem); }
.nav a {
  position: relative;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; color: var(--color-on-dark); padding: 0.35rem 0;
}
.nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--color-accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--color-accent); }
.nav a.btn[aria-current="page"] { color: #111; }
.nav .btn { padding: 0.7rem 1.1rem; font-size: 0.78rem; color: #111; }
.nav .btn:hover { color: var(--color-accent); }
.menu-toggle {
  display: none; background: none; border: 0; padding: 0.6rem; cursor: pointer; color: var(--color-on-dark);
}
.menu-toggle span { display: block; width: 26px; height: 2px; background: currentColor; margin: 6px 0; transition: transform 0.3s var(--ease), opacity 0.3s; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1140px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: 78px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color-darker); padding: 0.5rem var(--gutter) 1.5rem;
    transform: translateY(-120%); transition: transform 0.4s var(--ease);
    visibility: hidden;
  }
  .menu-open .nav { transform: none; visibility: visible; }
  .nav a { padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 0.9rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1rem; justify-content: center; padding: 1rem; }
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: var(--color-dark);
  color: var(--color-on-dark);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: min(82vh, 760px);
  position: relative;
  overflow: hidden;
}
.hero__copy {
  padding: clamp(3rem, 7vw, 6.5rem) var(--gutter) clamp(3rem, 6vw, 5rem) max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  display: flex; flex-direction: column; justify-content: center;
  position: relative; z-index: 2;
}
.hero__copy p { color: var(--color-on-dark-muted); max-width: 46ch; font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); }
.hero__photo { position: relative; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 20%; filter: grayscale(1) contrast(1.05); }
.hero__photo::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 34%; height: 18%;
  background: var(--color-accent);
}
.hero__trace {
  position: absolute; left: 0; bottom: 0; width: 52%; opacity: 0.18; z-index: 1; pointer-events: none;
}
.hero--page { min-height: 0; grid-template-columns: 1fr; }
.hero--page .hero__copy { padding-top: clamp(3.5rem, 7vw, 6rem); padding-bottom: clamp(3rem, 6vw, 5rem); padding-right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
.hero--page h1 { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem); max-width: 20ch; }
.crumbs { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-on-dark-muted); margin-bottom: 1rem; }
.crumbs a { color: var(--color-on-dark-muted); text-decoration: none; }
.crumbs a:hover { color: var(--color-accent); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__photo { height: 380px; order: -1; }
  .hero__trace { width: 100%; }
}

/* ── Split: copy beside a photo ─────────────────────────── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split--flip .split__media { order: -1; }
.split__media { position: relative; }
.split__media img { width: 100%; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
}

/* ── Project cards (commercial work) ────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.card {
  background: #fff; color: var(--color-text);
  padding: 2rem 1.8rem 2.2rem;
  border-top: 3px solid var(--color-accent);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12); }
/* Project cards: faint photo of a finished job behind the text (image + white wash set inline, relative URL so the /giverr/ preview works too). */
.card--photo { background-size: cover; background-position: center; }
.card--photo p { color: var(--color-text); }
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--color-text-muted); font-size: 0.98rem; }
.section--dark .card { background: #383838; color: var(--color-on-dark); }
.section--dark .card p { color: var(--color-on-dark-muted); }

/* ── Service rows (icon + text, no photo) ───────────────── */
.services { display: grid; gap: 0; margin-top: 2.2rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.service {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 1.5rem; align-items: center;
  padding: 1.6rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none; color: inherit;
}
.service img { width: 56px; height: auto; }
.service h3 { margin: 0 0 0.25rem; }
.service p { margin: 0; }
.service__arrow { font-size: 1.6rem; color: var(--color-accent); transition: transform 0.35s var(--ease); }
a.service:hover .service__arrow { transform: translateX(6px); }
.section:not(.section--dark) .services, .section:not(.section--dark) .service { border-color: var(--color-line); }
@media (max-width: 560px) { .service { grid-template-columns: 52px minmax(0, 1fr); } .service__arrow { display: none; } .service img { width: 44px; } }

/* ── Town list ──────────────────────────────────────────── */
.towns { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; padding: 0; margin: 1.6rem 0 0; }
.towns li {
  font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.55rem 1rem; border: 2px solid var(--color-accent); line-height: 1.1;
}
.towns a { text-decoration: none; }

/* ── Numbered steps ─────────────────────────────────────── */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: step; padding: 1.4rem 1.4rem 1.6rem; background: var(--color-surface); position: relative; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; color: var(--color-accent-deep); line-height: 1; margin-bottom: 0.6rem;
}
.section--surface .steps li { background: #fff; }

/* ── Stat strip ─────────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: rgba(255, 255, 255, 0.12); margin-top: 2.5rem; }
.fact { background: var(--color-dark); padding: 1.6rem 1.4rem; }
.fact strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; text-transform: uppercase; color: var(--color-accent); line-height: 1; margin-bottom: 0.4rem; }
.fact span { color: var(--color-on-dark-muted); font-size: 0.95rem; }

/* ── FAQ ────────────────────────────────────────────────── */
.faq { margin-top: 1.8rem; border-top: 1px solid var(--color-line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--color-line); padding: 1.1rem 0; }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 700; font-size: 1.08rem;
  display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--color-accent-deep); font-size: 1.5rem; line-height: 1; transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0.8rem 0 0; color: var(--color-text-muted); }

/* ── Contact: yellow panel + dark form (old-site layout) ── */
.contact { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr); }
.contact__panel, .contact__body {
  position: relative;
  background-repeat: repeat-x; background-position: left bottom; background-size: auto 150px;
  background-image: url('../images/circuit-trace-1026.webp');
}
.contact__panel { background-color: var(--color-accent); color: #222; display: flex; align-items: center; justify-content: center; text-align: center; padding: clamp(3.5rem, 6vw, 6rem) var(--gutter) 190px; }
.contact__panel h2 { font-size: clamp(2.2rem, 1.6rem + 2.2vw, 3.6rem); margin: 0.4rem 0 0.6rem; color: #222; }
.contact__panel p { margin: 0 auto 1.2rem; max-width: 26ch; color: #3a3a3a; }
.contact__icon { width: 72px; margin: 0 auto; }
.contact__phone { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); text-decoration: none; color: #222; border-bottom: 3px solid #222; }
.contact__body { background-color: var(--color-dark); color: var(--color-on-dark); padding: clamp(3rem, 5vw, 4.5rem) var(--gutter) 190px; }
.contact__body-inner { max-width: 640px; margin: 0 auto; }
.contact__meta { margin: 0 0 1.8rem; }
.contact__meta dt { font-weight: 700; color: #fff; }
.contact__meta dd { margin: 0.2rem 0 0; color: var(--color-accent); font-weight: 700; }
.form { display: grid; gap: 1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--color-on-dark); }
.form input, .form textarea {
  width: 100%; padding: 0.85rem 1rem; font: inherit; font-size: 1rem;
  background: #fff; color: #111; border: 2px solid transparent; border-radius: 3px;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--color-accent); }
.form textarea { min-height: 150px; resize: vertical; }
.form .field-error { color: #ffb4a8; font-size: 0.86rem; margin-top: 0.3rem; display: none; }
.form .invalid input, .form .invalid textarea { border-color: #ff7a66; }
.form .invalid .field-error { display: block; }
.form .hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; font-weight: 700; color: var(--color-accent); }
.form-status.err { color: #ffb4a8; }
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
  .contact__panel, .contact__body { background-size: auto 110px; padding-bottom: 150px; }
}
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }

/* ── Homepage: full-bleed hero (old-site composition) ───── */
.hero-full {
  position: relative; background: var(--color-dark); color: #fff; overflow: hidden;
  min-height: clamp(560px, calc(100vh - 78px), 820px);
  display: flex; align-items: center;
}
.hero-full__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 75% 25%; }
.hero-full::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(44, 44, 44, 0.9) 0%, rgba(44, 44, 44, 0.72) 34%, rgba(44, 44, 44, 0.15) 58%, rgba(44, 44, 44, 0) 70%);
}
.hero-full__copy { position: relative; z-index: 2; padding-top: 3rem; padding-bottom: 9rem; }
.hero-full__copy > * { max-width: 700px; }
.hero-full h1 { font-size: var(--step-hero); color: #fff; }
.hero-full p { color: #e6e6e6; font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); max-width: 50ch; }
.hero-full .eyebrow { color: var(--color-accent); }
@media (max-width: 860px) {
  .hero-full { display: block; min-height: 0; }
  .hero-full picture { display: block; }
  .hero-full__bg { position: static; height: 360px; object-position: 50% 20%; }
  .hero-full::after { display: none; }
  .hero-full__copy { padding-top: 2.2rem; padding-bottom: 6rem; }
}

/* ── Homepage: intro card overlapping the hero ──────────── */
.intro { position: relative; z-index: 3; margin-top: -110px; }
.intro__card {
  background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
  padding: clamp(2rem, 4vw, 3.5rem);
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  max-width: 1080px; margin: 0 auto;
}
.intro__card h2 { margin: 0; }
@media (max-width: 860px) {
  .intro { margin-top: -60px; }
  .intro__card { grid-template-columns: 1fr; }
}

/* ── Small helpers ──────────────────────────────────────── */
.center { text-align: center; }
.section--tight-top { padding-top: clamp(3rem, 2.4rem + 3vw, 5rem); }
.small { font-size: 0.95rem; margin-top: 1.4rem; }
.text-link {
  display: inline-flex; gap: 0.5rem; align-items: center; margin-top: 0.4rem;
  font-weight: 700; font-size: 0.86rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  color: inherit; border-bottom: 2px solid var(--color-accent); padding-bottom: 0.2rem;
}
.text-link span { transition: transform 0.35s var(--ease); }
.text-link:hover span { transform: translateX(4px); }

/* Circuit-node line beside a block, from the old site */
.nodes-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; max-width: 1080px; }
.nodes { width: 96px; justify-self: center; }
@media (max-width: 700px) { .nodes-row { grid-template-columns: 1fr; } .nodes { display: none; } }

/* Dark band with the circuit trace along the bottom */
.section--trace {
  background-image: url('../images/circuit-trace-1026.webp');
  background-repeat: repeat-x; background-position: left bottom; background-size: 1026px auto;
  padding-bottom: calc(var(--space-section) + 5rem);
}
.section--dark .service h3 { color: #fff; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: var(--color-darker); color: var(--color-on-dark-muted); padding: 3.5rem 0 2rem; font-size: 0.92rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font-size: 1rem; letter-spacing: 0.06em; color: var(--color-on-dark); margin-bottom: 0.8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { text-decoration: none; color: var(--color-on-dark-muted); }
.site-footer a:hover { color: var(--color-accent); }
.site-footer .legal { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: 0.84rem; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ── Back to top ────────────────────────────────────────── */
.to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 40;
  width: 48px; height: 48px; border: 0; background: var(--color-accent); color: #111;
  font-size: 1.3rem; cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }

/* ── Motion: staggered load + scroll reveals ────────────── */
.load > * { opacity: 0; transform: translateY(18px); animation: rise 0.8s var(--ease) forwards; }
.load > *:nth-child(2) { animation-delay: 0.1s; }
.load > *:nth-child(3) { animation-delay: 0.2s; }
.load > *:nth-child(4) { animation-delay: 0.3s; }
.load > *:nth-child(5) { animation-delay: 0.4s; }
.hero__photo { animation: wipe 1.1s var(--ease) both; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes wipe { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); will-change: transform; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .load > *, .js .reveal { opacity: 1; transform: none; }
}
