@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@600;700&family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #F8FAFC;          /* Light main background (Slate 50) */
  --bg-panel: #FFFFFF;         /* White cards/panels background */
  --bg-blueprint: #E2E8F0;     /* Border / grid lines (Slate 200) */
  --text-muted: #475569;       /* Muted text (Slate 600) */
  --text-light: #0F172A;       /* Primary text (Slate 900) */
  --accent-amber: #D97706;     /* Dark Amber for clear contrast (Amber 600) */
  --sensor-green: #059669;     /* Emerald 600 for status */
  --critical-red: #DC2626;     /* Red 600 for failures */
  --arc-blue: #2563EB;         /* Blue 600 for diagnostics */
  --hairline: rgba(15, 23, 42, 0.08); /* Fine divider lines */
  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --header-height: 80px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Subtle Film Grain Overlay */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.02;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Blueprint Grid Background (Light Mode version) */
.blueprint-grid {
  background-image: 
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--text-light);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  border-bottom: 2px solid var(--accent-amber);
  display: inline-block;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
}

.text-mono {
  font-family: var(--font-mono);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-padding {
  padding: clamp(4rem, 8vw, 8rem) 0;
}

.flex { display: flex; }
.grid { display: grid; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-4 { gap: 2rem; }

.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Buttons - Visible & High Contrast on Light Background */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.75rem;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  font-size: 0.85rem;
  gap: 0.5rem;
  outline: none;
}

.btn-primary {
  background-color: var(--text-light); /* Slate 900 background */
  color: var(--bg-panel);            /* White text */
  border: 1px solid var(--text-light);
}

.btn-primary:hover {
  background-color: var(--accent-amber);
  color: var(--bg-panel);
  border-color: var(--accent-amber);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

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

.btn-secondary:hover {
  background-color: var(--text-light);
  color: var(--bg-panel);
}

/* Header & Navigation (Light Theme overrides) */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
  z-index: 1000;
  transition: background-color 0.3s;
}

.header-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.brand-main {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
  line-height: 1;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-light);
}

/* Dropdown Menu (Light theme) */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: var(--bg-panel);
  border: 1px solid var(--bg-blueprint);
  padding: 0.75rem 0;
  width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.dropdown-link:hover {
  color: var(--accent-amber);
  background-color: var(--bg-dark);
}

/* Console Cards & Panels (Light Theme) */
.console-card {
  background-color: var(--bg-panel);
  border: 1px solid var(--bg-blueprint);
  padding: 2.25rem 2rem;
  position: relative;
  transition: border-color 0.3s, transform 0.3s;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

.console-card:hover {
  border-color: var(--arc-blue);
}

.card-label {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Status Indicator Dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-green {
  background-color: var(--sensor-green);
  box-shadow: 0 0 8px var(--sensor-green);
  animation: pulse-green 2s infinite;
}

.status-red {
  background-color: var(--critical-red);
  box-shadow: 0 0 8px var(--critical-red);
  animation: pulse-red 2s infinite;
}

.status-amber {
  background-color: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
  animation: pulse-amber 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

@keyframes pulse-amber {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(217, 119, 6, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

/* Telemetry Ticker */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background-color: #F1F5F9;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 0.6rem 0;
  display: flex;
}

.ticker {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-slide 60s linear infinite;
  padding-right: 2rem;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0 2rem;
  border-right: 1px solid var(--hairline);
}

.ticker-item span {
  color: var(--text-light);
  font-weight: 600;
}

@keyframes ticker-slide {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* Footer Specifications (Dark Corporate anchoring) */
footer {
  background-color: #0F172A; /* Contrast dark footer */
  color: #E2E8F0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5rem 0 2rem;
  position: relative;
}

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

.footer-info h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.footer-info p {
  color: #94A3B8 !important;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.footer-links h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
}

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

.footer-links ul li {
  margin-bottom: 0.75rem;
}

.footer-links ul li a {
  color: #94A3B8 !important;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links ul li a:hover {
  color: var(--accent-amber) !important;
}

.footer-legal-block {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-copyright {
  font-size: 0.75rem;
  color: #94A3B8;
}

.footer-disclaimer {
  max-width: 500px;
  font-size: 0.7rem;
  color: #94A3B8 !important;
  line-height: 1.4;
  text-align: right;
}

.footer-giant-wordmark {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.02) !important;
  line-height: 0.8;
  margin-top: 2rem;
  user-select: none;
  pointer-events: none;
  text-align: center;
  width: 100%;
}

.footer-logo-powered {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.powered-by {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-amber) !important;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Inverted / Section division contrast panels */
.paper-section {
  background-color: #F1F5F9; /* Slate 100 background */
  color: var(--text-light);
  border-top: 1px solid var(--bg-blueprint);
  border-bottom: 1px solid var(--bg-blueprint);
}

.paper-section h1, .paper-section h2, .paper-section h3, .paper-section h4 {
  color: var(--text-light);
}

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

.paper-section .console-card {
  background-color: #FFFFFF;
  border-color: var(--bg-blueprint);
  color: var(--text-light);
}

.paper-section .console-card:hover {
  border-color: var(--arc-blue);
}

.paper-section .btn-secondary {
  border-color: var(--text-light);
  color: var(--text-light);
}

.paper-section .btn-secondary:hover {
  background-color: var(--text-light);
  color: var(--bg-panel);
}

/* Mobile responsive drawer (Light theme) */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100vh;
  background-color: var(--bg-panel);
  border-left: 1px solid var(--bg-blueprint);
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  box-shadow: -10px 0 25px rgba(15, 23, 42, 0.05);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  list-style: none;
}

.mobile-drawer-link {
  color: var(--text-light);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.mobile-drawer-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.3);
  z-index: 1999;
  display: none;
}

.drawer-backdrop.open {
  display: block;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1.5rem;
  outline: none;
}

/* Accessibility Preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  .ticker {
    animation: none !important;
    white-space: normal !important;
    flex-wrap: wrap !important;
  }
}

/* Standard UI Layout Adjustments */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .footer-disclaimer {
    text-align: left;
  }
}
