/* 
  Solarenergy-ai.com - Design System v6
  "The Digital Helios" - Premium SaaS Dark Mode (Ultra Clean UI)
*/

:root {
  /* Colors - Solar Energy Tones */
  --primary: #f97316; /* Bright Orange */
  --primary-container: #ea580c; 
  --on-primary: #ffffff;
  
  --secondary: #fbbf24; 
  --secondary-container: #d97706;
  --on-secondary-container: #ffffff;

  /* Dark Backgrounds */
  --background: #020617; /* Slate 950 */
  --on-background: #ffffff; /* Brighter for readability */
  
  --surface: #020617;
  --surface-container-low: #0f172a; /* Slate 900 */
  --surface-container-lowest: #1e293b; /* Slate 800 */
  --surface-container-highest: #334155; /* Slate 700 */
  --on-surface: #f8fafc; 
  --on-surface-variant: #cbd5e1; /* Slate 300 - contrast */
  
  --outline: #475569;
  --outline-variant: #334155;
  --outline-variant-ghost: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-headline: 'Manrope', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;

  /* Shadows */
  --shadow-ambient: 0 32px 64px rgba(0, 0, 0, 0.5); 
  --shadow-sm: 0 8px 16px rgba(0, 0, 0, 0.4);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--on-surface-variant);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--primary);
  color: var(--on-primary);
}

/* Typography Base */
h1, h2, h3, h4, h5, h6, .font-headline {
  font-family: var(--font-headline);
  color: var(--on-background);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* Utilities */
.container {
  width: 100%;
  max-width: 1440px; 
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.text-primary { color: var(--primary); }
.text-on-surface { color: var(--on-surface); }
.text-on-surface-variant { color: var(--on-surface-variant); }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Flexbox Layouts */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }
.gap-16 { gap: var(--space-16); }

/* Grid Layouts */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
  .items-stretch { align-items: stretch; }
}

/* Massive Section Spacing (CRITICAL REQUIREMENT) */
.section-spacing {
  padding-top: 100px;
  padding-bottom: 100px;
}
@media (min-width: 1024px) {
  .section-spacing {
    padding-top: 140px;
    padding-bottom: 140px;
  }
}

.bg-surface-low { background-color: var(--surface-container-low); }

/* Premium Separator */
.separator-premium {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  margin: 0;
  display: block;
}

.section-header { max-width: 800px; margin-left: auto; margin-right: auto; }
.section-title { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: var(--space-4); color: var(--on-background); line-height: 1.15;}
.section-subtitle { font-size: 1.15rem; color: var(--on-surface-variant); max-width: 650px; line-height: 1.6;}
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}
.btn-primary {
  background-color: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background-color: var(--primary-container);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.4);
}
.btn-secondary {
  background-color: var(--surface-container-highest);
  color: var(--on-background);
  border: 1px solid var(--outline-variant);
  transition: all 0.2s;
}
.btn-secondary:hover {
  background-color: var(--outline-variant);
  border-color: var(--outline);
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-on-scroll.is-visible {
  opacity: 1; transform: translateY(0);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; width: 100%; z-index: 50; height: 90px;
  background-color: rgba(2, 6, 23, 0.85); /* Slate 950 */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--outline-variant-ghost);
}
.navbar .logo { font-size: 1.6rem !important; font-weight: 800; }
.navbar .logo .material-symbols-outlined { font-size: 32px; }
.navbar .nav-links { gap: var(--space-12); }
.navbar .nav-links a {
  font-weight: 600;
  color: var(--on-surface-variant);
  transition: color 0.2s;
  font-size: 1.15rem;
}
.navbar .nav-links a:hover { color: var(--on-background); }

/* Hero Section */
.hero-section {
  padding-top: calc(140px + 90px);
  padding-bottom: 140px;
  position: relative;
  overflow: hidden;
}
.hero-title {
  font-size: clamp(2rem, 3.2vw, 3.5rem);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-10);
  line-height: 1.7;
}

.hero-image-wrapper {
  position: relative;
  border-radius: 12px;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--outline-variant);
  width: 100%;
}
.hero-glow {
  position: absolute;
  top: 10%; right: 0%;
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(249,115,22,0.1) 0%, rgba(2,6,23,0) 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

/* Hero Video */
.hero-video {
  width: 100%;
  height: 100%;
  aspect-ratio: 8/11;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 24px;
}
.hero-video:fullscreen,
.hero-video:-webkit-full-screen {
  object-fit: contain !important;
  border-radius: 0 !important;
  aspect-ratio: auto !important;
}

/* Trust Badges */
.trust-badges { opacity: 0.9; }
.trust-badge { color: var(--on-surface-variant); }

/* Features List */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 768px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-12); }
}
.feature-item { display: flex; gap: var(--space-5); align-items: flex-start; }
.feature-icon-wrapper {
  width: 56px; height: 56px; min-width: 56px;
  background-color: rgba(249, 115, 22, 0.1);
  color: var(--primary);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.feature-icon-wrapper .material-symbols-outlined { font-size: 28px; }
.feature-item h3 { font-size: 1.35rem; margin-bottom: var(--space-2); color: var(--on-background); }
.feature-item p { color: var(--on-surface-variant); line-height: 1.6; font-size: 1rem; }

/* Demo section: Native WhatsApp Mockup & Pattern */
.demo-section {
  position: relative;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(249, 115, 22, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(249, 115, 22, 0.03) 0%, transparent 40%),
    linear-gradient(to right, rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 64px 64px, 64px 64px;
}
.phone-mockup {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 40px;
  background-color: #0b141a; 
  border: 12px solid #1f2937; 
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  position: relative;
  height: 700px;
  display: flex;
  flex-direction: column;
}
.phone-header {
  background-color: #202c33;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  color: #e9edef;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.phone-header .avatar {
  width: 44px; height: 44px; border-radius: 50%; background-color: #cfd8dc;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.phone-header .contact-info h4 { font-size: 1.1rem; margin: 0; font-weight: 600; font-family: 'Inter', sans-serif; color: #e9edef;}
.phone-header .contact-info p { font-size: 0.85rem; margin: 0; color: #8696a0; }

.phone-body {
  flex: 1; overflow-y: auto; padding: 24px 20px;
  background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
  background-color: #0b141a; background-blend-mode: overlay; opacity: 0.9;
  display: flex; flex-direction: column; gap: 14px;
}
.phone-body::-webkit-scrollbar { width: 4px; }
.phone-body::-webkit-scrollbar-thumb { background: #374151; border-radius: 10px; }

.msg-bubble {
  max-width: 85%; padding: 10px 12px 10px 14px; border-radius: 10px;
  font-size: 0.95rem; line-height: 1.45; position: relative;
  color: #e9edef; font-family: 'Inter', sans-serif; word-wrap: break-word;
}
.msg-bubble .time { font-size: 0.7rem; color: #8696a0; float: right; margin-left: 12px; margin-top: 12px; }
.msg-received { background-color: #202c33; align-self: flex-start; border-top-left-radius: 0; }
.msg-sent { background-color: #005c4b; align-self: flex-end; border-top-right-radius: 0; }

/* Dashboard Iframe */
.dashboard-wrapper {
  border-radius: 20px; border: 1px solid var(--outline-variant); box-shadow: var(--shadow-ambient);
  overflow: hidden; background-color: var(--surface-container-low); width: 100%;
  max-width: 1536px; margin: 0 auto;
}
.iframe-container { width: 100%; height: 900px; display: block; }
.dashboard-iframe { width: 100%; height: 100%; border: none; }

/* Case Study AISA (Clean Image Linkable) */
.aisa-image-wrapper {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
  border: 1px solid var(--outline-variant);
  transition: transform 0.3s ease, border-color 0.3s ease;
  background-color: transparent;
}
.aisa-image-wrapper:hover {
  transform: translateY(-8px);
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow: 0 24px 64px rgba(249, 115, 22, 0.15);
}
.aisa-image-wrapper a {
  display: block; width: 100%; height: auto;
}
.aisa-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.aisa-image-wrapper:hover img {
  transform: scale(1.02);
}
.metrics-grid { display: flex; flex-direction: column; gap: var(--space-4); }
.metric-card {
  padding: var(--space-4) var(--space-6); border-radius: 16px;
  background-color: var(--surface-container-low); border: 1px solid var(--outline-variant-ghost);
  display: flex; flex-direction: column;
}
.metric-card-highlight {
  background-color: var(--surface-container-lowest); border: 1px solid rgba(34, 197, 94, 0.4);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.1); position: relative; overflow: hidden;
}
.metric-card-highlight::before { content: ''; position: absolute; top:0; left:0; width: 4px; height: 100%; background-color: #22c55e;}
.metric-header { display: flex; align-items: center; gap: 12px; margin-bottom: var(--space-1); }
.metric-value { font-size: 2.8rem; font-weight: 800; font-family: var(--font-headline); color: var(--on-background); line-height: 1; }
.metric-value-green { color: #4ade80; }
.metric-badge { background-color: rgba(34, 197, 94, 0.15); color: #4ade80; padding: 4px 8px; border-radius: 8px; display: flex; align-items: center;}
.metric-label { font-size: 1rem; font-weight: 600; color: var(--on-surface-variant); text-transform: uppercase; letter-spacing: 0.05em; }

/* Final CTA Premium */
.cta-premium {
  text-align: center; background-color: var(--surface-container-low); border-radius: 32px;
  padding: var(--space-20) var(--space-6); border: 1px solid var(--outline-variant); box-shadow: var(--shadow-ambient);
}
.cta-premium h2 { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: var(--space-4); }
.cta-premium p { color: var(--on-surface-variant); font-size: 1.25rem; margin-bottom: var(--space-8); max-width: 600px; margin-left: auto; margin-right: auto; }

/* Flawless WhatsApp Widget from Scratch */
.wa-floating-btn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 64px;
  height: 64px;
  background-color: #25d366; 
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  outline: none;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
  padding: 0;
  margin: 0;
}
.wa-floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}
.wa-floating-btn svg {
  width: 34px;
  height: 34px;
  fill: #ffffff;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
}

/* Hidden utilities */
.hidden { display: none; }
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
}

/* Footer */
.footer a { transition: color 0.2s; }
.footer a:hover { color: var(--on-background); }

/* Responsive Overrides (Mobile Adaptations) */
@media (max-width: 768px) {
  /* Reduce navbar sizes to prevent overflow */
  .navbar .logo svg { width: 32px !important; height: 32px !important; }
  .navbar .logo span.text-on-background { font-size: 1.1rem !important; }
  .navbar .logo span.uppercase { font-size: 0.55rem !important; }
  .navbar .btn-primary { padding: 8px 12px; font-size: 0.85rem; }
  
  /* Contact section wrapping to prevent horizontal scroll */
  .contact-container { width: 100% !important; align-items: center !important; }
  .contact-row { flex-direction: column !important; align-items: center !important; }
  .contact-row .contact-label { width: auto !important; margin-right: 0 !important; margin-bottom: 4px; text-align: center !important; }
  .contact-row .material-symbols-outlined { margin-right: 0 !important; margin-bottom: 8px; }
  .contact-row a { white-space: normal !important; word-break: break-word; text-align: center !important; }
}
