/* Renewable Energy Hub - Shared Styles */

:root {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --surface: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-dim: #059669;
  --amber: #f59e0b;
  --border: #475569;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "Fira Code", ui-monospace, monospace;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Nav */
header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo span {
  background: linear-gradient(135deg, var(--amber), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  justify-content: flex-end;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

nav a:hover,
nav a:focus {
  color: var(--accent-hover);
  background: rgba(16, 185, 129, 0.1);
}

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

/* Main */
main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  margin-bottom: 2rem;
  background: linear-gradient(180deg, var(--bg-alt) 0%, transparent 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #fbbf24, #34d399, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 1.5rem;
}

.hero-cta {
  display: inline-flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #042f2e;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

/* Cards grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--accent-hover);
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card a {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--amber);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.card a:hover {
  text-decoration: underline;
}

/* Content sections */
section {
  margin-bottom: 2.5rem;
}

h1, h2, h3 {
  line-height: 1.25;
}

h1 {
  font-size: 1.9rem;
  margin-bottom: 1rem;
  color: var(--text);
}

h2 {
  font-size: 1.45rem;
  margin: 1.75rem 0 0.85rem;
  color: var(--accent-hover);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

h3 {
  font-size: 1.15rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--amber);
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

ul, ol {
  margin: 0.75rem 0 1.25rem 1.4rem;
  color: var(--text-muted);
}

li {
  margin-bottom: 0.4rem;
}

strong {
  color: var(--text);
  font-weight: 600;
}

/* Stats bar */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Callout */
.callout {
  background: rgba(16, 185, 129, 0.08);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.callout p {
  margin: 0;
  color: var(--text);
}

/* Footer */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 1.75rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-inner a {
  color: var(--accent);
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

/* 404 page */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}

.error-page .code {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--amber), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

/* Utility */
.lead {
  font-size: 1.1rem;
  color: var(--text);
}

.muted {
  color: var(--text-muted);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    justify-content: flex-start;
  }

  .hero {
    padding: 1.75rem 1rem 2rem;
  }
}
