/* ═════════════════════════════════════════════════════════════════════
   GridSim Website — SCADA Dark Theme
   ═════════════════════════════════════════════════════════════════════ */

/* CSS Variables */
:root {
  --color-bg: #0a0a0a;
  --color-bg-secondary: #0f1517;
  --color-bg-panel: rgba(10, 10, 10, 0.92);
  --color-border: rgba(0, 255, 136, 0.2);
  --color-accent: #00ff88;
  --color-accent-cyan: #00ffff;
  --color-alert: #ff3333;
  --color-warning: #ffaa00;
  --color-text-primary: #e0e0e0;
  --color-text-secondary: rgba(255, 255, 255, 0.5);
  --color-text-dim: rgba(255, 255, 255, 0.25);
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

@media (max-width: 600px) {
  html {
    font-size: 14px;
  }
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  letter-spacing: 0.3px;
}

/* Scanline overlay effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.05) 2px,
    rgba(0, 0, 0, 0.05) 3px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  color: var(--color-text-primary);
}

h1 {
  font-size: 2.5rem;
  font-weight: 600;
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.75rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--color-accent);
}

h3 {
  font-size: 1.25rem;
  color: var(--color-accent);
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom-color: var(--color-accent);
  text-shadow: 0 0 8px var(--color-accent);
}

/* Header & Navigation */
header {
  background-color: var(--color-bg-panel);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(4px);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--color-text-secondary);
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
  text-shadow: 0 0 6px var(--color-accent);
}

@media (max-width: 600px) {
  nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    gap: 1rem;
    flex-direction: column;
  }
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
  padding: 2rem;
  background: rgba(0, 255, 136, 0.02);
  border: 1px solid var(--color-border);
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-secondary);
}

.hero-image {
  width: 100%;
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

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

.stat-box {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid var(--color-border);
  padding: 1rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--color-text-dim);
}

@media (max-width: 1000px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 1rem;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

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

/* Feature Sections */
.feature-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin: 3rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border);
}

.feature-section.alt {
  direction: rtl;
}

.feature-section.alt > * {
  direction: ltr;
}

.feature-content h3 {
  margin-top: 0;
}

.feature-image {
  width: 100%;
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.3);
}

.feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .feature-section {
    grid-template-columns: 1fr;
    direction: ltr !important;
  }

  .feature-section > * {
    direction: ltr !important;
  }
}

/* Asset Table */
.asset-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border);
}

.asset-table thead {
  background: rgba(0, 255, 136, 0.08);
  border-bottom: 1px solid var(--color-border);
}

.asset-table th {
  padding: 1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  font-weight: 600;
}

.asset-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
  font-size: 0.95rem;
}

.asset-table tbody tr:hover {
  background-color: rgba(0, 255, 136, 0.05);
}

.asset-type {
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border-radius: 0;
}

.btn:hover {
  background: rgba(0, 255, 136, 0.22);
  text-shadow: 0 0 8px var(--color-accent);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.2);
}

.btn-primary {
  padding: 1rem 2rem;
  font-size: 1rem;
}

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

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

/* Grid Sections */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card {
  background: rgba(0, 255, 136, 0.04);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.card:hover {
  background: rgba(0, 255, 136, 0.08);
  border-color: var(--color-accent);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.1);
}

.card h3 {
  margin-top: 0;
}

/* Roadmap Timeline */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline-item {
  margin-bottom: 2rem;
  padding-left: 2rem;
  border-left: 2px solid var(--color-border);
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  border: 2px solid var(--color-bg);
  border-radius: 50%;
}

.timeline-item.completed::before {
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
}

.timeline-item.planned {
  opacity: 0.8;
}

.timeline-item.planned::before {
  background: transparent;
  border-color: var(--color-text-dim);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.timeline-content h4 {
  margin: 0.25rem 0 0.5rem;
  color: var(--color-text-primary);
}

.timeline-content p {
  margin: 0;
  font-size: 0.95rem;
}

/* Alerts & Badges */
.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-left: 3px solid var(--color-warning);
  background: rgba(255, 170, 0, 0.08);
  color: var(--color-text-secondary);
}

.alert-info {
  border-left-color: var(--color-accent);
  background: rgba(0, 255, 136, 0.08);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  border-radius: 0;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background-color: var(--color-bg-panel);
  border-top: 1px solid var(--color-border);
  padding: 2rem;
  margin-top: 4rem;
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Utilities */
.text-accent {
  color: var(--color-accent);
}

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

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

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.code-block {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--color-border);
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-accent);
}

.center {
  text-align: center;
}

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

/* Print Styles */
@media print {
  body::before {
    display: none;
  }

  header {
    position: static;
  }

  .btn {
    border: 1px solid #000;
    color: #000;
  }
}
