/* Campbell-Trembly Electric — static replica of campbelltrembly.com */

:root {
  --white: #ffffff;
  --accent: #eb7426;
  --light-accent: #fcede3;
  --dark: #1a1a1a;
  --black: #000000;
  --button: #e46f1c;
  --button-hover: #cf6214;
  --header: #212121;
  --h2: #4a4a4a;
  --muted: rgba(26, 26, 26, 0.7);
  --radius: 6.8px;
  --header-h: 86px;
  --stack-h: 86px;
  --wrap: 1120px;
  --font-body: "Poppins", "Segoe UI", sans-serif;
  --font-heading: "Urbanist", "Poppins", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--stack-h) + 12px);
}

#contact-form,
#form-success {
  scroll-margin-top: calc(var(--stack-h) + 12px);
}

body.nav-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--white);
  color: #000;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #000;
}

h1 { font-size: 4.4rem; margin: 0 0 0.45em; }
h2 { font-size: 2.8rem; margin: 0 0 0.45em; color: var(--h2); }
h3 { font-size: 2.2rem; margin: 0 0 0.4em; }
h4 { font-size: 1.6rem; margin: 0 0 0.35em; }

h1 strong,
h2 strong,
h3 strong,
h4 strong {
  font-weight: 700;
}

p { margin: 0 0 1rem; }

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover { color: #c45d12; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 80;
  transform: translateY(-120%);
  background: var(--button);
  color: #fff;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0.5rem);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 55;
  color: #fff;
  background: linear-gradient(
    to bottom,
    rgba(33, 33, 33, 0.94) 0%,
    rgba(33, 33, 33, 0.62) 58%,
    rgba(33, 33, 33, 0) 100%
  );
}

.site-header.is-solid {
  background: var(--header);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 84px;
  padding: 0.45rem 3.2vw;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  line-height: 0;
}

.brand img {
  width: auto;
  max-width: min(280px, 62vw);
  max-height: 72px;
  height: auto;
  display: block;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-link,
.nav-folder-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
  padding: 0.45rem 0.05rem;
  background: none;
  border: 0;
}

.nav-link:hover,
.nav-folder-link:hover,
.nav-link:focus-visible,
.nav-folder-link:focus-visible {
  color: #fff;
}

.nav-link[aria-current="page"],
.nav-folder-link[aria-current="page"],
.nav-folder-link.is-current-section {
  text-decoration: underline;
  text-underline-offset: 0.4em;
  color: #fff;
}

.nav-item--folder { position: relative; }

.nav-folder-menu {
  display: none;
  position: absolute;
  top: calc(100% - 0.15rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 250px;
  padding: 0.45rem 0;
  background: var(--header);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  z-index: 5;
}

.nav-item--folder:hover .nav-folder-menu,
.nav-item--folder:focus-within .nav-folder-menu {
  display: block;
}

.nav-folder-menu a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 0.7rem 1.15rem;
  font-size: 0.98rem;
}

.nav-folder-menu a:hover,
.nav-folder-menu a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-folder-menu a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.25em; }

.burger {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.burger-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 22px;
  height: 16px;
}

.burger-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  transform-origin: center;
}

.burger[aria-expanded="true"] .burger-icon span:first-child { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] .burger-icon span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: var(--stack-h);
  z-index: 50;
  background: var(--header);
  overflow: auto;
  padding: 0.5rem 1.35rem 2.5rem;
}

.mobile-nav a,
.folder-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.3;
  padding: 0.95rem 0;
  cursor: pointer;
}

.mobile-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }

.mobile-sub a {
  font-size: 1.05rem;
  padding-left: 0.85rem;
  color: rgba(255, 255, 255, 0.92);
}

.folder-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.folder-btn::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  margin-right: 0.35rem;
}

.folder-btn[aria-expanded="true"]::after { transform: rotate(225deg); margin-top: 0.3rem; }

/* Heroes */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  min-height: 62vh;
  padding: var(--header-h) 1.25rem 3rem;
  background-color: #1a1a1a;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.hero--tall { min-height: 75vh; }
.hero--medium { min-height: 64vh; }

.hero--install {
  background-image: url("../images/hero-install.jpg");
  background-image: image-set(
    url("../images/hero-install.webp") type("image/webp"),
    url("../images/hero-install.jpg") type("image/jpeg")
  );
}

.hero--services {
  background-image: url("../images/hero-services.jpg");
  background-image: image-set(
    url("../images/hero-services.webp") type("image/webp"),
    url("../images/hero-services.jpg") type("image/jpeg")
  );
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0.9;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
}

.hero h1 {
  color: #fff;
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero p {
  color: #fff;
  font-size: 1.4rem;
  line-height: 1.45;
  margin: 1rem auto 0;
  max-width: 42rem;
}

.hero .btn { margin-top: 1.6rem; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: #fff;
  background: var(--button);
  border: 2px solid var(--button);
  border-radius: var(--radius);
  padding: 1.3rem 2.1rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--button-hover);
  border-color: var(--button-hover);
  color: #fff;
}

.btn--secondary {
  border-width: 0;
  padding: 1.6rem 2.9rem;
}

.btn--tertiary {
  background: transparent;
  color: var(--button);
  border: 2px solid var(--button);
  border-radius: var(--radius);
  padding: 0.8rem 1.6rem;
  font-size: 1rem;
}

.btn--tertiary:hover,
.btn--tertiary:focus-visible {
  background: var(--button);
  color: #fff;
}

.btn:focus-visible,
.burger:focus-visible,
.nav-link:focus-visible,
.nav-folder-link:focus-visible,
.folder-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.band a:focus-visible,
.form-card :focus-visible {
  outline: 2px solid var(--dark);
  outline-offset: 3px;
}

/* Content bands */

.band {
  background: #fff;
  padding: 4.25rem 1.25rem;
}

.band--links { padding-bottom: 1.25rem; }

.band--products {
  padding-top: 0;
  padding-bottom: 2.75rem;
}

.band--products > .wrap > .rule:first-child { margin-top: 0.85rem; }

.wrap {
  width: min(var(--wrap), 100%);
  margin: 0 auto;
}

.wrap--narrow { width: min(820px, 100%); }

.center { text-align: center; }

.ink,
.band h1,
.band h2,
.band h3,
.band h4,
.band p,
.band li {
  color: #000;
}

.band h2 { color: #000; }

hr.rule {
  border: 0;
  border-top: 1px solid #000;
  margin: 2.4rem auto;
  width: 100%;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 28px;
  width: min(1040px, 100%);
  margin: 1.6rem auto 0;
}

.quick-grid .span {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

.quick-grid .span .btn { width: min(460px, 100%); }
.quick-grid .btn { width: 100%; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  align-items: center;
  margin: 0.5rem 0 0.25rem;
}

.split-copy h3 { margin-top: 0; }

.split-media { margin: 0; }

.split-media img { display: block; width: 100%; height: auto; }

.prose-center { text-align: center; }
.prose-center p { color: #000; }

.service-list {
  margin: 0.5rem auto 1rem;
  padding-left: 1.25rem;
  max-width: 760px;
}

.service-list li { margin: 0.35rem 0; }
.service-list li p { margin: 0; }

.stack > * + * { margin-top: 0.15rem; }

.feature { margin: 0 0 1.6rem; }
.feature h2 { margin-bottom: 0.35rem; }

.video {
  position: relative;
  width: min(854px, 100%);
  margin: 1.25rem auto 0.75rem;
  aspect-ratio: 16 / 9;
  background: #111;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.caption {
  text-align: center;
  max-width: 46rem;
  margin: 0.4rem auto 1.5rem;
}

.service-map {
  display: block;
  width: 100%;
  height: 500px;
  border: 0;
  margin-top: 1rem;
}

.product-figure {
  margin: 1.25rem auto;
  max-width: 720px;
}

.product-figure img { display: block; width: 100%; height: auto; }

.center-btn { text-align: center; margin: 1.4rem 0 0.4rem; }

.tertiary-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.contact-block { margin: 0 0 1.6rem; }
.contact-block h2 { margin-bottom: 0.25rem; }
.contact-block h4 { font-weight: 400; margin: 0; }
.phone-line { font-family: var(--font-heading); font-size: 2.8rem; letter-spacing: -0.02em; margin: 0; }

/* Contact form */

.form-card {
  width: min(680px, 100%);
  margin: 0.5rem auto 0;
  text-align: left;
}

.form-card fieldset {
  border: 0;
  margin: 0 0 1.15rem;
  padding: 0;
  min-inline-size: 0;
}

.form-card legend { padding: 0; }

.form-card input::placeholder,
.form-card textarea::placeholder {
  color: rgba(26, 26, 26, 0.45);
}

.form-row { margin: 0 0 1.15rem; }

.form-row label,
.address-legend {
  display: block;
  font-size: 0.95rem;
  color: var(--dark);
  margin-bottom: 0.2rem;
}

.form-card .address-legend { margin-bottom: 0.85rem; }

.req { color: var(--accent); }

.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.4);
  border-radius: 0;
  background: transparent;
  color: #1a1a1a;
  font: 400 1rem/1.4 var(--font-body);
  padding: 0.7rem 0.1rem;
}

.form-card textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-card select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #1a1a1a 50%),
    linear-gradient(135deg, #1a1a1a 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 10px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 1.6rem;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 0 var(--accent);
}

.form-card input[aria-invalid="true"],
.form-card select[aria-invalid="true"],
.form-card textarea[aria-invalid="true"] {
  border-bottom-color: #9d1c1c;
  box-shadow: 0 1px 0 0 #9d1c1c;
}

.field-error {
  color: #9d1c1c;
  font-size: 0.9rem;
  margin: 0.3rem 0 0;
}

.address-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 0.9rem 1rem;
}

.address-grid .full { grid-column: 1 / -1; }

.btn-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 1.05rem 1.5rem;
  font: 400 1rem/1.2 var(--font-body);
  cursor: pointer;
}

.btn-submit:hover,
.btn-submit:focus-visible { background: #d46518; color: #fff; }

.btn-submit:disabled { opacity: 0.72; cursor: progress; }

.form-banner {
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  margin: 0 0 1rem;
}

.form-banner--error { background: #fdecea; color: #6b1414; }
.form-banner--success { background: var(--light-accent); color: #1a1a1a; text-align: center; }

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer */

.site-footer {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 2.75rem 1.25rem 2.25rem;
}

.site-footer img {
  width: 200px;
  height: auto;
  margin: 0.25rem auto 1.35rem;
  display: block;
}

.site-footer p {
  margin: 0;
  color: #fff;
  line-height: 1.5;
}

.site-footer p + p { margin-top: 0.45rem; }

/* Responsive type and layout */

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .burger { display: inline-flex; }
  .brand img { max-height: 50px; }
  .header-inner { min-height: 72px; }
}

@media (max-width: 767px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.9rem; }
  h3 { font-size: 1.55rem; }
  h4 { font-size: 1.25rem; }
  .hero p,
  .phone-line { font-size: 1.35rem; }
  .phone-line { font-size: 2rem; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-grid .span .btn,
  .quick-grid .btn { width: 100%; }
  .split { grid-template-columns: 1fr; gap: 1.25rem; }
  .split--image-right .split-media { order: -1; }
  .address-grid { grid-template-columns: 1fr; }
  .band { padding: 3rem 1.1rem; }
  .band--links { padding-bottom: 1rem; }
  .band--products { padding-top: 0; padding-bottom: 2.25rem; }
  .band--products > .wrap > .rule:first-child { margin-top: 0.65rem; }
  .hero { min-height: 70vw; }
  .hero--tall { min-height: 78vh; }
  .hero--medium { min-height: 68vh; }
  .btn,
  .btn--secondary { padding: 1rem 1.25rem; }
  .service-map { height: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
