/* ============================================================
   CASSEL ELECTRIC INC. — demo site styles
   Palette + type pulled from the badge logo:
   black ring / silver plate / bolt orange / off-white paper.
   Edit brand values here; everything cascades from them.
   ============================================================ */

:root {
  /* Brand */
  --ink: #141416;          /* badge black */
  --char: #1e1f23;         /* charcoal surfaces */
  --char-2: #28292e;
  --steel: #9ba1a6;        /* muted steel text on dark */
  --silver: #e8eaec;       /* plate silver */
  --paper: #f6f5f2;        /* warm off-white page */
  --volt: #f25c19;         /* bolt orange */
  --volt-bright: #ff7a2e;
  --volt-deep: #c84508;
  --line: #d9d7d1;         /* hairline borders on light */

  /* Type */
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;

  /* Spacing scale */
  --s-1: .5rem; --s-2: .75rem; --s-3: 1rem; --s-4: 1.5rem;
  --s-5: 2.25rem; --s-6: 3.5rem; --s-7: 5.5rem;

  /* Signature angle from the bolt in the logo */
  --bolt-angle: -14deg;
  /* Chamfered corner used on buttons/cards */
  --chamfer: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--volt-deep); }
a:hover { color: var(--volt); }
h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1.04;
  letter-spacing: .015em;
  margin: 0 0 var(--s-3);
}
h1 { font-size: clamp(2.9rem, 8.5vw, 5.2rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: .04em; }
p { margin: 0 0 var(--s-3); }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 2.5rem); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--volt); color: #fff; padding: .6rem 1rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--volt); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; font-size: 1.05rem; text-decoration: none;
  padding: .8rem 1.5rem; border: 2px solid transparent; cursor: pointer;
  clip-path: var(--chamfer);
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn .ico { width: 1.1em; height: 1.1em; flex: none; }
.btn-lg { font-size: 1.2rem; padding: 1rem 1.9rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--volt); color: #fff; }
.btn-primary:hover { background: var(--volt-bright); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--char-2); color: #fff; }
.btn-ghost {
  background: transparent; color: currentColor;
  border-color: currentColor; clip-path: none;
}
.btn-call { background: transparent; color: inherit; border-color: var(--volt); clip-path: none; }
.btn-call:hover { background: var(--volt); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 20, 22, .94);
  backdrop-filter: blur(8px);
  color: var(--paper);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; gap: var(--s-4); padding: .65rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.brand-badge { width: 48px; height: 48px; }
.brand-word { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 1.35rem; letter-spacing: .05em; white-space: nowrap;
}
.brand-tag { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--steel); white-space: nowrap; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: var(--paper); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: .35rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--volt-bright); border-bottom-color: var(--volt); }

.header-actions { display: flex; align-items: center; gap: var(--s-3); }
.site-header .btn-call { color: var(--paper); font-size: .95rem; padding: .5rem 1rem; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: .55rem; cursor: pointer;
}
.nav-toggle-bar { width: 24px; height: 2.5px; background: var(--paper); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 78% 18%, rgba(242, 92, 25, .14), transparent 60%),
    linear-gradient(160deg, var(--ink) 0%, var(--char) 55%, #232021 100%);
  color: var(--paper);
  overflow: hidden;
}
.hero::before {
  /* faint oversized bolt watermark at the logo's angle */
  content: "";
  position: absolute; inset: -10% -20%;
  background: linear-gradient(var(--bolt-angle),
    transparent 47.4%, rgba(255,255,255,.045) 47.4%,
    rgba(255,255,255,.045) 52.6%, transparent 52.6%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--s-5); align-items: center;
  padding: var(--s-7) 0 var(--s-6);
}
.eyebrow {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .24em; font-size: .85rem; font-weight: 600;
  color: var(--volt-bright); margin-bottom: var(--s-2);
}
.hero h1 { margin-bottom: var(--s-4); }
.volt-text { color: var(--volt-bright); }
.lede { font-size: 1.2rem; color: #cfd2d6; max-width: 34em; margin-bottom: var(--s-4); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-4); }
.hero .btn-ghost { color: var(--paper); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

.hero-chips { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.hero-chips li {
  font-size: .9rem; color: var(--steel); display: flex; align-items: center; gap: .45rem;
}
.hero-chips li::before {
  content: ""; width: 9px; height: 9px; flex: none;
  background: var(--volt); transform: rotate(45deg);
}

.hero-badge { display: flex; justify-content: center; }
.badge-ring {
  position: relative; padding: 1.6rem;
  border: 1px dashed rgba(255,255,255,.22); border-radius: 50%;
}
.badge-ring img { width: min(340px, 62vw); height: auto; filter: drop-shadow(0 18px 38px rgba(0,0,0,.5)); }

.hero-trace { display: block; width: 100%; height: 36px; color: var(--volt); background: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: var(--s-7) 0; }
.section-head { text-align: center; max-width: 46em; margin: 0 auto var(--s-6); }
.section-head--left { text-align: left; margin-inline: 0; }
.section-sub { color: #5b5a56; font-size: 1.1rem; }
.section-head--light .eyebrow { color: var(--volt-bright); }

/* heading underline = voltage trace */
.section-head h2 { position: relative; padding-bottom: 1.1rem; }
.section-head h2::after {
  content: "";
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 96px; height: 10px;
  background:
    linear-gradient(115deg, transparent 30%, var(--volt) 30%, var(--volt) 44%,
      transparent 44%, transparent 56%, var(--volt) 56%, var(--volt) 70%, transparent 70%);
}
.section-head--left h2::after { left: 0; transform: none; }

/* ---------- Services: breaker panel ---------- */
.services { background: var(--paper); }
.breaker-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: var(--s-3); list-style: none; margin: 0; padding: 0;
}
.breaker {
  position: relative; background: #fff;
  border: 1px solid var(--line); border-left: 5px solid var(--ink);
  clip-path: var(--chamfer);
  padding: 1.4rem 1.4rem 1.4rem 1.5rem;
  transition: transform .18s ease, border-left-color .18s ease, box-shadow .18s ease;
}
.breaker:hover { transform: translateY(-4px); border-left-color: var(--volt); box-shadow: 0 14px 28px rgba(20,20,22,.1); }
.breaker-id {
  position: absolute; top: .9rem; right: 1.1rem;
  font-family: var(--font-display); font-weight: 600; font-size: .8rem;
  letter-spacing: .18em; color: #b9b6ae;
}
.breaker-switch {
  display: block; width: 34px; height: 16px; margin-bottom: .9rem;
  background: var(--silver); border: 1.5px solid var(--ink); border-radius: 9px;
  position: relative;
}
.breaker-switch::after {
  content: ""; position: absolute; top: 1.5px; left: 2px;
  width: 11px; height: 10px; border-radius: 6px;
  background: var(--ink); transition: left .18s ease, background-color .18s ease;
}
.breaker:hover .breaker-switch::after { left: 17px; background: var(--volt); }
.breaker h3 { margin-bottom: .4rem; }
.breaker p { margin: 0; color: #55544f; font-size: .97rem; }
.services-cta { text-align: center; margin-top: var(--s-5); font-size: 1.1rem; }

/* ---------- Why / trust ---------- */
.why { background: var(--char); color: var(--paper); }
.why .section-head h2 { color: var(--paper); }
.why-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: var(--s-4); margin-bottom: var(--s-6);
}
.why-card {
  background: var(--char-2); border: 1px solid rgba(255,255,255,.09);
  clip-path: var(--chamfer); padding: 1.6rem;
}
.why-ico { width: 38px; height: 38px; color: var(--volt-bright); margin-bottom: .9rem; }
.why-card h3 { color: var(--paper); margin-bottom: .45rem; }
.why-card p { color: #b7bbc0; margin: 0; font-size: .97rem; }

.process {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--s-4); list-style: none; margin: 0; padding: var(--s-4) 0 0;
  border-top: 1px dashed rgba(255,255,255,.2);
  counter-reset: step;
}
.process li { display: flex; flex-direction: column; gap: .2rem; font-size: .95rem; color: #b7bbc0; }
.process strong { color: var(--paper); font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: 1.1rem; }
.process-num {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  color: var(--volt-bright); margin-bottom: .15rem;
}

/* ---------- Service area ---------- */
.area-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--s-6); align-items: center;
}
.town-chips {
  display: flex; flex-wrap: wrap; gap: .55rem;
  list-style: none; margin: var(--s-4) 0; padding: 0;
}
.town-chips li {
  background: #fff; border: 1px solid var(--line);
  padding: .35rem .85rem; font-size: .92rem; font-weight: 500;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.town-chips .town-hq { background: var(--ink); color: #fff; border-color: var(--ink); }
.area-note { color: #5b5a56; }

.radar { width: 100%; max-width: 430px; margin-inline: auto; display: block; }
.radar-ring { fill: none; stroke: #cfccc4; stroke-dasharray: 4 6; stroke-width: 1.5; }
.radar-core { fill: var(--ink); }
.radar-dots circle { fill: var(--volt); }
.radar-label { font-family: var(--font-body); font-size: 13px; fill: #6b6a65; }
.radar-label--hq { font-family: var(--font-display); font-weight: 700; letter-spacing: .12em; fill: var(--ink); font-size: 15px; }

/* ---------- About ---------- */
.about { background: var(--silver); }
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: var(--s-6); align-items: center;
}
.about-frame {
  position: relative; background: #fff; padding: 2.2rem;
  border: 1px solid var(--line);
  clip-path: var(--chamfer);
  box-shadow: 0 18px 40px rgba(20,20,22,.12);
  transform: rotate(-2deg);
  max-width: 360px; margin-inline: auto;
}
.about-frame img { margin-inline: auto; }
.about-frame-tag {
  display: block; text-align: center; margin-top: 1rem;
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .22em; font-size: .85rem; color: #6b6a65;
}
.about-confirm { font-size: .92rem; color: #6b6a65; border-left: 3px solid var(--volt); padding-left: .9rem; }

/* ---------- FAQ ---------- */
.faq-list details {
  background: #fff; border: 1px solid var(--line);
  margin-bottom: var(--s-2);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
}
.faq-list summary {
  list-style: none; cursor: pointer; position: relative;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; font-size: 1.15rem;
  padding: 1.05rem 3.2rem 1.05rem 1.3rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 1.2rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem; color: var(--volt); font-weight: 400;
  transition: transform .18s ease;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p { padding: 0 1.3rem 1.2rem; margin: 0; color: #55544f; }
.faq-list summary:hover { color: var(--volt-deep); }

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(900px 480px at 14% 8%, rgba(242, 92, 25, .13), transparent 60%),
    linear-gradient(195deg, var(--char) 0%, var(--ink) 70%);
  color: var(--paper);
}
.contact .section-head h2 { color: var(--paper); }
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-6); align-items: start;
}
.contact-copy p { color: #c5c8cc; }
.contact-facts { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-4); }
.contact-facts li { display: flex; flex-direction: column; gap: .15rem; }
.contact-label {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .2em; font-size: .78rem; color: var(--steel);
}
.contact-big {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  color: var(--volt-bright); text-decoration: none; line-height: 1.1;
}
.contact-big:hover { color: #fff; }
.contact-facts a { color: var(--paper); }
.contact-facts a:hover { color: var(--volt-bright); }
.contact-facts em { color: var(--steel); font-style: italic; }

.estimate-form {
  background: var(--paper); color: var(--ink);
  clip-path: var(--chamfer); padding: 2rem;
}
.estimate-form h3 { font-size: 1.7rem; margin-bottom: var(--s-4); }
.form-row { margin-bottom: var(--s-3); }
.form-row label {
  display: block; font-weight: 600; font-size: .9rem;
  margin-bottom: .3rem; letter-spacing: .02em;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: .7rem .85rem;
  border: 1.5px solid #c9c6bf; border-radius: 0; background: #fff;
  font: inherit; color: inherit;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 3px solid rgba(242, 92, 25, .45); border-color: var(--volt);
}
.form-row input[aria-invalid="true"] { border-color: #c0262d; }
.form-status { margin: var(--s-3) 0 0; font-weight: 600; min-height: 1.4em; }
.form-status.is-ok { color: #1c7c3c; }
.form-status.is-err { color: #c0262d; }
.form-fineprint { font-size: .88rem; color: #6b6a65; margin: var(--s-2) 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--steel); padding: var(--s-6) 0 var(--s-4); }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--s-5); align-items: start;
  padding-bottom: var(--s-4); border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand { display: flex; gap: var(--s-3); align-items: flex-start; }
.footer-brand strong { color: var(--paper); font-family: var(--font-display); text-transform: uppercase; letter-spacing: .06em; font-size: 1.15rem; }
.footer-brand p { font-size: .95rem; line-height: 1.5; }
.footer-nav { display: grid; gap: .45rem; }
.footer-nav a { color: var(--steel); text-decoration: none; font-size: .95rem; }
.footer-nav a:hover { color: var(--volt-bright); }
.footer-contact { display: flex; flex-direction: column; gap: var(--s-2); align-items: flex-start; }
.footer-contact .btn-call { color: var(--paper); }
.footer-contact .btn-ghost { color: var(--steel); border-color: rgba(255,255,255,.3); font-size: .95rem; padding: .55rem 1.1rem; }
.footer-contact .btn-ghost:hover { color: var(--paper); }
.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2);
  padding-top: var(--s-3); font-size: .85rem;
}
.footer-legal p { margin: 0; }
.footer-demo-note { color: #6f747a; font-style: italic; }

/* ---------- Sticky mobile call bar ---------- */
.mobile-callbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(20,20,22,.97); border-top: 1px solid rgba(255,255,255,.12);
  padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom));
  gap: .6rem;
}
.mobile-callbar .btn { flex: 1; font-size: 1.05rem; padding: .8rem .5rem; }
.mobile-callbar .btn-dark { border: 1.5px solid rgba(255,255,255,.35); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .breaker:hover { transform: none; }
}

/* ============================================================
   RESPONSIVE — mobile-first adjustments
   ============================================================ */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: var(--s-6); text-align: left; }
  .hero-badge { order: -1; margin-bottom: var(--s-2); }
  .badge-ring img { width: min(220px, 52vw); }
  .area-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-visual { order: 2; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ink); border-bottom: 1px solid rgba(255,255,255,.12);
    display: none; padding: var(--s-3) 0 var(--s-4);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
  .site-nav a { display: block; padding: .8rem 0; font-size: 1.15rem; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-toggle { display: flex; }
  .site-header .btn-call span { display: none; } /* icon-only call button on small screens */
  .site-header .btn-call { padding: .55rem .7rem; }
  .brand-badge { width: 40px; height: 40px; }
  .brand-name { font-size: 1.15rem; }
  .brand-tag { font-size: .62rem; }

  .section { padding: var(--s-6) 0; }
  .mobile-callbar { display: flex; }
  body { padding-bottom: 4.2rem; } /* room for call bar */
  .footer-legal { flex-direction: column; }
}

@media (max-width: 480px) {
  .cta-row .btn-lg { width: 100%; }
  .estimate-form { padding: 1.4rem; }
  .breaker-grid { grid-template-columns: 1fr; }
}
