/* ==========================================================================
   VERGERE DESIGN SYSTEM — TACTICAL FIELD RELAY & CLOUD STREAMING
   Operational palette: graphite, warm white, muted olive, amber attention
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* --- 1. CSS Custom Properties / Tactical Design Tokens --- */
:root {
  /* Color Palette: Deep Obsidian Core & Tactical Accents */
  --bg-core: #06080C;
  --bg-surface: #0C1018;
  --bg-surface-elevated: #121824;
  --bg-surface-glass: rgba(12, 16, 24, 0.75);
  --bg-card: rgba(14, 20, 32, 0.7);
  --bg-card-hover: rgba(20, 28, 44, 0.85);
  --bg-input: #080B10;
  --bg-modal: rgba(8, 11, 17, 0.92);

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-medium: rgba(255, 255, 255, 0.18);
  --border-cyan: rgba(135, 149, 101, 0.4);
  --border-cyan-glow: rgba(135, 149, 101, 0.8);
  --border-green: rgba(134, 168, 120, 0.4);

  /* Tactical Accents */
  --cyan-primary: #879565;
  --cyan-hover: #A1AD7C;
  --cyan-active: #6F7D50;
  --cyan-subtle: rgba(135, 149, 101, 0.12);
  --cyan-glow: 0 0 24px rgba(135, 149, 101, 0.35);

  --green-live: #86A878;
  --green-hover: #A4C195;
  --green-subtle: rgba(134, 168, 120, 0.12);
  --green-glow: 0 0 20px rgba(134, 168, 120, 0.35);

  --amber-alert: #FFA726;
  --amber-subtle: rgba(255, 167, 38, 0.12);

  --crimson-danger: #FF5252;
  --crimson-subtle: rgba(255, 82, 82, 0.12);

  /* Typography */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-dim: #475569;
  --text-cyan: #879565;
  --text-green: #86A878;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, Menlo, monospace;

  /* Shadows & Depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);
  --shadow-hud: 0 12px 36px rgba(135, 149, 101, 0.15);

  /* Glassmorphism */
  --blur-glass: blur(16px);
  --blur-hud: blur(12px);

  /* Sizing & Radius */
  --container-max: 1240px;
  --header-height: 72px;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Transitions */
  --ease-tactical: cubic-bezier(0.16, 1, 0.3, 1);
  --trans-fast: 0.15s var(--ease-tactical);
  --trans-normal: 0.25s var(--ease-tactical);
  --trans-smooth: 0.4s var(--ease-tactical);
}

/* --- 2. Global Reset & Base Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  background-color: var(--bg-core);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Background Radar Ambient & Tactical Grid */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -2;
  background: var(--bg-core);
}

.bg-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  background-image: none;
  background-size: 40px 40px;
  mask-image: none;
}

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

/* Tactical Corner Accents */
.tactical-box {
  position: relative;
}
.tactical-box::before,
.tactical-box::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
  transition: all var(--trans-normal);
}
.tactical-box::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--cyan-primary);
  border-left: 2px solid var(--cyan-primary);
}
.tactical-box::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--cyan-primary);
  border-right: 2px solid var(--cyan-primary);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--cyan-primary);
  text-decoration: none;
  transition: color var(--trans-fast);
}
a:hover {
  color: var(--cyan-hover);
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
}

/* Code Pills & Badges */
.mono-pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 3px 8px;
  background: rgba(135, 149, 101, 0.08);
  border: 1px solid rgba(135, 149, 101, 0.25);
  border-radius: var(--radius-xs);
  color: var(--cyan-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --- 3. UI Components: Buttons, Badges, Glass Panels --- */

/* Glass Panel Base */
.glass-panel {
  background: var(--bg-surface-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--trans-normal), border-color var(--trans-normal), box-shadow var(--trans-normal);
}

.glass-panel:hover {
  border-color: rgba(135, 149, 101, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 20px rgba(135, 149, 101, 0.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--trans-normal);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--cyan-primary);
  color: #04080F;
  border-color: var(--cyan-primary);
  box-shadow: 0 0 16px rgba(135, 149, 101, 0.35);
}
.btn-primary:hover {
  background: var(--cyan-hover);
  border-color: var(--cyan-hover);
  color: #020408;
  box-shadow: 0 0 24px rgba(135, 149, 101, 0.6);
  transform: translateY(-2px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(18, 24, 36, 0.85);
  color: var(--text-primary);
  border-color: var(--border-glass);
  backdrop-filter: var(--blur-glass);
}
.btn-secondary:hover {
  background: rgba(26, 36, 54, 0.9);
  border-color: var(--border-cyan);
  color: var(--cyan-primary);
  transform: translateY(-2px);
}

.btn-live {
  background: rgba(134, 168, 120, 0.12);
  color: var(--green-live);
  border-color: var(--green-live);
  box-shadow: 0 0 16px rgba(134, 168, 120, 0.2);
}
.btn-live:hover {
  background: var(--green-live);
  color: #04080F;
  box-shadow: 0 0 24px rgba(134, 168, 120, 0.5);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-xs);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.badge-cyan {
  background: var(--cyan-subtle);
  border-color: rgba(135, 149, 101, 0.35);
  color: var(--cyan-primary);
}

.badge-green {
  background: var(--green-subtle);
  border-color: rgba(134, 168, 120, 0.35);
  color: var(--green-live);
}

.badge-amber {
  background: var(--amber-subtle);
  border-color: rgba(255, 167, 38, 0.35);
  color: var(--amber-alert);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  position: relative;
}

/* Capability availability is always expressed with text and color. */
.capability-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  margin-bottom: 12px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-transform: uppercase;
}

.capability-status-available {
  color: #62f5a5;
  background: rgba(134, 168, 120, 0.1);
}

.capability-status-validation {
  color: #ffc766;
  background: rgba(255, 167, 38, 0.12);
}

.capability-status-planned {
  color: #A1AD7C;
  background: rgba(135, 149, 101, 0.12);
}

.capability-status-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: -8px 0 28px;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(8, 12, 19, 0.55);
}

.capability-status-legend-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.4;
}

.capability-status-legend-item .capability-status {
  margin-bottom: 0;
}

.badge-live-pulse .badge-dot {
  background: var(--green-live);
  box-shadow: 0 0 8px var(--green-live);
}
.badge-live-pulse .badge-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--green-live);
  animation: radar-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radar-ping {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Section Common Layout */
section {
  padding: 96px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 56px auto;
}

.section-tag {
  display: inline-block;
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
}
.section-title span {
  color: var(--cyan-primary);
  background: none;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  font-size: 1.08rem;
  line-height: 1.7;
}

/* ==========================================================================
   4. Header & Navigation Bar
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(6, 8, 12, 0.85);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--border-glass);
  transition: all var(--trans-normal);
}

.site-header.scrolled {
  background: rgba(6, 8, 12, 0.95);
  border-bottom-color: rgba(135, 149, 101, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

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

/* Brand Logo */
.brand-logo {
  display: block;
  width: clamp(132px, 16vw, 168px);
  height: auto;
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
}

.brand-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(135, 149, 101, 0.1);
  border: 1px solid rgba(135, 149, 101, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-primary);
  box-shadow: 0 0 14px rgba(135, 149, 101, 0.2);
  transition: all var(--trans-normal);
}
.brand:hover .brand-icon-wrapper {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 20px rgba(135, 149, 101, 0.45);
  transform: rotate(45deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-title {
  line-height: 1;
}
.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--cyan-primary);
  letter-spacing: 0.18em;
  margin-top: 3px;
}

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

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--trans-fast);
  position: relative;
  padding: 6px 0;
}
.nav-link:hover, .nav-link.active {
  color: var(--cyan-primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan-primary);
  transition: width var(--trans-normal);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   5. Hero Section & Tactical Portal Input
   ========================================================================== */
.hero-section {
  padding-top: calc(var(--header-height) + 64px);
  padding-bottom: 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

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

.hero-badges-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.hero-title {
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--cyan-primary);
  background: none;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.12rem;
  line-height: 1.7;
  margin-bottom: 28px;
}
.hero-subtitle strong {
  color: var(--text-primary);
}

/* Live Token Portal Launcher Form */
.token-portal-card {
  background: rgba(14, 20, 32, 0.85);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(135, 149, 101, 0.15);
  margin-bottom: 24px;
}

.portal-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.portal-label span.status {
  color: var(--green-live);
  display: flex;
  align-items: center;
  gap: 4px;
}

.portal-input-group {
  display: flex;
  align-items: stretch;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
}
.portal-input-group:focus-within {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 14px rgba(135, 149, 101, 0.3);
}

.portal-prefix {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border-subtle);
  user-select: none;
}

.portal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cyan-primary);
  padding: 12px 16px;
}
.portal-input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.portal-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.preset-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--trans-fast);
}
.preset-pill:hover {
  background: var(--cyan-subtle);
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
}

/* Quick Metrics Bar */
.hero-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
}
.metric-value {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}
.metric-value.cyan { color: var(--cyan-primary); }
.metric-value.green { color: var(--green-live); }
.metric-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   6. Interactive Tactical HUD Simulator Frame
   ========================================================================== */
.hud-visual-container {
  position: relative;
}

.hud-device-wrapper {
  background: #080C14;
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-xl);
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(135, 149, 101, 0.2);
  position: relative;
}

.hud-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020408;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#hudCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Tactical HUD Scanlines Overlay */
.hud-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: none;
  background-size: 100% 3px, 6px 100%;
  z-index: 2;
  opacity: 0.6;
}

/* HUD Overlay Layer */
.hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  z-index: 3;
}

.hud-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.hud-tag-live {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 8, 12, 0.75);
  backdrop-filter: var(--blur-hud);
  border: 1px solid rgba(134, 168, 120, 0.4);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green-live);
}

.hud-telemetry-pill {
  display: flex;
  gap: 12px;
  background: rgba(6, 8, 12, 0.75);
  backdrop-filter: var(--blur-hud);
  border: 1px solid var(--border-glass);
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.hud-telemetry-pill span strong {
  color: var(--cyan-primary);
}

/* Crosshair & Pitch Reticle */
.hud-center-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border: 1px dashed rgba(135, 149, 101, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hud-center-crosshair::before,
.hud-center-crosshair::after {
  content: '';
  position: absolute;
  background: var(--cyan-primary);
}
.hud-center-crosshair::before {
  width: 14px;
  height: 2px;
}
.hud-center-crosshair::after {
  width: 2px;
  height: 14px;
}

.hud-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.hud-stream-metrics {
  display: flex;
  gap: 8px;
}

.hud-metric-badge {
  background: rgba(6, 8, 12, 0.8);
  backdrop-filter: var(--blur-hud);
  border: 1px solid var(--border-glass);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.hud-metric-badge strong {
  color: var(--text-primary);
}
.hud-metric-badge.green strong {
  color: var(--green-live);
}
.hud-metric-badge.cyan strong {
  color: var(--cyan-primary);
}

/* HUD Hardware Controls Panel */
.hud-controls-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding: 6px 4px;
}

.hud-channels-btn-group {
  display: flex;
  gap: 6px;
}

.hud-channel-btn {
  background: rgba(18, 24, 36, 0.6);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
}
.hud-channel-btn:hover, .hud-channel-btn.active {
  background: rgba(135, 149, 101, 0.15);
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
}

.hud-util-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--trans-fast);
}
.hud-util-btn:hover {
  border-color: var(--border-glass);
  color: var(--text-primary);
}

/* ==========================================================================
   7. Core Architecture Grid (4 Pillars)
   ========================================================================== */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.arch-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.arch-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: none;
  opacity: 0;
  transition: opacity var(--trans-normal);
}
.arch-card:hover .arch-card-glow {
  opacity: 1;
}

.arch-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(135, 149, 101, 0.08);
  border: 1px solid rgba(135, 149, 101, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-primary);
  margin-bottom: 20px;
}

.arch-card-title {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arch-card-desc {
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 24px;
}

.arch-specs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.arch-spec-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.arch-spec-item svg {
  color: var(--cyan-primary);
  flex-shrink: 0;
}

/* ==========================================================================
   8. Tactical Features & Field Capabilities
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all var(--trans-normal);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(135, 149, 101, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 16px rgba(135, 149, 101, 0.1);
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(134, 168, 120, 0.08);
  border: 1px solid rgba(134, 168, 120, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-live);
  margin-bottom: 18px;
}
.feature-icon-wrapper.cyan {
  background: rgba(135, 149, 101, 0.08);
  border-color: rgba(135, 149, 101, 0.25);
  color: var(--cyan-primary);
}

.feature-title {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.9rem;
  line-height: 1.6;
}

.capability-roadmap {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: center;
  margin-top: 24px;
  padding: 22px 24px;
  border: 1px solid rgba(135, 149, 101, 0.24);
  border-radius: var(--radius-md);
  background: rgba(8, 14, 23, 0.64);
}

.capability-roadmap .capability-status {
  margin-bottom: 8px;
}

.capability-roadmap h3 {
  margin-bottom: 5px;
  font-size: 1.05rem;
}

.capability-roadmap p,
.capability-roadmap li {
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.capability-roadmap ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.capability-roadmap li::marker {
  color: #A1AD7C;
}

/* ==========================================================================
   9. Interactive RTMP Stream URL Generator
   ========================================================================== */
.generator-container {
  background: var(--bg-surface-glass);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.generator-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-select, .form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--trans-fast);
}
.form-select:focus, .form-input:focus {
  border-color: var(--cyan-primary);
}

.generator-output-box {
  background: #04070D;
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.output-code-block {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--cyan-primary);
  word-break: break-all;
  background: rgba(0, 0, 0, 0.5);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(135, 149, 101, 0.3);
  margin: 16px 0;
  position: relative;
}

.copy-btn-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   10. Hardware Homologation Matrix Table
   ========================================================================== */
.matrix-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.matrix-table th, .matrix-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.matrix-table th {
  background: rgba(18, 24, 36, 0.95);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
}

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

.matrix-table tr:hover td {
  background: rgba(135, 149, 101, 0.03);
}

/* ==========================================================================
   11. Download & Installation Center
   ========================================================================== */
.download-card-wrapper {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  background: var(--bg-surface-glass);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.checksum-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checksum-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.steps-list {
  list-style: none;
  counter-reset: tactical-step;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step-item {
  position: relative;
  padding-left: 44px;
}
.step-item::before {
  counter-increment: tactical-step;
  content: counter(tactical-step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  background: rgba(135, 149, 101, 0.1);
  border: 1px solid rgba(135, 149, 101, 0.3);
  color: var(--cyan-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   12. FAQ Accordion
   ========================================================================== */
.faq-grid {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--trans-fast);
}
.faq-item.active {
  border-color: var(--border-cyan);
}

.faq-trigger {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--cyan-primary);
  transition: transform var(--trans-normal);
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out;
}
.faq-body {
  padding: 0 24px 20px 24px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ==========================================================================
   13. Footer & System Status Hub
   ========================================================================== */
.site-footer {
  background: #040609;
  border-top: 1px solid var(--border-glass);
  padding: 64px 0 32px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand-desc {
  font-size: 0.9rem;
  margin-top: 16px;
  max-width: 320px;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color var(--trans-fast);
}
.footer-link:hover {
  color: var(--cyan-primary);
}

.footer-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(12, 16, 24, 0.95);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--cyan-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 16px rgba(135, 149, 101, 0.3);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--trans-normal);
  pointer-events: auto;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   14. Responsive Media Queries
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .arch-grid {
    grid-template-columns: 1fr;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .capability-status-legend,
  .capability-roadmap {
    grid-template-columns: 1fr;
  }
  .generator-grid, .download-card-wrapper {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(6, 8, 12, 0.98);
    backdrop-filter: var(--blur-glass);
    border-bottom: 1px solid var(--border-glass);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    transform: translateY(-150%);
    transition: transform var(--trans-smooth);
  }
  .nav-menu.open {
    transform: translateY(0);
  }
  .mobile-menu-btn {
    display: flex;
  }
  .hero-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .capability-status-legend {
    gap: 10px;
    margin-top: 0;
  }
  .capability-roadmap {
    padding: 18px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* --- Accessibility and hierarchy refinements --- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--cyan-primary);
  color: #04080F;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--trans-fast);
}
.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--cyan-primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(135, 149, 101, 0.2);
}

.site-header .container { min-height: var(--header-height); }
.nav-link { padding: 8px 2px; }
.section-desc { max-width: 62ch; }
.hero-title { max-width: 14ch; font-size: clamp(2.5rem, 5vw, 4.35rem); }
.hero-subtitle { max-width: 62ch; color: #B7C3D4; }
.hero-metrics-bar { border-top: 1px solid var(--border-subtle); padding-top: 20px; }
.metric-label { max-width: 13ch; }
.hud-channel-btn, .hud-util-btn, .preset-pill { min-height: 40px; }
.faq-trigger { min-height: 56px; }

@media (max-width: 1024px) {
  .site-header nav { order: 3; }
  .header-actions { gap: 8px; }
  .header-actions > .badge { display: none; }
}

@media (max-width: 768px) {
  .container { padding-left: 18px; padding-right: 18px; }
  .hero-section { padding-top: calc(var(--header-height) + 36px); padding-bottom: 56px; }
  .hero-title { max-width: none; font-size: clamp(2.35rem, 12vw, 3.5rem); }
  .hero-subtitle { font-size: 1rem; }
  .portal-input-group { flex-wrap: wrap; }
  .portal-prefix { flex: 1 0 100%; border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .portal-input { min-width: 0; }
  .portal-input-group .btn { min-height: 48px; }
  .header-actions > .btn { display: none; }
  .mobile-menu-btn { min-width: 44px; min-height: 44px; }
  .nav-menu.open { max-height: calc(100vh - var(--header-height)); overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn-primary:hover, .btn-secondary:hover, .btn-live:hover { transform: none; }
}

/* --- Minimal tactical visual direction ---------------------------------- */
/* Keep the information architecture and live status semantics, while
   removing decorative sci-fi treatments in favor of calm, solid surfaces. */
:root {
  --bg-core: #111311;
  --bg-surface: #1a1c18;
  --bg-surface-elevated: #24261f;
  --bg-surface-glass: #1d201a;
  --bg-card: #20231c;
  --bg-card-hover: #292d23;
  --bg-input: #151713;
  --bg-modal: #1a1c18;
  --border-subtle: #35382e;
  --border-glass: #474a3e;
  --border-medium: #5b604f;
  --border-cyan: #596348;
  --border-cyan-glow: #78855d;
  --cyan-primary: #879565;
  --cyan-hover: #a1ad7c;
  --cyan-active: #6f7d50;
  --cyan-subtle: #252c20;
  --cyan-glow: none;
  --text-primary: #f3efe4;
  --text-secondary: #c0bbae;
  --text-muted: #938e83;
  --text-dim: #6e6a61;
  --text-cyan: #879565;
  --text-green: #86a878;
  --green-live: #86a878;
  --green-hover: #a4c195;
  --green-subtle: #263326;
  --green-glow: none;
  --amber-alert: #c7924c;
  --amber-subtle: #382d1f;
  --crimson-danger: #c96f68;
  --crimson-subtle: #3a2524;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .28);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .22);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, .26);
  --shadow-hud: 0 10px 24px rgba(0, 0, 0, .24);
  --blur-glass: none;
  --blur-hud: none;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

.bg-ambient,
.bg-grid-overlay { display: none; }

.tactical-box::before,
.tactical-box::after { display: none; }

.glass-panel,
.generator-container,
.download-card-wrapper {
  background: var(--bg-surface-glass);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: var(--shadow-md);
}

.glass-panel:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.site-header,
.site-header.scrolled,
.nav-menu {
  background: var(--bg-core);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.site-header.scrolled { border-bottom-color: var(--border-medium); }

.brand-icon-wrapper {
  background: var(--cyan-subtle);
  border-color: var(--border-cyan);
  box-shadow: none;
}
.brand:hover .brand-icon-wrapper {
  border-color: var(--cyan-primary);
  box-shadow: none;
  transform: none;
}

.hero-title span,
.section-title span {
  color: var(--cyan-primary);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.btn-primary {
  box-shadow: none;
}
.btn-primary:hover,
.btn-secondary:hover,
.btn-live:hover {
  transform: none;
  box-shadow: none;
}

.token-portal-card,
.arch-card,
.feature-card,
.matrix-table-container,
.faq-item,
.capability-roadmap {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.token-portal-card { box-shadow: var(--shadow-sm); }
.portal-input-group:focus-within { box-shadow: none; }
.feature-card:hover {
  transform: none;
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}
.arch-card-glow { display: none; }

.hud-device-wrapper { box-shadow: var(--shadow-hud); }
.hud-scanlines { display: none; }
.hud-tag-live,
.hud-telemetry-pill,
.hud-metric-badge {
  background: rgba(11, 16, 22, .9);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.badge-live-pulse .badge-dot,
.badge-live-pulse .badge-dot::after { animation: none; box-shadow: none; }
.toast { box-shadow: var(--shadow-md); backdrop-filter: none; -webkit-backdrop-filter: none; }

@media (prefers-reduced-motion: no-preference) {
  .nav-link::after { transition-duration: .15s; }
}
