/* =============================================================
   NIVE — Shared Design System & Core Stylesheet
   ============================================================= */

:root {
  --gold: #C6A15B;
  --gold-glow: rgba(198, 161, 91, 0.25);
  --w70: rgba(var(--ink-rgb), 0.70);
  --w58: rgba(var(--ink-rgb), 0.58);
  --w40: rgba(var(--ink-rgb), 0.40);
  --w30: rgba(var(--ink-rgb), 0.30);
  --w28: rgba(var(--ink-rgb), 0.28);
  --w15: rgba(var(--ink-rgb), 0.15);
  --w10: rgba(var(--ink-rgb), 0.10);
  --w05: rgba(var(--ink-rgb), 0.05);
  --bg-dark: #000000;
  --card: #0A0A0A;
  --card-bg: #0A0A0A;
}

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

html, body {
  min-height: 100%;
  background: var(--bg-dark);
  color: #fff;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

/* Grid Background */
.grid-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.35;
  background-image: linear-gradient(rgba(var(--ink-rgb), 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--ink-rgb), 0.02) 1px, transparent 1px);
  background-size: 100px 100px; background-position: center center;
}

/* Header Component */
header {
  position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px; border-bottom: 1px solid var(--w05); background: rgba(var(--surface-rgb), 0.85); backdrop-filter: blur(12px);
}
.header-left { display: flex; align-items: center; gap: 40px; }
.mark {
  font-family: 'Space Grotesk', sans-serif; font-weight: 500; color: var(--gold);
  font-size: 22px; letter-spacing: .38em; text-decoration: none; transition: opacity 0.25s;
}
.mark:hover { opacity: 0.85; }
.nav-tabs { display: flex; align-items: center; gap: 32px; }
.tab-btn {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  background: none; border: none; color: var(--w58); cursor: pointer; padding-bottom: 4px;
  border-bottom: 2px solid transparent; transition: color 0.25s, border-color 0.25s;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
.tab-btn.active, .tab-btn:hover { color: var(--gold); border-color: var(--gold); }
.tab-btn:not(.active):hover { color: #fff; border-color: transparent; }

.header-right { display: flex; align-items: center; gap: 20px; }
.org-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; background: var(--w05);
  border: 1px solid var(--w10); border-radius: 100px; font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--w58);
}
.org-badge i { color: var(--gold); font-style: normal; }
.icon-btn {
  position: relative; background: none; border: none; color: var(--w58); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 6px; transition: color 0.25s;
}
.icon-btn:hover { color: #fff; }
.icon-btn .dot { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--w10); border: 1px solid rgba(var(--ink-rgb),0.2);
  display: flex; align-items: center; justify-content: center; font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; font-weight: 500; color: #fff; cursor: pointer; transition: border-color 0.25s;
}
.avatar:hover { border-color: var(--gold); }

/* Buttons */
.btn {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 2.2px; text-transform: uppercase;
  padding: 16px 30px; border-radius: 12px; display: inline-flex; align-items: center; gap: 11px;
  transition: background .25s, border-color .25s, opacity .25s, color .25s; white-space: nowrap; cursor: pointer; border: none; text-decoration: none;
}
.btn-solid { background: var(--invert-bg); color: var(--invert-fg); }
.btn-solid:hover { background: var(--gold); color: var(--invert-fg); }
.btn-ghost { border: 1px solid var(--w10); color: var(--w70); background: rgba(var(--surface-rgb),0.45); }
.btn-ghost:hover { border-color: rgba(var(--ink-rgb),.35); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 9.5px; letter-spacing: 1.6px; border-radius: 100px; }

/* Accessibility & Reduced Motion */
:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
