/* ------------------------------
  Watson Electrician — Styles
---------------------------------*/

/* DARK MODE = default (matches your current design) */
:root{
  color-scheme: dark;

  --bg: #0b0d12;
  --surface: #121621;
  --muted: #a4acb9;
  --text: #eaf1ff;

  --brand: #ffd200; /* electrician yellow */
  --brand-ink: #0b0d12;
  --accent: #1f8cff;

  --radius: 14px;
  --maxw: 1120px;
  --shadow: 0 10px 30px rgba(0,0,0,.25);

  /* NEW: theme helpers */
  --border: rgba(255,255,255,.10);
  --border-soft: rgba(255,255,255,.06);
  --header-bg: rgba(11,13,18,.8);
  --footer-bg: var(--bg);
  --hover-bg: rgba(255,255,255,.04);
  --hover-border: rgba(255,255,255,.12);

  --input-bg: #0f1421;
  --input-border: rgba(255,255,255,.12);

  --parallax-scrim: rgba(11,13,18,.7);
  --hero-scrim: rgba(11,13,18,.45);

  /* Motion tokens */
  --parallax-strength: 0.12;
  --reveal-distance: 18px;
  --reveal-duration: 0.6s;
  --reveal-ease: cubic-bezier(0.19, 1, 0.22, 1);
}

/* LIGHT MODE override */
:root[data-theme="light"]{
  color-scheme: light;

  --bg: #f7f9fc;
  --surface: #ffffff;
  --muted: #5a6474;
  --text: #0b0d12;

  --brand: #ffd200;
  --brand-ink: #0b0d12;
  --accent: #126bff;

  --shadow: 0 10px 30px rgba(0,0,0,.10);

  --border: rgba(11,13,18,.14);
  --border-soft: rgba(11,13,18,.08);
  --header-bg: rgba(247,249,252,.78);
  --footer-bg: #f2f5fb;
  --hover-bg: rgba(11,13,18,.04);
  --hover-border: rgba(11,13,18,.14);

  --input-bg: #ffffff;
  --input-border: rgba(11,13,18,.18);

  --parallax-scrim: rgba(11,13,18,.45);
  --hero-scrim: rgba(11,13,18,.30);
}

/* Respect users who prefer reduced motion (but keep hero animation alive) */
@media (prefers-reduced-motion: reduce) {
  :root{
    --parallax-strength: 0;
    --reveal-distance: 0;
    --reveal-duration: 0.01ms;
  }
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
}

.container{width:min(100% - 32px, var(--maxw)); margin-inline:auto}

.skip-link{
  position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;
}
.skip-link:focus{
  position:static;width:auto;height:auto;
  background:#fff;color:#000;
  padding:.5rem 1rem;z-index:1000
}

.site-header{
  position:sticky; top:0; z-index:50;
  background:var(--header-bg); backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border-soft);
}
.nav-wrap{display:flex; align-items:center; justify-content:space-between; padding:14px 0}
.logo{
  display:flex; align-items:center; gap:.6rem;
  color:var(--text); text-decoration:none; font-weight:700; letter-spacing:.2px
}
.logo svg{fill:var(--brand)}
.nav__toggle{display:none}

.nav__list{display:flex; gap:1rem; list-style:none; margin:0; padding:0}
.nav__link{
  color:var(--text); text-decoration:none; padding:.5rem .9rem; border-radius:999px;
  border:1px solid transparent;
}
.nav__link:hover{border-color:var(--hover-border); background:var(--hover-bg)}

/* NEW: Theme toggle button (fits your nav style) */
.theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.5rem .75rem;
  border-radius:999px;
  border:1px solid var(--hover-border);
  background:transparent;
  color:var(--text);
  font-weight:700;
  cursor:pointer;
}
.theme-toggle:hover{background:var(--hover-bg)}
.theme-toggle__icon{font-size:1rem; line-height:1}
.theme-toggle__text{font-size:.95rem}

/* Makes the toggle align nicely inside the nav list */
.nav__item--theme{display:flex; align-items:center}

.hero{
  min-height:88svh;
  display:grid; place-items:center;
  text-align:center;
  position:relative;
  isolation:isolate;
}

/* Electric hero over the parallax image */
.hero.hero--electric{
  position:relative;
  overflow:hidden; /* keep glow edges contained */
  z-index:0; /* base layer */
}

.hero.hero--electric::before,
.hero.hero--electric::after{
  content:"";
  position:absolute;
  inset:-30%;
  pointer-events:none;
  z-index:1; /* ABOVE the background image, BELOW scrim + content */
}

/* Soft electric glows (yellow + blue) */
.hero.hero--electric::before{
  background:
    radial-gradient(circle at 30% 20%, rgba(255,210,0,.45), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(31,140,255,.40), transparent 60%);
  opacity:0.85;
  mix-blend-mode:screen;
  animation: electricGlowDrift 16s ease-in-out infinite;
}

/* Light mode: screen blend can look too bright; soften it */
:root[data-theme="light"] .hero.hero--electric::before{
  opacity:0.55;
}

/* Subtle grid / wiring pattern */
.hero.hero--electric::after{
  background-image:
    linear-gradient(transparent 0 96%, rgba(255,255,255,.18) 100%),
    linear-gradient(90deg, transparent 0 96%, rgba(255,255,255,.18) 100%);
  background-size: 40px 40px, 40px 40px;
  opacity:0.2;
  mix-blend-mode:soft-light;
  animation: electricGridShift 26s linear infinite;
}
:root[data-theme="light"] .hero.hero--electric::after{
  opacity:0.12;
}

/* Parallax content layer (hero text) */
.hero__content{
  position:relative;
  z-index:3; /* on top of scrim + glow */
  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}

.headline{
  font-size:clamp(2rem, 4vw + 1rem, 3.5rem);
  line-height:1.1; margin:0 0 .6rem
}
.subhead{
  font-size:clamp(1rem, .7vw + .9rem, 1.25rem);
  margin:0 0 1.25rem; color:var(--muted)
}
.cta-group{display:flex; gap:.8rem; justify-content:center; flex-wrap:wrap}

.btn{
  display:inline-block; text-decoration:none; font-weight:700;
  padding:.9rem 1.2rem; border-radius:12px; border:1px solid transparent;
}
.btn--primary{background:var(--brand); color:var(--brand-ink)}
.btn--primary:hover{filter:brightness(.95)}
.btn--ghost{border-color:var(--border); color:var(--text)}
.btn--ghost:hover{background:var(--hover-bg)}

/* Parallax backgrounds */
.parallax{
  background-position:center;
  background-size:cover;
  background-attachment: fixed;
  position:relative;
}
.parallax::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(to top, var(--parallax-scrim), transparent 30%);
}
.parallax--one{
  background-image:
    linear-gradient(180deg, rgba(16,20,30,.35), rgba(16,20,30,.35)),
    url('../img/hero-electric.jpg');
}
.parallax--two{
  background-image:
    linear-gradient(180deg, rgba(16,20,30,.2), rgba(16,20,30,.2)),
    url('../img/wires.jpg');
  min-height:40svh
}
.parallax--three{
  background-image:
    linear-gradient(180deg, rgba(16,20,30,.2), rgba(16,20,30,.2)),
    url('../img/city.jpg');
  min-height:40svh
}

/* Darker scrim so text stays clean over motion/glow */
.hero__scrim{
  position:absolute; inset:0;
  background:radial-gradient(60% 60% at 50% 40%, var(--hero-scrim), transparent 60%);
  z-index:2; /* ABOVE glows, BELOW text */
}

.section{padding: clamp(2rem, 4vw, 4rem) 0}
.trust{
  background:linear-gradient(180deg, rgba(255,210,0,.06), transparent)
}
.trust__inner{
  display:flex; align-items:center; justify-content:center;
  gap:.8rem; flex-wrap:wrap; color:var(--muted);
}
.trust__dot{
  width:6px; height:6px; border-radius:999px;
  background:rgba(255,255,255,.25)
}
:root[data-theme="light"] .trust__dot{
  background:rgba(11,13,18,.25);
}

.section__title{
  font-size:clamp(1.6rem, 2.5vw + .6rem, 2.2rem);
  margin:0 0 .25rem
}
.section__subtitle{color:var(--muted); margin:0 0 1.6rem}

.grid{display:grid; gap:1rem}
.services__grid{grid-template-columns: repeat(4, minmax(0, 1fr))}
.card{
  background:var(--surface);
  border:1px solid var(--border-soft);
  border-radius:var(--radius);
  padding:1.2rem;
  box-shadow: var(--shadow);
}
.card__icon{font-size:1.6rem}

.split{
  display:grid; grid-template-columns: 1.1fr .9fr;
  gap:2rem; align-items:center
}
.split__media svg{width:100%; height:auto; color:var(--accent)}
.checklist{padding-left:1.1rem}
.checklist li{margin:.25rem 0}
.about .btn{margin-top:.6rem}

/* Parallax overlay content (secondary sections) */
.parallax__overlay{
  position:relative; z-index:1;
  display:grid; place-items:center;
  min-height:40svh; text-align:center;

  transform: translateY(var(--parallax-y, 0));
  will-change: transform;
}
.parallax__overlay h2{margin:0}

.form{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:1.2rem;
  box-shadow:var(--shadow);
  max-width:720px;
}
.form__row{display:flex; flex-direction:column; gap:.4rem; margin-bottom:1rem}
.form__row--inline{flex-direction:row; align-items:center; gap:.6rem}
.form__row input,
.form__row textarea{
  width:100%; padding:.9rem 1rem;
  border-radius:10px; border:1px solid var(--input-border);
  background:var(--input-bg); color:var(--text);
}
.form__note{color:var(--muted); font-size:.9rem}

.site-footer{
  border-top:1px solid var(--border-soft);
  padding:2rem 0; background:var(--footer-bg);
}
.footer__grid{
  display:flex; align-items:center; justify-content:space-between;
  gap:1rem; flex-wrap:wrap
}
.footer__brand{
  display:flex; align-items:center; gap:.5rem; font-weight:700
}
.footer__brand svg{fill:var(--brand)}
.footer__menu{display:flex; gap:1rem}
.footer__menu a{color:var(--muted); text-decoration:none}
.footer__menu a:hover{color:var(--text)}

.muted{color:var(--muted)}

/* Reveal on scroll (hooked to JS adding .is-visible) */
.reveal{
  opacity:0;
  transform: translateY(var(--reveal-distance));
  will-change: transform, opacity;
  transition:
    opacity var(--reveal-duration) var(--reveal-ease),
    transform var(--reveal-duration) var(--reveal-ease);
}
.reveal.is-visible{
  opacity:1;
  transform:none;
}

/* Electric hero keyframes */
@keyframes electricGlowDrift{
  0%{
    transform:translate3d(-20px, 16px, 0) scale(1);
  }
  50%{
    transform:translate3d(18px, -20px, 0) scale(1.06);
  }
  100%{
    transform:translate3d(-20px, 16px, 0) scale(1);
  }
}

@keyframes electricGridShift{
  0%{
    transform:translate3d(0, 0, 0);
  }
  100%{
    transform:translate3d(-60px, -40px, 0);
  }
}

/* Responsive */
@media (max-width: 960px){
  .services__grid{grid-template-columns: repeat(2, minmax(0, 1fr))}
  .split{grid-template-columns: 1fr}
}

@media (max-width: 560px){
  .nav__toggle{
    display:inline-flex; align-items:center; justify-content:center;
    padding:.5rem .75rem;
    border:1px solid var(--hover-border);
    background:transparent; color:var(--text);
    border-radius:8px
  }
  .nav__list{
    display:none;
    position:absolute; right:16px; top:56px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:10px;
    padding:.5rem;
    flex-direction:column; gap:.25rem;
    width:min(80vw, 260px)
  }
  .nav__list.is-open{display:flex}

  /* Fix for mobile: no background-attachment: fixed */
  .parallax{background-attachment: scroll;}

  /* Make theme toggle full-width on mobile dropdown */
  .nav__item--theme{margin-top:.25rem}
  .theme-toggle{width:100%; justify-content:center}
}