/* ==========================================================================
   Birch Electrical — site styles
   --------------------------------------------------------------------------
   Plain CSS, mobile-first, no framework. Custom properties hold the brand
   palette. Edit values here and they apply everywhere.
   ========================================================================== */

:root {
  /* Brand palette */
  --grey: #5d5d5d;            /* logo-matching banner grey */
  --grey-dark: #3a3a3a;       /* nav band, footer */
  --grey-line: #c8c8c8;
  --yellow: #f7c024;          /* bulb yellow / CTA */
  --yellow-dark: #d9a91a;
  --yellow-on-light: #8a6716; /* AA-compliant link colour on white */
  --text: #2a2a2a;
  --text-muted: #555;
  --bg: #ffffff;
  --bg-soft: #f6f6f6;

  /* Type scale */
  --font-sans: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Roboto Slab", Georgia, serif;
  --max-width: 1140px;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--font-sans);
  color: var(--text);
  background: var(--bg);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--yellow-on-light); }
a:hover { color: var(--yellow-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(1.8rem, 1.4rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Skip link (a11y) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: .5rem 1rem;
  z-index: 999;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header { background: var(--grey); color: #fff; }
.site-header a { color: #fff; text-decoration: none; }
.site-header a:hover { color: var(--yellow); }

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

.site-header__logo img {
  height: auto;
  width: 200px;
  max-width: 60vw;
}

.site-header__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: .95rem;
}
.site-header__contact-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.site-nav { background: var(--grey-dark); }
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__link {
  display: block;
  padding: .85rem 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 3px solid transparent;
}
.site-nav__link:hover,
.site-nav__link.is-current {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

/* --------------------------------------------------------------------------
   Page header (interior pages)
   -------------------------------------------------------------------------- */
.page-header {
  background: var(--grey);
  color: #fff;
  padding: 2.5rem 0 2rem;
  border-bottom: 4px solid var(--yellow);
}
.page-header h1 { color: #fff; margin: 0; }
.page-header p { margin: .35rem 0 0; color: rgba(255,255,255,.85); }

/* --------------------------------------------------------------------------
   Hero (home)
   -------------------------------------------------------------------------- */
.hero {
  background: var(--grey);
  color: #fff;
  padding: 3rem 0;
}
.hero__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .hero__grid { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
}
.hero__eyebrow {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 .5rem;
}
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,.9); font-size: 1.05rem; max-width: 38rem; }
.hero__cta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem; }

/* --------------------------------------------------------------------------
   Sections / cards
   -------------------------------------------------------------------------- */
section.section { padding: 3rem 0; }
section.section--soft { background: var(--bg-soft); }

.card-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 600px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff;
  border: 1px solid var(--grey-line);
  border-radius: 6px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card h3 { color: var(--grey-dark); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .8rem 1.2rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.btn--primary { background: var(--yellow); color: #000; }
.btn--primary:hover { background: var(--yellow-dark); color: #000; }
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* --------------------------------------------------------------------------
   Tables (price guide)
   -------------------------------------------------------------------------- */
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .98rem;
}
.price-table th,
.price-table td {
  text-align: left;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--grey-line);
}
.price-table th { background: var(--bg-soft); font-weight: 700; }
.price-table tbody tr:nth-child(even) { background: #fafafa; }

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.testimonial {
  background: #fff;
  border: 1px solid var(--grey-line);
  border-left: 4px solid var(--yellow);
  border-radius: 6px;
  padding: 1.25rem 1.4rem;
  margin: 0 0 1.25rem;
}
.testimonial blockquote { margin: 0; font-style: italic; }
.testimonial cite {
  display: block;
  margin-top: .8rem;
  font-style: normal;
  font-weight: 700;
}
.testimonial cite span { font-weight: 400; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */
.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

.gallery figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--grey-line);
  border-radius: 6px;
  overflow: hidden;
}
.gallery figure img,
.gallery figure picture { width: 100%; display: block; }
.gallery figure picture img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption {
  padding: .6rem .8rem;
  font-size: .9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--grey-line);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form { max-width: 38rem; }
.form__field { margin: 0 0 1rem; }
.form__field label {
  display: block;
  font-weight: 600;
  margin-bottom: .25rem;
}
.form__field input[type="text"],
.form__field input[type="email"],
.form__field input[type="tel"],
.form__field textarea {
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
  font: inherit;
  background: #fff;
}
.form__field textarea { min-height: 8rem; resize: vertical; }
.form__field input:focus,
.form__field textarea:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 1px;
  border-color: var(--yellow);
}
.form__honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--grey-dark);
  color: #fff;
  margin-top: 3rem;
  padding: 2.5rem 0 1rem;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .site-footer__grid { grid-template-columns: repeat(3, 1fr); } }
.site-footer__logo { background: var(--grey); border-radius: 4px; padding: .5rem; }
.site-footer__heading { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--yellow); margin: 0 0 .5rem; }
.site-footer__address { font-style: normal; line-height: 1.6; }
.site-footer__bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: .85rem;
  color: rgba(255,255,255,.7);
}

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */
.lead { font-size: 1.1rem; color: var(--text); }
.muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.mt-2 { margin-top: 1rem; }

.alert {
  padding: 1rem 1.25rem;
  border-radius: 4px;
  margin: 1rem 0;
}
.alert--info {
  background: #eef5ff;
  border-left: 4px solid #3a78d4;
  color: #1e3a6b;
}
.alert--success {
  background: #eaf7ec;
  border-left: 4px solid #2e7d32;
  color: #1b5e20;
}

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */
.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}
@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
.gallery-item {
  background: var(--bg-soft);
  border: 1px solid var(--grey-line);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.gallery-item picture,
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.muted { color: var(--text-muted); font-size: 0.95rem; }
.lede  { font-size: 1.1rem; color: var(--text-muted); margin: 0 0 1.5rem; }
.section--muted { background: var(--bg-soft); }
.narrow { max-width: 760px; margin: 0 auto; }

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 3rem; }
}

.contact-list { margin: 1.25rem 0; }
.contact-list dt { font-weight: 600; color: var(--text); margin-top: 0.75rem; }
.contact-list dd { margin: 0.1rem 0 0; color: var(--text-muted); }

.contact-form .field { margin-bottom: 1rem; }
.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font: inherit;
  color: inherit;
  background: var(--bg);
  border: 1px solid var(--grey-line);
  border-radius: 4px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 1px;
  border-color: var(--grey-dark);
}
.contact-form textarea { resize: vertical; min-height: 8rem; }

/* Honeypot — visually hidden but still in tab order *only* for bots that ignore CSS */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note { margin-top: 0.75rem; }

.btn-secondary {
  display: inline-block;
  padding: 0.55rem 1rem;
  background: var(--grey-dark);
  color: #fff;
  border: 0;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
}
.btn-secondary:hover { background: #222; color: #fff; }
