/* ==========================================================================
   Brightwire Electric — components.css
   Header, footer, hero, cards, forms and reusable section patterns.
   ========================================================================== */

/* ---- Sticky header ------------------------------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 28, 48, .85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: height .25s var(--ease), background-color .25s var(--ease),
              box-shadow .25s var(--ease);
}
.site-header.is-scrolled {
  height: 64px;
  background: rgba(8, 22, 38, .96);
  box-shadow: 0 10px 30px rgba(6, 18, 31, .35);
}
/* Reserve space so page content doesn't slide under the fixed header */
body { padding-top: var(--header-h); }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.5rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--white);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--white); }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name b { color: var(--amber-400); font-weight: 700; }

/* Primary nav */
.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: .35rem; }
.nav__link {
  display: inline-block;
  padding: .55rem .75rem;
  border-radius: var(--radius-sm);
  color: var(--on-dark);
  font-weight: 500;
  font-size: .98rem;
  position: relative;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav__link:hover { color: var(--white); background: rgba(255, 255, 255, .07); }
.nav__link[aria-current="page"] { color: var(--amber-400); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: .75rem; right: .75rem; bottom: .28rem;
  height: 2px; border-radius: 2px;
  background: var(--amber-400);
}

.header-actions { display: flex; align-items: center; gap: .85rem; margin-left: .5rem; }
.nav__cta-mobile { display: none; } /* shown only inside the mobile menu */
.header-phone {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--on-dark); font-weight: 600; font-size: .95rem;
  white-space: nowrap;
  margin-right: 1.9rem;
}
.header-phone:hover { color: var(--white); }
.header-phone svg { color: var(--amber-400); }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  color: var(--white);
  align-items: center; justify-content: center;
}
.nav-toggle:hover { background: rgba(255, 255, 255, .08); }
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Hide the header phone on mid-size screens so the nav + CTA always fit */
@media (max-width: 1100px) { .header-phone { display: none; } }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .header-phone { display: none; }
  .header-actions { display: none; } /* CTA moves into the hamburger menu */
  .site-header.is-scrolled { height: var(--header-h); } /* keep menu flush on mobile */
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    margin: 0;
    background: var(--navy-900);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: var(--shadow-lg);
    padding: 1rem var(--gutter) 1.5rem;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s var(--ease), opacity .25s var(--ease), visibility .25s;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; gap: .2rem; }
  .nav__link { padding: .85rem 1rem; font-size: 1.05rem; }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav__link[aria-current="page"] { background: rgba(255, 255, 255, .06); }
  .nav .btn { margin-top: .8rem; }
  .nav__cta-mobile { display: block; }
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 78% -10%, rgba(245, 165, 36, .16), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(30, 67, 104, .55), transparent 55%),
    linear-gradient(160deg, var(--navy-900), var(--navy-950));
  color: var(--on-dark);
  overflow: hidden;
}
.hero::after { /* subtle grid texture */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(800px 500px at 70% 20%, #000, transparent 75%);
          mask-image: radial-gradient(800px 500px at 70% 20%, #000, transparent 75%);
  pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero h1 { color: var(--white); }
.hero .lead { color: var(--on-dark-muted); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

.hero__badges {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.hero__badge { display: inline-flex; align-items: center; gap: .55rem; font-size: .95rem; color: var(--on-dark); }
.hero__badge svg { color: var(--amber-400); flex: none; }

/* Hero visual / image placeholder */
.hero__media {
  position: relative;
  aspect-ratio: 4 / 4.4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: var(--shadow-lg);
}
.hero__floating {
  position: absolute;
  left: -18px; bottom: 26px;
  background: var(--white);
  color: var(--ink-900);
  border-radius: var(--radius);
  padding: .95rem 1.15rem;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: .8rem;
  max-width: 270px;
}
.hero__floating .stars { color: var(--amber-500); font-size: .95rem; letter-spacing: 2px; }
.hero__floating strong { display: block; font-family: var(--font-head); }
.hero__floating span { font-size: .85rem; color: var(--muted-500); }

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { aspect-ratio: 16 / 11; max-width: 560px; }
}

/* ---- Image placeholders ------------------------------------------------
   Swap any element with .img-ph for a real <img> when you have photos.
   ------------------------------------------------------------------------ */
.img-ph {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  min-height: 220px;
  background:
    radial-gradient(120% 120% at 20% 0%, var(--navy-700), var(--navy-900));
  color: var(--on-dark-muted);
  overflow: hidden;
}
.img-ph::before { /* diagonal sheen */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(245, 165, 36, .12) 50%, transparent 60%);
}
.img-ph__label {
  position: relative;
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head); font-size: .82rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .5rem .85rem;
  border: 1px dashed rgba(255, 255, 255, .3);
  border-radius: var(--radius-pill);
}
.img-ph svg { color: rgba(255, 255, 255, .45); }

/* ---- Cards -------------------------------------------------------------- */
.card {
  background: var(--surface-0);
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d4dde8; }

.card__icon {
  display: grid; place-items: center;
  width: 54px; height: 54px;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--navy-700), var(--navy-900));
  color: var(--amber-400);
  margin-bottom: 1.15rem;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-600); font-size: 1rem; }
.card__link {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: 1.1rem; font-weight: 600; font-family: var(--font-head);
  font-size: .95rem;
}
.card__link svg { transition: transform .2s var(--ease); }
.card:hover .card__link svg { transform: translateX(4px); }

/* Service card with hover image zoom (when you add photos) */
.service-card { padding: 0; overflow: hidden; }
.service-card .img-ph { height: 200px; min-height: 200px; transition: transform .4s var(--ease); }
.service-card:hover .img-ph { transform: scale(1.05); }
.service-card__body { padding: 1.6rem 1.75rem 1.9rem; }
.service-card ul { margin-top: 1rem; }
.service-card ul li {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .97rem; color: var(--ink-600);
  padding: .28rem 0;
}
.service-card ul li svg { color: var(--amber-600); flex: none; margin-top: .28rem; }

/* ---- Stat strip --------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { text-align: center; padding: .5rem; }
.stat__num { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.9rem, 1.2rem + 2vw, 2.6rem); color: var(--white); line-height: 1; }
.stat__num span { color: var(--amber-400); }
.stat__label { margin-top: .5rem; font-size: .92rem; color: var(--on-dark-muted); }
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; } }

/* ---- Feature list (Why choose us) -------------------------------------- */
.feature { display: flex; gap: 1rem; }
.feature__icon {
  flex: none;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(245, 165, 36, .14);
  color: var(--amber-600);
}
.feature h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.feature p { font-size: .98rem; }

/* ---- Split (image + text) ---------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.split__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3.2;
}
.split--flip .split__media { order: 2; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
}

/* ---- Process steps ------------------------------------------------------ */
.steps { counter-reset: step; display: grid; gap: 1.25rem; grid-template-columns: repeat(4, 1fr); }
.step { position: relative; padding: 1.75rem; background: var(--surface-0); border: 1px solid var(--line-200); border-radius: var(--radius); }
.step__num {
  counter-increment: step;
  font-family: var(--font-head); font-weight: 700;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy-900); color: var(--amber-400);
  margin-bottom: 1rem;
}
.step__num::before { content: counter(step, decimal-leading-zero); }
.step h3 { font-size: 1.12rem; margin-bottom: .35rem; }
.step p { font-size: .96rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---- Testimonials ------------------------------------------------------- */
.quote {
  background: var(--surface-0);
  border: 1px solid var(--line-200);
  border-radius: var(--radius);
  padding: 1.9rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex; flex-direction: column;
}
.quote .stars { color: var(--amber-500); letter-spacing: 2px; margin-bottom: .9rem; }
.quote blockquote { font-size: 1.05rem; color: var(--ink-700); flex: 1; }
.quote figcaption { margin-top: 1.25rem; display: flex; align-items: center; gap: .8rem; }
.quote__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(150deg, var(--navy-600), var(--navy-900));
  color: var(--amber-400);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700;
}
.quote cite { font-style: normal; font-weight: 600; color: var(--ink-900); display: block; }
.quote figcaption span { font-size: .88rem; color: var(--muted-500); }

/* ---- CTA band ----------------------------------------------------------- */
.cta-band {
  background:
    radial-gradient(700px 360px at 85% 20%, rgba(245, 165, 36, .2), transparent 60%),
    linear-gradient(150deg, var(--navy-800), var(--navy-950));
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--on-dark-muted); max-width: 52ch; margin-inline: auto; }
.cta-band .hero__cta { justify-content: center; }

/* ---- Page hero (interior pages) ---------------------------------------- */
.page-hero {
  background:
    radial-gradient(900px 400px at 80% -20%, rgba(245, 165, 36, .14), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-950));
  color: var(--on-dark);
  padding-block: clamp(3rem, 7vw, 5rem);
  text-align: center;
}
.page-hero h1 { color: var(--white); }
.page-hero p { color: var(--on-dark-muted); max-width: 60ch; margin-inline: auto; }
.breadcrumb { display: flex; gap: .5rem; justify-content: center; font-size: .9rem; color: var(--on-dark-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--on-dark-muted); }
.breadcrumb a:hover { color: var(--amber-400); }

/* ---- Forms -------------------------------------------------------------- */
.form-card {
  background: var(--surface-0);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-md);
}
.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.15rem; }
.field label { font-weight: 600; color: var(--ink-700); font-size: .95rem; }
.field label .req { color: var(--amber-600); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1.5px solid var(--line-200);
  border-radius: var(--radius-sm);
  background: var(--surface-0);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 165, 36, .18);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.form-note { font-size: .88rem; color: var(--muted-500); margin-top: .25rem; }
.form-status {
  display: none;
  margin-top: 1rem; padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: .96rem;
}
.form-status.is-success { display: block; background: rgba(34, 160, 90, .1); color: #157a47; border: 1px solid rgba(34, 160, 90, .3); }
.form-status.is-error { display: block; background: rgba(214, 64, 64, .08); color: #b3261e; border: 1px solid rgba(214, 64, 64, .3); }

/* Contact sidebar */
.contact-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { display: grid; gap: 1.25rem; }
.info-item { display: flex; gap: .9rem; }
.info-item__icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(245, 165, 36, .14); color: var(--amber-600);
}
.info-item h4 { margin-bottom: .15rem; }
.info-item a, .info-item p { color: var(--ink-600); font-size: .98rem; }
.info-item a:hover { color: var(--amber-600); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--navy-950); color: var(--on-dark-muted); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p { font-size: .96rem; max-width: 34ch; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 1.1rem; }
.footer-col ul { display: grid; gap: .65rem; }
.footer-col a { color: var(--on-dark-muted); font-size: .96rem; }
.footer-col a:hover { color: var(--amber-400); }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; font-size: .96rem; margin-bottom: .7rem; }
.footer-contact svg { color: var(--amber-400); flex: none; margin-top: .2rem; }
.footer-social { display: flex; gap: .6rem; margin-top: 1.1rem; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .06); color: var(--on-dark);
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.footer-social a:hover { background: var(--amber-500); color: var(--navy-950); transform: translateY(-2px); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  padding-block: 1.5rem; font-size: .9rem;
}
.footer-bottom a { color: var(--on-dark-muted); }
.footer-bottom a:hover { color: var(--amber-400); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Misc --------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.center-btn { display: flex; justify-content: center; margin-top: 2.5rem; }
