/* ==========================================================================
   WhyWatt? Home Electrification Explorer — Design System Stylesheet
   ========================================================================== */

:root {
  --primary: #0d47a1;
  --primary-hover: #083375;
  --primary-light: #eef2ff;
  --journey-blue: #1f5fbf;
  --solar-green: #0f8a6f;
  --solar-light: #e6f6f2;
  --accent-amber: #ec9b1e;
  --accent-light: #fff8eb;
  --nothing-red: #c8553d;
  --nothing-light: #fdf2f0;
  
  --ink: #16202e;
  --ink-light: #2d3748;
  --slate: #4a5568;
  --muted: #718096;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 12px 28px rgba(13, 71, 161, 0.09);
  --shadow-hover: 0 16px 36px rgba(13, 71, 161, 0.14);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;
  --container-max: 1200px;
}

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

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--primary-hover);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Mockup / Layout Options Switcher Bar
   ========================================================================== */
.mockup-switcher-bar {
  background: #1e293b;
  color: #e2e8f0;
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mockup-switcher-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.mockup-switcher-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #94a3b8;
}

.mockup-badge-pill {
  background: #f59e0b;
  color: #0f172a;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mockup-options {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mockup-opt-btn {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.mockup-opt-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.mockup-opt-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: #3b82f6;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-item a {
  font-weight: 500;
  font-size: 15px;
  color: var(--slate);
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav-item a:hover {
  color: var(--primary);
}

.nav-item a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-toggle-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.18s ease;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.3;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13.5px;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 16px;
  border-radius: 8px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(13, 71, 161, 0.22);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.32);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--ink-light);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: #94a3b8;
  color: var(--ink);
}

.btn-discord {
  background-color: #5865F2;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.25);
}

.btn-discord:hover {
  background-color: #4752c4;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.38);
  transform: translateY(-1px);
}

.btn-beta {
  background-color: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.08);
}

.btn-beta:hover {
  background-color: #fef3c7;
  border-color: #f59e0b;
  color: #78350f;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(180, 83, 9, 0.14);
}

.btn-beta .badge-tag {
  background: #d97706;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Signature HEX Branding */
.hex-blue {
  color: #1f5fbf !important;
  font-weight: 800;
}

.btn-primary .hex-blue {
  color: #93c5fd !important;
}

.btn-launch {
  background-color: #ffffff;
  color: #16202e;
  border: 1.5px solid #1f5fbf;
  box-shadow: 0 2px 6px rgba(31, 95, 191, 0.12);
  font-weight: 600;
}

.btn-launch:hover {
  background-color: #f0f7ff;
  border-color: #13407f;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 95, 191, 0.22);
}

.btn-launch .hex-blue {
  color: #1f5fbf !important;
}

.btn-outline-solar {
  background: transparent;
  color: var(--solar-green);
  border-color: var(--solar-green);
}

.btn-outline-solar:hover {
  background: var(--solar-light);
  color: #085e4b;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 56px 0 68px;
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-page) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--journey-blue);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
  border: 1px solid rgba(31, 95, 191, 0.15);
}

.hero-title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.18;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}

.hero-title .highlight-blue {
  color: var(--primary);
}

.hero-title .highlight-gold {
  color: var(--accent-amber);
}

.hero-body {
  font-size: 16.5px;
  color: var(--slate);
  line-height: 1.68;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-body p strong {
  color: var(--ink);
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--slate);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.pill-badge strong {
  color: var(--journey-blue);
  font-weight: 600;
}

/* Hero Showcase Image Card */
.hero-image-card {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all 0.25s ease;
}

.hero-image-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #93c5fd;
}

.card-window-bar {
  background: #f1f5f9;
  border-bottom: 1px solid var(--line);
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.window-dots span:nth-child(1) { background: #fca5a5; }
.window-dots span:nth-child(2) { background: #fde047; }
.window-dots span:nth-child(3) { background: #86efac; }

.window-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-image-wrap {
  position: relative;
  overflow: hidden;
  display: block;
}

.card-image-wrap img {
  width: 100%;
  transition: transform 0.3s ease;
}

.card-image-wrap:hover img {
  transform: scale(1.02);
}

.image-overlay-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}

.hero-image-card:hover .image-overlay-badge {
  background: var(--primary);
  color: #fff;
}

.hero-image-caption {
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--slate);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   Section: Learn How It's Built (Explainer Preview)
   ========================================================================== */
.section {
  padding: 72px 0;
}

.section-alt {
  background-color: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-desc {
  font-size: 16.5px;
  color: var(--slate);
  line-height: 1.6;
}

/* System Flow Diagram Banner */
.explainer-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.explainer-banner::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(13, 71, 161, 0.4) 0%, transparent 70%);
  border-radius: 50%;
}

.banner-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}

.banner-content h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #f8fafc;
}

.banner-content p {
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.6;
  max-width: 680px;
}

/* Flowchart pill preview */
.flow-diagram-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.flow-step {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--font-mono);
  color: #e2e8f0;
}

.flow-step.active {
  background: rgba(31, 95, 191, 0.35);
  border-color: #3b82f6;
  color: #93c5fd;
  font-weight: 600;
}

.flow-arrow {
  color: #64748b;
  font-weight: 800;
}

/* 3-Card Architecture Grid */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.arch-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.22s ease;
  text-decoration: none;
  color: inherit;
}

.arch-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.arch-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}

.icon-blue {
  background: var(--primary-light);
  color: var(--primary);
}

.icon-green {
  background: var(--solar-light);
  color: var(--solar-green);
}

.icon-amber {
  background: var(--accent-light);
  color: var(--accent-amber);
}

.arch-card-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 8px;
}

.arch-card-tag.tag-blue { color: var(--journey-blue); }
.arch-card-tag.tag-green { color: var(--solar-green); }
.arch-card-tag.tag-amber { color: #d97706; }

.arch-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.arch-card p {
  font-size: 14.5px;
  color: var(--slate);
  line-height: 1.55;
  flex-grow: 1;
  margin-bottom: 18px;
}

.card-link-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.arch-card:hover .card-link-text {
  gap: 8px;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
  padding: 68px 0;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.cta-box {
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 16px 36px rgba(13, 71, 161, 0.2);
  position: relative;
  overflow: hidden;
}

.cta-box h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.cta-box p {
  font-size: 17px;
  color: #e0e7ff;
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-white {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
  background: #f8fafc;
  color: #083375;
  transform: translateY(-1px);
}

.btn-ghost-white {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-ghost-white:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 56px 0 28px;
  font-size: 14px;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: #64748b;
  margin-top: 14px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f1f5f9;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #64748b;
}

.collaboration-tag {
  display: flex;
  align-items: center;
  gap: 8px;
}

.collaboration-tag strong {
  color: #cbd5e1;
}

/* ==========================================================================
   Inside Pages: About & Community Specific Styles
   ========================================================================== */
.page-hero {
  padding: 56px 0 44px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-page) 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero-title {
  font-size: 38px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.page-hero-lede {
  font-size: 18px;
  color: var(--slate);
  line-height: 1.6;
  max-width: 760px;
}

.content-section {
  padding: 56px 0;
}

.article-content {
  max-width: 820px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin: 36px 0 16px;
  letter-spacing: -0.015em;
}

.article-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 12px;
}

.article-content p {
  font-size: 16px;
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: 20px;
}

.article-content ul, .article-content ol {
  margin: 0 0 24px 24px;
  color: var(--ink-light);
  font-size: 16px;
  line-height: 1.7;
}

.article-content li {
  margin-bottom: 8px;
}

.callout-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.callout-box p {
  margin-bottom: 0;
  color: #1e3a8a;
  font-size: 15.5px;
}

.callout-solar {
  background: var(--solar-light);
  border-left-color: var(--solar-green);
}

.callout-solar p {
  color: #064e3b;
}

/* Discord Community Banner & Cards */
.discord-hero-card {
  background: linear-gradient(135deg, #5865F2 0%, #4752c4 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: 0 16px 36px rgba(88, 101, 242, 0.28);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  margin-bottom: 48px;
}

.discord-hero-card h2 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 12px;
}

.discord-hero-card p {
  font-size: 16.5px;
  color: #e0e7ff;
  line-height: 1.6;
  max-width: 600px;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 36px;
}

.community-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.community-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-card p {
  font-size: 15px;
  color: var(--slate);
  line-height: 1.6;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  
  .cards-grid-3 {
    grid-template-columns: 1fr;
  }
  
  .banner-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .community-grid {
    grid-template-columns: 1fr;
  }
  
  .discord-hero-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 20px 24px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid var(--line);
    gap: 16px;
  }
  
  .nav-menu.open {
    display: flex;
  }
  
  .nav-toggle-btn {
    display: block;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .section-title {
    font-size: 26px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-box {
    padding: 32px 20px;
  }
  
  .discord-hero-card {
    padding: 28px 20px;
  }
}
