/* ========================================================================
   OhMyAgent.dev — AI Agent Control Tower
   Layout: Top navbar + full-width centered sections
   Colors: Geek Black #0D1117 / Neon Green #3FB950 / Alert Orange #D29922
   ======================================================================== */

:root {
  --bg-deep:      #0d1117;
  --bg-surface:   #161b22;
  --bg-raised:    #1c2128;
  --border:       rgba(139, 148, 158, 0.18);
  --border-glow:  rgba(63, 185, 80, 0.35);
  --text:         #e6edf3;
  --text-dim:     #8b949e;
  --text-mid:     #c9d1d9;
  --brand:        #3fb950;
  --brand-dim:    rgba(63, 185, 80, 0.15);
  --warn:         #d29922;
  --warn-dim:     rgba(210, 153, 34, 0.15);
  --danger:       #f85149;
  --danger-dim:   rgba(248, 81, 73, 0.15);
  --radius-lg:    20px;
  --radius-full:  9999px;
  --glass:        rgba(22, 27, 34, 0.72);
  --glass-border: rgba(255, 255, 255, 0.07);
  --shadow:       0 8px 32px rgba(0, 0, 0, 0.4);
  --transition:   0.25s cubic-bezier(0.22, 1, 0.36, 1);
  --navbar-h:     64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--navbar-h) + 20px);
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'JetBrains Mono', Consolas, Monaco, 'Courier New', monospace;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: #7ee787; }

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

/* ═══════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-h);
  z-index: 100;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
}

.brand:hover { color: var(--text); }

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--border-glow);
  padding: 2px;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-dot { color: var(--brand); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 7px 12px;
  border-radius: 12px;
  color: var(--text-dim);
  font-size: 13px;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: var(--brand-dim);
}

.nav-link.active {
  color: var(--brand);
  background: var(--brand-dim);
  border-color: rgba(63, 185, 80, 0.25);
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--brand);
  background: var(--brand-dim);
  border: 1px solid rgba(63, 185, 80, 0.25);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--brand);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.5); }
  50%      { opacity: 0.6; box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
}

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

/* Mobile hamburger */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ═══════════════════════════════════════════════════
   GLASS CARD
   ═══════════════════════════════════════════════════ */
.glass {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.glass:hover { border-color: rgba(63, 185, 80, 0.18); }

.glow-hover { position: relative; }

.glow-hover::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.2), transparent, rgba(210, 153, 34, 0.15));
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}

.glow-hover:hover::after { opacity: 1; }

/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.hero-section {
  padding: calc(var(--navbar-h) + 60px) 0 70px;
  position: relative;
  overflow: hidden;
}

.hero-compact {
  padding-bottom: 40px;
}

.hero-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(63, 185, 80, 0.08) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.hero-section h1 {
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.15;
  font-weight: 700;
  max-width: 780px;
}

.highlight {
  background: linear-gradient(90deg, var(--brand), #7ee787);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-mid);
  max-width: 680px;
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.75;
}

.cta-row {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--glass-border);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  color: var(--text);
}

.btn-brand {
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.3), rgba(63, 185, 80, 0.1));
  border-color: rgba(63, 185, 80, 0.5);
}
.btn-brand:hover { border-color: var(--brand); box-shadow: 0 0 24px rgba(63, 185, 80, 0.2); }

.btn-warn {
  background: linear-gradient(135deg, rgba(210, 153, 34, 0.25), rgba(210, 153, 34, 0.08));
  border-color: rgba(210, 153, 34, 0.5);
}
.btn-warn:hover { border-color: var(--warn); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--brand-dim); border-color: rgba(63, 185, 80, 0.3); }

/* ═══════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════ */
.section {
  padding: 70px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(22, 27, 34, 0.4), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-label {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--brand);
  margin-bottom: 10px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: var(--brand-dim);
  border: 1px solid rgba(63, 185, 80, 0.2);
}

.section-header h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  margin-top: 8px;
}

.section-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 10px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════════════════
   FEATURE GRID
   ═══════════════════════════════════════════════════ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 26px;
  transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: rgba(63, 185, 80, 0.3);
  transform: translateY(-3px);
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border-glow);
  background: var(--brand-dim);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.feature-icon img { width: 28px; height: 28px; }

.feature-icon.warn {
  border-color: rgba(210, 153, 34, 0.4);
  background: var(--warn-dim);
}

.feature-icon.danger {
  border-color: rgba(248, 81, 73, 0.4);
  background: var(--danger-dim);
}

.feature-card h3 { font-size: 16px; font-weight: 600; }

.feature-card .pain {
  font-size: 12px;
  color: var(--warn);
  margin-bottom: 4px;
}

.feature-card .desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.feature-card ul {
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.9;
}

.feature-card li::marker { color: var(--brand); }

/* ═══════════════════════════════════════════════════
   LIVE TOPOLOGY + WALLET
   ═══════════════════════════════════════════════════ */
.panel-split {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 16px;
}

.topo-panel { padding: 24px; }

.topo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.topo-header h3 { font-size: 15px; font-weight: 600; }

.legend { display: flex; gap: 14px; font-size: 11px; color: var(--text-dim); }
.legend-item { display: flex; align-items: center; gap: 5px; }

.dot { width: 8px; height: 8px; border-radius: var(--radius-full); }
.dot-ok   { background: var(--brand); }
.dot-wait { background: var(--warn); }
.dot-err  { background: var(--danger); }

.topo-canvas {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  min-height: 200px;
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.03), rgba(210, 153, 34, 0.02));
  position: relative;
  overflow: hidden;
}

.topo-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(139, 148, 158, 0.04) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(139, 148, 158, 0.04) 40px);
  pointer-events: none;
}

.flow-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  position: relative;
  z-index: 1;
}

.agent-node {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.7);
  font-size: 12px;
  white-space: nowrap;
  transition: all var(--transition);
  cursor: default;
}

.agent-node:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 20px rgba(63, 185, 80, 0.12);
}

.agent-node .node-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.edge {
  display: flex;
  align-items: center;
  padding: 0 6px;
  color: var(--text-dim);
  font-size: 16px;
  opacity: 0.5;
}

.payload-hint {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.6);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
  overflow-x: auto;
}

.payload-hint .key { color: var(--brand); }
.payload-hint .str { color: var(--warn); }
.payload-hint .num { color: #79c0ff; }

.scan-line {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0.3;
  animation: scan 4s linear infinite;
  z-index: 0;
}

@keyframes scan {
  0%   { left: -100%; }
  100% { left: 100%; }
}

/* Wallet */
.wallet-panel { padding: 24px; }
.wallet-panel h3 { font-size: 15px; font-weight: 600; margin-bottom: 18px; }

.metric-row { margin-bottom: 16px; }

.metric-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 6px;
}

.metric-label .val { font-weight: 600; color: var(--text); }

.meter {
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.meter-fill.green  { background: linear-gradient(90deg, #238636, var(--brand)); }
.meter-fill.orange { background: linear-gradient(90deg, #9e6a03, var(--warn)); }
.meter-fill.red    { background: linear-gradient(90deg, #da3633, var(--danger)); }

.wallet-total {
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  background: var(--brand-dim);
  border: 1px solid rgba(63, 185, 80, 0.25);
  text-align: center;
}

.wallet-total .amount {
  font-size: 30px;
  font-weight: 700;
  color: var(--brand);
}

.wallet-total .label {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════
   CTA BANNER
   ═══════════════════════════════════════════════════ */
.cta-banner {
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.cta-banner h2 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════
   LINK GRID (links.html)
   ═══════════════════════════════════════════════════ */
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.link-card {
  padding: 22px;
  transition: border-color var(--transition), transform var(--transition);
}

.link-card:hover {
  border-color: rgba(63, 185, 80, 0.25);
  transform: translateY(-3px);
}

.link-card h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-card h4 .card-icon {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.link-card a {
  display: block;
  padding: 7px 0;
  color: var(--text-mid);
  font-size: 13px;
  border-bottom: 1px solid rgba(139, 148, 158, 0.08);
  transition: color var(--transition), padding-left var(--transition);
}

.link-card a:last-child { border-bottom: none; }

.link-card a:hover {
  color: var(--brand);
  padding-left: 6px;
}

.link-card a::before {
  content: '\2192\00a0';
  color: var(--brand);
  opacity: 0;
  transition: opacity var(--transition);
}

.link-card a:hover::before { opacity: 1; }

/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 50px;
  padding-bottom: 20px;
  margin-top: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand { max-width: 260px; }

.footer-tagline {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 10px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  color: var(--text-mid);
  font-size: 13px;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--brand); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
}

/* ═══════════════════════════════════════════════════
   TYPING CURSOR
   ═══════════════════════════════════════════════════ */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--brand);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--navbar-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(13, 17, 23, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    gap: 4px;
  }

  .nav-links.open { display: flex; }

  .mobile-toggle { display: flex; }

  .status-badge { display: none; }

  .feature-grid { grid-template-columns: 1fr; }
  .panel-split  { grid-template-columns: 1fr; }
  .link-grid    { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .cta-banner   { flex-direction: column; text-align: center; }
  .cta-banner .cta-row { justify-content: center; }
}

@media (max-width: 640px) {
  .hero-section { padding-top: calc(var(--navbar-h) + 36px); padding-bottom: 40px; }
  .section      { padding: 44px 0; }
  .link-grid    { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}
