/* Daigle Electric LLC — site stylesheet
   Hand-rolled, mobile-first, no frameworks. See BRANDING.md for the system. */

:root {
  --ink: #14161A;
  --charcoal: #22252B;
  --gold: #B69E59;
  --gold-bright: #D8BC6F;
  --gold-deep: #79652E;
  --paper: #F7F6F2;
  --white: #FFFFFF;
  --slate: #4A4F58;

  --content-max: 1100px;
  --radius: 8px;
  --font-head: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body,
h1, h2, h3, p, ul, ol, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

@media (min-width: 640px) {
  body {
    font-size: 18px;
  }
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--gold);
}

.section-dark .eyebrow,
.hero .eyebrow {
  color: var(--gold);
}

.section-light .eyebrow,
body.light-page .eyebrow {
  color: var(--gold-deep);
}

p {
  max-width: 68ch;
}

p + p {
  margin-top: 1em;
}

/* ---------- Focus ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.5rem 0;
}

@media (min-width: 900px) {
  .section {
    padding: 5rem 0;
  }
}

.section-dark {
  background: var(--ink);
  color: var(--white);
}

.section-charcoal {
  background: var(--charcoal);
  color: var(--white);
}

.section-light {
  background: var(--paper);
  color: var(--ink);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-charcoal h1,
.section-charcoal h2,
.section-charcoal h3 {
  color: var(--white);
}

.section-dark p,
.section-charcoal p {
  color: var(--white);
}

.section-header {
  max-width: 62ch;
  margin-bottom: 2.25rem;
}

.section-header h2 {
  margin-top: 0.4rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--ink);
  border-bottom: 1px solid var(--charcoal);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  color: var(--white);
  text-decoration: none;
}

.wordmark .bolt {
  flex: none;
  width: 28px;
  height: 28px;
}

.wordmark small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}

.main-nav a {
  display: inline-block;
  padding: 0.4rem 0.1rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--white);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  border-bottom-color: var(--gold);
}

.header-call {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--gold-bright);
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--ink) 0%, var(--charcoal) 100%);
  color: var(--white);
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -10%;
  top: -20%;
  width: 60%;
  height: 140%;
  background: radial-gradient(circle, rgba(182, 158, 89, 0.16) 0%, rgba(182, 158, 89, 0) 65%);
  pointer-events: none;
}

@media (min-width: 900px) {
  .hero {
    padding: 6rem 0 5.5rem;
  }
}

.hero .wrap {
  position: relative;
}

.hero h1 {
  margin-top: 0.6rem;
  max-width: 18ch;
}

.hero .lede {
  margin-top: 1.25rem;
  max-width: 56ch;
  font-size: 1.15rem;
  color: var(--white);
}

.hero .cta-row {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-hero {
  background: var(--ink);
  color: var(--white);
  padding: 3rem 0;
}

.page-hero h1 {
  margin-top: 0.5rem;
  max-width: 26ch;
}

.page-hero .lede {
  margin-top: 1rem;
  max-width: 60ch;
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}

.btn-gold:hover,
.btn-gold:focus-visible {
  background: var(--gold-bright);
}

.btn-outline {
  border-color: var(--white);
  color: var(--white);
  background: transparent;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-outline-dark {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}

.btn-outline-dark:hover,
.btn-outline-dark:focus-visible {
  border-color: var(--gold-deep);
  color: var(--gold-deep);
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 1rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgba(20, 22, 26, 0.08);
  border-top: 3px solid var(--gold);
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--slate);
  max-width: none;
}

.card a.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gold-deep);
  text-decoration: none;
}

.card a.card-link:hover,
.card a.card-link:focus-visible {
  text-decoration: underline;
}

.section-dark .card,
.section-charcoal .card {
  background: var(--charcoal);
  border-top-color: var(--gold);
}

.section-dark .card p,
.section-charcoal .card p {
  color: var(--white);
}

/* ---------- Why choose us / list features ---------- */
.feature-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-list li {
  padding-left: 1.9rem;
  position: relative;
  font-size: 1.05rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 14px;
  height: 14px;
  background: var(--gold);
  border-radius: 3px;
}

/* ---------- Reviews ---------- */
.review-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.review-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.4rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--white);
}

.review-links a:hover,
.review-links a:focus-visible {
  background: var(--gold);
  color: var(--ink);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--white);
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.site-footer h3 {
  color: var(--gold);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}

.site-footer address {
  font-style: normal;
  color: var(--white);
  line-height: 1.7;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--gold-bright);
  text-decoration: underline;
}

.footer-reviews li {
  margin-bottom: 0.4rem;
}

.footer-license {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--gold);
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--charcoal);
  font-size: 0.85rem;
  color: var(--gold);
}

/* ---------- Forms ---------- */
.form-field {
  margin-bottom: 1.35rem;
}

.form-field label {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 2px solid var(--slate);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--gold-deep);
}

.form-hint {
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 0.25rem;
}

/* Honeypot field — hidden from sighted users, present for bots */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Article / prose content ---------- */
.prose {
  max-width: 72ch;
}

.prose h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.prose p {
  max-width: none;
  color: var(--ink);
}

.prose p + p {
  margin-top: 1.1em;
}

.article-meta {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
}

.teaser-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* ---------- Contact info block ---------- */
.nap-block {
  margin-top: 1rem;
}

.nap-block p {
  max-width: none;
  font-size: 1.1rem;
}

.nap-block a {
  color: var(--gold-deep);
  font-weight: 700;
  text-decoration: none;
}

.nap-block a:hover,
.nap-block a:focus-visible {
  text-decoration: underline;
}

.section-dark .nap-block a,
.section-charcoal .nap-block a {
  color: var(--gold-bright);
}

/* ---------- 404 ---------- */
.not-found {
  text-align: center;
  padding: 5rem 0;
}

.not-found .code {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 5rem;
  color: var(--gold-deep);
  line-height: 1;
}

/* ---------- Photo placeholders (see FACTS.md Image placeholders policy) ---------- */
.img-placeholder {
  border: 2px dashed var(--gold-deep);
  background: var(--paper);
  border-radius: var(--radius);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  text-align: center;
}

.img-placeholder::before {
  content: "\26A1";
  font-size: 1.8rem;
  color: var(--gold-deep);
}

.img-placeholder figcaption {
  font-style: italic;
  color: var(--slate);
  max-width: 40ch;
}

/* ---------- Real project photos ---------- */
.site-photo {
  margin: 1.75rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.site-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.site-photo figcaption {
  font-style: italic;
  color: var(--slate);
  font-size: 0.92rem;
  padding: 0.7rem 1rem;
}

/* ---------- Before / after project pairs ---------- */
.before-after {
  margin: 1.75rem 0;
}

.before-after .ba-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  align-items: start;
}

@media (min-width: 620px) {
  .before-after .ba-pair {
    grid-template-columns: 1fr 1fr;
  }
}

.before-after .ba-shot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.before-after .ba-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.before-after .ba-label {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(20, 22, 26, 0.86);
  border: 1px solid var(--gold-deep);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
}

.before-after figcaption {
  font-style: italic;
  color: var(--slate);
  font-size: 0.92rem;
  padding: 0.7rem 0.1rem 0;
}

.why-us-media .site-photo {
  width: 100%;
  margin: 0; /* parent flex gap handles spacing */
}

/* ---------- Hero CTA row (supports 2 or 3 actions) ---------- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 560px) {
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-row .btn {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- Service hub cards ---------- */
.services-hub-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.services-hub-grid .card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

/* ---------- FAQ ---------- */
.faq-item {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(20, 22, 26, 0.12);
}

.faq-item:first-of-type {
  border-top: none;
  padding-top: 0.5rem;
}

.faq-item h3 {
  color: var(--gold-deep);
  margin-bottom: 0.6rem;
}

.faq-item p {
  max-width: none;
  color: var(--ink);
}

.section-charcoal .faq-item p,
.section-dark .faq-item p {
  color: var(--white);
}

.section-charcoal .faq-item,
.section-dark .faq-item {
  border-top-color: rgba(255, 255, 255, 0.18);
}

/* ---------- Service area town lists ---------- */
.town-grid {
  columns: 2;
  column-gap: 2rem;
  font-size: 0.9rem;
  line-height: 1.9;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .town-grid {
    columns: 3;
  }
}

@media (min-width: 900px) {
  .town-grid {
    columns: 4;
  }
}

.town-grid li {
  break-inside: avoid;
}

/* ---------- Why-choose-us layout (shield + placeholder beside the list) ---------- */
.why-us-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .why-us-layout {
    grid-template-columns: 220px 1fr;
  }
}

.why-us-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.why-us-media .img-placeholder {
  width: 100%;
  border-color: var(--gold);
}

/* ---------- Utility ---------- */
.center {
  text-align: center;
}

.mt-lg {
  margin-top: 2.5rem;
}
