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

html, body {
  overflow-x: hidden;
  background: #000;
}

/* ── Preloader ── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 24px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-percent {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
}

/* ══════════════════════════════════════════════ */
/* TRANSPARENT NAVBAR                            */
/* ══════════════════════════════════════════════ */
.site-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2.5rem;
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
}

.site-navbar.scrolled {
  background: rgba(2, 25, 54, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.nav-brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.08em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fed65b;
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-menu a:hover {
  color: #fff;
}

.nav-menu a:hover::after {
  width: 100%;
}

/* ══════════════════════════════════════════════ */
/* SCROLL ANIMATION                              */
/* ══════════════════════════════════════════════ */
#scroll-spacer {
  height: 200vh;
  position: relative;
  z-index: 1;
  background: transparent;
  pointer-events: none;
}

#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  display: block;
  pointer-events: none;
  background: #000; /* Prevent grey flash while frames load */
}

/* ── Hero text overlay ── */
.hero-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  text-align: center;
  transition: opacity 0.15s ease-out;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 50%, transparent 75%);
}

.hero-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 88px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.06em;
  line-height: 1.05;
  margin: 0;
  text-shadow:
    0 2px 10px rgba(0,0,0,0.8),
    0 8px 40px rgba(0,0,0,0.5),
    0 0 120px rgba(0,0,0,0.3);
}

.hero-subheading {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  letter-spacing: 0.3em;
  margin-top: 18px;
  text-transform: uppercase;
  text-shadow:
    0 1px 8px rgba(0,0,0,0.7),
    0 4px 20px rgba(0,0,0,0.4);
  background: rgba(0,0,0,0.3);
  padding: 8px 24px;
  border-radius: 40px;
  backdrop-filter: blur(4px);
}

#canvas.hidden-canvas {
  visibility: hidden;
  opacity: 0;
}

.hero-overlay.hidden-canvas {
  visibility: hidden;
  opacity: 0;
}

/* ── Scroll Down Indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.8;
  transition: opacity 0.5s ease;
}

.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-indicator-text {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-indicator-arrow {
  width: 26px;
  height: 26px;
  border-right: 2px solid rgba(255,255,255,0.8);
  border-bottom: 2px solid rgba(255,255,255,0.8);
  transform: rotate(45deg);
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ══════════════════════════════════════════════ */
/* MAIN CONTENT STYLING                          */
/* ══════════════════════════════════════════════ */
main, footer {
  position: relative;
  z-index: 10;
  background: #fff;
}
footer {
  background: #000;
}

/* ══════════════════════════════════════════════ */
/* GALLERY MASONRY GRID                          */
/* ══════════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 250px;
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item.gallery-tall {
  grid-row: span 2;
}

.gallery-item.gallery-wide {
  grid-column: span 2;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,25,54,0.7) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* ══════════════════════════════════════════════ */
/* OUR BRANDS SECTION                            */
/* ══════════════════════════════════════════════ */
.brands-section {
  padding: 100px 0 120px;
  background: #021936;
  position: relative;
  overflow: hidden;
}

.brands-section::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(254, 214, 91, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.brands-section::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(180, 199, 237, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Section Header ── */
.brands-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 72px;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

.brands-tag {
  display: inline-block;
  padding: 8px 24px;
  background: rgba(254, 214, 91, 0.1);
  border: 1px solid rgba(254, 214, 91, 0.2);
  color: #fed65b;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  border-radius: 40px;
  margin-bottom: 24px;
}

.brands-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.brands-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.brands-divider {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}

.brands-divider span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(254, 214, 91, 0.4);
}

.brands-divider span:nth-child(2) {
  width: 32px;
  border-radius: 4px;
  background: #fed65b;
}

/* ── Brands Grid ── */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

/* ── Brand Card ── */
.brand-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 520px;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.brand-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(254, 214, 91, 0.15);
}

/* ── Card Image ── */
.brand-card-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.brand-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.brand-card:hover .brand-card-image img {
  transform: scale(1.08);
}

.brand-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(2, 25, 54, 0.15) 0%,
    rgba(2, 25, 54, 0.5) 35%,
    rgba(2, 25, 54, 0.88) 65%,
    rgba(2, 25, 54, 0.96) 100%
  );
  transition: background 0.5s ease;
}

.brand-card:hover .brand-card-overlay {
  background: linear-gradient(
    180deg,
    rgba(2, 25, 54, 0.1) 0%,
    rgba(2, 25, 54, 0.4) 30%,
    rgba(2, 25, 54, 0.85) 60%,
    rgba(2, 25, 54, 0.95) 100%
  );
}

/* ── Badge ── */
.brand-card-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(254, 214, 91, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(254, 214, 91, 0.3);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.brand-card:hover .brand-card-badge {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 24px rgba(254, 214, 91, 0.5);
}

.badge-years {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #021936;
  line-height: 1;
}

.badge-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #021936;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1;
  margin-top: 2px;
}

.brand-card-badge.badge-green {
  background: rgba(34, 197, 94, 0.9);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.brand-card:hover .brand-card-badge.badge-green {
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5);
}

.badge-green .badge-years,
.badge-green .badge-label {
  color: #fff;
}

/* ── Card Content ── */
.brand-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

/* ── Card Icon ── */
.brand-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(254, 214, 91, 0.15);
  border: 1px solid rgba(254, 214, 91, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.brand-card-icon .material-symbols-outlined {
  font-size: 26px;
  color: #fed65b;
}

.brand-card:hover .brand-card-icon {
  background: rgba(254, 214, 91, 0.25);
  transform: scale(1.05);
}

.brand-card-icon.icon-green {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.25);
}

.brand-card-icon.icon-green .material-symbols-outlined {
  color: #22c55e;
}

.brand-card:hover .brand-card-icon.icon-green {
  background: rgba(34, 197, 94, 0.25);
}

/* ── Card Name & Short ── */
.brand-card-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.2;
}

.brand-card-short {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #fed65b;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-block;
}

#brand-solar .brand-card-short {
  color: #22c55e;
}

/* ── Card Description ── */
.brand-card-desc {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.brand-card:hover .brand-card-desc {
  color: rgba(255, 255, 255, 0.75);
}

/* ── Card Stats ── */
.brand-card-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.brand-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  backdrop-filter: blur(4px);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.brand-card:hover .brand-stat {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.brand-stat .material-symbols-outlined {
  font-size: 16px;
  color: rgba(254, 214, 91, 0.8);
}

.brand-stat span:last-child {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.03em;
}

#brand-solar .brand-stat .material-symbols-outlined {
  color: rgba(34, 197, 94, 0.8);
}

/* ── Card CTA ── */
.brand-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fed65b;
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: gap 0.3s ease, color 0.3s ease;
}

.brand-card-cta .material-symbols-outlined {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.brand-card:hover .brand-card-cta {
  gap: 14px;
}

.brand-card:hover .brand-card-cta .material-symbols-outlined {
  transform: translateX(4px);
}

#brand-solar .brand-card-cta {
  color: #22c55e;
}

/* ══════════════════════════════════════════════ */
/* REVIEW CARDS                                  */
/* ══════════════════════════════════════════════ */
.review-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 4px 24px rgba(26, 46, 76, 0.06);
  transition: all 0.4s ease;
}

.review-card:hover {
  box-shadow: 0 16px 48px rgba(26, 46, 76, 0.12);
  transform: translateY(-4px);
}

/* ══════════════════════════════════════════════ */
/* OUR CLIENTS MARQUEE                           */
/* ══════════════════════════════════════════════ */
.clients-marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
  padding: 16px 0;
}

.clients-marquee-container::before,
.clients-marquee-container::after {
  content: "";
  position: absolute;
  top: 0;
  width: 150px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.clients-marquee-container::before {
  left: 0;
  background: linear-gradient(to right, #ffffff, transparent);
}

.clients-marquee-container::after {
  right: 0;
  background: linear-gradient(to left, #ffffff, transparent);
}

.clients-marquee {
  display: inline-flex;
  animation: scroll-marquee 40s linear infinite;
  gap: 40px;
  align-items: center;
}

.client-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #021936;
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  padding: 0 16px;
}

.client-logo:hover {
  opacity: 1;
  transform: scale(1.05);
  color: #fed65b;
}

@keyframes scroll-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════ */
/* RESPONSIVE                                    */
/* ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .brands-grid .brand-card:last-child {
    grid-column: span 2;
    max-width: 600px;
    justify-self: center;
    width: 100%;
  }
  .brands-title {
    font-size: 40px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
  }
  .gallery-item.gallery-tall {
    grid-row: span 2;
  }
}

@media (max-width: 768px) {
  .site-navbar {
    padding: 0.8rem 1rem;
  }
  .nav-menu {
    gap: 0.8rem;
  }
  .nav-menu a {
    font-size: 0.65rem;
  }
  .hero-heading {
    font-size: 48px;
  }
  .hero-subheading {
    font-size: 14px;
  }
  .brands-section {
    padding: 64px 0 80px;
  }
  .brands-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px;
  }
  .brands-grid .brand-card:last-child {
    grid-column: span 1;
    max-width: none;
  }
  .brand-card {
    min-height: 440px;
  }
  .brands-title {
    font-size: 32px;
  }
  .brands-header {
    margin-bottom: 48px;
    padding: 0 16px;
  }
  .brands-subtitle {
    font-size: 15px;
  }
  .brand-card-name {
    font-size: 20px;
  }
  .brand-card-content {
    padding: 24px 20px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
  .gallery-item.gallery-tall,
  .gallery-item.gallery-wide {
    grid-row: span 1;
    grid-column: span 1;
  }
  
  #scroll-spacer {
    height: 150vh;
  }

  /* --- Global Mobile Overrides for Custom Theme Values --- */
  .px-margin {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .py-xl {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
  .py-lg {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }
  .gap-xl {
    gap: 24px !important;
  }
  .gap-lg {
    gap: 16px !important;
  }
  .text-headline-xl {
    font-size: 36px !important;
    line-height: 1.2 !important;
  }
  .text-headline-lg {
    font-size: 28px !important;
    line-height: 1.3 !important;
  }
  .text-headline-md {
    font-size: 22px !important;
  }
  .text-body-lg {
    font-size: 16px !important;
  }
  /* Prevent any horizontal scrolling issues */
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }
}
