/* ==========================================================================
   KRISID — Dark tech theme
   Palette derived from the KRISID logo: deep navy + cyan accent
   Pure CSS, no dependencies.
   ========================================================================== */

:root {
  /* Brand */
  --navy-900: #060b1a;
  --navy-850: #0a1024;
  --navy-800: #0d152e;
  --navy-700: #131e3f;
  --navy-600: #1b2a55;
  --brand: #1e3a8f;          /* logo navy */
  --brand-light: #2f57c4;
  --accent: #35a8d0;         /* logo cyan dot */
  --accent-bright: #4fd1e8;
  --accent-glow: rgba(53, 168, 208, 0.35);

  /* Text */
  --text: #e8edf7;
  --text-muted: #9aa8c4;
  --text-dim: #7787a6;   /* 4.9:1 on the raised surface, not just the page bg */

  /* Surfaces */
  --surface: rgba(255, 255, 255, 0.028);
  --surface-hover: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(79, 209, 232, 0.35);

  /* Layout */
  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 9px;
  --nav-h: 72px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--navy-900);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient background glow — pure CSS, no images */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(760px 520px at 12% -6%, rgba(47, 87, 196, 0.20), transparent 62%),
    radial-gradient(620px 460px at 88% 4%, rgba(53, 168, 208, 0.13), transparent 60%),
    radial-gradient(900px 620px at 50% 108%, rgba(30, 58, 143, 0.16), transparent 65%);
  pointer-events: none;
}

/* Subtle grid overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 62% at 50% 0%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 100% 62% at 50% 0%, #000 35%, transparent 78%);
  pointer-events: none;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-bright); text-decoration: none; transition: color .18s ease; }
a:hover { color: #fff; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.18;
  letter-spacing: -0.022em;
  font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.16rem; }
p  { margin: 0 0 1.1em; color: var(--text-muted); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section-head { max-width: 660px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 1.03rem; margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 14px;
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(53, 168, 208, 0.07);
}

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.text-accent { color: var(--accent-bright); }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: .935rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease,
              border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn-primary {
  /* Gradient ends on a darkened cyan so white label text clears 4.5:1 along
     the whole button, not just the navy end. */
  background: linear-gradient(135deg, var(--brand-light), #1d7d9e);
  color: #fff;
  box-shadow: 0 6px 22px rgba(53, 168, 208, 0.24);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(53, 168, 208, 0.38);
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  color: #fff;
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateY(-2px);
}
.btn-lg { padding: 15px 32px; font-size: 1rem; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(6, 11, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 10px; }
/* Brightened, background-removed mark (generated from the source logo) */
.brand-logo {
  height: 34px;
  width: auto;
  transition: filter .18s ease, transform .18s ease;
}
.brand:hover .brand-logo {
  filter: brightness(1.15) drop-shadow(0 0 9px var(--accent-glow));
}
/* The wordmark is the actual lettering lifted from the supplied logo file —
   extracted, filled, and re-rendered at 2x for retina. No font substitution,
   so the letterforms are exactly the brand's own. */
.brand-wordmark {
  height: 17px;
  width: auto;
  transition: filter .18s ease;
}
.brand:hover .brand-wordmark { filter: brightness(1.25); }

.footer .brand-logo { height: 40px; }
.footer .brand-wordmark { height: 20px; }

@media (max-width: 400px) {
  .brand-logo { height: 28px; }
  .brand-wordmark { height: 14px; }
}

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block;
  padding: 8px 15px;
  border-radius: 7px;
  font-size: .93rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover { color: #fff; background: var(--surface-hover); }
.nav-links a.active { color: var(--accent-bright); }
.nav-cta { margin-left: 12px; }

/* The nav CTA is an <a> inside .nav-links, so the link colour above outranks
   .btn-primary on specificity and the label inherits the muted text colour.
   Restate it here, above both, so the button label stays white. */
.nav-links .nav-cta a.btn,
.nav-links .nav-cta a.btn:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-light), #1d7d9e);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 106px 0 88px; position: relative; }
.hero-inner { max-width: 830px; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .glow {
  background: linear-gradient(120deg, var(--accent-bright), var(--brand-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede { font-size: clamp(1.02rem, 2vw, 1.2rem); max-width: 640px; margin-bottom: 34px; }

/* ---------- Tagline ---------- */
.tagline {
  font-size: clamp(1.12rem, 2.3vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -.012em;
  line-height: 1.35;
  margin: 0 0 20px;
  background: linear-gradient(100deg, var(--accent-bright), var(--brand-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline-sm {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 13px 0 0;
}
.footer .tagline-sm { margin: 12px 0 10px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }

.page-hero { padding: 74px 0 42px; }
.page-hero h1 { margin-bottom: 16px; }
/* Standfirst runs close to the container width. text-wrap: pretty stops the
   last line being left with a single orphaned word in browsers that support
   it, and is harmlessly ignored elsewhere. */
.page-hero p {
  font-size: 1.08rem;
  max-width: 1040px;
  margin-bottom: 0;
  text-wrap: pretty;
}
/* Small qualifier under a standfirst — "no registration", disclaimers etc. */
.hero-note {
  font-size: .88rem;
  color: var(--text-dim);
  margin: 10px 0 0;
}

/* ==========================================================================
   VISUALS — inline SVG graphics. No images, no libraries, ~0 KB transfer.
   All motion is slow and looping; disabled under prefers-reduced-motion.
   ========================================================================== */

.viz {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Shared SVG primitives */
.viz-node {
  fill: var(--navy-800);
  stroke: var(--border-strong);
  stroke-width: 1;
}
.viz-node-accent { fill: rgba(53, 168, 208, .10); stroke: var(--accent); }
.viz-label {
  fill: var(--text);
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
}
.viz-sub {
  fill: var(--text-dim);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.viz-wire {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1.2;
  opacity: .55;
}
.viz-icon { fill: none; stroke: var(--accent-bright); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; }

/* Particles travelling along a wire */
.viz-dot { fill: var(--accent-bright); }

/* ---------- Richer hero diagram ---------- */
/* KRISID mark inside the hero diagram — two variants, one per theme */
.viz-logo-dk { display: none; }

.viz-chip {
  fill: var(--navy-800);
  stroke: var(--border);
  stroke-width: 1;
}
.viz-chip-accent { fill: rgba(53,168,208,.10); stroke: var(--border-strong); }
.viz-micro {
  fill: var(--text-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.viz-chip-icon {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* dashed energy travelling along the connectors */
@keyframes vizWireDash { to { stroke-dashoffset: -24; } }
.viz-flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-dasharray: 3 9;
  opacity: .75;
  animation: vizWireDash 1.9s linear infinite;
}

/* segmented capability ring around the core */
@keyframes vizRingSpin { to { stroke-dashoffset: -503; } }
.viz-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  opacity: .30;
  stroke-linecap: round;
  animation: vizRingSpin 40s linear infinite;
}

/* bright arc that sweeps around the core like a scanner */
@keyframes vizSweepRot { to { transform: rotate(360deg); } }
.viz-scanner {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 2.5;
  stroke-linecap: round;
  animation: vizSweepRot 9s linear infinite;
}

/* fine tick ring */
.viz-ticks { stroke: var(--accent); stroke-width: 1; opacity: .28; }
.viz-ticks-rot { animation: vizSweepRot 90s linear infinite reverse; }

/* small status pill inside the diagram */
.viz-badge { fill: rgba(53,168,208,.16); stroke: var(--border-strong); stroke-width: .8; }
.viz-badge-text {
  fill: var(--accent-bright);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .08em;
}

@media (prefers-reduced-motion: reduce) {
  .viz-flow, .viz-ring, .viz-scanner, .viz-ticks-rot { animation: none; }
}

/* Slow pulse for the "governed" ring */
@keyframes vizPulse {
  0%, 100% { opacity: .25; transform: scale(1); }
  50%      { opacity: .6;  transform: scale(1.045); }
}
.viz-pulse { animation: vizPulse 6s ease-in-out infinite; transform-origin: center; }

/* Node breathing — staggered so the diagram never looks static */
@keyframes vizGlow {
  0%, 100% { opacity: .32; }
  50%      { opacity: .85; }
}
.viz-halo { animation: vizGlow 5.5s ease-in-out infinite; }
.viz-halo--2 { animation-delay: 1.4s; }
.viz-halo--3 { animation-delay: 2.8s; }
.viz-halo--4 { animation-delay: 4.2s; }

/* Scanning sweep across the lineage bars */
@keyframes vizSweep {
  0%   { transform: translateX(-16%); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(116%); opacity: 0; }
}
.viz-sweep { animation: vizSweep 9s linear infinite; }

/* Orbiting ring — used on the About page */
@keyframes vizSpin { to { transform: rotate(360deg); } }
.viz-orbit { animation: vizSpin 46s linear infinite; transform-origin: center; }
.viz-orbit--rev { animation: vizSpin 62s linear infinite reverse; transform-origin: center; }

/* Hero layout with a visual beside the copy */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 54px;
  align-items: center;
}
.hero-grid .hero-inner { max-width: none; padding: 0; }

/* A visual placed as a full-width band between sections */
.viz-band {
  padding: 8px 0 4px;
  border-radius: var(--radius);
}

/* Decorative visual paired with prose */
.viz-aside {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-grid .viz-wrap { max-width: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  .viz-pulse, .viz-halo, .viz-sweep, .viz-orbit, .viz-orbit--rev { animation: none; }
  .viz-dot { display: none; }
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .22s ease, border-color .22s ease, background .22s ease,
              box-shadow .22s ease;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .22s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}
.card:hover::before { opacity: 1; }
.card h3 { color: #fff; margin-bottom: 10px; }
.card p { margin-bottom: 0; font-size: .945rem; }

/* Grid rows stretch to the tallest card. Make cards columns so a bullet list
   always sits flush at the bottom instead of leaving a floating gap when
   neighbouring cards carry more copy. */
.card { display: flex; flex-direction: column; }
.card > .card-list { margin-top: auto; }

/* ...except where the copy above the list is short. Pushing the list to the
   bottom then detaches its top border from the paragraph and reads as a
   mistake. Keep those lists in natural flow. */
.cards-top > * > .card > .card-list { margin-top: 17px; }

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 17px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(47,87,196,.28), rgba(53,168,208,.18));
  border: 1px solid var(--border-strong);
  color: var(--accent-bright);
}
.card-icon svg { width: 21px; height: 21px; stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.card-list {
  list-style: none;
  padding: 0;
  margin: 17px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.card-list li {
  position: relative;
  padding-left: 19px;
  font-size: .885rem;
  color: var(--text-dim);
  margin-bottom: 7px;
}
.card-list li::before {
  content: '';
  position: absolute;
  left: 0; top: .62em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.card-list li:last-child { margin-bottom: 0; }

/* ---------- Industries ---------- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}
.industry {
  position: relative;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.industry:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}
.industry-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(47,87,196,.28), rgba(53,168,208,.18));
  border: 1px solid var(--border-strong);
}
.industry-icon svg {
  width: 19px; height: 19px;
  fill: none; stroke: var(--accent-bright); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.industry h3 {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 7px;
}
.industry p {
  font-size: .855rem;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Compact inline strip — used on the Services page */
.industry-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.industry-strip span {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  padding: 7px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; }
.stat { background: var(--navy-850); padding: 28px 22px; text-align: center; }
.stat-num {
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--accent-bright);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.stat-label { font-size: .82rem; color: var(--text-dim); margin: 6px 0 0;
  text-transform: uppercase; letter-spacing: .07em; }

/* ---------- Journey stepper (Assess → Prioritise → Implement → Embed) ---------- */
.journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: jstep;
}

/* connector rail behind the markers */
.journey::before {
  content: '';
  position: absolute;
  top: 37px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg,
    rgba(79,209,232,.10), rgba(79,209,232,.42), rgba(79,209,232,.10));
  border-radius: 2px;
}
/* light travelling along the rail */
.journey::after {
  content: '';
  position: absolute;
  top: 36px;
  left: 12.5%;
  width: 25%;
  height: 4px;
  border-radius: 4px;
  background: radial-gradient(closest-side, var(--accent-bright), transparent);
  opacity: .85;
  animation: journeyRun 11s ease-in-out infinite;
}
@keyframes journeyRun {
  0%        { transform: translateX(0);    opacity: 0; }
  8%        { opacity: .9; }
  92%       { opacity: .9; }
  100%      { transform: translateX(300%); opacity: 0; }
}

.journey-step {
  counter-increment: jstep;
  position: relative;
  text-align: center;
  padding: 0 6px;
}

.journey-marker {
  position: relative;
  width: 74px;
  height: 74px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy-850);
  border: 1px solid var(--border-strong);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.journey-marker::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 72%);
  opacity: .5;
  animation: vizGlow 6s ease-in-out infinite;
}
.journey-step:nth-child(2) .journey-marker::before { animation-delay: 1.5s; }
.journey-step:nth-child(3) .journey-marker::before { animation-delay: 3s; }
.journey-step:nth-child(4) .journey-marker::before { animation-delay: 4.5s; }

.journey-marker svg {
  position: relative;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 01 – 04 badge */
.journey-marker::after {
  content: '0' counter(jstep);
  position: absolute;
  bottom: -6px;
  right: -4px;
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--navy-900);
  background: var(--accent-bright);
  border-radius: 999px;
  padding: 2px 7px;
  line-height: 1.35;
}

.journey-step:hover .journey-marker {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 26px rgba(53,168,208,.22);
}

.journey-step h3 {
  font-size: 1.02rem;
  color: #fff;
  margin-bottom: 8px;
}
.journey-step p {
  font-size: .89rem;
  margin-bottom: 0;
}

@media (max-width: 940px) {
  .journey { grid-template-columns: repeat(2, 1fr); gap: 34px 20px; }
  .journey::before, .journey::after { display: none; }
}
@media (max-width: 560px) {
  .journey { grid-template-columns: 1fr; gap: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .journey::after, .journey-marker::before { animation: none; }
}

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  padding: 62px 34px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(53,168,208,.15), transparent 70%),
    var(--navy-850);
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { max-width: 520px; margin: 0 auto 26px; }

/* ---------- Prose (About / Insights article) ---------- */
.prose { max-width: 720px; }

/* On a paper page the prose is the only thing in the container, so
   left-aligning it dumps ~400px of dead space on the right. Centre the
   measure and the whitespace splits evenly. */
.paper-page .prose,
.paper-page .paper-hero .container > * { margin-left: auto; margin-right: auto; }
.paper-page .prose { max-width: 740px; }
.paper-page .paper-hero .container { max-width: 740px; }
.paper-page .back-link { display: inline-flex; margin-right: auto; }

/* Figures and wide tables get to break out past the text measure —
   the framework diagram in particular is cramped at 740px. */
.paper-page .prose > .figure { margin-left: -70px; margin-right: -70px; }
.paper-page .prose > table   { width: calc(100% + 80px); margin-left: -40px; }

@media (max-width: 920px) {
  .paper-page .prose > .figure { margin-left: 0; margin-right: 0; }
  .paper-page .prose > table   { width: 100%; margin-left: 0; }
}
.prose h2 { margin-top: 44px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; color: var(--text-muted); }
.prose li { margin-bottom: 9px; }
.prose blockquote {
  margin: 28px 0;
  padding: 18px 24px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose blockquote p { margin: 0; color: var(--text); font-size: 1.05rem; }

/* ---------- Figures inside papers ---------- */
.figure {
  margin: 34px 0;
  padding: 24px 20px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.figure svg { width: 100%; height: auto; display: block; }
.figure figcaption {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: .84rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.figure figcaption strong { color: var(--text-muted); font-weight: 600; }

/* framework diagram primitives */
.fw-band { fill: rgba(255,255,255,.03); stroke: var(--border); stroke-width: 1; }
.fw-box  { fill: var(--navy-800); stroke: var(--border-strong); stroke-width: 1; }
.fw-box-accent { fill: rgba(53,168,208,.11); stroke: var(--accent); stroke-width: 1; }
.fw-title {
  fill: var(--accent-bright);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.fw-label { fill: var(--text); font-family: var(--font); font-size: 11px; font-weight: 600; }
.fw-sub   { fill: var(--text-dim); font-family: var(--font); font-size: 9px; }
.fw-arrow { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: .55; }

/* ---------- White paper article pages ---------- */
.paper-hero { padding: 56px 0 34px; }
.paper-hero h1 { font-size: clamp(1.85rem, 4vw, 2.85rem); margin-bottom: 18px; }

/* Back link — kept out of the meta line so it reads as navigation rather
   than as another metadata field. */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  padding: 6px 14px 6px 11px;
  font-size: .86rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color .18s ease, border-color .18s ease, background .18s ease,
              transform .18s ease;
}
.back-link svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}
.back-link:hover {
  color: var(--accent-bright);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
.back-link:hover svg { transform: translateX(-2px); }

/* Meta line as flex items. Each fact is atomic and can never be split
   mid-phrase, and the separators are drawn rather than typed — so
   "6 min read" cannot end up orphaned on its own line. */
.paper-hero .article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 16px;
}
.paper-hero .article-meta span { white-space: nowrap; }
.paper-hero .article-meta span + span::before {
  content: '·';
  margin-right: 14px;
  color: var(--border-strong);
}
.paper-standfirst {
  font-size: clamp(1.02rem, 2vw, 1.16rem);
  color: var(--text);
  max-width: 700px;
  margin-bottom: 0;
}

/* Vertical rhythm in long-form papers.
   The space above a heading should clearly exceed the space below it, so the
   heading reads as belonging to the text that follows rather than floating
   between two blocks — but not by so much that it looks detached. */
.prose h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 58px 0 18px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.prose h3 {
  font-size: 1.08rem;
  line-height: 1.4;
  margin: 36px 0 10px;
  color: #fff;
}

/* No rule or leading space on the opening heading, and none directly under
   the contents box — the box is already a divider. */
.prose > :first-child { margin-top: 0; }
.prose h2:first-child,
.paper-toc + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Kill the double gap where a heading is followed by a block that carries
   its own top margin. */
.prose h2 + p,
.prose h3 + p,
.prose h2 + ul,
.prose h2 + ol,
.prose h3 + ul,
.prose h3 + ol { margin-top: 0; }
.prose h2 + .figure,
.prose h2 + .callout,
.prose h2 + table,
.prose h3 + table { margin-top: 22px; }

/* A subheading directly under a section heading needs almost no gap —
   otherwise the two stack with 54px of nothing between them. */
.prose h2 + h3 { margin-top: 10px; }

/* Blocks that sit between paragraphs need a little more air than a
   paragraph gap, or they read as part of the preceding sentence. */
.prose ul, .prose ol { margin: 0 0 1.3em; }
.prose p + ul, .prose p + ol { margin-top: -.2em; }
.prose ol { padding-left: 20px; color: var(--text-muted); }
.prose ol li, .prose ul li { margin-bottom: 10px; }
.prose li strong, .prose p strong { color: var(--text); font-weight: 600; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0;
  font-size: .92rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.prose th {
  color: #fff;
  font-weight: 600;
  font-size: .84rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom-color: var(--border-strong);
}
.prose td { color: var(--text-muted); }
.prose tr:last-child td { border-bottom: 0; }

.callout {
  margin: 30px 0;
  padding: 22px 24px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgba(53, 168, 208, 0.055);
}
.callout h4 {
  margin: 0 0 9px;
  font-size: .78rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-family: var(--mono);
}
.callout p:last-child { margin-bottom: 0; }

.paper-toc {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 40px;
}
.paper-toc h4 {
  margin: 0 0 12px;
  font-size: .76rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--mono);
}
.paper-toc ol { margin: 0; padding-left: 19px; }
.paper-toc li { margin-bottom: 6px; font-size: .92rem; }

.paper-footnote {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: .85rem;
  color: var(--text-dim);
}
.paper-footnote a { color: var(--text-muted); }
.paper-footnote a:hover { color: var(--accent-bright); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 17px; }
.field label {
  display: block;
  font-size: .855rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: .94rem;
  color: var(--text);
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field textarea { min-height: 138px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,.055);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field select option { background: var(--navy-800); color: var(--text); }
.form-note { font-size: .82rem; color: var(--text-dim); margin: 0; }
.form-status {
  display: none;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  border: 1px solid var(--border-strong);
  background: rgba(53,168,208,.1);
  color: var(--accent-bright);
}
.form-status.show { display: block; }

/* ---------- Contact info list ---------- */
.info-item { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.info-item:last-child { border-bottom: 0; }
.info-item .card-icon { margin-bottom: 0; flex-shrink: 0; width: 40px; height: 40px; }
.info-item h4 { margin: 0 0 3px; font-size: .93rem; color: #fff; }
.info-item p { margin: 0; font-size: .9rem; }

/* ---------- Empty state (Insights scaffold) ---------- */
.empty-state {
  text-align: center;
  padding: 76px 30px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.empty-state .card-icon { margin: 0 auto 18px; width: 52px; height: 52px; }
.empty-state .card-icon svg { width: 24px; height: 24px; }
.empty-state h3 { color: #fff; }
.empty-state p { max-width: 440px; margin: 0 auto 22px; }

/* Article card — template for Insights entries */
.article-card { display: flex; flex-direction: column; }
.article-meta {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 11px;
}
.article-card h3 a { color: #fff; }
.article-card h3 a:hover { color: var(--accent-bright); }
.article-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }

/* Cards in a grid row stretch to the tallest. Excerpts vary in length, so
   without this the tag row floats at a different height in every card and
   the leftover space reads as a mistake. Pin tags to the bottom and the
   rows line up. */
.article-card .article-tags {
  margin-top: auto;
  padding-top: 18px;
}

/* ---- Whole card is the click target ----
   The title stays a real <a>; its ::after is stretched over the card. That
   keeps keyboard focus, middle-click and "open in new tab" working, and
   needs no JavaScript. */
.article-card { position: relative; }
.article-card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}
.article-card { cursor: pointer; }
.article-card:hover h3 a { color: var(--accent-bright); }

/* Keyboard users get the same affordance the mouse gets. */
.article-card:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.article-card h3 a:focus-visible { outline: none; }

/* Note: each card contains exactly one link. If a second link is ever added
   inside a card, give it `position: relative; z-index: 2` so it sits above
   the overlay and remains independently clickable. */
/* Give the title a consistent footprint so two- and three-line headlines
   do not shunt everything below them out of alignment. */
.article-card h3 {
  min-height: 2.6em;
  margin-bottom: 12px;
}
.tag {
  font-size: .74rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--navy-850);
  padding: 54px 0 26px;
  margin-top: 44px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 38px;
}
.footer-brand p { font-size: .9rem; max-width: 320px; margin: 14px 0 0; }
.footer h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--text-dim);
  margin-bottom: 15px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; }
.footer li a { font-size: .9rem; color: var(--text-muted); }
.footer li a:hover { color: var(--accent-bright); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: .84rem;
  color: var(--text-dim);
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats  { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 24px 20px;
    background: rgba(6, 11, 26, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 14px; }
  .nav-cta { margin: 8px 0 0; justify-content: center; }

  .section { padding: 58px 0; }
  .hero { padding: 66px 0 56px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .step { padding: 22px 22px 22px 22px; }
  .step::before { position: static; display: block; margin-bottom: 8px; }
  .cta-band { padding: 44px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Print ---------- */
@media print {
  body::before, body::after, .nav, .footer, .cta-band { display: none; }
  body { background: #fff; color: #000; }
}
