/* ============================================================
   NEXOGRAPH — Enterprise AI Control Plane
   Design system: "Technical Blueprint × warm Editorial"
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- Cool light blue-grey neutrals ---- */
  --paper:    #ECF1F7;
  --paper-2:  #E1E9F2;
  --paper-3:  #D2DEEB;
  --paper-4:  #BFD0E1;

  /* ---- Blue primary (signature = Microsoft blue) ---- */
  --ink:      #0C2233;   /* deep navy, default text */
  --green:    #0078D4;   /* primary / signature blue */
  --green-700:#0A5BA0;
  --green-900:#0A2742;   /* deep navy — dark sections */
  --sage:     #586E86;   /* muted blue-grey body / captions */
  --sage-300: #9AACC1;

  /* ---- Secondary deep tone (petrol/teal) ---- */
  --aubergine:#0C4A63;
  --aubergine-700:#0A3A4F;

  /* ---- Cyan accent (second blue note) ---- */
  --ocher:    #0FA3D1;
  --ocher-600:#0A82AA;
  --ocher-300:#74CFEA;
  --brick:    #C0492E;   /* warm — error/validation only */

  /* ---- Lines / blueprint ---- */
  --line:      rgba(12,34,51,0.15);
  --line-soft: rgba(12,34,51,0.08);
  --line-dash: rgba(12,34,51,0.22);
  --grid:      rgba(12,34,51,0.045);

  /* ---- Type ---- */
  /* --serif holds the display/heading face (now a grotesk) */
  --serif: 'Space Grotesk', system-ui, sans-serif;
  --sans:  'IBM Plex Sans', system-ui, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, monospace;

  /* ---- Layout ---- */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 70px;
}

/* ============================================================ RESET */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

::selection { background: var(--ocher-300); color: var(--ink); }

/* ============================================================ TYPE */
.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.04; letter-spacing: -0.015em; }
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 6.2vw, 5.1rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
}
.h-sec {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.1vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.h-card {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.lede {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--sage);
  max-width: 60ch;
}
em, .it { font-style: italic; }
/* Space Grotesk has no true italic — emphasise headings with colour + weight instead */
h1 em, h2 em, h3 em, .display em, .h-sec em, .h-card em,
.display .accent, .display .it, .h-sec .it, h1 .it, h2 .it {
  font-style: normal;
  color: var(--green);
  font-weight: 600;
}

/* ---- Mono label / blueprint tag ---- */
.tag {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
}
.tag::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--ocher);
}
.tag.no-rule::before { display: none; }
.tag-ocher { color: var(--ocher-600); }
.tag-ocher::before { background: var(--green); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage);
}

/* ============================================================ LAYOUT */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 130px); position: relative; }
.section-tight { padding-block: clamp(48px, 6vw, 88px); }

.grid { display: grid; gap: clamp(20px, 2.4vw, 34px); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .cols-3, .cols-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px){ .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }

/* blueprint grid background */
.bp-grid {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hairline { height: 1px; background: var(--line); border: 0; }
.hairline-dash {
  height: 0; border: 0; border-top: 1px dashed var(--line-dash);
}

/* ============================================================ BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--mono); font-weight: 500;
  font-size: 0.82rem; letter-spacing: 0.04em;
  padding: 0.95em 1.5em;
  border-radius: 2px;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; transition: transform .18s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-700); transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(10,91,160,0.8); }
/* nav CTA: navy fill so it pops on the Microsoft-blue bar */
.nav .btn-primary { background: var(--green-900); color: #fff; }
.nav .btn-primary:hover { background: #06182B; box-shadow: 0 10px 24px -12px rgba(0,0,0,0.6); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--green-900); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: rgba(12,34,51,0.04); }
.btn-light { border: 1px solid rgba(236,241,247,0.4); color: var(--paper); }
.btn-light:hover { background: rgba(236,241,247,0.1); border-color: var(--paper); }

/* link with arrow */
.link-arrow {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.04em; color: var(--green);
  display: inline-flex; align-items: center; gap: 0.5em;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: gap .18s ease, border-color .18s ease;
}
.link-arrow:hover { gap: 0.85em; border-color: var(--green); }

/* ============================================================ HEADER */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  --nav-bg: #0078D4;          /* Microsoft blue */
  background: color-mix(in srgb, var(--nav-bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
.nav-inner {
  max-width: var(--maxw); margin-inline: auto; height: 100%;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name {
  font-family: var(--serif); font-weight: 600; font-size: 1.32rem;
  letter-spacing: -0.02em; color: #fff;
}
.brand-name b { color: rgba(255,255,255,0.66); font-weight: 600; }
/* logo: light strokes on the blue bar, keep an accent node */
.nav .brand-mark [stroke="#0078D4"] { stroke: #EAF1F8; }
.nav .brand-mark [fill="#0078D4"] { fill: #EAF1F8; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em;
  padding: 0.5em 0.85em; border-radius: 2px; color: rgba(255,255,255,0.82);
  transition: background .15s ease, color .15s ease;
  position: relative;
}
.nav-links a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0.85em; right: 0.85em; bottom: 0.1em;
  height: 1.5px; background: #BFE6F8;
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: #fff; position: relative; transition: .2s; }
.nav-toggle span::before, .nav-toggle span::after { content:""; position:absolute; left:0; width:20px; height:1.5px; background: #fff; transition:.2s; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav.open .nav-toggle span { background: transparent; }
.nav.open .nav-toggle span::before { top:0; transform: rotate(45deg); }
.nav.open .nav-toggle span::after { top:0; transform: rotate(-45deg); }

@media (max-width: 940px){
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--nav-bg); border-bottom: 1px solid rgba(255,255,255,0.16);
    padding: 12px var(--gutter) 24px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: .22s ease;
  }
  .nav.open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 0.9em 0; border-bottom: 1px solid rgba(255,255,255,0.12); font-size: 0.95rem; }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta .btn { display: none; }
}

/* ---- nav dropdown ---- */
.nav-dd { position: relative; display: flex; align-items: center; }
.nav-dd-toggle { display: inline-flex; align-items: center; gap: 0.35em; }
.nav-dd .dd-caret { width: 11px; height: 11px; transition: transform .18s ease; }
.nav-dd:hover .dd-caret, .nav-dd:focus-within .dd-caret { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 250px;
  display: flex; flex-direction: column; gap: 2px;
  background: #0A2742;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  padding: 6px;
  box-shadow: 0 18px 44px -20px rgba(0,0,0,0.6);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 120;
}
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { opacity: 1; visibility: visible; transform: none; }
.nav-dd-menu a {
  padding: 0.72em 0.9em; white-space: nowrap; border-radius: 2px;
  color: rgba(255,255,255,0.82); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em;
}
.nav-dd-menu a::after { display: none; }
.nav-dd-menu a:hover { background: rgba(255,255,255,0.12); color: #fff; }

@media (max-width: 940px){
  .nav-dd { flex-direction: column; align-items: stretch; }
  .nav-dd-toggle { justify-content: space-between; }
  .nav-dd .dd-caret { display: none; }
  .nav-dd-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: none; border: 0; box-shadow: none; padding: 0; min-width: 0; gap: 0;
  }
  .nav-dd-menu a {
    padding: 0.8em 0 0.8em 1.1em; font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.7);
  }
}

/* ============================================================ CARDS */
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: clamp(22px, 2.4vw, 34px);
  position: relative;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card-hover:hover { transform: translateY(-3px); border-color: var(--green); box-shadow: 0 18px 40px -28px rgba(22,36,28,0.5); }
.card .idx {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  color: var(--ocher-600);
}
.card-flat { background: transparent; border: 1px solid var(--line); }

/* corner ticks — blueprint accent */
.ticks::before, .ticks::after {
  content: ""; position: absolute; width: 8px; height: 8px;
  border-color: var(--ocher); border-style: solid; border-width: 0;
  opacity: 0.7;
}
.ticks::before { top: 8px; left: 8px; border-top-width: 1.5px; border-left-width: 1.5px; }
.ticks::after  { bottom: 8px; right: 8px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* ============================================================ SURFACES (dark sections) */
.dark { background: var(--green-900); color: var(--paper); }
.dark .lede, .dark .sage { color: var(--sage-300); }
.dark .tag { color: var(--ocher-300); }
.dark .tag::before { background: var(--ocher-300); }
.dark .hairline { background: rgba(236,241,247,0.16); }
.dark .card { background: rgba(236,241,247,0.04); border-color: rgba(236,241,247,0.14); }
.dark .link-arrow { color: var(--ocher-300); }
.dark .link-arrow:hover { border-color: var(--ocher-300); }

.aubergine { background: var(--aubergine-700); color: var(--paper); }
.aubergine .tag { color: var(--ocher-300); }
.aubergine .tag::before { background: var(--ocher-300); }
.aubergine .lede, .aubergine .sage { color: #A9C0D2; }
.aubergine .card { background: rgba(236,241,247,0.06); border-color: rgba(236,241,247,0.18); color: var(--paper); }
.aubergine .card p { color: #D2E0EC; }
.aubergine .card .idx { color: var(--ocher-300); }

/* ============================================================ FOOTER */
.foot { background: var(--ink); color: var(--paper); padding-block: clamp(56px, 6vw, 84px) 36px; }
.foot a { color: var(--sage-300); transition: color .15s; font-size: 0.92rem; }
.foot a:hover { color: var(--paper); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
@media (max-width: 760px){ .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot h5 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage-300); margin-bottom: 16px; font-weight: 500; }
.foot ul { display: flex; flex-direction: column; gap: 10px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(236,241,247,0.14); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--sage-300); }
.foot-legal { display: inline-flex; gap: 0.5em; flex-wrap: wrap; }
.foot-legal a { color: var(--sage-300); transition: color .15s; }
.foot-legal a:hover { color: var(--paper); }

/* ============================================================ MISC UTILITIES */
.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 34px; }
.muted { color: var(--sage); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-sm { gap: 12px; }
.gap { gap: 20px; }
.wrap-flex { flex-wrap: wrap; }

/* bullet list with blueprint markers */
.bp-list { display: flex; flex-direction: column; gap: 14px; }
.bp-list li { position: relative; padding-left: 30px; }
.bp-list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 7px; height: 7px;
  border: 1.5px solid var(--ocher); border-radius: 50%;
}
.bp-list.green li::before { border-color: var(--green); }

/* data row / spec list */
.spec { display: flex; flex-direction: column; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.spec-row:last-child { border-bottom: 0; }
.spec-row dt { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.03em; color: var(--sage); }
.spec-row dd { text-align: right; font-weight: 500; }

/* pill */
.pill {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  padding: 0.4em 0.8em; border: 1px solid var(--line); border-radius: 100px;
  color: var(--sage);
}
.pill-dot::before { content:""; width:6px; height:6px; border-radius:50%; background: var(--green); }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity:1; transform:none; transition:none; } }
