/* HarborMind — shared design tokens and global components.
   Loaded by every page. Page-specific overrides come after this file
   (either inline or via a page-specific stylesheet).
   ----------------------------------------------------------------- */

:root {
  --bg: #07111f;
  --bg-2: #0a1628;
  --bg-3: #0f1d33;
  --line: #18253d;
  --line-2: #22324f;
  --ink: #e8eef7;
  --ink-2: #a7b7d1;
  --ink-3: #6b7d9b;
  --ink-4: #475873;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-glow: #3b82f6;
  --pii: #f07d7d;   /* muted crimson */
  --phi: #d9a441;   /* muted amber — overridden to #f59e0b at runtime by viz-config.js */
  --pci: #a48af0;   /* muted violet */
  --sec: #5dd3a8;   /* safe green */
  --radius: 10px;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: clip;
}

a { color: inherit; }
main { position: relative; z-index: 1; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* =========== NAV =========== */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease;
  border-bottom: 1px solid transparent;
}
.nav-wrap.scrolled {
  background: rgba(7, 17, 31, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px;
  max-width: 1440px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; }
.brand-logo { height: 26px; width: auto; display: block; transition: opacity .2s; }
a.brand:hover .brand-logo { opacity: 0.85; }
.nav-links { display: flex; gap: 28px; align-items: center; color: var(--ink-2); font-size: 14px; }
.nav-links a { color: inherit; text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.nav-anchor { position: relative; padding: 6px 0; }
.nav-links a.nav-anchor::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-links a.nav-anchor.active { color: var(--ink); }
.nav-links a.nav-anchor.active::after { transform: scaleX(1); }

@media (max-width: 980px) {
  .nav { padding: 18px 20px; }
  .nav-links a:not(.btn) { display: none; }
}

/* =========== BUTTONS =========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--line-2);
  background: transparent; color: var(--ink);
  cursor: pointer; transition: all .18s ease;
  text-decoration: none;
}
.btn:hover { border-color: var(--accent); background: rgba(59,130,246,0.08); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 0 0 rgba(59,130,246,0.4);
}
.btn-primary:hover { background: #4b8ef7; border-color: #4b8ef7; box-shadow: 0 0 20px rgba(59,130,246,0.35); }

/* =========== FOOTER =========== */
.footer {
  max-width: 1440px; margin: 0 auto;
  padding: 80px 40px 40px;
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) { .footer { padding: 56px 20px 32px; } }
.footer-inner {
  display: grid; grid-template-columns: 1.2fr 2fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-tag { color: var(--ink-3); font-size: 14px; margin: 16px 0 0; max-width: 280px; line-height: 1.5; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col h5 { font-size: 12px; color: var(--ink-3); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; margin: 0 0 16px; }
.footer-col a { display: block; color: var(--ink-2); text-decoration: none; font-size: 14px; padding: 4px 0; transition: color .15s; }
.footer-col a:hover { color: var(--ink); }
.footer-base {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--ink-4);
}

/* Live status widget (footer) */
.status-widget {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-3);
  text-decoration: none;
  transition: color .15s;
}
.status-widget:hover { color: var(--ink); }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-4);
  box-shadow: 0 0 0 0 transparent;
  flex: none;
}
/* state colors — set via data-state on the widget */
.status-widget[data-state="operational"] .status-dot { background: var(--sec);      box-shadow: 0 0 7px rgba(93,211,168,0.7); animation: status-pulse 2.4s infinite; }
.status-widget[data-state="degraded"]    .status-dot { background: #d9a441;          box-shadow: 0 0 7px rgba(217,164,65,0.7); }
.status-widget[data-state="partial"]     .status-dot { background: #e8843a;          box-shadow: 0 0 7px rgba(232,132,58,0.7); }
.status-widget[data-state="outage"]      .status-dot { background: #ef4444;          box-shadow: 0 0 7px rgba(239,68,68,0.75); }
.status-widget[data-state="maintenance"] .status-dot { background: var(--accent-2);  box-shadow: 0 0 7px rgba(96,165,250,0.7); }
.status-widget[data-state="operational"] .status-text { color: var(--ink-2); }
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .status-widget .status-dot { animation: none; }
}
