/* ==========================================================================
   Jeanes Power & Electrical — stylesheet
   Design tokens derived from the trade: switchboard charcoal, bare copper,
   breaker-switch yellow. No build step — plain CSS, custom properties.
   ========================================================================== */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/archivo-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../assets/fonts/archivo-900.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/public-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/public-sans-700.woff2') format('woff2');
}

/* ---- Tokens ------------------------------------------------------------ */
:root {
  /* Palette */
  --charcoal: #1E2124;
  --panel: #2C3034;
  --off-white: #F2F1ED;
  --ink: #181A1B;
  --copper: #B5652C;
  --copper-bright: #D6853F;
  --copper-text: #8C4419; /* AA-safe copper for body text on light backgrounds */
  --breaker-yellow: #F2B705;
  --safe-green: #3C7A4E;
  --line: #3D4247;
  --line-light: #DAD7CE;

  /* Type */
  --font-display: 'Archivo', 'Arial Black', sans-serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: 2.75rem;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  --radius: 4px;
  --focus-ring: 3px solid var(--breaker-yellow);

  --max-width: 72rem;
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--off-white);
}
img { max-width: 100%; display: block; }
svg { display: block; }
a { color: var(--copper-text); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 var(--space-2); }
p { margin: 0 0 var(--space-2); }
ul, ol { margin: 0 0 var(--space-2); padding-left: 1.25em; }
button { font-family: inherit; }

/* ---- Focus & touch targets ----------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
a, button, input, select, textarea, summary { min-height: 44px; }
input, select, textarea { min-height: 48px; }

/* ---- Skip link ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--breaker-yellow);
  color: var(--ink);
  padding: var(--space-2) var(--space-3);
  z-index: 1000;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* ---- Layout helpers -------------------------------------------------------- */
.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
.section { padding-block: var(--space-5); }
.section--panel { background: var(--panel); color: var(--off-white); }
.section--panel h2 { color: var(--off-white); }
.section-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper-text);
  margin-bottom: var(--space-1);
}
.section--panel .section-eyebrow { color: var(--copper-bright); }
.section-heading { font-size: var(--step-3); max-width: 40ch; }
.section-lede { max-width: 60ch; font-size: var(--step-1); }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--charcoal);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-2);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: var(--off-white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1.1;
}
.brand__mark {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
}
.brand__text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.brand__name-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--line-light);
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--space-2);
}
.header-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--off-white);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.header-call svg { width: 18px; height: 18px; flex-shrink: 0; }
.header-call:hover { border-color: var(--copper-bright); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--off-white);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

.site-nav {
  border-top: 1px solid var(--line);
}
.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0.6rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.site-nav a {
  color: var(--line-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}
.site-nav a:hover { color: var(--breaker-yellow); }

@media (max-width: 44em) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav { display: none; }
  .site-nav.is-open { display: block; }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__list a { display: block; padding: 0.75rem 0; }
  /* Phone number in the header must stay visible without scrolling on
     mobile — trim the brand instead of hiding the number. */
  .brand__name-sub { display: none; }
  .brand { font-size: 0.95rem; }
  .header-call { font-size: 0.85rem; padding: 0.5rem 0.6rem; }
}
@media (max-width: 21em) {
  .brand span:not(.brand__name-sub) { display: none; }
}

/* ---- Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  background: var(--charcoal);
  color: var(--off-white);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}
.hero__inner {
  position: relative;
  padding-block: var(--space-5) var(--space-4);
  display: grid;
  gap: var(--space-3);
  max-width: 48rem;
}
.hero__eyebrow {
  font-weight: 700;
  color: var(--breaker-yellow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, var(--step-4));
  font-weight: 900;
  margin-bottom: 0.25rem;
}
.hero__suburb {
  display: block;
  color: var(--copper-bright);
}
.hero__sub {
  font-size: var(--step-1);
  color: var(--line-light);
  max-width: 42ch;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--line-light);
}
.hero__trust strong { color: var(--off-white); }
.trust-stars { color: var(--breaker-yellow); letter-spacing: 0.05em; }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.2;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn--primary {
  background: var(--breaker-yellow);
  color: var(--ink);
}
.btn--primary:hover { background: #ffc61a; }
.btn--outline {
  background: transparent;
  color: var(--off-white);
  border-color: var(--line-light);
}
.btn--outline:hover { border-color: var(--breaker-yellow); color: var(--breaker-yellow); }
.btn--dark {
  background: var(--charcoal);
  color: var(--off-white);
}
.btn--dark:hover { background: #000; }
.btn--block { width: 100%; }

/* ---- Breaker quick-nav (signature element) ------------------------------- */
.breaker-nav {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.breaker-nav__list {
  list-style: none;
  margin: 0;
  padding: var(--space-2) 0;
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.breaker-nav__list li { flex-shrink: 0; }
.breaker {
  --breaker-state: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.5rem 0.75rem 0.5rem 0.5rem;
  color: var(--off-white);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.breaker__toggle {
  position: relative;
  width: 14px;
  height: 22px;
  border-radius: 2px;
  background: var(--line);
  flex-shrink: 0;
}
.breaker__toggle::after {
  content: '';
  position: absolute;
  left: 2px;
  right: 2px;
  top: 2px;
  height: 9px;
  border-radius: 1px;
  background: var(--breaker-yellow);
  transition: transform 0.15s ease;
}
.breaker:hover .breaker__toggle::after,
.breaker:focus-visible .breaker__toggle::after {
  transform: translateY(9px);
  background: var(--safe-green);
}
.breaker:hover, .breaker:focus-visible { border-color: var(--copper-bright); }

/* ---- Services ------------------------------------------------------------- */
.service-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.service-card {
  background: var(--off-white);
  border: 1px solid var(--line-light);
  border-top: 4px solid var(--copper);
  border-radius: var(--radius);
  padding: var(--space-3);
  scroll-margin-top: 7rem;
}
.service-card h3 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.service-card__icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--copper);
}
.service-card ul {
  font-size: 0.92rem;
  color: #3a3f43;
  margin-bottom: var(--space-2);
}
.service-card ul li { margin-bottom: 0.3rem; }
.service-card .btn { font-size: 0.9rem; padding: 0.65rem 1rem; }

/* ---- Why / trust ------------------------------------------------------- */
.trust-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.trust-item {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.trust-item h3 { font-size: 1.05rem; color: var(--breaker-yellow); }
.trust-item p { color: var(--line-light); font-size: 0.92rem; margin-bottom: 0; }

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-3);
}
.stat {
  min-width: 8rem;
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.25rem;
  color: var(--breaker-yellow);
  line-height: 1;
}
.stat__label { font-size: 0.85rem; color: var(--line-light); }

/* ---- Reviews / testimonials --------------------------------------------- */
.review-card {
  background: var(--off-white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: var(--space-3);
  height: 100%;
}
.review-card__stars { color: var(--breaker-yellow); margin-bottom: 0.4rem; letter-spacing: 0.05em; }
.review-card p { font-style: italic; }
.review-card cite { font-style: normal; font-weight: 700; font-size: 0.85rem; color: var(--copper-text); }
.needs-input {
  outline: 2px dashed var(--copper);
  outline-offset: 4px;
}

/* ---- Service area -------------------------------------------------------- */
.area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
}
.area-list li {
  background: var(--off-white);
  border: 1px solid var(--line-light);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 700;
}

/* ---- FAQ ------------------------------------------------------------------ */
.faq-list { margin-top: var(--space-4); }
.faq-item {
  border-bottom: 1px solid var(--line-light);
}
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  padding: var(--space-2) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--copper);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { padding-bottom: var(--space-2); max-width: 65ch; }

/* ---- Contact / lead form ------------------------------------------------- */
.contact-layout {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 55em) {
  .contact-layout { grid-template-columns: 1fr 1.2fr; }
}
.contact-card {
  background: var(--panel);
  color: var(--off-white);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.contact-card h3 { color: var(--breaker-yellow); font-size: 1.1rem; }
.contact-card a { color: var(--off-white); }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.contact-list a { text-decoration: none; display: flex; gap: 0.6rem; align-items: flex-start; }
.contact-list svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--copper-bright); }

.lead-form {
  background: var(--off-white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.form-row { margin-bottom: var(--space-2); }
.form-row label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
.form-row .required { color: var(--copper-text); }
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #78746b;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.form-row textarea { resize: vertical; }
.form-error {
  color: #9c2b2b;
  font-size: 0.85rem;
  margin-top: 0.3rem;
  display: none;
}
.form-row.has-error input,
.form-row.has-error select,
.form-row.has-error textarea {
  border-color: #9c2b2b;
  outline: 2px solid #9c2b2b;
  outline-offset: 1px;
}
.form-row.has-error .form-error { display: block; }
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  margin-top: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius);
  font-weight: 700;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status--success { background: #e4f0e6; color: #2F6640; border: 1px solid var(--safe-green); }
.form-status--error { background: #f6e5e0; color: #8a3116; border: 1px solid #8a3116; }
.form-note { font-size: 0.8rem; color: #55565a; margin-top: var(--space-2); }

/* ---- Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--line-light);
  padding-block: var(--space-4);
  font-size: 0.85rem;
}
.footer-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-bottom: var(--space-3);
}
.footer-grid h4 { color: var(--off-white); font-size: 0.95rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid a { color: var(--line-light); text-decoration: none; }
.footer-grid a:hover { color: var(--breaker-yellow); }
.footer-social { display: flex; gap: 0.75rem; margin-top: var(--space-2); }
.footer-social a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* ---- Sticky mobile call bar ------------------------------------------------ */
.call-bar {
  display: none;
}
@media (max-width: 44em) {
  .call-bar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 200;
    background: var(--breaker-yellow);
    padding: 0.6rem var(--space-2);
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0,0,0,0.25);
  }
  .call-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--ink);
    text-decoration: none;
    font-weight: 900;
    font-family: var(--font-display);
    font-size: 1.05rem;
    min-height: 48px;
  }
  .call-bar svg { width: 22px; height: 22px; }
  /* keep content clear of the fixed bar */
  body { padding-bottom: 64px; }
}

/* ---- Misc ------------------------------------------------------------------ */
.text-center { text-align: center; }
hr.rule { border: none; border-top: 1px solid var(--line-light); margin: var(--space-4) 0; }
