/* Design System & CSS Variables */
:root {
  /* Light Mode (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent: #d97706; /* Solar Amber */
  --accent-light: #fef3c7;
  --accent-hover: #b45309;
  --accent-rgb: 217, 119, 6;
  --border-color: #e2e8f0;
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  --nav-bg: rgba(248, 250, 252, 0.85);
  --success: #10b981;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --max-width: 1200px;
}

[data-theme="dark"] {
  /* Dark Mode */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --accent: #fbbf24; /* Bright Solar Gold */
  --accent-light: #78350f;
  --accent-hover: #f59e0b;
  --accent-rgb: 251, 191, 36;
  --border-color: #1f2937;
  --card-bg: rgba(17, 24, 39, 0.75);
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(11, 15, 25, 0.85);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.center-title {
  text-align: center;
  display: block;
}

.center-title::after {
  left: 50%;
  transform: translateX(-50%);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0px);
  transition: var(--transition);
}

.navbar.scrolled {
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  transition: var(--transition);
}

.navbar.scrolled .nav-container {
  height: 70px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--accent);
}

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

.nav-links a {
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after,
.nav-links a:hover::after {
  width: 100%;
}

/* Theme Toggle */
.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border-radius: 50%;
  background-color: var(--border-color);
  width: 40px;
  height: 40px;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background-color: var(--accent-light);
  color: var(--accent-hover);
  transform: scale(1.05);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.theme-toggle-btn .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle-btn .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-btn .moon-icon {
  display: none;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0.5rem;
}

.mobile-menu-btn svg {
  width: 28px;
  height: 28px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
}

/* Parallax Hero */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 100px; /* Accounts for fixed navbar + breathing room */
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image: linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.8)), url('Installing-solar-panels.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Short parallax sub-header */
.sub-hero {
  position: relative;
  height: 55vh; /* Increased for better proportions */
  min-height: 420px; /* Prevents overflow/overlap on small height viewports */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding-top: 100px; /* Accounts for fixed navbar + breathing room */
}

.sub-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image: linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.8)), url('Installing-solar-panels.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-content {
  text-align: center;
  color: #ffffff;
  max-width: 800px;
  padding: 0 2rem;
  z-index: 1;
}

.hero-content h1 {
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease;
}

.hero h1 {
  font-size: 4.5rem;
}

.sub-hero h1 {
  font-size: 3.5rem;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.35rem;
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  animation: fadeInUp 1s ease 0.4s both;
}

/* Glassmorphism General Card */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-5px);
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-grid.reverse {
  grid-template-columns: 1fr 1.2fr;
}

/* Case Study Card */
.case-study-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
  background-image: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05), rgba(var(--accent-rgb), 0.01));
}

.about-img-container {
  position: relative;
}

.about-img-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.about-img {
  width: 100%;
  transition: transform 0.6s ease;
}

.about-img-wrapper:hover .about-img {
  transform: scale(1.05);
}

.about-badge {
  background: var(--accent);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 16px;
  font-family: var(--font-heading);
  box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.3);
  text-align: center;
  margin: 1.5rem auto 0 auto;
  max-width: max-content;
  display: block;
}

.about-badge .number {
  font-size: 2.5rem;
  font-weight: 800;
  display: block;
  line-height: 1;
}

.about-badge .label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-text {
  font-size: 1.15rem;
}

.about-text .lead {
  font-size: 1.35rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* Badge Banner (Credentials & Experience info) */
.badge-banner {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 4rem 0;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  text-align: center;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge-icon {
  width: 70px;
  height: 70px;
  background-color: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

[data-theme="dark"] .badge-icon {
  color: var(--text-primary);
  background-color: var(--accent-light);
}

.badge-item:hover .badge-icon {
  transform: rotateY(180deg);
}

.badge-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.badge-item p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-top: 3.5rem;
}

.price-card {
  text-align: center;
}

.price-amount {
  font-size: 4rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--accent);
  margin: 1rem 0;
  line-height: 1;
}

.price-amount span {
  font-size: 1.5rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.price-features {
  list-style: none;
  margin: 2rem 0;
}

.price-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.price-features li:last-child {
  border-bottom: none;
}

.pricing-note {
  grid-column: span 2;
  text-align: center;
  margin-top: 2rem;
  font-size: 1.1rem;
}

/* Highlight / Travel Card */
.travel-highlight {
  background-image: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.03));
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

/* Accordion FAQ */
.faq-list {
  max-width: 800px;
  margin: 3.5rem auto 0 auto;
}

.faq-item {
  margin-bottom: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition);
}

.faq-question:hover {
  background-color: var(--accent-light);
  color: var(--accent-hover);
}

[data-theme="dark"] .faq-question:hover {
  background-color: #27272a;
  color: var(--accent);
}

.faq-arrow {
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}

.faq-answer-content {
  padding: 0 2rem 2rem 2rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
}

.faq-item.active .faq-answer {
  max-height: 1000px; /* high number to allow expansion */
  transition: max-height 0.4s cubic-bezier(1, 0, 1, 0);
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-details {
  list-style: none;
  margin-top: 2rem;
}

.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-details h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.contact-details p {
  margin-bottom: 0;
}

/* Contact Form */
.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.contact-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

/* Form success banner */
.form-status {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 10px;
  display: none;
  font-weight: 500;
  text-align: center;
}

.form-status.success {
  display: block;
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.form-status.error {
  display: block;
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 5rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-about .logo {
  margin-bottom: 1.5rem;
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Media Queries */
@media (max-width: 1024px) {
  h1 { font-size: 2.75rem; }
  .hero h1 { font-size: 3.75rem; }
  .sub-hero h1 { font-size: 3rem; }
  .about-grid, .about-grid.reverse, .contact-grid, .case-study-card {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-img-container {
    max-width: 500px;
    margin: 0 auto;
  }
  .badge-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 5rem 0;
  }
  .hero {
    height: auto;
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 80px;
  }
  .sub-hero {
    height: auto;
    min-height: 360px;
    padding-top: 120px;
    padding-bottom: 60px;
  }
  .hero h1 {
    font-size: 2.75rem;
  }
  .sub-hero h1 {
    font-size: 2.25rem;
  }
  .hero-content p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
  }
  .navbar.scrolled .nav-links {
    top: 70px;
    height: calc(100vh - 70px);
  }
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background-color: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transition: var(--transition);
    border-top: 1px solid var(--border-color);
    z-index: 999;
  }
  .nav-links.active {
    left: 0;
  }
  .mobile-menu-btn {
    display: block;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .pricing-note {
    grid-column: span 1;
  }
  .contact-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  /* Disable Parallax Fixed Attachment on Mobile for Performance */
  .hero-bg, .sub-hero-bg {
    background-attachment: scroll;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }
  .glass-card, .case-study-card {
    padding: 2.5rem 1.5rem;
  }
  .btn {
    padding: 0.75rem 1.5rem;
    width: 100%;
  }
  .hero-btns {
    flex-direction: column;
    gap: 1rem;
  }
  .price-amount {
    font-size: 3rem;
  }
  .hero h1 {
    font-size: 2.25rem;
  }
  .sub-hero h1 {
    font-size: 1.85rem;
  }
  .hero-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
}

/* Earth Building Link & Banner Styles */
.earth-building-link {
  color: inherit;
  transition: var(--transition);
}

.earth-building-link:hover {
  color: var(--accent);
}

.earth-building-banner-wrapper {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.banner-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.earth-building-banner-link {
  display: inline-block;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  max-width: 100%;
}

.earth-building-banner-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  border-color: var(--accent);
}

.earth-building-banner-logo {
  height: 45px;
  width: auto;
  display: block;
  max-width: 100%;
  object-fit: contain;
}

/* Footer Banner */
.earth-building-footer-banner {
  display: inline-block;
  margin-top: 1rem;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
  max-width: 100%;
  width: 180px;
}

.earth-building-footer-banner:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.footer-banner-logo {
  height: 25px;
  width: auto;
  display: block;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
}
