/* Flux Energy — Single-page marketing */
:root {
  --bg: #f8fafc;
  --bg-elevated: #f1f5f9;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  /* Logo colors */
  --navy: #1e3a5f;
  --navy-subtle: rgba(30, 58, 95, 0.06);
  --orange: #d97706;
  --orange-subtle: rgba(217, 119, 6, 0.12);
  /* Green — retained for CTAs, success, growth */
  --accent: #16a34a;
  --accent-hover: #15803d;
  --accent-subtle: rgba(34, 197, 94, 0.12);
  --highlight: #0ea5e9;
  --error: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Wind particle canvas — fixed background layer */
#wind-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
body > main,
body > header { position: relative; z-index: 1; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
/* Logo styles: see /logo.css (single source of truth) */
.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.site-header nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.site-header nav a:hover { color: var(--navy); }
#session { margin-left: 0.5rem; font-size: 0.875rem; display: flex; align-items: center; gap: 0.75rem; }
.signin-dropdown-wrap { position: relative; }
#session .btn-signin,
.site-header nav a.btn-signin,
.signin-dropdown-wrap .btn-signin { padding: 0.5rem 1rem; font-size: 0.875rem; text-decoration: none; border: 2px solid transparent; border-radius: var(--radius-sm); color: #fff; background: var(--accent); cursor: pointer; font-weight: 600; transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
#session .btn-signin:hover,
.site-header nav a.btn-signin:hover,
.signin-dropdown-wrap .btn-signin:hover { background: #fff; color: var(--accent); border-color: var(--accent); }
.signin-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 0.5rem;
  min-width: 260px; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  display: none; z-index: 200;
}
.signin-dropdown.open { display: block; }
.signin-dropdown-form .form-group { margin-bottom: 0.75rem; }
.signin-dropdown-form .form-group input {
  width: 100%; padding: 0.6rem 0.75rem; font-size: 0.9rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text);
}
.signin-dropdown-form .form-group input::placeholder { color: var(--text-muted); }
.signin-dropdown-form .btn { margin-top: 0.25rem; padding: 0.6rem; font-size: 0.9rem; }
.signin-dropdown-form .msg { font-size: 0.8rem; margin-top: 0.5rem; padding: 0.5rem; }
.signin-dropdown-signup {
  display: block; margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--border);
  color: var(--accent); font-size: 0.875rem; text-decoration: none; text-align: center;
}
.signin-dropdown-signup:hover { color: var(--orange); }
#session .muted { color: var(--text-muted); }
#session button {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
}
#session button:hover { border-color: var(--navy); color: var(--navy); }

/* Hero */
.hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--orange-subtle);
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin: 0 0 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  line-height: 1.7;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--navy); border-color: var(--navy); }
.btn-block { width: 100%; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

/* Sections */
section {
  padding: 4rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  text-align: center;
}
.section-lead {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 2.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* Problem section */
.problem-section {
  background: var(--navy-subtle);
  border-top: 1px solid var(--border);
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.problem-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.problem-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  object-fit: contain;
  flex-shrink: 0;
}
.problem-content {
  flex: 1;
  min-width: 0;
}
.problem-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.problem-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Outcomes section */
.outcomes-section { padding-bottom: 3rem; }
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.outcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.outcome-card:hover { border-color: var(--accent); }
.outcome-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.outcome-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Features */
.features {
  background: var(--bg-elevated);
  position: relative;
}
.features::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--orange-subtle) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.features h2,
.features .section-lead,
.features .features-grid { position: relative; z-index: 1; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--accent); }
.feature-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 0.75rem;
  display: block;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.pricing-card h3 { margin: 0 0 0.5rem; font-size: 1.125rem; }
.pricing-card .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0.5rem 0 1rem;
}
.pricing-card .price span { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); }
.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex: 1;
}
.pricing-card li {
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.pricing-card li:last-child { border-bottom: none; }
.pricing-card .btn { margin-top: auto; }
.pricing-skeleton .skeleton {
  height: 24px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-elevated) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.2s ease-in-out infinite;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}
@keyframes skeleton { to { background-position: 200% 0; } }

/* Auth section */
.auth-section {
  background: var(--bg-elevated);
  padding-bottom: 5rem;
}
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.auth-tabs .tab {
  flex: 1;
  padding: 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.auth-tabs .tab:hover { color: var(--text); }
.auth-tabs .tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.auth-forms {
  max-width: 360px;
  margin: 0 auto;
  position: relative;
}
.auth-form {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.auth-form.active { display: block; }
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
}
.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group input::placeholder { color: var(--text-muted); opacity: 0.7; }
.auth-form .btn { margin-top: 0.5rem; }
.auth-signin-link { margin: 0.75rem 0 0; text-align: center; font-size: 0.9rem; }
.auth-signin-link a { color: var(--accent); text-decoration: none; }
.auth-signin-link a:hover { text-decoration: underline; }
.msg {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

/* Footer */
.site-footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-inner .footer-tagline {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0.5rem 0 0.25rem;
}
.footer-inner .footer-copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0 0 1rem;
}
.footer-inner p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0.5rem 0 1rem;
}
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; justify-content: center; }
.footer-inner nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}
.footer-inner nav a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; gap: 1rem; }
  .site-header nav { order: 3; width: 100%; justify-content: flex-start; }
  .hero { padding: 3rem 1rem 3rem; }
  .hero-stats { flex-direction: column; gap: 0.75rem; }
  .problem-list { grid-template-columns: 1fr; }
  .problem-grid { grid-template-columns: 1fr; }
}
