/* =========================================================
   NovaOps Technologies — Design System
   Palette: deep-space navy + electric blue (from brand mark)
   Type: Space Grotesk (display) / Inter (body) / JetBrains Mono (system labels)
   ========================================================= */

:root{
  /* --- surfaces --- */
  --bg:            #060a16;
  --bg-soft:       #0a1120;
  --surface:       #0f192e;
  --surface-2:     #142140;
  --surface-border: rgba(140,170,255,0.14);
  --hairline:      rgba(140,170,255,0.12);

  /* --- brand --- */
  --navy:          #0b1440;
  --blue-600:      #1d4fd8;
  --blue-500:      #2f6fee;
  --blue-400:      #5b8bff;
  --blue-300:      #8fb0ff;
  --cyan:          #35d0e0;
  --signal:        #34e0a1;   /* "healthy / monitoring" green, used sparingly */
  --amber:         #ffb648;   /* used sparingly for emphasis / warnings-as-craft */

  /* --- text --- */
  --ink-0:         #f4f7ff;
  --ink-1:         #c4cee6;
  --ink-2:         #8996b8;
  --ink-3:         #57648a;

  /* --- gradients --- */
  --grad-brand: linear-gradient(120deg, #0b1440 0%, #1d4fd8 55%, #5b8bff 100%);
  --grad-line:  linear-gradient(90deg, transparent, #5b8bff, #35d0e0, transparent);

  /* --- type --- */
  --f-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --f-body:    'Inter', 'Segoe UI', sans-serif;
  --f-mono:    'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  /* --- rhythm --- */
  --edge: 5vw;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --maxw: 1480px;
}

@media (min-width:1600px){
  :root{ --edge: 4vw; --maxw: 1680px; }
}

/* ---------- light theme ---------- */
/* Toggled by adding data-theme="light" to <html> (see theme.js). Overrides
   the same variable names used everywhere else, so no component CSS below
   needs a light-mode variant of its own. */
html[data-theme="light"]{
  --bg:             #ffffff;
  --bg-soft:        #f6f8fb;
  --surface:        #ffffff;
  --surface-2:      #f4f6fb;
  --surface-border: rgba(11,20,64,0.14);
  --hairline:       rgba(11,20,64,0.10);

  /* darkened so text/gradients built from these stay legible on a light bg
     (the dark-theme values are pastel-light, meant to sit on near-black) */
  --blue-300: #3457c9;
  --cyan:     #0b8fa6;
  --signal:   #0f9d68;
  --amber:    #b5790a;

  --ink-0: #0b1440;
  --ink-1: #33406b;
  --ink-2: #64719a;
  --ink-3: #93a0c2;
}
html[data-theme="light"] body::before{
  background-image:
    linear-gradient(rgba(11,20,64,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,20,64,0.045) 1px, transparent 1px);
}
/* Cards sit on a pure-white page, so they need a touch more definition than
   dark mode (where they naturally stood out against near-black) — a
   slightly stronger border plus a soft shadow reads as "elevated" instead
   of just blending into the page. */
html[data-theme="light"] .card{
  box-shadow:0 1px 3px rgba(11,20,64,0.06);
}
html[data-theme="light"] .card:hover{
  box-shadow:0 20px 50px -20px rgba(47,111,238,0.22);
}
/* The sticky header's translucent dark glass effect would otherwise show
   the dark-theme tint through it even in light mode. */
html[data-theme="light"] .site-header{
  background:rgba(255,255,255,0.78);
}
html[data-theme="light"] .promo-banner{
  box-shadow:0 18px 44px -14px rgba(11,20,64,0.18);
}

/* ---------- theme toggle button ---------- */
.theme-toggle{
  width:38px; height:38px; border-radius:999px;
  border:1px solid var(--surface-border); background:var(--surface);
  color:var(--ink-1); display:flex; align-items:center; justify-content:center;
  cursor:pointer; flex:none; transition:border-color .15s ease, color .15s ease;
}
.theme-toggle:hover{ border-color:var(--blue-400); color:var(--ink-0); }
.theme-toggle svg{ width:18px; height:18px; }
.theme-toggle .icon-moon{ display:none; }
html[data-theme="light"] .theme-toggle .icon-sun{ display:none; }
html[data-theme="light"] .theme-toggle .icon-moon{ display:block; }

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink-1);
  font-family:var(--f-body);
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
body::before{
  /* faint drifting grid — instrumentation texture, not decoration for its own sake */
  content:"";
  position:fixed; inset:0;
  background-image:
    linear-gradient(rgba(140,170,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,170,255,0.035) 1px, transparent 1px);
  background-size:64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 75%);
  pointer-events:none;
  z-index:0;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3,h4{
  font-family:var(--f-display);
  color:var(--ink-0);
  line-height:1.12;
  margin:0 0 .5em;
  letter-spacing:-0.01em;
}
h1{ font-size:clamp(2.4rem, 5.2vw, 4.4rem); font-weight:600; }
h2{ font-size:clamp(1.9rem, 3.4vw, 2.75rem); font-weight:600; }
h3{ font-size:clamp(1.2rem, 1.6vw, 1.45rem); font-weight:600; }
p{ margin:0 0 1em; color:var(--ink-1); }
.lede{ font-size:clamp(1.05rem, 1.4vw, 1.25rem); color:var(--ink-1); max-width:62ch; }
strong{ color:var(--ink-0); font-weight:600; }

::selection{ background:var(--blue-500); color:#fff; }
:focus-visible{ outline:2px solid var(--blue-400); outline-offset:3px; border-radius:4px; }

/* ---------- layout helpers ---------- */
.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 var(--edge); position:relative; z-index:1; }
/* padding-top/bottom only — NOT the "padding: X 0" shorthand. That
   shorthand sets all four sides at once, so on any element that also
   carries .wrap directly (rather than nesting .wrap in a child div), this
   rule's "0" for left/right was silently overriding .wrap's horizontal
   padding whenever it happened to be declared later in the file — exactly
   what caused the two flush-left sections this was meant to catch. */
section{ position:relative; z-index:1; padding-top:clamp(3.5rem,8vw,7rem); padding-bottom:clamp(3.5rem,8vw,7rem); }
.section-tight{ padding-top:clamp(2.5rem,5vw,4rem); padding-bottom:clamp(2.5rem,5vw,4rem); }
.eyebrow{
  font-family:var(--f-mono);
  font-size:.78rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--blue-300);
  display:flex; align-items:center; gap:.6em;
  margin-bottom:1em;
}
.eyebrow::before{
  content:""; width:7px; height:7px; border-radius:50%;
  background:var(--signal);
  box-shadow:0 0 0 3px rgba(52,224,161,0.18);
}
.hr{ height:1px; background:var(--hairline); border:0; margin:0; }
.grid{ display:grid; gap:1.5rem; }
.g-2{ grid-template-columns:repeat(2,1fr); }
.g-3{ grid-template-columns:repeat(3,1fr); }
.g-4{ grid-template-columns:repeat(4,1fr); }
@media (max-width:920px){ .g-2,.g-3,.g-4{ grid-template-columns:1fr; } }
@media (min-width:921px) and (max-width:1180px){ .g-4{ grid-template-columns:repeat(2,1fr); } }

/* ---------- buttons ---------- */
.btn{
  font-family:var(--f-mono);
  font-size:.86rem;
  letter-spacing:.02em;
  display:inline-flex; align-items:center; gap:.55em;
  padding:.85em 1.5em;
  border-radius:999px;
  border:1px solid transparent;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space:nowrap;
}
.btn-primary{
  background:var(--grad-brand);
  color:#fff;
  box-shadow:0 8px 30px -8px rgba(47,111,238,0.65);
}
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 14px 34px -8px rgba(47,111,238,0.8); }
.btn-ghost{
  background:rgba(255,255,255,0.02);
  border-color:var(--surface-border);
  color:var(--ink-0);
}
.btn-ghost:hover{ border-color:var(--blue-400); background:rgba(91,139,255,0.08); }
.btn-arrow::after{ content:"→"; transition:transform .18s ease; }
.btn:hover .btn-arrow::after, .btn-arrow:hover::after{ transform:translateX(3px); }

/* ---------- nav ---------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(6,10,22,0.72);
  backdrop-filter:blur(14px) saturate(140%);
  border-bottom:1px solid var(--hairline);
}
.nav{ display:flex; align-items:center; justify-content:space-between; padding:1rem var(--edge); max-width:var(--maxw); margin:0 auto; }
.brand{ display:flex; align-items:center; gap:.7rem; }
.brand img{ height:34px; width:auto; }
.brand-word{ font-family:var(--f-display); font-weight:600; font-size:1.12rem; color:var(--ink-0); letter-spacing:-0.01em; }
.brand-word span{ color:var(--blue-400); }
.nav-links{ display:flex; align-items:center; gap:2.1rem; }
.nav-links a{
  font-family:var(--f-mono); font-size:.82rem; letter-spacing:.03em;
  color:var(--ink-2); position:relative; padding:.3em 0;
  transition:color .16s ease;
}
.nav-links a:hover, .nav-links a.active{ color:var(--ink-0); }
.nav-links a.active::after{
  content:""; position:absolute; left:0; right:0; bottom:-6px; height:2px;
  background:var(--grad-line);
}
.nav-links .theme-toggle-mobile{
  display:none; align-items:center; gap:.6em; margin-top:.4rem;
  background:none; border:1px solid var(--surface-border); border-radius:999px;
  padding:.7em 1.1em; color:var(--ink-1); font-family:var(--f-mono); font-size:.85rem; cursor:pointer;
  width:fit-content; height:auto;
}
/* These two buttons exist only for the mobile slide-out menu — hidden by
   default here, then explicitly re-shown inside the mobile media query
   below. Without this, they'd otherwise sit inline among the plain nav
   links (Home/Services/...) on desktop, which is what was happening before. */
.nav-links a.btn{ display:none; }
.nav-links .theme-toggle-mobile svg{ width:16px; height:16px; }
.nav-links .theme-toggle-mobile .icon-moon{ display:none; }
html[data-theme="light"] .nav-links .theme-toggle-mobile .icon-sun{ display:none; }
html[data-theme="light"] .nav-links .theme-toggle-mobile .icon-moon{ display:block; }
.nav-cta{ display:flex; align-items:center; gap:1.4rem; }
.nav-toggle{ display:none; background:none; border:1px solid var(--surface-border); border-radius:8px; width:42px; height:38px; color:var(--ink-0); cursor:pointer; }
@media (max-width:900px){
  .brand{ min-width:0; }
  .brand-word{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .nav-links{
    position:fixed; inset:64px 0 0 0; height:calc(100dvh - 64px);
    background:var(--bg-soft); flex-direction:column; justify-content:flex-start;
    padding:2.2rem var(--edge); gap:1.6rem; transform:translateX(100%);
    transition:transform .28s ease; overflow-y:auto;
  }
  .nav-links.open{ transform:translateX(0); }
  .nav-links a{ font-size:1rem; }
  .nav-links .theme-toggle-mobile{ display:flex; }
  .nav-links a.btn{ display:inline-flex; }
  .nav-cta .btn-ghost{ display:none; }
  .nav-cta .theme-toggle{ display:none; }
  .nav-cta .btn-primary{ display:none; }
  .nav-toggle{ display:block; }
}

/* ---------- footer ---------- */
.site-footer{ border-top:1px solid var(--hairline); padding:3.5rem 0 2rem; margin-top:4rem; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:2.5rem; margin-bottom:2.5rem; }
@media (max-width:800px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:540px){ .footer-grid{ grid-template-columns:1fr; } }
.footer-col h4{ font-family:var(--f-mono); font-size:.76rem; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-2); margin-bottom:1em; }
.footer-col a{ display:block; color:var(--ink-1); font-size:.92rem; margin-bottom:.7em; transition:color .15s; }
.footer-col a:hover{ color:var(--blue-300); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:1rem; font-size:.82rem; color:var(--ink-3); font-family:var(--f-mono); }

/* ---------- cards ---------- */
.card{
  background:linear-gradient(160deg, var(--surface), var(--surface) 60%, var(--surface-2));
  border:1px solid var(--surface-border);
  border-radius:var(--radius-l);
  padding:2rem;
  transition:transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover{ transform:translateY(-4px); border-color:rgba(91,139,255,0.45); box-shadow:0 20px 50px -20px rgba(47,111,238,0.35); }
.card .tag{
  font-family:var(--f-mono); font-size:.72rem; letter-spacing:.08em; text-transform:uppercase;
  color:var(--cyan); display:inline-block; margin-bottom:1em;
}
.pill{
  font-family:var(--f-mono); font-size:.74rem; padding:.35em .8em; border-radius:999px;
  border:1px solid var(--surface-border); color:var(--ink-2); display:inline-block;
}
.pill-row{ display:flex; flex-wrap:wrap; gap:.5em; }

/* ---------- reveal-on-scroll ---------- */
.reveal{ opacity:0; transform:translateY(22px); transition:opacity .7s ease, transform .7s ease; }
.reveal.in{ opacity:1; transform:translateY(0); }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
  html{ scroll-behavior:auto; }
}

/* ---------- page hero shared ---------- */
.page-hero{ padding-top:clamp(3rem,7vw,5.5rem); padding-bottom:clamp(2rem,5vw,3rem); }
.page-kicker{ font-family:var(--f-mono); color:var(--blue-300); font-size:.8rem; letter-spacing:.14em; text-transform:uppercase; margin-bottom:1em; }

/* ---------- CTA band ---------- */
.cta-band{
  border-radius:var(--radius-l);
  background:radial-gradient(120% 160% at 15% 0%, rgba(47,111,238,0.25), transparent 55%), var(--surface);
  border:1px solid var(--surface-border);
  padding:clamp(2.2rem,5vw,3.6rem);
  display:flex; align-items:center; justify-content:space-between; gap:2rem; flex-wrap:wrap;
}
.cta-band h2{ margin-bottom:.3em; }
.cta-actions{ display:flex; gap:1rem; flex-wrap:wrap; }

/* ---------- misc utility ---------- */
.center{ text-align:center; margin-left:auto; margin-right:auto; }
.mt-0{ margin-top:0 !important; }
.mb-0{ margin-bottom:0 !important; }
.narrow{ max-width:56ch; }
.stat-num{ font-family:var(--f-display); font-size:clamp(2.1rem,3.4vw,2.9rem); color:var(--ink-0); font-weight:600; }
.stat-label{ font-family:var(--f-mono); font-size:.78rem; color:var(--ink-2); letter-spacing:.04em; }

/* skip link for a11y */
.skip-link{
  position:absolute; left:-999px; top:0; background:var(--blue-500); color:#fff;
  padding:.8em 1.2em; z-index:100; border-radius:0 0 8px 0;
}
.skip-link:focus{ left:0; }
