/**
 * UGKOS Design System
 * Mission-control aesthetic — Bloomberg Terminal meets space program
 * Dark mode, gold accents, HUD panels, monospace data
 */

/* ======================================================
   GOOGLE FONTS IMPORT
   ====================================================== */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ======================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ====================================================== */
:root {
  /* Base colors */
  --bg:           #0a0a0a;
  --bg-deep:      #050505;
  --surface:      #111111;
  --surface2:     #161616;
  --surface3:     #1c1c1c;
  --surface4:     #222222;

  /* Borders */
  --border:       rgba(255,255,255,0.08);
  --border2:      rgba(255,255,255,0.13);
  --border3:      rgba(255,255,255,0.18);

  /* Text */
  --text:         #f0f0f0;
  --text-muted:   #888888;
  --text-dim:     #555555;

  /* Gold — primary brand accent */
  --gold:         #C9A84C;
  --gold-bright:  #e0bb5a;
  --gold-dim:     rgba(201,168,76,0.12);
  --gold-glow:    rgba(201,168,76,0.20);
  --gold-border:  rgba(201,168,76,0.35);

  /* Green — operational status */
  --green:        #1DB954;
  --green-bright: #22c55e;
  --green-dim:    rgba(29,185,84,0.12);
  --green-border: rgba(29,185,84,0.35);

  /* Other status colors */
  --yellow:       #eab308;
  --yellow-dim:   rgba(234,179,8,0.12);
  --red:          #ef4444;
  --red-dim:      rgba(239,68,68,0.12);
  --orange:       #f97316;
  --orange-dim:   rgba(249,115,22,0.12);
  --blue:         #3b82f6;
  --blue-dim:     rgba(59,130,246,0.12);

  /* Typography */
  --font:         'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Syne', var(--font);
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --radius:       8px;
  --radius-sm:    5px;
  --radius-lg:    12px;

  /* Nav height (for sticky positioning math) */
  --nav-height:   58px;
}

/* ======================================================
   RESET & BASE
   ====================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ======================================================
   GRID OVERLAY (scanline / subtle texture)
   ====================================================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.018) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ======================================================
   GLOBAL NAVIGATION
   ====================================================== */
.ugkos-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 0;
}

/* Gold top accent line */
.ugkos-nav::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 30%, var(--gold) 70%, transparent 100%);
  opacity: 0.5;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  margin-right: 24px;
}

.nav-brand-mark {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--gold);
  background: var(--gold-dim);
  flex-shrink: 0;
}

.nav-brand-text {
  line-height: 1.1;
}

.nav-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.nav-brand-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 1px;
}

/* Nav links container */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-link {
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  position: relative;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.nav-link.active {
  color: var(--text);
  background: rgba(255,255,255,0.07);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.nav-link-gold {
  color: var(--gold) !important;
  background: var(--gold-dim) !important;
  border: 1px solid var(--gold-border) !important;
}
.nav-link-gold:hover {
  background: var(--gold-glow) !important;
}

/* Nav right actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 12px;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

.nav-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: navPulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes navPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(29,185,84,0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(29,185,84,0); }
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 6px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  background: transparent;
  margin-left: auto;
}

.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.2s;
}

/* Mobile menu */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border2);
  padding: 12px 16px;
  flex-direction: column;
  gap: 4px;
  z-index: 999;
}

.nav-mobile-menu.open {
  display: flex;
}

.nav-mobile-link {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  display: block;
}

.nav-mobile-link:hover,
.nav-mobile-link.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

/* ======================================================
   HUD PANEL COMPONENTS
   ====================================================== */
.hud-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.hud-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* Gold-bordered variant */
.hud-panel-gold {
  border-color: var(--gold-border);
  background: linear-gradient(135deg, rgba(201,168,76,0.06) 0%, var(--surface) 60%);
}

/* Corner accent marks */
.hud-panel-corners::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 20px; height: 20px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  border-radius: 0 var(--radius-lg) 0 0;
  opacity: 0.4;
}

.hud-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.hud-panel-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-panel-title-icon {
  color: var(--gold);
}

/* ======================================================
   STATUS PILLS & BADGES
   ====================================================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid;
}

.status-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-green  { color: var(--green);  border-color: var(--green-border); background: var(--green-dim); }
.status-green .status-pill-dot  { background: var(--green); animation: navPulse 2s infinite; }
.status-gold   { color: var(--gold);   border-color: var(--gold-border);  background: var(--gold-dim); }
.status-gold .status-pill-dot   { background: var(--gold); }
.status-yellow { color: var(--yellow); border-color: rgba(234,179,8,0.35);  background: var(--yellow-dim); }
.status-red    { color: var(--red);    border-color: rgba(239,68,68,0.35);  background: var(--red-dim); }
.status-blue   { color: var(--blue);   border-color: rgba(59,130,246,0.35); background: var(--blue-dim); }
.status-muted  { color: var(--text-muted); border-color: var(--border2); background: transparent; }

/* ======================================================
   BUTTONS
   ====================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text-muted);
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font);
  line-height: 1;
}

.btn:hover {
  background: var(--surface3);
  border-color: var(--border3);
  color: var(--text);
}

.btn-gold {
  background: var(--gold-dim);
  border-color: var(--gold-border);
  color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-green {
  background: var(--green-dim);
  border-color: var(--green-border);
  color: var(--green);
}
.btn-green:hover {
  background: rgba(29,185,84,0.20);
  color: var(--green-bright);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border2);
  color: var(--text-muted);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 14px;
}

/* ======================================================
   STAT CARDS (metric displays)
   ====================================================== */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-card-gold  { border-left: 3px solid var(--gold);  }
.stat-card-green { border-left: 3px solid var(--green); }
.stat-card-blue  { border-left: 3px solid var(--blue);  }
.stat-card-red   { border-left: 3px solid var(--red);   }

/* ======================================================
   GOLD GLOW DIVIDER
   ====================================================== */
.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.3;
  margin: 32px 0;
}

/* ======================================================
   SECTION LABELS (eyebrow text)
   ====================================================== */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

/* ======================================================
   LAYER/ARCHITECTURE CARDS
   ====================================================== */
.layer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.layer-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
}

.layer-card-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.layer-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.layer-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.layer-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ======================================================
   LIVE TICKER / STATUS BAR
   ====================================================== */
.status-ticker {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  font-family: var(--font-mono);
  font-size: 11px;
}
.status-ticker::-webkit-scrollbar { display: none; }

.ticker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ticker-dot-green  { background: var(--green);  animation: navPulse 2s infinite; }
.ticker-dot-gold   { background: var(--gold); }
.ticker-dot-blue   { background: var(--blue); }
.ticker-dot-yellow { background: var(--yellow); }
.ticker-dot-muted  { background: var(--text-dim); }

.ticker-label { color: var(--text-dim); }
.ticker-value { color: var(--text); font-weight: 600; }
.ticker-value-gold { color: var(--gold); font-weight: 600; }
.ticker-value-green { color: var(--green); font-weight: 600; }

.ticker-sep {
  color: var(--border3);
  flex-shrink: 0;
}

/* ======================================================
   COMPARISON TABLE (competitive positioning)
   ====================================================== */
.compare-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  vertical-align: top;
}

.compare-table tr:last-child td { border-bottom: none; }

.compare-table tr:hover td { background: rgba(255,255,255,0.02); }

.compare-row-ugkos td {
  background: var(--gold-dim) !important;
  color: var(--text) !important;
}

.compare-row-ugkos td:first-child {
  border-left: 3px solid var(--gold);
}

.compare-check {
  color: var(--green);
  font-weight: 700;
}

.compare-x {
  color: var(--red);
  opacity: 0.7;
}

.compare-partial {
  color: var(--yellow);
}

/* ======================================================
   RESPONSIVE / MOBILE
   ====================================================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-hamburger { display: flex; }

  /* Mobile nav open state — toggled by hamburger button */
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border2);
    padding: 10px 16px 16px;
    gap: 3px;
    z-index: 999;
  }

  .nav-links.open .nav-link {
    padding: 11px 14px;
    font-size: 14px;
    border-radius: var(--radius);
  }

  .stat-value { font-size: 22px; }
}

@media (max-width: 480px) {
  .ugkos-nav { padding: 0 14px; }
  .nav-brand-sub { display: none; }
}
