/* =====================================================================
   The Webfluence Agency — Brand site design system
   Palette locked to the official logo: navy #14243A, cream #DBE0DC,
   light blue #99C0E6, mid blue #6E96C8. Niche-agnostic. Premium.
   Zero external dependencies (system fonts).
   ===================================================================== */

/* ---------- Display font (self-hosted, latin subset) ---------- */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/archivo-600.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/archivo-700.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/archivo-800.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --navy:       #14243a;   /* brand dark — header, footer, dark sections */
  --navy-2:     #1b2e49;   /* raised dark surface */
  --navy-3:     #2a4060;   /* border / hairline on dark */
  --navy-glass: rgba(20,36,58,.82);

  --cream:      #dbe0dc;   /* light text / marks on navy */
  --cream-dim:  #c0c6ba;   /* secondary cream-grey */
  --blue-l:     #99c0e6;   /* light blue accent on dark */
  --blue-m:     #6e96c8;   /* mid brand blue (decorative fills) */

  --accent:     #2e5c99;   /* action blue — accessible on white (6.8:1) */
  --accent-700: #214778;   /* action blue hover */
  --accent-soft:#e8eef7;   /* tint for icon badges / chips on light */

  --paper:      #ffffff;
  --mist:       #f3f6fb;   /* light section bg */
  --mist-2:     #e8eef6;
  --line:       #dde4ee;   /* hairline borders on light */
  --text:       #1f2a3d;   /* primary body on light */
  --muted:      #586374;   /* secondary body on light */
  --muted-dark: #aeb8c8;   /* secondary body on navy */

  --maxw: 1160px;
  --gut: clamp(1.1rem, 4vw, 2rem);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20,36,58,.06), 0 2px 8px rgba(20,36,58,.06);
  --shadow-md: 0 6px 24px rgba(20,36,58,.10), 0 2px 6px rgba(20,36,58,.06);
  --shadow-lg: 0 24px 60px rgba(8,16,28,.30);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Archivo", system-ui, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-700); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.025em; color: var(--navy); font-weight: 800; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 3.9rem); }
h2 { font-size: clamp(1.85rem, 3.9vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); font-weight: 700; letter-spacing: -0.015em; }
h4 { font-weight: 700; }
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.05em; padding-left: 1.2em; }
li { margin: .3em 0; }
:focus-visible { outline: 3px solid var(--blue-m); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(3.4rem, 8vw, 6rem); }
.section--tight { padding-block: clamp(2.6rem, 6vw, 4.2rem); }
.section--ink { background: var(--navy); color: var(--cream); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.section--mist { background: var(--mist); }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.28rem); color: var(--muted); max-width: 62ch; }
.section--ink .lede { color: var(--muted-dark); }
.center { text-align: center; margin-inline: auto; }
.center .lede { margin-inline: auto; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 720; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .9rem;
}
.section--ink .eyebrow { color: var(--blue-l); }
.measure { max-width: 70ch; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: .7rem 1rem; border-radius: 0 0 8px 0; z-index: 200;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.6rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font: inherit; font-weight: 680; font-size: 1rem; line-height: 1;
  padding: .92rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(46,92,153,.30); }
.btn--primary:hover { background: var(--accent-700); color: #fff; box-shadow: 0 12px 28px rgba(46,92,153,.38); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { color: var(--navy); border-color: var(--navy); }
.section--ink .btn--ghost, .hero .btn--ghost { color: #fff; border-color: rgba(219,224,220,.34); }
.section--ink .btn--ghost:hover, .hero .btn--ghost:hover { border-color: var(--cream); color: #fff; }
.btn--lg { padding: 1.05rem 1.85rem; font-size: 1.06rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.center .btn-row { justify-content: center; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.3rem, 2.5vw, 1.8rem); box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #c4d0e2; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card__num {
  font-size: .8rem; font-weight: 760; letter-spacing: .1em; color: var(--accent);
  display: block; margin-bottom: .7rem;
}
.icon-badge {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1rem;
}
.icon-badge svg { width: 24px; height: 24px; }
.section--ink .card { background: var(--navy-2); border-color: var(--navy-3); color: var(--cream); box-shadow: none; }
.section--ink .card h3 { color: #fff; }
.section--ink .icon-badge { background: rgba(153,192,230,.16); color: var(--blue-l); }

/* ---------- Stats ---------- */
.stat { text-align: left; }
.stat__big {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -.03em;
  color: var(--navy); line-height: 1;
}
.section--ink .stat__big { color: #fff; }
.stat__label { color: var(--muted); font-size: .98rem; margin-top: .35rem; }
.section--ink .stat__label { color: var(--muted-dark); }

/* ---------- Checklist ---------- */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 1.9rem; margin: .7rem 0; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .15em; width: 1.25rem; height: 1.25rem;
  border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e5c99' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/0.8rem no-repeat;
}
.section--ink .ticks li::before { background-color: rgba(153,192,230,.18); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2399c0e6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--navy-glass);
  backdrop-filter: saturate(150%) blur(12px); border-bottom: 1px solid var(--navy-3);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; }
.brand__logo { height: 30px; width: auto; display: block; }
@media (max-width: 460px) { .brand__logo { height: 25px; } }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a.nav__link { color: var(--cream); font-weight: 560; font-size: .98rem; }
.nav a.nav__link:hover, .nav a.nav__link[aria-current="page"] { color: var(--blue-l); }
.nav__cta { margin-left: .4rem; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .4rem; color: var(--cream);
}
.nav-toggle svg { width: 28px; height: 28px; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--navy); border-bottom: 1px solid var(--navy-3);
    padding: .6rem var(--gut) 1.4rem; box-shadow: var(--shadow-lg);
    transform: translateY(-130%); transition: transform .28s var(--ease); visibility: hidden;
  }
  .nav[data-open="true"] { transform: translateY(0); visibility: visible; }
  .nav a.nav__link { padding: .85rem .2rem; border-bottom: 1px solid var(--navy-3); font-size: 1.05rem; }
  .nav__cta { margin: 1rem 0 0; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy); color: var(--cream); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(58% 80% at 80% 4%, rgba(153,192,230,.20), transparent 60%),
    radial-gradient(52% 65% at 4% 102%, rgba(46,92,153,.26), transparent 60%),
    linear-gradient(180deg, #16283f, #1c3253);
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.6rem, 4vw, 3.2rem); align-items: center; }
@media (max-width: 880px) { .hero__grid { grid-template-columns: 1fr; } }
.hero h1 { color: #fff; }
.hero .lede { color: #cdd6e6; }
.hero__panel {
  background: linear-gradient(180deg, rgba(219,224,220,.08), rgba(219,224,220,.03));
  border: 1px solid rgba(219,224,220,.16); border-radius: 18px; padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.kpi-row .stat { min-width: 0; }
.kpi-row .stat__big { font-size: clamp(1.7rem, 7vw, 2.4rem); }
@media (max-width: 420px) { .kpi-row { gap: .55rem; } .hero__panel { padding: 1.2rem; } }

/* ---------- Pill / tag ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 620;
  padding: .35rem .8rem; border-radius: 999px; background: rgba(153,192,230,.14);
  color: var(--blue-l); border: 1px solid rgba(153,192,230,.30);
}
.tag { display: inline-block; font-size: .8rem; font-weight: 640; color: var(--accent); background: var(--accent-soft); padding: .25rem .7rem; border-radius: 999px; }

/* ---------- Steps (numbered process) ---------- */
.steps { counter-reset: step; display: grid; gap: 1.1rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; }
.step__n {
  counter-increment: step; width: 44px; height: 44px; flex: none; border-radius: 12px;
  background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 760;
}
.step__n::before { content: counter(step, decimal-leading-zero); }
.section--ink .step__n { background: var(--accent); }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.4rem); align-items: center; }
.split--rev > :first-child { order: 2; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } }

/* ---------- FAQ accordion ---------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit;
  font-weight: 680; font-size: 1.08rem; color: var(--navy); padding: 1.15rem 2.5rem 1.15rem 0;
  position: relative;
}
.faq__q::after {
  content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--accent); transition: transform .2s var(--ease);
}
.faq__q[aria-expanded="true"]::after { content: "\2212"; }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq__a > div { padding: 0 0 1.2rem; color: var(--muted); max-width: 68ch; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: #fff; border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.4rem); text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content:""; position:absolute; inset:0; background: radial-gradient(70% 120% at 50% -20%, rgba(153,192,230,.26), transparent 60%); z-index:0; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }

/* ---------- Founder block ---------- */
.founder { display: grid; grid-template-columns: 220px 1fr; gap: clamp(1.4rem, 3vw, 2.4rem); align-items: center; }
.founder__photo { border-radius: var(--radius); background: var(--mist-2); aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); }
@media (max-width: 640px) { .founder { grid-template-columns: 1fr; } .founder__photo { max-width: 200px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--muted-dark); padding-block: clamp(2.6rem, 6vw, 4rem) 2rem; }
.site-footer a { color: #cdd6e6; }
.site-footer a:hover { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .footer__top { grid-template-columns: 1fr; gap: 1.6rem; } }
.footer__logo { height: 86px; width: auto; display: block; margin-bottom: .6rem; }
.footer__col h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .9rem; }
.footer__col ul { list-style: none; padding: 0; margin: 0; }
.footer__col li { margin: .5rem 0; }
.footer__bottom { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(219,224,220,.12); display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; font-size: .9rem; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.hr { height: 1px; background: var(--line); border: 0; margin-block: clamp(2rem,5vw,3.4rem); }
.section--ink .hr, .hero .hr { background: var(--navy-3); }
.text-muted { color: var(--muted); }
.fine { font-size: .9rem; color: var(--muted); }
.badge-row { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Value cards: size to fit the longest heading, reflow 4 -> 2x2 -> 1, never clip */
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(.9rem, 2vw, 1.4rem); }
@media (max-width: 980px) { .value-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .value-grid { grid-template-columns: 1fr; } }
.value-card { padding: clamp(1.1rem, 2vw, 1.5rem); }
.value-card .stat__big { font-size: clamp(1.45rem, 1.9vw, 1.78rem); white-space: nowrap; letter-spacing: -.025em; }

/* =====================================================================
   VISUAL LAYER — brand-native "systems & signal" atmosphere
   ===================================================================== */
:root {
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  --grid-line: rgba(153,192,230,.07);
}

/* ---- Grain + dark-section atmosphere ---- */
.section--ink, .cta-band, .hero { position: relative; }
.section--ink::after, .cta-band::after, .hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: var(--noise); opacity: .35; mix-blend-mode: soft-light;
}
.section--ink > *, .cta-band > *, .hero > * { position: relative; z-index: 1; }
/* signal accent line atop dark sections */
.section--ink::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 1;
  background: linear-gradient(90deg, transparent, var(--blue-m), var(--blue-l), transparent);
  opacity: .55;
}

/* ---- Hero: layered mesh + blueprint grid + signal field + drift ---- */
.hero::before {
  content: ""; position: absolute; inset: -2px; z-index: 0;
  background:
    radial-gradient(46% 60% at 82% 2%, rgba(153,192,230,.22), transparent 60%),
    radial-gradient(50% 64% at 6% 104%, rgba(46,92,153,.30), transparent 60%),
    linear-gradient(180deg, #16283f, #1b3052 62%, #16273f);
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 100%);
          mask-image: linear-gradient(90deg, transparent, #000 22%, #000 100%);
}
.hero__bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px; background-position: center;
  -webkit-mask-image: radial-gradient(70% 80% at 78% 18%, #000, transparent 78%);
          mask-image: radial-gradient(70% 80% at 78% 18%, #000, transparent 78%);
}
.hero__bars { position: absolute; z-index: 0; top: 50%; right: clamp(2%, 6vw, 8%); transform: translateY(-50%); display: flex; gap: 10px; align-items: center; opacity: .42; }
.hero__bars span { width: 7px; border-radius: 6px; background: linear-gradient(180deg, var(--blue-l), var(--blue-m)); animation: eq 2.6s var(--ease) infinite; }
.hero__bars span:nth-child(1){ height: 64px; animation-delay: -.1s; }
.hero__bars span:nth-child(2){ height: 110px; animation-delay: -.5s; background: linear-gradient(180deg, var(--cream), var(--blue-l)); }
.hero__bars span:nth-child(3){ height: 150px; animation-delay: -.9s; }
.hero__bars span:nth-child(4){ height: 92px; animation-delay: -.3s; }
.hero__bars span:nth-child(5){ height: 124px; animation-delay: -.7s; }
.hero__bars span:nth-child(6){ height: 58px; animation-delay: -1.1s; }
@keyframes eq { 0%,100% { transform: scaleY(.6); } 50% { transform: scaleY(1); } }
@media (max-width: 980px){ .hero__bars { display: none; } }
@media (prefers-reduced-motion: reduce){ .hero__bars span { animation: none; } }

/* ---- Section divider: signal waveform ---- */
.divider { display: block; width: 100%; height: 26px; color: var(--blue-m); opacity: .5; }
.divider svg { width: 100%; height: 100%; }

/* ---- Decorative ring motif (large, faint) ---- */
.ring-motif { position: absolute; pointer-events: none; z-index: 0; opacity: .5; }
.section--ink .ring-motif { opacity: .9; }

/* ---- Card upgrade: signal hover accent ---- */
.card { position: relative; overflow: hidden; }
.card--hover::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--blue-l)); transform: scaleX(0);
  transform-origin: left; transition: transform .35s var(--ease);
}
.card--hover:hover::before { transform: scaleX(1); }

/* ---- Scroll reveal (no-flash: gated on html.js) ---- */
html.js :is(.reveal, .card, .step, .pillar, .pipe-node, .gauge-card, .eng, .metric-card) {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
html.js :is(.reveal, .card, .step, .pillar, .pipe-node, .gauge-card, .eng, .metric-card).is-in {
  opacity: 1; transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.js :is(.reveal, .card, .step, .pillar, .pipe-node, .gauge-card, .eng, .metric-card) {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* ============ DIAGRAM: 5 Pillars (equalizer) ============ */
.pillars {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(.5rem, 1.6vw, 1.1rem);
  align-items: end; height: clamp(220px, 32vw, 300px); padding: clamp(1.1rem,2.5vw,1.8rem);
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(180deg, var(--navy-2), var(--navy)); border: 1px solid var(--navy-3);
  border-bottom: 0; position: relative; overflow: hidden;
}
.pillars::after { content:""; position:absolute; inset:0; background-image: var(--noise); opacity:.3; mix-blend-mode: soft-light; pointer-events:none; }
.pillar { position: relative; z-index: 1; height: 100%; display: flex; align-items: flex-end; }
.pillar__bar {
  width: 100%; align-self: flex-end; border-radius: 9px 9px 3px 3px; transform-origin: bottom; transform: scaleY(.04);
  transition: transform .9s var(--ease) var(--bar-delay, 0s);
  background: linear-gradient(180deg, var(--blue-l), var(--blue-m) 60%, rgba(46,92,153,.5));
  box-shadow: 0 0 0 1px rgba(153,192,230,.18) inset; position: relative;
}
.pillar.is-in .pillar__bar { transform: scaleY(1); }
.pillar:nth-child(1) .pillar__bar { height: 58%; --bar-delay:.05s; }
.pillar:nth-child(2) .pillar__bar { height: 80%; --bar-delay:.15s; }
.pillar:nth-child(3) .pillar__bar { height: 68%; --bar-delay:.25s; }
.pillar:nth-child(4) .pillar__bar { height: 90%; --bar-delay:.35s; }
.pillar:nth-child(5) .pillar__bar { height: 100%; --bar-delay:.45s; background: linear-gradient(180deg, var(--cream), var(--blue-l) 55%, var(--blue-m)); }
.pillar__bar::before { content:""; position:absolute; top:8px; left:50%; transform:translateX(-50%); width:9px; height:9px; border-radius:50%; background: var(--cream); box-shadow: 0 0 12px rgba(219,224,220,.6); }
.pillars-key {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(.5rem, 1.6vw, 1.1rem);
  padding: 1.1rem clamp(1.1rem,2.5vw,1.8rem) 0; border: 1px solid var(--navy-3); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius); background: var(--navy); margin-top: -1px;
}
.pillars-key > div { text-align: center; padding-bottom: 1.1rem; border-top: 2px solid var(--navy-3); padding-top: .8rem; }
.pillars-key .pk-n { color: var(--blue-l); font-family: var(--display); font-weight: 800; font-size: .8rem; }
.pillars-key b { display: block; color: #fff; font-weight: 700; font-size: clamp(.84rem,1.5vw,1.02rem); margin: .15rem 0; }
.pillars-key span { font-size: .76rem; color: var(--muted-dark); line-height: 1.35; }
@media (max-width: 680px){ .pillars-key span { display: none; } }

/* ============ DIAGRAM: Process pipeline ============ */
.pipeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.pipeline::before {
  content: ""; position: absolute; top: 27px; left: 12%; right: 12%; height: 2px; z-index: 0;
  background: linear-gradient(90deg, var(--accent), var(--blue-l));
  background-size: 14px 2px; opacity: .5;
}
.pipe-node { position: relative; z-index: 1; text-align: center; padding-top: 0; }
.pipe-node__dot {
  width: 54px; height: 54px; margin: 0 auto .9rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper);
  border: 2px solid var(--accent); color: var(--accent); font-family: var(--display);
  font-weight: 800; box-shadow: 0 6px 18px rgba(46,92,153,.18);
}
.section--ink .pipe-node__dot { background: var(--navy); border-color: var(--blue-l); color: var(--blue-l); }
.pipe-node__dot svg { width: 24px; height: 24px; }
.pipe-node h3 { font-size: 1.08rem; margin-bottom: .25em; }
.pipe-node p { font-size: .9rem; color: var(--muted); margin: 0; }
.section--ink .pipe-node p { color: var(--muted-dark); }
@media (max-width: 760px) {
  .pipeline { grid-template-columns: 1fr; gap: 1.4rem; text-align: left; }
  .pipeline::before { top: 0; bottom: 0; left: 27px; right: auto; width: 2px; height: auto; }
  .pipe-node { display: grid; grid-template-columns: 54px 1fr; gap: 1rem; text-align: left; align-items: start; }
  .pipe-node__dot { margin: 0; }
}

/* ============ DIAGRAM: System map (engines -> hub) ============ */
.sysmap { display: grid; gap: 1.1rem; }
.sysmap__engines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 720px){ .sysmap__engines { grid-template-columns: repeat(2,1fr); } }
.eng {
  background: var(--navy-2); border: 1px solid var(--navy-3); border-radius: var(--radius);
  padding: 1.2rem; text-align: center; position: relative;
}
.eng__icon { width: 42px; height: 42px; margin: 0 auto .7rem; border-radius: 11px; display: grid; place-items: center; background: rgba(153,192,230,.14); color: var(--blue-l); }
.eng__icon svg { width: 22px; height: 22px; }
.eng h4 { color: #fff; margin: 0 0 .2em; font-size: 1rem; }
.eng p { color: var(--muted-dark); font-size: .82rem; margin: 0; }
.sysmap__flow { display: grid; place-items: center; }
.sysmap__flow svg { width: 100%; max-width: 520px; height: 40px; color: var(--blue-m); opacity:.7; }
.sysmap__hub {
  text-align: center; margin-inline: auto; max-width: 560px; padding: 1.1rem 1.6rem;
  background: linear-gradient(180deg, var(--accent), var(--accent-700)); color: #fff;
  border-radius: 999px; font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 14px 34px rgba(46,92,153,.34); position: relative;
}
.sysmap__hub span { display:block; font-family: var(--sans); font-weight: 500; font-size: .85rem; opacity: .85; }

/* ============ DIAGRAM: Standard gauges ============ */
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem,2.5vw,1.6rem); }
@media (max-width: 760px){ .gauges { grid-template-columns: repeat(2,1fr); } }
.gauge-card { text-align: center; }
.gauge {
  width: clamp(108px, 18vw, 138px); aspect-ratio: 1; margin: 0 auto .9rem; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--blue-l) var(--deg,0deg), rgba(153,192,230,.14) 0);
  transition: --deg 1.1s var(--ease);
}
.gauge::before { content:""; position: absolute; inset: 12px; border-radius: 50%; background: var(--navy); }
.gauge__mark { position: relative; z-index: 1; color: #fff; }
.gauge__mark svg { width: 30px; height: 30px; color: var(--blue-l); }
.gauge-card h4 { color: #fff; margin: 0 0 .15em; font-size: 1rem; }
.gauge-card p { color: var(--muted-dark); font-size: .82rem; margin: 0; }
@property --deg { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
html.js .gauge { --deg: 0deg; }
html.js .gauge-card.is-in .gauge { --deg: 360deg; }

/* ============ Results: metric card + signal graphic ============ */
.metric-card { position: relative; overflow: hidden; }
.metric-card .stat__big { color: var(--accent); }
.metric-card[data-pending]::after {
  content: "pending real data"; position: absolute; top: .9rem; right: .9rem;
  font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  color: var(--accent); background: var(--accent-soft); padding: .2rem .5rem; border-radius: 999px;
}
.signalviz { display: flex; align-items: flex-end; gap: 5px; height: 76px; }
.signalviz span { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--blue-l), var(--blue-m)); opacity: .85; transform-origin: bottom; }
.section--ink .signalviz span { background: linear-gradient(180deg, var(--cream), var(--blue-l)); }

/* ---- Founder frame ---- */
.founder__frame { position: relative; }
.founder__frame .founder__photo { position: relative; z-index: 1; }
.founder__frame::before {
  content: ""; position: absolute; inset: -10px -10px 14px 14px; border-radius: var(--radius);
  border: 1.5px solid var(--blue-m); opacity: .5; z-index: 0;
}
.founder__badge {
  position: absolute; z-index: 2; right: -10px; bottom: -10px; background: var(--navy); color: var(--cream);
  border: 1px solid var(--navy-3); border-radius: 999px; padding: .4rem .85rem; font-size: .72rem; font-weight: 600;
}
