/* site-shell.css — canonical site chrome (nav + footer), injected on every
   page by scripts/inject-site-shell.js. Loaded AFTER each page's inline
   styles so these rules win ties; explicit resets below neutralise the
   legacy per-page `nav{}` / `footer{}` element rules that still ship in
   older inline style blocks. */

/* ---------- Navigation ---------- */
:root { --nav-height: 78px; }

.site-nav {
  display: block;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(16px);
  background: rgba(6, 11, 18, 0.86);
  border-bottom: 1px solid rgba(90, 126, 164, 0.22);
}
.site-nav-inner {
  width: min(calc(100% - 32px), 1440px);
  margin: 0 auto;
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.site-logo {
  text-decoration: none;
  color: var(--accent, #00d4ff);
  font-family: 'Space Mono', monospace;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-logo span { color: var(--text-strong, #ffffff); }
.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}
.site-nav-links a {
  text-decoration: none;
  color: var(--muted, #89a0b9);
  font-size: 0.92rem;
  transition: color 0.18s ease;
}
.site-nav-links a:hover { color: var(--accent, #00d4ff); }
.site-nav-links a.cta-link { color: var(--accent, #00d4ff); font-weight: 700; }
.site-nav-links a.intel-hub-beacon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid rgba(123, 47, 255, 0.55);
  background: rgba(123, 47, 255, 0.12);
  color: #e9defb;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.site-nav-links a.intel-hub-beacon:hover {
  background: rgba(123, 47, 255, 0.22);
  border-color: var(--accent2, #7b2fff);
  color: #f3edff;
}
.intel-rec {
  position: relative;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #ff3b3b;
  box-shadow: 0 0 8px 1px rgba(255, 59, 59, 0.85);
}
.intel-rec::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(255, 59, 59, 0.7);
  animation: intelRec 1.8s ease-out infinite;
}
@keyframes intelRec {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .intel-rec::after { animation: none; }
}
@media (max-width: 768px) {
  .site-nav-inner { flex-direction: column; align-items: stretch; padding: 1rem; gap: 1rem; }
  .site-nav-links { justify-content: center; gap: 1rem; }
}

/* Explore dropdown */
.site-nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.site-nav-dropdown-toggle {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.92rem;
  color: var(--muted, #89a0b9); display: inline-flex; align-items: center;
  gap: 4px; transition: color 0.18s ease;
}
.site-nav-dropdown-toggle:hover,
.site-nav-dropdown.open .site-nav-dropdown-toggle { color: var(--accent, #00d4ff); }
.site-nav-dropdown-menu {
  position: absolute; top: 100%; left: 0; margin-top: 8px;
  background: #060b12; border: 1px solid rgba(90, 126, 164, 0.22);
  border-radius: 6px; padding: 8px 0; min-width: 180px; display: none;
  flex-direction: column; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); z-index: 40;
}
.site-nav-dropdown-menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.site-nav-dropdown.open .site-nav-dropdown-menu { display: flex; }
.site-nav-dropdown-menu a {
  display: block; padding: 8px 16px; text-decoration: none;
  color: var(--muted, #89a0b9); font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem; transition: color 0.18s ease, background 0.18s ease;
}
.site-nav-dropdown-menu a:hover,
.site-nav-dropdown-menu a:focus { color: var(--accent, #00d4ff); background: rgba(0, 212, 255, 0.06); }
@media (max-width: 768px) {
  .site-nav-dropdown { width: 100%; }
  .site-nav-dropdown-menu { position: static; margin-top: 4px; width: 100%; box-shadow: none; }
  .site-nav-dropdown-menu::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .site-nav-dropdown-toggle, .site-nav-dropdown-menu a { transition: none; }
}

/* ---------- Footer ---------- */
.tc-footer {
  position: relative;
  z-index: 1;
  margin-top: 4rem;
  padding: 0;
  text-align: left;
  border-top: 1px solid rgba(90, 126, 164, 0.22);
  background: rgba(6, 11, 18, 0.6);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
}
.tc-footer-grid {
  width: min(calc(100% - 32px), 1200px);
  margin: 0 auto;
  padding: 3rem 0 2.25rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.25rem;
}
.tc-footer-col h3 {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, #00d4ff);
  margin: 0 0 0.9rem;
}
.tc-footer-col a {
  display: block;
  color: var(--muted, #89a0b9);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 2.1;
  transition: color 0.18s ease;
}
.tc-footer-col a:hover { color: var(--accent, #00d4ff); }
.tc-footer-logo {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent, #00d4ff);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.8rem;
}
.tc-footer-logo span { color: #ffffff; }
.tc-footer-brand p {
  color: var(--muted, #89a0b9);
  font-size: 0.85rem;
  line-height: 1.65;
  margin: 0 0 1.1rem;
}
.tc-footer-cta {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  background: var(--accent, #00d4ff);
  color: #02131a !important;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.18s ease;
}
.tc-footer-cta:hover { background: #ffffff; }
.tc-footer .footer-socials {
  display: flex;
  gap: 1.05rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
}
.tc-footer .footer-socials a {
  color: var(--muted, #89a0b9);
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}
.tc-footer .footer-socials a:hover { color: var(--accent, #00d4ff); }
.tc-footer-bottom {
  border-top: 1px solid rgba(90, 126, 164, 0.14);
  padding: 1.1rem 16px 1.4rem;
  text-align: center;
  color: var(--muted, #89a0b9);
  font-size: 0.78rem;
}
.tc-footer-bottom p { margin: 0.2rem 0; color: var(--muted, #89a0b9); }
.tc-footer-bottom a { color: var(--muted, #89a0b9); text-decoration: none; }
.tc-footer-bottom a:hover { color: var(--accent, #00d4ff); }
@media (max-width: 900px) {
  .tc-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .tc-footer-grid { grid-template-columns: 1fr; gap: 1.75rem; padding: 2.25rem 0 1.75rem; }
}
