/* ==========================================================================
   KB Analytics public site, rebuilt Nov 2026.
   Dark hero, light body. No framework: tokens, layout, components, graphics.
   Contrast: body text >= 4.5:1 everywhere (checked in frontend/tests.py).
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --navy-950: #060e1a;
  --navy-900: #0a1628;
  --navy-800: #102239;
  --navy-700: #1a3352;
  --brand: #234e70;
  --cyan-300: #67e8f9;
  --cyan-400: #22d3ee;
  --teal-700: #0e7490;
  --ink: #0f172a;
  --text: #334155;
  --muted: #5f6f85;
  --on-dark: #e2e8f0;
  --on-dark-muted: #94a3b8;
  --line: #e2e8f0;
  --line-dark: rgba(148, 163, 184, .16);
  --tint: #f4f7fb;
  --white: #fff;
  --ok: #10b981;
  --star: #f59e0b;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 32px);
  --section: clamp(72px, 10vw, 128px);
  --header-h: 72px;
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 30px 80px -24px rgba(2, 8, 23, .55);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  color: var(--text); background: var(--white);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--teal-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--cyan-400); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--cyan-300); color: var(--navy-950); }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 200; background: var(--white); color: var(--ink); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; }
.skip-link:focus { left: 12px; }

/* ---------- 3. Type ---------- */
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--ink); font-weight: 650; line-height: 1.12; letter-spacing: -.025em; }
h1 { font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); letter-spacing: -.04em; line-height: 1.02; font-weight: 700; }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3rem); letter-spacing: -.035em; }
h3 { font-size: 1.25rem; letter-spacing: -.015em; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 1rem + .45vw, 1.3rem); line-height: 1.6; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  font: 600 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--teal-700);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .6; }
.gradient-text {
  background: linear-gradient(100deg, var(--cyan-300), #a5f3fc 45%, #fff 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* ---------- 4. Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--tint { background: var(--tint); }
.section--tight { padding: clamp(48px, 7vw, 80px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .eyebrow::before { display: none; }
.section-head--split { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; }
.section-head--split > div { max-width: 680px; }
.section-head .lead { margin: 0; color: var(--text); }
.grid { display: grid; gap: 24px; }
.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: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split--wide-left { grid-template-columns: 1.1fr .9fr; }
@media (max-width: 900px) { .split, .split--wide-left { grid-template-columns: 1fr; } }

/* Grid and flex children may shrink below their content (code panels, long words). */
.split > *, .feature > *, .hero__grid > *, .study > *, .grid > *, .dash-row > * { min-width: 0; }

/* ---------- 5. Buttons, links, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  font: 600 .975rem/1 var(--font); letter-spacing: -.005em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--cyan-400); color: var(--navy-950); box-shadow: 0 8px 24px -10px rgba(34, 211, 238, .7); }
.btn--primary:hover { background: var(--cyan-300); color: var(--navy-950); }
.btn--dark { background: var(--navy-900); color: var(--white); }
.btn--dark:hover { background: var(--navy-700); color: var(--white); }
.btn--ghost { background: var(--white); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { border-color: #cbd5e1; color: var(--ink); }
.btn--ghost-dark { background: rgba(255, 255, 255, .06); color: var(--white); border-color: rgba(255, 255, 255, .18); }
.btn--ghost-dark:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.btn--block { width: 100%; }
.link {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--teal-700);
}
.link svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link:hover svg { transform: translateX(3px); }
.link--light { color: var(--cyan-300); }
.link--light:hover { color: var(--white); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: var(--tint); border: 1px solid var(--line); color: var(--text); font-size: .82rem; font-weight: 500; line-height: 1.3;
}
.chip--dark { background: rgba(255, 255, 255, .06); border-color: var(--line-dark); color: var(--on-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .25); color: var(--on-dark);
  font-size: .85rem; font-weight: 500;
}
.badge__dot { display: inline-flex; width: 22px; height: 22px; border-radius: 999px; align-items: center; justify-content: center; background: rgba(245, 158, 11, .15); color: var(--star); }
.badge__dot svg { width: 13px; height: 13px; }
.icon { width: 20px; height: 20px; flex: none; }
.icon-box {
  display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, .14), rgba(35, 78, 112, .12)); color: var(--teal-700);
  border: 1px solid rgba(14, 116, 144, .14); flex: none;
}
.icon-box svg { width: 22px; height: 22px; }
.icon-box--dark { background: rgba(34, 211, 238, .1); color: var(--cyan-300); border-color: rgba(34, 211, 238, .2); }

/* ---------- 6. Header & navigation ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  color: var(--white); transition: background-color .25s, border-color .25s, color .25s, backdrop-filter .25s;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line); color: var(--ink);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; letter-spacing: -.02em; font-size: 1.08rem; }
.brand:hover { color: inherit; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav__link, .nav__trigger {
  display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 8px;
  color: inherit; opacity: .86; text-decoration: none; font-size: .95rem; font-weight: 500; background: none; border: 0; cursor: pointer;
}
.nav__link:hover, .nav__trigger:hover, .nav__link[aria-current="page"], .nav__trigger[aria-current="page"] { opacity: 1; color: inherit; background: rgba(148, 163, 184, .12); }
.nav__trigger svg { width: 16px; height: 16px; transition: transform .2s; }
.nav__item { position: relative; }
.nav__item.is-open .nav__trigger svg { transform: rotate(180deg); }
.nav__cta { margin-left: 12px; }
.megamenu {
  position: absolute; top: calc(100% + 10px); left: 50%; width: 560px; transform: translate(-50%, 6px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px;
  background: var(--white); color: var(--text); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s var(--ease), visibility .18s;
}
.nav__item.is-open .megamenu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.megamenu a { display: flex; gap: 12px; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--text); }
.megamenu a:hover { background: var(--tint); color: var(--text); }
.megamenu strong { display: block; color: var(--ink); font-size: .95rem; font-weight: 600; margin-bottom: 2px; }
.megamenu span { display: block; font-size: .85rem; line-height: 1.45; color: var(--muted); }
.megamenu .icon-box { width: 38px; height: 38px; border-radius: 10px; }
.megamenu .icon-box svg { width: 19px; height: 19px; }
.megamenu__all { grid-column: 1 / -1; justify-content: space-between; align-items: center; background: var(--tint); font-weight: 600; font-size: .9rem; color: var(--teal-700) !important; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid rgba(148, 163, 184, .3); background: transparent; color: inherit; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0; flex-direction: column; align-items: stretch; gap: 4px; margin: 0;
    padding: 16px var(--gutter) 32px; background: var(--white); color: var(--ink); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s var(--ease), visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__link, .nav__trigger { justify-content: space-between; width: 100%; padding: 14px 12px; font-size: 1.05rem; opacity: 1; }
  .megamenu { position: static; width: auto; transform: none; grid-template-columns: 1fr; box-shadow: none; border: 0; padding: 0 0 8px; display: none; opacity: 1; visibility: visible; }
  .nav__item.is-open .megamenu { display: grid; transform: none; }
  .nav__cta { margin: 16px 0 0; }
  .nav__cta .btn { width: 100%; }
  body.menu-open .site-header { background: var(--white); color: var(--ink); border-bottom-color: var(--line); }
  body.menu-open { overflow: hidden; }
}

/* ---------- 7. Dark hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--navy-950); color: var(--on-dark);
  padding: calc(var(--header-h) + clamp(56px, 9vw, 112px)) 0 clamp(64px, 9vw, 112px);
}
.hero::before { /* grid */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 75%);
}
.hero::after { /* glow */
  content: ""; position: absolute; z-index: -1; inset: -20% -10% auto auto; width: 70%; height: 120%;
  background: radial-gradient(closest-side, rgba(34, 211, 238, .22), transparent 70%),
              radial-gradient(closest-side at 30% 60%, rgba(35, 78, 112, .55), transparent 75%);
  filter: blur(10px);
}
.hero h1, .hero h2, .hero h3 { color: var(--white); }
.hero .lead { color: var(--on-dark-muted); max-width: 38em; }
.hero .eyebrow { color: var(--cyan-300); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.hero__grid--text { grid-template-columns: 1fr; }
.hero__grid--text > div { max-width: 860px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; color: var(--on-dark-muted); font-size: .9rem; }
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 16px; height: 16px; color: var(--cyan-300); }
.hero--compact { padding-bottom: clamp(56px, 7vw, 88px); }
.hero--compact h1 { font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.9rem); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; font-size: .88rem; color: var(--on-dark-muted); }
.breadcrumb a { color: var(--on-dark-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span[aria-hidden] { opacity: .5; }
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; } }

/* Stats band, overlapping the hero edge */
.stats {
  position: relative; z-index: 2; margin-top: clamp(-56px, -5vw, -40px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.stat { padding: 26px 28px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__value { display: block; color: var(--ink); font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.stat__value small { font-size: .5em; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.stat__label { display: block; margin-top: 6px; color: var(--muted); font-size: .9rem; line-height: 1.4; }
@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Sectors strip */
.sectors { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; }
.sectors__label { width: 100%; text-align: center; font: 600 .75rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

/* ---------- 8. Cards ---------- */
.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px;
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cbd5e1; }
.card h3 { margin-top: 18px; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card p { color: var(--text); font-size: .98rem; }
.card__foot { margin-top: auto; padding-top: 16px; }
.card__list { list-style: none; padding: 0; margin: 4px 0 20px; display: grid; gap: 8px; font-size: .93rem; }
.card__list li { display: flex; gap: 10px; align-items: flex-start; }
.card__list svg { width: 18px; height: 18px; color: var(--teal-700); flex: none; margin-top: 2px; }
.card__num { position: absolute; top: 24px; right: 28px; font: 500 .8rem/1 var(--mono); color: #94a3b8; }

/* Case study card with generated cover */
.case-card { padding: 0; overflow: hidden; }
.case-card__cover { position: relative; aspect-ratio: 16 / 9; background: var(--navy-900); overflow: hidden; }
.case-card__cover svg, .case-card__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-card__body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.case-card__sector { font: 600 .74rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--teal-700); }
.case-card h3 { margin: 10px 0 10px; font-size: 1.18rem; line-height: 1.3; }
.case-card p { font-size: .95rem; margin-bottom: 18px; }
.case-card .chips { margin-top: auto; }
.case-card .chip { font-size: .76rem; padding: 3px 9px; }

/* Quote card */
.quote { display: flex; flex-direction: column; height: 100%; margin: 0; padding: 30px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.quote__stars { display: flex; gap: 2px; color: var(--star); margin-bottom: 16px; }
.quote__stars svg { width: 18px; height: 18px; }
.quote__stars .is-empty { color: #e2e8f0; }
.quote blockquote { margin: 0 0 24px; color: var(--ink); font-size: 1.02rem; line-height: 1.65; flex: 1; }
.quote figcaption { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--muted); }
.quote figcaption strong { display: block; color: var(--ink); font-weight: 600; }
.avatar { display: inline-flex; width: 40px; height: 40px; flex: none; border-radius: 999px; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), var(--teal-700)); color: var(--white); font-weight: 600; font-size: .9rem; }

/* ---------- 9. Dark band ---------- */
.band {
  position: relative; overflow: hidden; isolation: isolate; background: var(--navy-900); color: var(--on-dark);
  border-radius: clamp(0px, 3vw, 28px); padding: clamp(40px, 6vw, 72px);
}
.band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 80% at 100% 0%, rgba(34, 211, 238, .16), transparent 60%), radial-gradient(50% 70% at 0% 100%, rgba(35, 78, 112, .6), transparent 70%);
}
.band h2, .band h3 { color: var(--white); }
.band .lead, .band p { color: var(--on-dark-muted); }
.band .eyebrow { color: var(--cyan-300); }

/* ---------- 10. Graphics ---------- */
.graphic { position: relative; }
.window {
  position: relative; background: #0d1b2f; border: 1px solid rgba(148, 163, 184, .18); border-radius: 16px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .05); overflow: hidden; color: var(--on-dark);
}
.window--light { background: var(--white); border-color: var(--line); color: var(--text); box-shadow: var(--shadow); }
.window__bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(148, 163, 184, .14); font-size: .8rem; color: var(--on-dark-muted); }
.window--light .window__bar { border-color: var(--line); color: var(--muted); }
.window__dots { display: flex; gap: 6px; }
.window__dots i { width: 10px; height: 10px; border-radius: 999px; background: rgba(148, 163, 184, .28); }
.window__title { font-weight: 600; color: var(--on-dark); }
.window--light .window__title { color: var(--ink); }
.window__pill { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: rgba(148, 163, 184, .12); font-size: .75rem; }
.window__body { padding: 18px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { padding: 12px 14px; border-radius: 10px; background: rgba(148, 163, 184, .07); border: 1px solid rgba(148, 163, 184, .1); }
.window--light .kpi { background: var(--tint); border-color: var(--line); }
.kpi span { display: block; font-size: .72rem; color: var(--on-dark-muted); }
.window--light .kpi span { color: var(--muted); }
.kpi strong { display: block; margin-top: 4px; font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; color: var(--white); }
.window--light .kpi strong { color: var(--ink); }
.kpi em { font-style: normal; font-size: .72rem; font-weight: 600; color: #34d399; }
.window--light .kpi em { color: #047857; }
.chart-box { border-radius: 10px; background: rgba(148, 163, 184, .05); border: 1px solid rgba(148, 163, 184, .1); padding: 12px 12px 6px; }
.window--light .chart-box { background: var(--white); border-color: var(--line); }
.chart-box__head { display: flex; justify-content: space-between; font-size: .75rem; color: var(--on-dark-muted); margin-bottom: 6px; }
.dash-row { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; margin-top: 10px; }
.barlist { display: grid; gap: 9px; padding: 12px; border-radius: 10px; background: rgba(148, 163, 184, .05); border: 1px solid rgba(148, 163, 184, .1); font-size: .74rem; }
.barlist__row { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; color: var(--on-dark-muted); }
.barlist__row b { color: var(--on-dark); font-weight: 600; }
.barlist__bar { grid-column: 1 / -1; height: 5px; border-radius: 9px; background: rgba(148, 163, 184, .12); overflow: hidden; }
.barlist__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--cyan-400)); }
.float-chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px;
  background: rgba(255, 255, 255, .96); color: var(--ink); border-radius: 12px; box-shadow: var(--shadow-lg);
  font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.float-chip small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.float-chip__icon { display: inline-flex; width: 28px; height: 28px; border-radius: 8px; align-items: center; justify-content: center; background: #d1fae5; color: #047857; }
.float-chip__icon--cyan { background: #cffafe; color: var(--teal-700); }
.float-chip__icon svg { width: 16px; height: 16px; }
/* Chips hang off the window's top or bottom edge, never over its content. */
.graphic:has(.float-chip--tl) { padding-top: 44px; }
.graphic:has(.float-chip--br) { padding-bottom: 40px; }
.float-chip--tl { top: 0; left: 28px; }
.float-chip--br { bottom: 0; right: 28px; }
@media (max-width: 600px) { .float-chip--tl { left: 12px; } .float-chip--br { right: 12px; } .kpis { grid-template-columns: repeat(2, 1fr); } .kpis .kpi:nth-child(3) { display: none; } .dash-row { grid-template-columns: 1fr; } .dash-row .barlist { display: none; } }

/* Code panel */
.code { margin: 0; padding: 18px 20px; font: 400 .82rem/1.75 var(--mono); color: #cbd5e1; overflow-x: auto; white-space: pre; tab-size: 4; }
.code .k { color: #67e8f9; } .code .f { color: #c4b5fd; } .code .s { color: #86efac; } .code .c { color: #64748b; } .code .t { color: #fbbf24; }
.test-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid rgba(148, 163, 184, .14); }
.test-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(16, 185, 129, .12); color: #6ee7b7; font: 500 .74rem/1.2 var(--mono); }
.test-pill svg { width: 13px; height: 13px; }

/* SVG diagrams */
.diagram { width: 100%; height: auto; }
/* Wide diagrams keep a readable size on phones and scroll inside their frame. */
.diagram-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
@media (max-width: 600px) { .diagram-scroll .diagram { min-width: 540px; } }
.diagram text { font-family: var(--font); }
.diagram .node rect { fill: #0f2036; stroke: rgba(148, 163, 184, .28); }
.diagram .node--accent rect { fill: url(#dgAccent); stroke: rgba(103, 232, 249, .55); }
.diagram .node text { fill: #e2e8f0; font-size: 14px; font-weight: 600; }
.diagram .node .sub { fill: #94a3b8; font-size: 11px; font-weight: 500; font-family: var(--mono); }
.diagram .edge { fill: none; stroke: rgba(103, 232, 249, .45); stroke-width: 1.6; }
.diagram .flow { fill: none; stroke: var(--cyan-300); stroke-width: 2; stroke-dasharray: 4 14; animation: flow 1.6s linear infinite; }
.diagram--compact .node text { font-size: 12px; }
.diagram--compact .node .sub { font-size: 10.5px; }
.diagram--light .node rect { fill: var(--white); stroke: #cbd5e1; }
.diagram--light .node text { fill: var(--ink); }
.diagram--light .node .sub { fill: var(--muted); }
.diagram--light .edge { stroke: #94a3b8; }
.diagram--light .flow { stroke: var(--teal-700); }
@keyframes flow { to { stroke-dashoffset: -36; } }

/* Scorecard */
.score { display: grid; gap: 14px; padding: 20px; }
.score__head { display: grid; grid-template-columns: 1fr 90px 90px; gap: 8px; font-size: .72rem; color: var(--on-dark-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.score__row { display: grid; grid-template-columns: 1fr 90px 90px; gap: 8px; align-items: center; font-size: .86rem; color: var(--on-dark); }
.dots { display: flex; gap: 4px; }
.dots i { width: 12px; height: 12px; border-radius: 3px; background: rgba(148, 163, 184, .18); }
.dots i.on { background: var(--cyan-400); }
.dots--alt i.on { background: #64748b; }
.score__pick { display: flex; align-items: center; gap: 10px; margin: 4px 20px 20px; padding: 12px 14px; border-radius: 10px; background: rgba(34, 211, 238, .1); border: 1px solid rgba(34, 211, 238, .3); font-size: .86rem; color: var(--on-dark); }
.score__pick svg { width: 18px; height: 18px; color: var(--cyan-300); }

/* Report mock (light) */
.report-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.report-filters span { padding: 4px 10px; border-radius: 6px; background: var(--tint); border: 1px solid var(--line); font-size: .72rem; color: var(--text); }
.report-table { width: 100%; border-collapse: collapse; font-size: .78rem; margin-top: 12px; }
.report-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.report-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); color: var(--ink); }
.report-table td:last-child, .report-table th:last-child { text-align: right; }
.up { color: #047857; font-weight: 600; }
.down { color: #b91c1c; font-weight: 600; }

/* ---------- 11. Feature blocks ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; padding: clamp(40px, 6vw, 72px) 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature--flip .feature__visual { order: -1; }
.feature__num { font: 500 .85rem/1 var(--mono); color: var(--teal-700); margin-bottom: 16px; display: block; }
.feature h2, .feature h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; } .feature--flip .feature__visual { order: 0; } }
.checklist { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist svg { width: 20px; height: 20px; flex: none; margin-top: 3px; padding: 3px; border-radius: 999px; background: rgba(14, 116, 144, .1); color: var(--teal-700); }
.band .checklist svg { background: rgba(34, 211, 238, .14); color: var(--cyan-300); }

/* Process */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; position: relative; }
.process::before { content: ""; position: absolute; top: 22px; left: 22px; right: 22px; height: 1px; background: linear-gradient(90deg, var(--cyan-400), rgba(34, 211, 238, .1)); }
.process__step { position: relative; }
.process__dot { position: relative; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 999px; background: var(--white); border: 1px solid #a5f3fc; color: var(--teal-700); font: 600 .9rem/1 var(--mono); margin-bottom: 20px; box-shadow: 0 0 0 6px var(--white); }
.section--tint .process__dot { box-shadow: 0 0 0 6px var(--tint); }
.process__step h3 { font-size: 1.1rem; }
.process__step p { font-size: .95rem; margin: 0; }
@media (max-width: 900px) {
  .process { grid-template-columns: 1fr; gap: 28px; }
  .process::before { top: 22px; bottom: 22px; left: 22px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--cyan-400), rgba(34, 211, 238, .1)); }
  .process__step { padding-left: 68px; }
  .process__dot { position: absolute; left: 0; top: 0; }
}

.process--vertical { list-style: none; margin: 28px 0 0; padding: 0; grid-template-columns: 1fr; gap: 28px; }
.process--vertical::before { top: 22px; bottom: 22px; left: 22px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--cyan-400), rgba(34, 211, 238, .1)); }
.process--vertical .process__step { padding-left: 68px; }
.process--vertical .process__dot { position: absolute; left: 0; top: 0; }

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.timeline__item { padding-top: 24px; border-top: 2px solid var(--line); position: relative; }
.timeline__item::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 999px; background: var(--cyan-400); box-shadow: 0 0 0 4px rgba(34, 211, 238, .2); }
.timeline__item:last-child { border-top-color: var(--cyan-400); }
.timeline__years { font: 600 .82rem/1 var(--mono); color: var(--teal-700); }
.timeline__item h3 { margin: 12px 0 10px; }
.timeline__item p { font-size: .96rem; }
@media (max-width: 800px) { .timeline { grid-template-columns: 1fr; } }
.yearchart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding: 0 4px; }
.yearchart__bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.yearchart__bar i { display: block; width: 100%; max-width: 44px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--cyan-400), var(--brand)); min-height: 4px; }
.yearchart__bar span { font: 500 .68rem/1 var(--mono); color: var(--on-dark-muted); }
.yearchart__bar b { font: 600 .72rem/1 var(--mono); color: var(--on-dark); }

/* Team */
.team-card { display: flex; gap: 20px; align-items: center; padding: 20px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.team-card img { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; flex: none; }
.team-card h3 { margin: 0 0 4px; font-size: 1.15rem; }
.team-card p { margin: 0; color: var(--muted); font-size: .92rem; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--white); transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: #cbd5e1; box-shadow: var(--shadow-sm); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; cursor: pointer; list-style: none; color: var(--ink); font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; color: var(--muted); transition: transform .25s var(--ease); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 20px; }

/* Call to action */
.cta {
  position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center;
  padding: clamp(40px, 6vw, 72px); border-radius: clamp(16px, 3vw, 28px); background: var(--navy-950); color: var(--on-dark);
}
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 120% at 100% 50%, rgba(34, 211, 238, .25), transparent 60%), linear-gradient(rgba(148, 163, 184, .06) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(148, 163, 184, .06) 1px, transparent 1px) 0 0 / 40px 40px; }
.cta h2 { color: var(--white); margin-bottom: 14px; }
.cta p { color: var(--on-dark-muted); margin: 0; }
.cta__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; justify-self: end; }
.cta__actions .muted-link { color: var(--on-dark-muted); font-size: .92rem; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.cta__actions .muted-link:hover { color: var(--white); }
.cta__actions svg { width: 16px; height: 16px; }
@media (max-width: 800px) { .cta { grid-template-columns: 1fr; } .cta__actions { justify-self: start; } }

/* ---------- 12. Case study page ---------- */
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 36px; }
.highlight { padding: 18px 20px; border-radius: var(--r); background: rgba(255, 255, 255, .05); border: 1px solid var(--line-dark); }
.highlight strong { display: block; color: var(--white); font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -.03em; line-height: 1.15; }
.highlight span { color: var(--on-dark-muted); font-size: .88rem; }
.study { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 6vw, 80px); align-items: start; }
.study__block + .study__block { margin-top: 48px; }
.study__block h2 { font-size: 1.5rem; display: flex; align-items: center; gap: 12px; }
.study__block h2 .icon-box { width: 36px; height: 36px; border-radius: 10px; }
.study__block h2 .icon-box svg { width: 18px; height: 18px; }
.study__block p { font-size: 1.06rem; }
.study__aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 16px; }
.meta-card { padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow-sm); }
.meta-card dl { margin: 0; display: grid; gap: 16px; }
.meta-card dt { font: 600 .72rem/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 6px; }
.meta-card dd { margin: 0; color: var(--ink); font-weight: 500; }
.meta-card--dark { background: var(--navy-900); border-color: var(--navy-800); color: var(--on-dark); }
.meta-card--dark h3 { color: var(--white); font-size: 1.1rem; }
.meta-card--dark p { color: var(--on-dark-muted); font-size: .93rem; }
.review { margin: 48px 0 0; padding: 32px; border-radius: var(--r-lg); background: var(--tint); border: 1px solid var(--line); }
.review blockquote { margin: 0 0 14px; font-size: 1.15rem; line-height: 1.6; color: var(--ink); }
@media (max-width: 960px) { .study { grid-template-columns: 1fr; } .study__aside { position: static; } }

/* Work filter */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--text); font-weight: 500; font-size: .9rem; cursor: pointer; transition: all .2s; }
.filter button:hover { border-color: #94a3b8; }
.filter button[aria-pressed="true"] { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }
[data-services].is-hidden { display: none; }

/* ---------- 13. Forms ---------- */
.form-card { padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 10px; border: 1px solid #cbd5e1; background: var(--white);
  color: var(--ink); font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal-700); box-shadow: 0 0 0 4px rgba(34, 211, 238, .18); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 4px 0 22px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal-700); flex: none; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r); margin-bottom: 24px; }
.notice svg { width: 22px; height: 22px; flex: none; }
.notice--ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.notice--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.route { display: flex; gap: 16px; padding: 24px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .05); border: 1px solid var(--line-dark); color: var(--on-dark); text-decoration: none; transition: background .2s, border-color .2s, transform .2s var(--ease); }
.route:hover { background: rgba(255, 255, 255, .09); border-color: rgba(103, 232, 249, .4); color: var(--on-dark); transform: translateY(-2px); }
.route strong { display: block; color: var(--white); font-size: 1.08rem; margin-bottom: 4px; }
.route span { color: var(--on-dark-muted); font-size: .93rem; line-height: 1.5; }
.booking { min-height: 700px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--white); overflow: hidden; display: grid; place-items: center; }
.booking__placeholder { text-align: center; color: var(--muted); padding: 40px; }

/* Prose */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.5rem; margin: 2.2em 0 .6em; }
.prose ul { padding-left: 1.25em; }
.prose li { margin-bottom: .45em; }

/* ---------- 14. Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--on-dark-muted); padding: clamp(56px, 8vw, 88px) 0 32px; font-size: .94rem; }
.site-footer .brand { color: var(--white); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer__about p { max-width: 30em; margin: 16px 0 20px; }
.footer__grid h2 { font: 600 .75rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--white); margin: 6px 0 18px; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__grid a { color: var(--on-dark-muted); text-decoration: none; }
.footer__grid a:hover { color: var(--white); }
.social { display: flex; gap: 10px; }
.social a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line-dark); color: var(--on-dark); }
.social a:hover { border-color: rgba(103, 232, 249, .5); color: var(--white); }
.social svg { width: 18px; height: 18px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-dark); font-size: .86rem; }
.footer__bottom a { color: var(--on-dark-muted); }
.footer__bottom a:hover { color: var(--white); }
.link-reset { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-reset:hover { color: var(--white); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__about { grid-column: 1 / -1; } }

/* ---------- 15. Consent banner ---------- */
.consent {
  position: fixed; z-index: 150; left: 16px; bottom: 16px; max-width: 420px; padding: 20px; border-radius: var(--r);
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: .9rem; color: var(--text);
}
.consent[hidden] { display: none; }
.consent p { margin: 0 0 14px; }
.consent__actions { display: flex; gap: 8px; }
@media (max-width: 480px) { .consent { left: 8px; right: 8px; bottom: 8px; max-width: none; } }

/* ---------- 16. Motion ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }
.draw { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 2.2s .3s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .draw { stroke-dashoffset: 0; }
}
