:root {
  color-scheme: light;
}

/* Global page behavior */
html {
  scroll-behavior: smooth;
}

/* Base page background for light mode */
body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
}

/* Contact page side cards and form styling */
.contact-side-card {
  background: #0b0f19;
  color: #ffffff;
}

.contact-side-card h2,
.contact-side-card p {
  color: inherit;
}

.contact-form-panel {
  background: #0b0f19;
  border-color: rgba(15, 23, 42, 0.6);
}

.contact-form-panel h2,
.contact-form-panel label {
  color: #f8fafc;
}

.contact-input {
  background: #e5e7eb;
  border-color: #cbd5f5;
  color: #111827;
}

.contact-input::placeholder {
  color: #4b5563;
}

/* Base page background for dark mode */
.dark body {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 22%),
    linear-gradient(180deg, #000000 0%, #000000 100%);
}

/* Header styling overrides for dark mode */
.dark nav.fixed.top-0 {
  background:
    radial-gradient(circle at 72% 50%, rgba(16, 185, 129, 0.08), transparent 18%),
    linear-gradient(90deg, #06111f 0%, #08192d 48%, #03101d 100%) !important;
  border-bottom-color: rgba(30, 41, 59, 0.9) !important;
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.45);
}

/* Mobile menu and dark section background overrides */
.dark #mobileMenu {
  background:
    linear-gradient(180deg, #06111f 0%, #03101d 100%) !important;
}

.dark #mobileMenu a[href$="solar.html"] {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.14) !important;
}

.dark #mobileMenu a[href$="solar.html"]:hover {
  background: rgba(251, 191, 36, 0.22) !important;
}

.dark #darkToggle,
.dark #darkToggleSm {
  background: rgba(59, 130, 246, 0.14);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.55),
    0 0 18px rgba(59, 130, 246, 0.55);
  color: #e2e8f0 !important;
}

.dark #darkToggle:hover,
.dark #darkToggleSm:hover {
  background: rgba(59, 130, 246, 0.22);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.7),
    0 0 22px rgba(59, 130, 246, 0.7);
}

.dark nav.fixed.top-0 a[data-nav] {
  color: #cbd5e1 !important;
}

.dark nav.fixed.top-0 a[data-nav][href$="solar.html"] {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.16) !important;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.25);
}

.dark nav.fixed.top-0 a[data-nav][href$="solar.html"]:hover {
  background: rgba(251, 191, 36, 0.28) !important;
  color: #fde68a !important;
}

.dark nav.fixed.top-0 a[data-nav]:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.dark nav.fixed.top-0 a.nav-link.text-blue-600.bg-blue-50 {
  color: #e2e8f0 !important;
  background: rgba(30, 64, 175, 0.42) !important;
}

.dark nav.fixed.top-0 .text-slate-900 {
  color: #f8fafc !important;
}

.dark nav.fixed.top-0 .text-slate-500,
.dark nav.fixed.top-0 .text-slate-600 {
  color: #cbd5e1 !important;
}

.dark nav.fixed.top-0 .bg-white {
  background: #f8fafc !important;
}

.dark nav.fixed.top-0 .h-8.w-px,
.dark nav.fixed.top-0 .h-6.w-px {
  background: rgba(148, 163, 184, 0.35) !important;
}

.dark section[class*="bg-slate-50"],
.dark section[class*="bg-white"] {
  background: #000000 !important;
  background-image: none !important;
}

/* Light text for dark full-width content sections */
.dark .dark-copy-light,
.dark .dark-copy-light > .container,
.dark .dark-copy-light .mb-12,
.dark .dark-copy-light .mb-10,
.dark .dark-copy-light .text-center {
  color: #e5e7eb;
}

.dark .dark-copy-light h1,
.dark .dark-copy-light h2,
.dark .dark-copy-light h3,
.dark .dark-copy-light h4,
.dark .dark-copy-light p,
.dark .dark-copy-light li,
.dark .dark-copy-light span {
  color: inherit;
}

.dark .dark-copy-light .text-slate-900,
.dark .dark-copy-light .text-slate-800,
.dark .dark-copy-light .text-slate-700,
.dark .dark-copy-light .text-slate-600,
.dark .dark-copy-light .text-slate-500 {
  color: #e5e7eb !important;
}

.dark .dark-copy-light .bg-blue-100 {
  background: rgba(219, 234, 254, 0.9) !important;
}

.dark .dark-copy-light .text-blue-600 {
  color: #2563eb !important;
}

/* Restore readable dark text inside light-gray cards on dark mode */
.dark .dark-copy-light .section-panel,
.dark .dark-copy-light .section-panel h1,
.dark .dark-copy-light .section-panel h2,
.dark .dark-copy-light .section-panel h3,
.dark .dark-copy-light .section-panel h4,
.dark .dark-copy-light .section-panel p,
.dark .dark-copy-light .section-panel li,
.dark .dark-copy-light .section-panel span,
.dark .dark-copy-light .section-panel label,
.dark .dark-copy-light .photo-frame,
.dark .dark-copy-light .highlight-card,
.dark .dark-copy-light .highlight-card h1,
.dark .dark-copy-light .highlight-card h2,
.dark .dark-copy-light .highlight-card h3,
.dark .dark-copy-light .highlight-card h4,
.dark .dark-copy-light .highlight-card p,
.dark .dark-copy-light .highlight-card li,
.dark .dark-copy-light .highlight-card span {
  color: #0f172a !important;
}

.dark .dark-copy-light .section-panel .text-slate-600,
.dark .dark-copy-light .section-panel .text-slate-500,
.dark .dark-copy-light .section-panel .dark\:text-slate-300,
.dark .dark-copy-light .section-panel .dark\:text-slate-400,
.dark .dark-copy-light .highlight-card .text-slate-600,
.dark .dark-copy-light .highlight-card .text-slate-500,
.dark .dark-copy-light .highlight-card .dark\:text-slate-300,
.dark .dark-copy-light .highlight-card .dark\:text-slate-400 {
  color: #334155 !important;
}

.dark .dark-copy-light button[data-filter] {
  background: #e5e7eb !important;
  color: #334155 !important;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.dark .dark-copy-light button[data-filter]:hover {
  background: #dbe1e8 !important;
  color: #0f172a !important;
}

.dark .dark-copy-light button[data-filter].bg-blue-600,
.dark .dark-copy-light button[data-filter][class*="text-white"] {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

/* Shared click/tap animation */
.btn-press {
  transition: transform 0.15s ease;
}

.btn-press:active {
  transform: scale(0.96);
}

/* Reveal animation used on scroll */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* Reusable hero backgrounds and page visuals */
.hero-cover {
  background-image: url("../../heroimage.jpg");
}

.services-hero-bg,
.projects-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.services-hero-bg {
  background:
    radial-gradient(circle at 15% 25%, rgba(59, 130, 246, 0.22), transparent 26%),
    radial-gradient(circle at 85% 22%, rgba(14, 165, 233, 0.2), transparent 24%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(30, 64, 175, 0.9) 100%);
}

.services-hero-bg::before,
.projects-hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.14) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.34;
}

.services-hero-bg::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -70px;
  bottom: -110px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 46px rgba(255, 255, 255, 0.04),
    0 0 0 92px rgba(255, 255, 255, 0.02);
}

.projects-hero-bg {
  background:
    radial-gradient(circle at 20% 18%, rgba(96, 165, 250, 0.18), transparent 24%),
    radial-gradient(circle at 78% 30%, rgba(37, 99, 235, 0.22), transparent 26%),
    linear-gradient(135deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.88) 48%, rgba(30, 64, 175, 0.78) 100%);
}

.projects-hero-bg::after {
  content: "";
  position: absolute;
  inset: auto 7% 16% auto;
  width: 280px;
  height: 180px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.3);
}

/* Shared panel, card, and layout surfaces */
.site-topbar {
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 55%, #0f172a 100%);
}

.site-nav-shell {
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.dark .site-nav-shell {
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.45);
}

.utility-pill {
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.page-frame {
  position: relative;
}

.page-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 72%);
}

.hero-panel,
.info-panel,
.section-panel,
.cta-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.dark .hero-panel,
.dark .info-panel,
.dark .section-panel,
.dark .cta-panel {
  border-color: rgba(51, 65, 85, 0.8);
  background: #e5e7eb;
  box-shadow: 0 20px 54px rgba(2, 6, 23, 0.45);
}

.hero-panel,
.info-panel,
.section-panel,
.cta-panel,
.feedback-card,
.highlight-card {
  color: #0f172a;
}

.dark .hero-panel,
.dark .info-panel,
.dark .section-panel,
.dark .cta-panel,
.dark .feedback-card,
.dark .highlight-card {
  color: #0f172a;
}

.section-panel h1,
.section-panel h2,
.section-panel h3,
.section-panel h4,
.section-panel p,
.section-panel li,
.section-panel label,
.section-panel span,
.feedback-card h1,
.feedback-card h2,
.feedback-card h3,
.feedback-card h4,
.feedback-card p,
.feedback-card li,
.feedback-card label,
.feedback-card span,
.highlight-card h1,
.highlight-card h2,
.highlight-card h3,
.highlight-card h4,
.highlight-card p,
.highlight-card li,
.highlight-card label,
.highlight-card span {
  color: inherit;
}

.section-panel input,
.section-panel textarea,
.section-panel select,
.feedback-card input,
.feedback-card textarea,
.feedback-card select {
  color: #0f172a;
}

.dark .section-panel input,
.dark .section-panel textarea,
.dark .section-panel select,
.dark .feedback-card input,
.dark .feedback-card textarea,
.dark .feedback-card select {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.55);
}

.section-panel input::placeholder,
.section-panel textarea::placeholder,
.feedback-card input::placeholder,
.feedback-card textarea::placeholder {
  color: #64748b;
}

.dark .section-panel input::placeholder,
.dark .section-panel textarea::placeholder,
.dark .feedback-card input::placeholder,
.dark .feedback-card textarea::placeholder {
  color: #64748b;
}

.hero-stat {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-badge {
  letter-spacing: 0.16em;
}

.hero-heading {
  line-height: 1.02;
}

.hero-kicker-line {
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #f59e0b);
}

.page-hero {
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 28%),
    radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.12), transparent 22%);
  pointer-events: none;
}

.official-card {
  position: relative;
  overflow: hidden;
}

.official-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #0f172a);
}

.dark .official-card::after {
  background: linear-gradient(90deg, #60a5fa, #f59e0b);
}

.section-eyebrow {
  letter-spacing: 0.18em;
}

.photo-frame {
  position: relative;
}

.photo-frame::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 28px;
  z-index: 0;
}

.dark .photo-frame::before {
  border-color: rgba(96, 165, 250, 0.2);
}

.photo-frame > * {
  position: relative;
  z-index: 1;
}

.cta-band {
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #0f172a 100%);
}

.dark .cta-band {
  background: linear-gradient(135deg, #020617 0%, #1e40af 52%, #020617 100%);
}

.contact-strip {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.74);
}

.dark .contact-strip {
  border-color: rgba(51, 65, 85, 0.8);
  background: rgba(15, 23, 42, 0.74);
}

/* Highlight card image overlays */
.highlight-card::before,
.project-backdrop::before,
.solar-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
}

.highlight-card {
  position: relative;
  overflow: hidden;
}

.highlight-card > * {
  position: relative;
  z-index: 1;
}

.highlight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.12));
  pointer-events: none;
}

.dark .highlight-card::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.24));
}

.highlight-card h2,
.highlight-card h3,
.highlight-card p,
.highlight-card span {
  color: inherit;
}

.highlight-card-residential::before {
  background-image: url("../../assets/residential.png");
  opacity: 0.42;
}

.highlight-card-commercial::before {
  background-image: url("../../assets/Commercial.png");
  opacity: 0.52;
}

.highlight-card-emergency::before {
  background-image: url("../../Gemini_Generated_Image_zd2iyvzd2iyvzd2i.png");
  opacity: 0.4;
}

/* Solar teaser animation styles */
.solar-teaser-container {
  position: relative;
  background-size: 200% 200%;
  animation: solarGradient 10s ease-in-out infinite;
}

.solar-teaser-container::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -12%;
  top: -12%;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 60%);
  filter: blur(14px);
  opacity: 0.6;
  animation: glowFloat 4s ease-in-out infinite;
  pointer-events: none;
}

.solar-badge {
  animation: badgeFloat 3s ease-in-out infinite;
}

.solar-icon-spin svg,
.solar-icon-spin [data-lucide="sun"] {
  animation: slowSpin 10s linear infinite;
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

.solar-teaser-button {
  position: relative;
  overflow: hidden;
}

.solar-teaser-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
  transform: translateX(-120%);
  animation: sheen 2.5s ease-in-out infinite;
  pointer-events: none;
}

/* Project and solar section decorative layers */
.project-backdrop {
  position: relative;
  isolation: isolate;
}

.project-backdrop::before {
  background-image: url("../../assets/projects.png");
  opacity: 0.18;
}

.solar-hero {
  position: relative;
  overflow: hidden;
}

.solar-hero::before {
  background:
    radial-gradient(60% 60% at 80% 20%, rgba(234, 179, 8, 0.25), transparent 55%),
    radial-gradient(40% 40% at 20% 80%, rgba(249, 115, 22, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 1));
  background-size: 200% 200%;
  animation: solarGradient 18s ease-in-out infinite;
}

.hero-overlay {
  background: linear-gradient(to bottom, transparent, rgb(15 23 42));
}

.dark .hero-overlay {
  background: linear-gradient(to bottom, transparent, rgb(0 0 0));
}

/* Feedback cards and form surfaces */
.dynamic-card {
  min-height: 100%;
}

.project-card-label {
  letter-spacing: 0.18em;
}

.lightbox-open {
  overflow: hidden;
}

.feedback-card {
  min-height: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.feedback-card .font-bold {
  color: #0f172a;
}

.feedback-card .text-yellow-400 {
  font-size: 1.25rem;
}

.dark .feedback-card {
  border-color: rgba(148, 163, 184, 0.4);
  background: #e5e7eb;
  box-shadow: 0 20px 54px rgba(2, 6, 23, 0.45);
}

.dark .feedback-card,
.dark .feedback-card h1,
.dark .feedback-card h2,
.dark .feedback-card h3,
.dark .feedback-card h4,
.dark .feedback-card p,
.dark .feedback-card li,
.dark .feedback-card span,
.dark .feedback-card div {
  color: #0f172a !important;
}

.dark .feedback-card .text-blue-600,
.dark .feedback-card .dark\:text-blue-400 {
  color: #2563eb !important;
}

.dark .feedback-card .text-yellow-400 {
  color: #eab308 !important;
}

#ratingStars .star {
  font-size: 1.35rem;
}

#feedbackForm input,
#feedbackForm textarea {
  background: #ffffff !important;
  color: #111827 !important;
}

#feedbackForm input::placeholder,
#feedbackForm textarea::placeholder {
  color: #6b7280 !important;
}

.feedback-more-button {
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: rgba(255, 255, 255, 0.8);
  color: #0f172a;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.feedback-more-button:hover {
  background: rgba(239, 246, 255, 0.92);
}

.dark .feedback-more-button {
  border-color: rgba(148, 163, 184, 0.55);
  background: #e5e7eb;
  color: #0f172a;
}

.dark .feedback-more-button:hover {
  background: #dbe1e8;
}

.theme-surface,
.theme-surface p,
.theme-surface label,
.theme-surface input,
.theme-surface textarea,
.theme-surface select,
.theme-surface option,
.theme-surface button:not(.bg-blue-600):not(.bg-slate-900):not(.bg-red-600) {
  color: #0f172a;
}

.dark .theme-surface,
.dark .theme-surface p,
.dark .theme-surface label,
.dark .theme-surface input,
.dark .theme-surface textarea,
.dark .theme-surface select,
.dark .theme-surface option,
.dark .theme-surface button:not(.bg-blue-600):not(.bg-slate-900):not(.bg-red-600) {
  color: #0f172a;
}

.dark .theme-surface .text-slate-900,
.dark .theme-surface .text-slate-800,
.dark .theme-surface .text-slate-700,
.dark .theme-surface .text-slate-600,
.dark .theme-surface .text-slate-500,
.dark .theme-surface .dark\:text-slate-200,
.dark .theme-surface .dark\:text-slate-300,
.dark .theme-surface .dark\:text-slate-400 {
  color: #0f172a !important;
}

.dark .theme-surface input,
.dark .theme-surface textarea,
.dark .theme-surface select {
  background: #f8fafc !important;
  color: #0f172a !important;
}

.dark .theme-surface input::placeholder,
.dark .theme-surface textarea::placeholder {
  color: #64748b !important;
}

/* Reusable animations */
@keyframes solarGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes slowSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes badgeFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes sheen {
  0% {
    transform: translateX(-120%);
  }

  60%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes glowFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-50px);
  }
}
