/* ═══════════════════════════════════════════════════════════════════════════
   NOVA DESIGN SYSTEM — Shared tokens + components
   Version: 1.0.0 | 2026-05-10
   Import first, then apply a product theme class to <body>.
   No build step — pure CSS custom properties + vanilla JS.
   Usage:
     <link rel="stylesheet" href="/src/design-system/design-system.css">
     <body class="theme-novagov">   <!-- or theme-nova-solutions / theme-nova-citizen -->
═══════════════════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────────────────────────
   1. BASE TOKENS — identical across all three products
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Backgrounds */
  --bg:          #02060a;
  --bg-card:     #080d14;
  --bg-deep:     #000307;
  --bg-nav:      rgba(2, 6, 10, 0.85);
  --bg-modal:    rgba(0, 2, 6, 0.92);

  /* Typography */
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', monospace;

  /* Type scale (fluid, unitless multipliers of 1rem = 16px) */
  --text-xs:     0.75rem;    /* 12px — labels, captions */
  --text-sm:     0.875rem;   /* 14px — body small, nav links */
  --text-base:   1rem;       /* 16px — body */
  --text-lg:     1.125rem;   /* 18px — lead paragraph */
  --text-xl:     1.25rem;    /* 20px — card title */
  --text-2xl:    1.5rem;     /* 24px — section subhead */
  --text-3xl:    1.875rem;   /* 30px — section title */
  --text-4xl:    2.25rem;    /* 36px — hero subhead */
  --text-5xl:    3rem;       /* 48px — hero h1 */
  --text-6xl:    3.75rem;    /* 60px — hero h1 large */

  /* Font weights */
  --fw-normal:   400;
  --fw-medium:   500;
  --fw-semi:     600;
  --fw-bold:     700;
  --fw-black:    900;

  /* Line heights */
  --lh-tight:    1.1;
  --lh-snug:     1.25;
  --lh-normal:   1.5;
  --lh-relaxed:  1.65;

  /* Spacing — 4px base grid */
  --space-1:     0.25rem;    /* 4px */
  --space-2:     0.5rem;     /* 8px */
  --space-3:     0.75rem;    /* 12px */
  --space-4:     1rem;       /* 16px */
  --space-5:     1.25rem;    /* 20px */
  --space-6:     1.5rem;     /* 24px */
  --space-8:     2rem;       /* 32px */
  --space-10:    2.5rem;     /* 40px */
  --space-12:    3rem;       /* 48px */
  --space-16:    4rem;       /* 64px */
  --space-20:    5rem;       /* 80px */
  --space-24:    6rem;       /* 96px */
  --space-32:    8rem;       /* 128px */

  /* Border radius */
  --radius-sm:   6px;        /* inputs, small tags */
  --radius-md:   8px;        /* buttons */
  --radius-lg:   12px;       /* small cards */
  --radius-xl:   16px;       /* cards — locked across all products */
  --radius-2xl:  20px;       /* large cards */
  --radius-pill: 9999px;     /* badges, pills, tags */

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6);
  --shadow-xl:   0 16px 64px rgba(0,0,0,0.7);

  /* Layout */
  --nav-h:       64px;
  --max-w:       1200px;
  --max-w-text:  720px;
  --col-gap:     1.5rem;     /* 24px */
  --section-py:  6rem;       /* 96px — section vertical padding */
  --card-px:     1.5rem;     /* 24px — card horizontal padding */
  --card-py:     2rem;       /* 32px — card vertical padding */
  --btn-h:       48px;       /* button height */
  --tap-min:     44px;       /* minimum tap target (WCAG) */

  /* Motion */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:    150ms;
  --dur-base:    250ms;
  --dur-slow:    400ms;

  /* Noise texture overlay — shared identity marker */
  --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}


/* ─────────────────────────────────────────────────────────────────────────
   2. PRODUCT THEME OVERRIDES
   Apply one class to <body>. Everything below inherits the base tokens
   and overrides only accent values.
   ───────────────────────────────────────────────────────────────────────── */

/* NovaGovAI — Palantir monochrome */
.theme-novagov {
  --accent:        #F4F0E4;
  --accent2:       #C5C1B6;
  --accent3:       #A8A49A;
  --accent-dark:   #8E8A7E;
  --accent-rgb:    197, 193, 182;
  --text:          #ECE8DD;
  --text2:         #A8A49A;
  --muted:         #6E6A62;
  --border:        rgba(197, 193, 182, 0.25);
  --border-strong: rgba(197, 193, 182, 0.4);
  --glow:          rgba(197, 193, 182, 0.1);
  --glow-strong:   rgba(197, 193, 182, 0.2);
  --gradient:      linear-gradient(135deg, #1F1F1F 0%, #2A2925 50%, #3A3630 100%);
  --gradient-text: linear-gradient(135deg, #C5C1B6, #ECE8DD);
  /* Card identity: top border accent line */
  --card-top-border: 2px solid rgba(197, 193, 182, 0.35);
}

/* Nova Solutions — Palantir monochrome */
.theme-nova-solutions {
  --accent:        #F4F0E4;
  --accent2:       #C5C1B6;
  --accent3:       #A8A49A;
  --accent-dark:   #8E8A7E;
  --accent-rgb:    197, 193, 182;
  --text:          #ECE8DD;
  --text2:         #A8A49A;
  --muted:         #6E6A62;
  --border:        rgba(197, 193, 182, 0.25);
  --border-strong: rgba(197, 193, 182, 0.4);
  --glow:          rgba(197, 193, 182, 0.1);
  --glow-strong:   rgba(197, 193, 182, 0.2);
  --gradient:      linear-gradient(135deg, #1F1F1F 0%, #2A2925 50%, #3A3630 100%);
  --gradient-text: linear-gradient(135deg, #C5C1B6, #ECE8DD);
  --card-top-border: 2px solid rgba(197, 193, 182, 0.35);
}

/* Nova Citizen — Palantir monochrome */
.theme-nova-citizen {
  --accent:        #F4F0E4;
  --accent2:       #C5C1B6;
  --accent3:       #A8A49A;
  --accent-dark:   #8E8A7E;
  --accent-rgb:    197, 193, 182;
  --text:          #ECE8DD;
  --text2:         #A8A49A;
  --muted:         #6E6A62;
  --border:        rgba(197, 193, 182, 0.25);
  --border-strong: rgba(197, 193, 182, 0.4);
  --glow:          rgba(197, 193, 182, 0.1);
  --glow-strong:   rgba(197, 193, 182, 0.2);
  --gradient:      linear-gradient(135deg, #1F1F1F 0%, #2A2925 50%, #3A3630 100%);
  --gradient-text: linear-gradient(135deg, #C5C1B6, #ECE8DD);
  --card-top-border: 2px solid rgba(197, 193, 182, 0.35);
  /* Citizen: larger tap targets */
  --tap-min:       48px;
  --btn-h:         52px;
}


/* ─────────────────────────────────────────────────────────────────────────
   3. RESET + BASE
   ───────────────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-relaxed);
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  /* Noise texture — shared identity marker across all products */
  background-image: var(--noise);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; }


/* ─────────────────────────────────────────────────────────────────────────
   4. TYPOGRAPHY SCALE
   ───────────────────────────────────────────────────────────────────────── */

.ds-h1 {
  font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: -0.03em;
  color: var(--text);
}

.ds-h2 {
  font-size: clamp(var(--text-3xl), 3.5vw, var(--text-5xl));
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--text);
}

.ds-h3 {
  font-size: clamp(var(--text-2xl), 2.5vw, var(--text-3xl));
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: -0.015em;
  color: var(--text);
}

.ds-h4 {
  font-size: var(--text-xl);
  font-weight: var(--fw-semi);
  line-height: var(--lh-snug);
  color: var(--text);
}

.ds-lead {
  font-size: clamp(var(--text-base), 1.5vw, var(--text-lg));
  font-weight: var(--fw-normal);
  line-height: var(--lh-relaxed);
  color: var(--text2);
}

.ds-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
}

.ds-mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.ds-gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ─────────────────────────────────────────────────────────────────────────
   5. LAYOUT UTILITIES
   ───────────────────────────────────────────────────────────────────────── */

.ds-container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.ds-section {
  padding-block: var(--section-py);
  position: relative;
}

.ds-section--tight {
  padding-block: calc(var(--section-py) * 0.6);
}

.ds-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--col-gap);
}

.ds-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--col-gap);
}

.ds-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* ─────────────────────────────────────────────────────────────────────────
   6. ANNOUNCEMENT / URGENCY BAR
   Used by: Nova Solutions (urgency), NovaGovAI (optional compliance notice)
   Not used by: Nova Citizen (no top bar — mobile screen real estate)
   ───────────────────────────────────────────────────────────────────────── */

.ds-announcement-bar {
  width: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--accent-dark));
  background-size: 200% 100%;
  animation: ds-bar-shimmer 4s ease infinite;
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  text-align: center;
  padding: var(--space-2) var(--space-6);
  position: relative;
  z-index: 100;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.ds-announcement-bar__close {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
  transition: opacity var(--dur-fast) var(--ease);
  cursor: pointer;
  font-size: var(--text-lg);
  line-height: 1;
  padding: var(--space-1);
}

.ds-announcement-bar__close:hover { opacity: 1; }

.ds-announcement-bar__count {
  font-weight: var(--fw-bold);
  background: rgba(255,255,255,0.2);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

@keyframes ds-bar-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}


/* ─────────────────────────────────────────────────────────────────────────
   7. NAVIGATION
   ───────────────────────────────────────────────────────────────────────── */

.ds-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--nav-h);
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--dur-base) var(--ease),
              background var(--dur-base) var(--ease);
}

.ds-nav--scrolled {
  border-bottom-color: var(--border-strong);
  background: rgba(2, 6, 10, 0.95);
}

.ds-nav__inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.ds-nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: var(--fw-bold);
  font-size: var(--text-lg);
  color: var(--text);
  flex-shrink: 0;
  min-height: var(--tap-min);
}

.ds-nav__logo img {
  height: 32px;
  width: auto;
}

.ds-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}

.ds-nav__link {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
  white-space: nowrap;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
}

.ds-nav__link:hover,
.ds-nav__link[aria-current="page"] {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.ds-nav__cta {
  flex-shrink: 0;
}

/* Hamburger */
.ds-nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--dur-fast) var(--ease);
}

.ds-nav__hamburger:hover { background: rgba(255,255,255,0.06); }

.ds-nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease),
              opacity var(--dur-base) var(--ease);
}

.ds-nav__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.ds-nav__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.ds-nav__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ─────────────────────────────────────────────────────────────────────────
   7b. NAV DROPDOWN (Solutions mega-menu)
   ───────────────────────────────────────────────────────────────────────── */

.ds-nav__has-dropdown { position: relative; }
.ds-nav__dd-trigger {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: inherit; font-weight: inherit;
  color: inherit; padding: 0;
  display: inline-flex; align-items: center; gap: 4px;
}
.ds-nav__caret { font-size: .7em; opacity: .7; transition: transform .2s; display: inline-block; }
.ds-nav__has-dropdown:hover .ds-nav__caret,
.ds-nav__has-dropdown.open .ds-nav__caret { transform: rotate(180deg); }
.ds-nav__dd {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 320px;
  background: rgba(10,22,40,.97);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--ds-border, rgba(255,255,255,0.1));
  border-radius: 14px;
  padding: 10px;
  display: none; flex-direction: column; gap: 2px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  z-index: 1100; margin-top: 8px;
}
.ds-nav__has-dropdown:hover .ds-nav__dd,
.ds-nav__has-dropdown:focus-within .ds-nav__dd,
.ds-nav__has-dropdown.open .ds-nav__dd { display: flex; }
/* Bridge hover gap */
.ds-nav__has-dropdown::after {
  content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 8px;
}
.ds-nav__dd a {
  display: flex; gap: 12px; padding: 10px 12px;
  border-radius: 8px; text-decoration: none;
  color: var(--ds-text, #e2e8f0);
  transition: background .15s; align-items: flex-start;
}
.ds-nav__dd a:hover { background: rgba(255,255,255,.08); }
.ds-nav__dd .dd-icon {
  font-size: 1.3rem; width: 32px; text-align: center;
  flex-shrink: 0; line-height: 1.4;
}
.ds-nav__dd .dd-name {
  font-size: .92rem; font-weight: 600;
  color: var(--ds-text, #e2e8f0); margin-bottom: 2px; line-height: 1.3;
}
.ds-nav__dd .dd-sub { font-size: .78rem; color: #94a3b8; line-height: 1.4; }

/* Mobile: hide dropdown, use <details> groups instead */
@media (max-width: 900px) { .ds-nav__dd { display: none !important; } }

/* Mobile menu <details> groups */
.ds-mobile-menu__group { border-bottom: 1px solid rgba(255,255,255,.08); padding: 0; }
.ds-mobile-menu__group summary {
  cursor: pointer; list-style: none;
  padding: 14px 0; font-size: .95rem; font-weight: 600;
  color: var(--ds-text, #e2e8f0);
  display: flex; align-items: center; justify-content: space-between;
}
.ds-mobile-menu__group summary::-webkit-details-marker { display: none; }
.ds-mobile-menu__group summary::after {
  content: '+'; font-size: 1.4rem; color: rgba(255,255,255,.5);
  transition: transform .2s;
}
.ds-mobile-menu__group[open] summary::after { content: '−'; }
.ds-mobile-menu__sublink {
  display: block; padding: 10px 0 10px 16px;
  color: rgba(255,255,255,.6); font-size: .88rem;
  text-decoration: none;
  border-left: 2px solid rgba(255,255,255,.1);
  margin-left: 8px;
}
.ds-mobile-menu__sublink:hover { color: #fff; border-left-color: rgba(255,255,255,.4); }
.ds-mobile-menu__sublink:last-child { margin-bottom: 8px; }

/* ─────────────────────────────────────────────────────────────────────────
   8. MOBILE MENU
   ───────────────────────────────────────────────────────────────────────── */

.ds-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(2, 6, 10, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding-top: var(--nav-h);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
}

.ds-mobile-menu.is-open {
  transform: translateX(0);
}

.ds-mobile-menu__inner {
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.ds-mobile-menu__link {
  font-size: var(--text-xl);
  font-weight: var(--fw-semi);
  color: var(--text2);
  padding: var(--space-4) var(--space-4);
  border-radius: var(--radius-md);
  border-bottom: 1px solid var(--border);
  transition: color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
  display: block;
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
}

.ds-mobile-menu__link:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.ds-mobile-menu__cta {
  margin-top: var(--space-6);
}


/* ─────────────────────────────────────────────────────────────────────────
   9. HERO SECTION
   ───────────────────────────────────────────────────────────────────────── */

.ds-hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding-block: var(--space-20);
  position: relative;
  overflow: hidden;
}

/* Radial glow behind hero content */
.ds-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: min(800px, 100vw);
  height: 600px;
  background: radial-gradient(ellipse at center,
    var(--glow-strong) 0%,
    var(--glow) 40%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.ds-hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: var(--max-w-text);
  margin-inline: auto;
}

.ds-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-strong);
  color: var(--accent2);
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-6);
}

.ds-hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  animation: ds-pulse 2s ease infinite;
}

@keyframes ds-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.8); }
}

.ds-hero__title {
  font-size: clamp(var(--text-4xl), 5.5vw, var(--text-6xl));
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: var(--space-6);
}

.ds-hero__sub {
  font-size: clamp(var(--text-base), 2vw, var(--text-xl));
  line-height: var(--lh-relaxed);
  color: var(--text2);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
}

.ds-hero__cta-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Typewriter cursor for Nova Solutions */
.ds-typewriter::after {
  content: '|';
  animation: ds-blink 1s step-end infinite;
  color: var(--accent2);
}

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


/* ─────────────────────────────────────────────────────────────────────────
   10. BUTTONS
   ───────────────────────────────────────────────────────────────────────── */

/* Primary — gradient fill */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--btn-h);
  min-width: 120px;
  padding-inline: var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--fw-semi);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              opacity var(--dur-fast) var(--ease);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  min-height: var(--tap-min);
}

.ds-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--dur-fast) var(--ease);
}

.ds-btn:hover::before  { background: rgba(255,255,255,0.08); }
.ds-btn:active         { transform: scale(0.97); }

/* Primary */
.ds-btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 0 20px var(--glow), 0 4px 12px rgba(0,0,0,0.4);
}

.ds-btn--primary:hover {
  box-shadow: 0 0 32px var(--glow-strong), 0 6px 20px rgba(0,0,0,0.5);
  transform: translateY(-1px);
}

/* Secondary — outlined */
.ds-btn--secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 0 0 0 var(--glow);
}

.ds-btn--secondary:hover {
  border-color: var(--accent2);
  box-shadow: 0 0 16px var(--glow);
  color: var(--accent2);
}

/* Ghost — minimal */
.ds-btn--ghost {
  background: transparent;
  color: var(--text2);
  border: none;
}

.ds-btn--ghost:hover { color: var(--text); }

/* Size variants */
.ds-btn--sm {
  height: 36px;
  padding-inline: var(--space-4);
  font-size: var(--text-xs);
}

.ds-btn--lg {
  height: 56px;
  padding-inline: var(--space-8);
  font-size: var(--text-base);
}


/* ─────────────────────────────────────────────────────────────────────────
   11. STAT / METRIC STRIP
   ───────────────────────────────────────────────────────────────────────── */

.ds-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-card);
}

.ds-stats__item {
  flex: 1;
  padding: var(--space-8) var(--space-6);
  text-align: center;
  border-right: 1px solid var(--border);
  position: relative;
}

.ds-stats__item:last-child { border-right: none; }

.ds-stats__value {
  font-size: clamp(var(--text-3xl), 3.5vw, var(--text-5xl));
  font-weight: var(--fw-black);
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-2);
}

.ds-stats__label {
  font-size: var(--text-sm);
  color: var(--text2);
  font-weight: var(--fw-medium);
}

.ds-stats__sub {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: var(--space-1);
}


/* ─────────────────────────────────────────────────────────────────────────
   12. SECTION PATTERN — label → title → subhead
   ───────────────────────────────────────────────────────────────────────── */

.ds-section-header {
  text-align: center;
  max-width: var(--max-w-text);
  margin-inline: auto;
  margin-bottom: var(--space-16);
}

.ds-section-header--left {
  text-align: left;
  margin-inline: 0;
}

.ds-section-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: var(--space-3);
  display: block;
}

.ds-section-title {
  font-size: clamp(var(--text-3xl), 3.5vw, var(--text-5xl));
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-5);
}

.ds-section-sub {
  font-size: clamp(var(--text-base), 1.5vw, var(--text-lg));
  color: var(--text2);
  line-height: var(--lh-relaxed);
}


/* ─────────────────────────────────────────────────────────────────────────
   13. CARD GRID
   ───────────────────────────────────────────────────────────────────────── */

.ds-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--col-gap);
}

.ds-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: var(--card-top-border);
  border-radius: var(--radius-xl);
  padding: var(--card-py) var(--card-px);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: border-color var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease);
  position: relative;
  overflow: hidden;
}

/* Inner glow on hover */
.ds-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, var(--glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease);
  pointer-events: none;
}

.ds-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 32px var(--glow), var(--shadow-lg);
  transform: translateY(-2px);
}

.ds-card:hover::after { opacity: 1; }

.ds-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  flex-shrink: 0;
}

.ds-card__title {
  font-size: var(--text-xl);
  font-weight: var(--fw-semi);
  color: var(--text);
  line-height: var(--lh-snug);
}

.ds-card__body {
  font-size: var(--text-sm);
  color: var(--text2);
  line-height: var(--lh-relaxed);
  flex: 1;
}

.ds-card__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  color: var(--accent2);
  background: rgba(var(--accent-rgb), 0.1);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  width: fit-content;
}

/* NovaGovAI: no hover lift — institutional feel */
.theme-novagov .ds-card:hover {
  transform: none;
  box-shadow: 0 0 0 1px var(--border-strong), 0 8px 32px var(--glow);
}


/* ─────────────────────────────────────────────────────────────────────────
   14. FOOTER
   ───────────────────────────────────────────────────────────────────────── */

.ds-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-deep);
  padding-block: var(--space-16) var(--space-8);
}

.ds-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.ds-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ds-footer__brand-name {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--text);
}

.ds-footer__tagline {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: var(--lh-relaxed);
  max-width: 280px;
}

.ds-footer__col-title {
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: var(--space-4);
}

.ds-footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ds-footer__link {
  font-size: var(--text-sm);
  color: var(--muted);
  transition: color var(--dur-fast) var(--ease);
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
}

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

.ds-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.ds-footer__copy {
  font-size: var(--text-xs);
  color: var(--muted);
}

.ds-footer__legal {
  display: flex;
  gap: var(--space-6);
}

.ds-footer__legal a {
  font-size: var(--text-xs);
  color: var(--muted);
  transition: color var(--dur-fast) var(--ease);
}

.ds-footer__legal a:hover { color: var(--text2); }


/* ── Footer v2 (inner grid layout used by advai pages) ────────────────
   Provides container behavior (centered + horizontally padded) and brand
   inline-rendering override so "NovaSolutions" doesn't wrap to two lines.
   ────────────────────────────────────────────────────────────────────── */

.ds-footer__inner--grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 48px var(--space-6) 32px;
  max-width: var(--max-w);
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
}

/* Override `.ds-footer__brand` (which is display:flex;flex-direction:column
   and would stack "Nova" and "Solutions" vertically) when the brand sits
   inside a footer column. */
.ds-footer__col .ds-footer__brand {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
  white-space: nowrap;
  line-height: 1.2;
}
.ds-footer__col .ds-footer__brand span { display: inline; }

.ds-footer__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ds-footer__tag {
  font-size: .85rem;
  color: var(--text2);
  line-height: 1.5;
  margin: 0;
}

.ds-footer__heading {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text);
  margin-bottom: 6px;
}

.ds-footer__col .ds-footer__link {
  font-size: .85rem;
  color: var(--text2);
  text-decoration: none;
  padding: 4px 0;
  display: block;
  transition: color .15s;
  min-height: 0;
}
.ds-footer__col .ds-footer__link:hover { color: var(--accent2); }

/* Center the bottom row with the same container constraints as the grid. */
.ds-footer__bottom {
  padding: 20px var(--space-6);
  border-top: 1px solid var(--border);
  text-align: center;
  max-width: var(--max-w);
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
  display: block;
}

@media (max-width: 900px) {
  .ds-footer__inner--grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 40px var(--space-6) 24px;
  }
}

@media (max-width: 560px) {
  .ds-footer__inner--grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px var(--space-4) 20px;
  }
  .ds-footer__bottom {
    padding: 16px var(--space-4);
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   15. CHATBOT FAB + PANEL
   ───────────────────────────────────────────────────────────────────────── */

.ds-chatbot-fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 4px 20px var(--glow-strong), var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-spring),
              box-shadow var(--dur-base) var(--ease);
  border: none;
  color: #fff;
  font-size: 22px;
}

/* Nova Citizen: larger FAB for mobile */
.theme-nova-citizen .ds-chatbot-fab {
  width: 64px;
  height: 64px;
  bottom: calc(var(--space-6) + 60px); /* above sticky bar */
}

.ds-chatbot-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px var(--glow-strong), var(--shadow-xl);
}

.ds-chatbot-fab[aria-expanded="true"] {
  transform: rotate(45deg) scale(0.9);
}

.ds-chatbot-panel {
  position: fixed;
  bottom: calc(var(--space-6) + 64px);
  right: var(--space-6);
  z-index: 199;
  width: 360px;
  max-width: calc(100vw - var(--space-8));
  max-height: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  box-shadow: 0 12px 48px var(--glow), var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9) translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--dur-base) var(--ease-spring),
              opacity var(--dur-base) var(--ease);
  transform-origin: bottom right;
}

.ds-chatbot-panel.is-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.ds-chatbot-panel__header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(var(--accent-rgb), 0.08);
}

.ds-chatbot-panel__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
}

.ds-chatbot-panel__title {
  font-size: var(--text-sm);
  font-weight: var(--fw-semi);
  color: var(--text);
}

.ds-chatbot-panel__subtitle {
  font-size: var(--text-xs);
  color: var(--accent2);
}

.ds-chatbot-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ds-chatbot-panel__footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-2);
}

.ds-chatbot-panel__input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  outline: none;
  min-height: var(--tap-min);
  transition: border-color var(--dur-fast) var(--ease);
}

.ds-chatbot-panel__input:focus { border-color: var(--accent); }

.ds-chatbot-panel__send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease);
}

.ds-chatbot-panel__send:hover { transform: scale(1.1); }


/* ─────────────────────────────────────────────────────────────────────────
   16. STICKY BOTTOM BAR
   Nova Solutions only by default. Activated via JS scroll threshold.
   ───────────────────────────────────────────────────────────────────────── */

.ds-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(var(--accent-rgb), 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  transform: translateY(100%);
  transition: transform var(--dur-base) var(--ease-out);
}

.ds-sticky-bar.is-visible { transform: translateY(0); }

.ds-sticky-bar__text {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: #fff;
}

.ds-sticky-bar__cta {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

/* Nova Citizen: sticky bar is always visible (app download CTA) */
.theme-nova-citizen .ds-sticky-bar {
  transform: translateY(0);
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
}


/* ─────────────────────────────────────────────────────────────────────────
   17. EXIT INTENT MODAL
   Nova Solutions only — triggered by JS on mouseout / back button
   ───────────────────────────────────────────────────────────────────────── */

.ds-exit-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--bg-modal);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease);
}

.ds-exit-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ds-exit-modal__box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  padding: var(--space-12) var(--space-10);
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: scale(0.9) translateY(24px);
  transition: transform var(--dur-slow) var(--ease-spring);
  box-shadow: 0 24px 80px var(--glow), var(--shadow-xl);
}

.ds-exit-modal.is-open .ds-exit-modal__box {
  transform: scale(1) translateY(0);
}

.ds-exit-modal__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  color: var(--muted);
  font-size: var(--text-xl);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease);
  min-width: var(--tap-min);
  min-height: var(--tap-min);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-exit-modal__close:hover { color: var(--text); }

.ds-exit-modal__title {
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-4);
}

.ds-exit-modal__sub {
  font-size: var(--text-base);
  color: var(--text2);
  margin-bottom: var(--space-8);
  line-height: var(--lh-relaxed);
}

.ds-exit-modal__cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}


/* ─────────────────────────────────────────────────────────────────────────
   18. SCROLL REVEAL ANIMATION
   Add .ds-reveal to any element. JS adds .is-visible when it enters viewport.
   ───────────────────────────────────────────────────────────────────────── */

.ds-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.ds-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children with data-delay attribute */
.ds-reveal[data-delay="1"] { transition-delay: 100ms; }
.ds-reveal[data-delay="2"] { transition-delay: 200ms; }
.ds-reveal[data-delay="3"] { transition-delay: 300ms; }
.ds-reveal[data-delay="4"] { transition-delay: 400ms; }
.ds-reveal[data-delay="5"] { transition-delay: 500ms; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ds-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   19. UTILITY CLASSES
   ───────────────────────────────────────────────────────────────────────── */

.ds-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.ds-divider {
  height: 1px;
  background: var(--border);
  margin-block: var(--space-8);
}

.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent2);
  border: 1px solid var(--border);
}

.ds-glow-line {
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--accent),
    transparent);
  opacity: 0.4;
}


/* ─────────────────────────────────────────────────────────────────────────
   20. RESPONSIVE BREAKPOINTS
   ───────────────────────────────────────────────────────────────────────── */

/* Tablet — 1024px */
@media (max-width: 1024px) {
  :root {
    --section-py:    4rem;
    --card-px:       1.25rem;
    --card-py:       1.5rem;
  }

  .ds-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ds-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .ds-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }

  .ds-stats {
    flex-wrap: wrap;
  }

  .ds-stats__item {
    flex: 1 1 calc(50% - 1px);
  }
}

/* Mobile — 768px */
@media (max-width: 768px) {
  :root {
    --section-py:    3rem;
    --col-gap:       1rem;
  }

  /* Nav: hide links, show hamburger */
  .ds-nav__links,
  .ds-nav__cta {
    display: none;
  }

  .ds-nav__hamburger {
    display: flex;
  }

  /* Mobile menu activates */
  .ds-mobile-menu {
    display: block;
  }

  /* Grids collapse to 1 column */
  .ds-card-grid,
  .ds-grid-3,
  .ds-grid-2 {
    grid-template-columns: 1fr;
  }

  /* Hero CTA pair stacks */
  .ds-hero__cta-pair {
    flex-direction: column;
    align-items: stretch;
  }

  .ds-hero__cta-pair .ds-btn {
    width: 100%;
  }

  /* Stats stack 2 per row on mobile */
  .ds-stats {
    flex-wrap: wrap;
  }

  .ds-stats__item {
    flex: 1 1 50%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .ds-stats__item:nth-child(odd) {
    border-right: 1px solid var(--border);
  }

  .ds-stats__item:last-child,
  .ds-stats__item:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
  }

  /* Footer stacks */
  .ds-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .ds-footer__bottom {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  /* Chatbot panel full-width on mobile */
  .ds-chatbot-panel {
    right: var(--space-4);
    left: var(--space-4);
    width: auto;
    bottom: calc(var(--space-6) + 72px);
  }

  /* Sticky bar */
  .ds-sticky-bar {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-4);
  }

  /* Exit modal */
  .ds-exit-modal__box {
    padding: var(--space-8) var(--space-6);
  }

  /* Announcement bar wraps */
  .ds-announcement-bar {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-8);
    line-height: var(--lh-normal);
    min-height: 44px;
  }
}

/* Small mobile — 480px */
@media (max-width: 480px) {
  :root {
    --section-py:    2.5rem;
  }

  .ds-container {
    padding-inline: var(--space-4);
  }

  .ds-stats__item {
    flex: 1 1 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .ds-stats__item:nth-child(odd) {
    border-right: none;
  }

  .ds-stats__item:last-child {
    border-bottom: none;
  }
}
