/* ===========================================================
   Dermot Ryan Electrical — clean rebuild
   No build step, no GSAP ScrollTrigger pinning, no SVG filters.
   Scroll reveals use IntersectionObserver + CSS transitions only.
   =========================================================== */

:root {
  --navy: #0B0F17;
  --navy-light: #141B26;
  --navy-lighter: #1C2530;
  --orange: #FF6A00;
  --orange-light: #FF8533;
  --white: #FFFFFF;
  --muted: #B8C0CC;
  --border: rgba(255,255,255,0.1);

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --contact-bar-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: var(--contact-bar-h);
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--orange);
  color: var(--navy);
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  z-index: 2000;
  transition: top 0.2s var(--ease-out-expo);
}
.skip-link:focus {
  top: 1rem;
}

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

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.75rem;
}

.headline-xl {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  font-size: clamp(36px, 5.5vw, 76px);
  line-height: 0.95;
  margin-bottom: 1.25rem;
}

.headline-lg {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.body-text {
  font-weight: 400;
  color: var(--muted);
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.6;
  max-width: 46ch;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-block;
  border-radius: 6px;
  background: var(--orange);
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  color: var(--navy);
  transition: transform 0.2s var(--ease-out-expo), background 0.2s var(--ease-out-expo);
}
.btn-primary:hover {
  transform: scale(1.02);
  background: var(--orange-light);
}

.btn-secondary {
  display: inline-block;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 0.85rem 1.75rem;
  font-weight: 500;
  color: var(--white);
  transition: border-color 0.2s var(--ease-out-expo), background 0.2s var(--ease-out-expo);
}
.btn-secondary:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11,15,23,0.5);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease-out-expo), border-color 0.3s var(--ease-out-expo), backdrop-filter 0.3s var(--ease-out-expo);
}
.nav.scrolled {
  background: rgba(11,15,23,0.95);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 7vw;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s var(--ease-out-expo);
}
.nav-links a:hover { color: var(--orange); }

.nav-cta { flex-shrink: 0; padding: 0.6rem 1.25rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 0.5rem;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out-expo), opacity 0.25s var(--ease-out-expo);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 0 7vw 1.5rem;
  background: rgba(11,15,23,0.98);
}
.mobile-menu a { padding: 0.5rem 0; font-size: 1.05rem; }
.mobile-menu .btn-primary { text-align: center; margin-top: 0.5rem; }
.mobile-menu.open { display: flex; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,15,23,0.92) 0%, rgba(11,15,23,0.75) 45%, rgba(11,15,23,0.35) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 8rem 7vw 6rem;
  max-width: 640px;
}
.hero-sub { margin-bottom: 2rem; }
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.hero-trust {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* ---------- Feature sections (Solar / EV / Heat Pump / General Electrical) ----------
   Each is a full-bleed cinematic section like the original build, but the
   scroll effect is a simple reveal-on-enter (IntersectionObserver + CSS
   transform/opacity) instead of GSAP pin/scrub — same visual drama, no
   scroll-jacking, no fake extra scroll distance. */
.feature {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.feature-bg { position: absolute; inset: 0; z-index: 0; }
.feature-bg img { width: 100%; height: 100%; object-fit: cover; }
.feature-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(11,15,23,0.88) 0%, rgba(11,15,23,0.55) 50%, rgba(11,15,23,0.25) 100%);
}
.feature-content {
  position: relative;
  z-index: 1;
  padding: 6rem 7vw;
  max-width: 900px;
  min-width: 0;
}
.feature-headline .line {
  display: block;
}
@media (min-width: 641px) {
  .feature-headline .line { white-space: nowrap; }
}
.feature-content .btn-primary { margin-top: 1.5rem; }
.feature-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}

.icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
  color: var(--orange);
}
/* Icons sitting on an orange button need to stay dark, or they'd vanish */
.btn-primary .icon {
  color: var(--navy);
}

.feature-list--icons li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.feature-headline { text-align: left; }

.tag-pills {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tag-pill {
  font-size: 0.85rem;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255,255,255,0.9);
}
.tag-pill .icon { color: var(--orange); }

/* ---------- Services ---------- */
.services {
  padding: 6rem 7vw;
  max-width: 1400px;
  margin: 0 auto;
}
.section-head { margin-bottom: 3rem; text-align: center; }
.section-head .headline-lg { margin-bottom: 0; }
.section-head-sub { max-width: 42ch; margin: 1rem auto 0; text-align: center; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-card {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 1.5rem;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(255,106,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.service-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- Coverage ---------- */
.coverage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: 6rem 7vw;
  max-width: 1400px;
  margin: 0 auto;
}
.coverage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.coverage-list li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  color: rgba(255,255,255,0.8);
}
.coverage-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}
.info-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(255,106,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.info-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.info-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.info-value a { color: var(--white); }
.info-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* ---------- Reviews ---------- */
.reviews {
  padding: 6rem 7vw;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
  text-align: left;
}
.review-card {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
}
.stars {
  color: var(--orange);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.review-card p {
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}
.review-card footer {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}
.reviews-cta {
  margin-top: 2.5rem;
  color: var(--orange);
  font-weight: 600;
}

/* ---------- FAQ ---------- */
.faq {
  padding: 6rem 7vw;
  max-width: 900px;
  margin: 0 auto;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-item {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
}
.faq-chevron {
  flex-shrink: 0;
  color: var(--orange);
  transition: transform 0.3s var(--ease-out-expo);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-out-expo);
}
.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ---------- Why us ---------- */
.why-us {
  padding: 6rem 7vw;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.why-us-divider {
  width: 60px;
  height: 2px;
  background: var(--orange);
  margin: 1.5rem auto 0;
}
.why-us-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
}
.why-us-card {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem;
}
.why-us-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(255,106,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}
.why-us-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.why-us-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* ---------- Contact ---------- */
.contact {
  position: relative;
  overflow: hidden;
}
.contact-bg { position: absolute; inset: 0; z-index: 0; }
.contact-bg img { width: 100%; height: 100%; object-fit: cover; }
.contact-scrim { position: absolute; inset: 0; background: rgba(11,15,23,0.9); }
.contact-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 6rem 7vw;
  align-items: start;
}
.contact-response {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.contact-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}
.next-steps {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}
.next-steps-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  color: var(--orange);
}
.next-steps-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  list-style: none;
}
.next-steps-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.next-steps-list strong { display: block; margin-bottom: 0.15rem; }
.next-steps-list li span:last-child {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}
.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,106,0,0.15);
  color: var(--orange);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark, #070A10);
  border-top: 1px solid var(--border);
  padding: 4rem 7vw 2rem;
}
.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand .nav-logo { margin-bottom: 1rem; }
.footer-brand .body-text { max-width: 32ch; margin-bottom: 1rem; }
.footer-address { font-size: 0.85rem; color: var(--muted); }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
  transition: color 0.2s var(--ease-out-expo);
}
.footer-col a:hover { color: var(--orange); }
.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.footer-brand-link { color: var(--orange); }

.contact-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--contact-bar-h);
  background: rgba(11,15,23,0.98);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7vw;
  gap: 1rem;
}
.contact-bar-item {
  font-size: 0.85rem;
  color: var(--orange);
  white-space: nowrap;
}
.contact-bar-item strong { color: var(--orange); }
.contact-bar-cta { padding: 0.55rem 1.25rem; font-size: 0.9rem; }

/* ---------- Scroll reveal (IntersectionObserver driven) ---------- */
.reveal {
  opacity: 0;
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
  will-change: opacity, transform;
}
.reveal[data-reveal="up"]    { transform: translateY(28px); }
.reveal[data-reveal="left"]  { transform: translateX(-28px); }
.reveal[data-reveal="right"] { transform: translateX(28px); }

.reveal[data-stagger="1"] { transition-delay: 0.05s; }
.reveal[data-stagger="2"] { transition-delay: 0.15s; }
.reveal[data-stagger="3"] { transition-delay: 0.25s; }

.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Once revealed, drop will-change so we're not holding compositing layers forever */
.reveal.reveal-settled {
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal[data-reveal] {
    transition: opacity 0.3s linear !important;
    transform: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .coverage { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .why-us-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .feature-content { padding: 5rem 6vw; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-content { padding: 7rem 6vw 4rem; }
  .headline-xl { font-size: clamp(28px, 8vw, 44px); }
  .headline-lg { font-size: clamp(24px, 6vw, 32px); }
  .body-text { font-size: 15px; }
  .contact-bar { flex-wrap: wrap; height: auto; padding: 0.6rem 5vw; gap: 0.5rem; }
  .contact-bar-item:last-child { display: none; }
  body { padding-bottom: 68px; }
}
