/* ============================================
   SolarX Landing Page — Production CSS
   Dark theme · GreenTech · Clean & Trustworthy
   ============================================ */

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

/* ----- Custom Properties ----- */
:root {
  --bg: #0a0f1a;
  --card: #111827;
  --card-hover: #1a2332;
  --text: #e5e7eb;
  --muted: #6b7280;
  --green: #22c55e;
  --blue: #3b82f6;
  --yellow: #eab308;
  --orange: #f97316;
  --border: #1f2937;
  --radius: 12px;
  --max-width: 1080px;
}

/* ----- Body ----- */
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

section {
  padding: 5rem 0;
}

.hidden {
  display: none !important;
}

/* ----- Section headings (shared) ----- */
h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

/* ============================================
   Hero (#hero)
   ============================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.08) 0%, var(--bg) 70%);
}

#hero .container {
  text-align: center;
}

#hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.highlight {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin: 3rem 0;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--green);
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cta-button {
  background: linear-gradient(135deg, var(--green), #16a34a);
  color: #fff;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

/* ============================================
   How It Works (#how-it-works)
   ============================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.step {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--green);
  transition: background 0.2s ease;
}

.step:hover {
  background: var(--card-hover);
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.step h3 {
  color: var(--green);
  margin-bottom: 0.5rem;
}

/* ============================================
   Live Stats (#live-stats)
   ============================================ */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
}

.pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-left: 0.5rem;
  vertical-align: middle;
  animation: pulse 2s ease-in-out infinite;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  background: var(--card-hover);
  border-color: var(--border);
}

.stat-card-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--green);
  display: block;
}

.stat-card-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ============================================
   Demo (#demo)
   ============================================ */
.demo-box {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
}

.demo-box textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  resize: vertical;
  line-height: 1.6;
  transition: border-color 0.2s ease;
}

.demo-box textarea:focus {
  border-color: var(--green);
  outline: none;
}

.demo-result {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: 8px;
  border-left: 4px solid var(--blue);
}

#demo-answer {
  font-size: 1rem;
  line-height: 1.8;
}

.demo-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.error {
  color: var(--orange);
}

/* ============================================
   Waitlist (#waitlist)
   ============================================ */
#waitlist {
  text-align: center;
}

.waitlist-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

input[type="email"] {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  width: 320px;
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.2s ease;
}

input[type="email"]:focus {
  border-color: var(--green);
  outline: none;
}

input[type="email"]::placeholder {
  color: var(--muted);
}

/* ============================================
   Footer
   ============================================ */
footer {
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

footer a {
  color: var(--green);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

footer a:hover {
  opacity: 0.8;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .waitlist-form {
    flex-direction: column;
    align-items: center;
  }

  input[type="email"] {
    width: 100%;
  }
}

@media (max-width: 480px) {
  section {
    padding: 3rem 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .demo-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}
