/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --purple: #a855f7;
  --pink: #ec4899;
  --amber: #f59e0b;
  --green: #22c55e;
  --bg: #0a0a0f;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-border: rgba(255, 255, 255, 0.1);
  --text: #f1f1f1;
  --text-muted: #a1a1aa;
  --radius: 16px;
  --glow: 0 0 30px rgba(168, 85, 247, 0.3);
}

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-decoration: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px; font-weight: 600;
  font-size: 1rem; transition: all 0.3s ease; cursor: pointer;
  border: none; text-decoration: none;
}
.btn--sm { padding: 8px 20px; font-size: 0.875rem; }
.btn--primary {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.btn--glow { box-shadow: 0 0 20px rgba(168, 85, 247, 0.4); }
.btn--outline {
  background: transparent; color: var(--text);
  border: 2px solid var(--bg-card-border);
}
.btn--outline:hover { border-color: var(--purple); color: var(--purple); }

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0; transition: all 0.3s ease;
}
.nav--scrolled {
  background: rgba(10, 10, 15, 0.9); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--bg-card-border);
  padding: 10px 0;
}
.nav__inner {
  max-width: 1100px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__logo img { filter: invert(1); height: 32px; width: auto; }
.nav__links {
  display: flex; align-items: center; gap: 28px; list-style: none;
}
.nav__links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav__links a:hover { color: #fff; }
.nav__toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav__toggle span {
  display: block; width: 24px; height: 2px; background: #fff;
  margin: 5px 0; transition: all 0.3s;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; top: 0; right: -100%; width: 75%; max-width: 300px;
    height: 100vh; background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center; gap: 32px;
    transition: right 0.3s ease; padding: 40px;
  }
  .nav__links.active { right: 0; }
  .nav__links a { font-size: 1.1rem; }
}

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--bg); /* Fallback if video doesn't load */
  overflow: hidden;
}
.hero__video {
  position: absolute; top: 50%; left: 50%;
  min-width: 100%; min-height: 100%;
  width: auto; height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,15,0.4) 0%, rgba(10,10,15,0.85) 100%);
  z-index: 1;
}
.hero__content {
  position: relative; text-align: center; padding: 20px;
  z-index: 2;
}
.hero__logo { filter: invert(1); margin: 0 auto 24px; max-width: 280px; }
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem); font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, var(--purple) 50%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem); color: var(--text-muted);
  margin-bottom: 32px; letter-spacing: 2px; text-transform: uppercase;
}

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section__title {
  text-align: center; font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 48px;
}

/* ===== Glass Card ===== */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 40px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.glass-card h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 16px; }
.glass-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.glass-card p { color: var(--text-muted); margin-bottom: 12px; }
.glass-card p:last-child { margin-bottom: 0; }

/* ===== About ===== */
#about .container { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.about__image { border-radius: var(--radius); overflow: hidden; }
@media (max-width: 768px) {
  #about .container { grid-template-columns: 1fr; }
}

/* ===== Solar ===== */
.section--solar { background: linear-gradient(180deg, rgba(34,197,94,0.05) 0%, transparent 100%); }
.glass-card--green { border-color: rgba(34,197,94,0.2); }
.solar__grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center; }
.solar__icon { font-size: 3rem; display: block; margin-bottom: 16px; }
.solar__stats { display: flex; gap: 32px; margin: 24px 0; flex-wrap: wrap; }
.stat { text-align: center; }
.stat__number {
  display: block; font-size: 2.2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--green), var(--amber));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat__label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.solar__note { font-style: italic; font-size: 0.9rem; }
.solar__image { border-radius: var(--radius); overflow: hidden; }
@media (max-width: 768px) {
  .solar__grid { grid-template-columns: 1fr; }
}

/* ===== Gallery ===== */
.gallery {
  columns: 3; column-gap: 16px;
}
.gallery__item {
  break-inside: avoid; margin-bottom: 16px;
  border-radius: 12px; overflow: hidden; cursor: pointer;
  transition: transform 0.3s ease;
}
.gallery__item:hover { transform: scale(1.02); }
.gallery__item img { width: 100%; display: block; }
@media (max-width: 900px) { .gallery { columns: 2; } }
@media (max-width: 500px) { .gallery { columns: 1; } }

/* ===== Services ===== */
.section--services { background: linear-gradient(180deg, transparent, rgba(168,85,247,0.03) 50%, transparent); }
.services__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.service__icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }

/* ===== Contact ===== */
.section--contact { padding-bottom: 40px; }
.glass-card--contact {
  text-align: center; max-width: 600px; margin: 0 auto;
  border-color: rgba(168,85,247,0.2);
}
.contact__links { display: flex; flex-direction: column; gap: 16px; margin: 32px 0 24px; align-items: center; }
.contact__social { display: flex; justify-content: center; gap: 20px; margin-top: 24px; }
.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--bg-card-border);
  color: var(--text-muted); transition: all 0.3s;
}
.social-link:hover { color: #fff; border-color: var(--purple); transform: translateY(-2px); }

/* ===== Contact Form ===== */
.contact-form { margin: 32px 0; text-align: left; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; margin-bottom: 6px; font-weight: 500;
  color: var(--text); font-size: 0.9rem;
}
.form-group input,
.form-group textarea {
  width: 100%; padding: 12px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  color: var(--text); font-size: 1rem;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.1);
  background: rgba(255, 255, 255, 0.08);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}
.form-group textarea {
  resize: vertical; min-height: 100px;
}
.contact-form .btn {
  margin: 16px auto 0; display: flex; align-items: center;
}
.form-message {
  margin-top: 20px; padding: 16px; border-radius: 12px;
  background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--green); font-weight: 500; text-align: center;
}
.form-message.error {
  background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}
.form-message.loading {
  background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.2);
  color: var(--purple);
}

/* ===== Footer ===== */
.footer { text-align: center; padding: 32px 0; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--bg-card-border); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.92);
  display: none; align-items: center; justify-content: center; padding: 20px;
  cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox__img { max-width: 90vw; max-height: 90vh; border-radius: 8px; object-fit: contain; }
.lightbox__close {
  position: absolute; top: 20px; right: 24px; background: none; border: none;
  color: #fff; font-size: 2.5rem; cursor: pointer; line-height: 1;
}

/* ===== Scroll Animations ===== */
.fade-in {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
