/* NDStudio grade for the NIDSARK site — flat black/white editorial, burgundy accent.
   Loaded AFTER colors_and_type.css: retokenizes the NG5 vars to the NDStudio aesthetic.
   Default (no data-theme attr) = paper white. data-theme="dark" = pure black. */
:root {
  --ng5-bg-base: #f7f6f3;
  --ng5-bg-surface: #ffffff;
  --ng5-bg-elevated: #ffffff;
  --ng5-bg-overlay: #ffffff;
  --ng5-glass-1: #f7f6f3;
  --ng5-glass-2: #ffffff;
  --ng5-glass-3: #ffffff;
  --ng5-glass-4: #ffffff;
  --ng5-glass-shine: transparent;
  --ng5-glass-border-thin: rgba(0, 0, 0, 0.10);
  --ng5-glass-border-med: rgba(0, 0, 0, 0.16);
  --ng5-glass-border-strong: rgba(0, 0, 0, 0.28);
  --ng5-accent-primary: #cd0019;
  --ng5-accent-secondary: #cd0019;
  --ng5-accent-tertiary: #cd0019;
  --ng5-accent-gradient: linear-gradient(#cd0019, #cd0019);
  --ng5-accent-glow-soft: transparent;
  --ng5-accent-glow-med: transparent;
  --ng5-accent-glow-strong: transparent;
  --ng5-danger: #cd0019;
  --ng5-fg-1: #141414;
  --ng5-fg-2: rgba(0, 0, 0, 0.62);
  --ng5-fg-3: rgba(0, 0, 0, 0.38);
  --ng5-shadow-glass: 0 1px 2px rgba(0, 0, 0, 0.04);
  --ng5-shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.05);
  --ng5-shadow-xl: 0 2px 10px rgba(0, 0, 0, 0.05);
  --ng5-shadow-glow: 0 0 0 transparent;
  --ng5-highlight: inset 0 0 0 0 transparent;
  --ng5-highlight-strong: inset 0 0 0 0 transparent;
  --ng5-blur-thin: 0px;
  --ng5-blur-med: 0px;
  --ng5-blur-thick: 0px;
  --ng5-blur-ultra: 0px;
  --ng5-saturation: 1;
  --ng5-font-sans: 'Instrument Sans', 'Inter', system-ui, sans-serif;
}
[data-theme="dark"] {
  --ng5-bg-base: #050505;
  --ng5-bg-surface: #0a0a0a;
  --ng5-bg-elevated: #111111;
  --ng5-bg-overlay: #141414;
  --ng5-glass-1: #101010;
  --ng5-glass-2: #0e0e0e;
  --ng5-glass-3: #0e0e0e;
  --ng5-glass-4: #141414;
  --ng5-glass-border-thin: rgba(255, 255, 255, 0.12);
  --ng5-glass-border-med: rgba(255, 255, 255, 0.18);
  --ng5-glass-border-strong: rgba(255, 255, 255, 0.30);
  --ng5-fg-1: rgba(255, 255, 255, 0.94);
  --ng5-fg-2: rgba(255, 255, 255, 0.60);
  --ng5-fg-3: rgba(255, 255, 255, 0.36);
  --ng5-shadow-glass: none;
  --ng5-shadow-xl: none;
}
/* Liquid-glass floating nav: translucent, blurred, softly bordered.
   !important so it wins over the inline glass tokens (flattened to solid). */
header > nav {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(20px) saturate(1.8) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.8) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}
[data-theme="dark"] header > nav {
  background: rgba(16, 16, 16, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}
/* Editorial serif display — the NDStudio signature */
h1, h2 {
  font-family: var(--ng5-font-serif) !important;
  font-weight: 400 !important;
  letter-spacing: -0.015em !important;
}
h1 .ng5-gradient-text, h2 .ng5-gradient-text { font-style: italic; }
/* Kill the ambient gradient-mesh overlays (Liquid Glass leftovers) */
div[style*="radial-gradient"][style*="pointer-events"] { display: none !important; }
/* Logo wall marks: plain grayscale on paper */
img[style*="brightness(1.8)"] { filter: grayscale(1) !important; }
/* Brand mark flips to white on the black theme */
[data-theme="dark"] img[alt="NIDSARK"] { filter: invert(1) brightness(1.4); }
/* Dark-ink certification/partner marks become white silhouettes on black */
[data-theme="dark"] img[src*="duns-logo"],
[data-theme="dark"] img[src*="sam-gov"],
[data-theme="dark"] img[src*="aws-partner"] { filter: brightness(0) invert(1); }
[data-theme="dark"] img[style*="brightness(1.8)"] { filter: grayscale(1) invert(1) brightness(1.35) !important; }
/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
  html { scroll-behavior: auto !important; }
}
/* Smooth light/dark theme switching — elements with their own inline
   transitions keep them (inline wins); everything else fades colors. */
body, header, nav, footer, section, article, aside, div, span, p,
h1, h2, h3, h4, h5, h6, li, ul, ol, a, button, input, select, textarea,
blockquote, figure, figcaption, label, table, td, th {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
img { transition: filter .25s ease, opacity .25s ease; }
/* Smooth cross-page transitions + polish */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; }
html { scroll-behavior: smooth; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid #cd0019; outline-offset: 2px; }
