/* ============================================================
   Evalium — Fracture Dark design system
   Base black, ember-gradient accents, backlit shard motif.
   ============================================================ */

:root {
  --bg: #151516;
  --panel: #1d1d20;
  --surface: #242427;
  --surface-2: #2a2a2e;
  --line: #333336;
  --line-soft: #29292c;
  --text: #d7ccbb;
  --dim: #97968f;
  --dim-2: #6f6e68;

  /* ---------- brand accent ----------
     Single source of truth: put any colour here — hex, rgb(), hsl(), named.
     Every shade, gradient and glow below is derived from it with relative
     colour syntax, so this one line recolours the whole site.
     (Original ember orange was #d9661c.) */
  --accent: #878787;

  /* same hue, pushed lighter/darker for the gradient stops and artwork.
     min() keeps saturation in gamut when the base colour is already vivid. */
  --accent-hi: hsl(from var(--accent) calc(h + 4) min(s + 4, 100) 58);
  --accent-deep: hsl(from var(--accent) calc(h - 6) min(s + 11, 100) 32);
  --accent-deepest: hsl(from var(--accent) calc(h - 5) min(s + 12, 100) 20);
  /* near-black tinted with the accent — text that sits on top of the accent */
  --accent-ink: hsl(from var(--accent) h 100 4);
  /* glow is light, not pigment: always bright and fully saturated */
  --glow-color: hsl(from var(--accent) calc(h + 5) 100 56);
  --glow-hi-color: hsl(from var(--accent) calc(h + 5) 100 64);

  --ember: linear-gradient(135deg, var(--accent-hi) 0%, var(--accent) 42%, var(--accent-deep) 100%);
  /* deeper than --ember so dark text still clears contrast at the pill centre */
  --ember-cta: linear-gradient(135deg,
    hsl(from var(--accent) calc(h + 5) s 56) 0%,
    hsl(from var(--accent) calc(h - 1) s 46) 55%,
    hsl(from var(--accent) calc(h - 2) min(s + 7, 100) 37) 100%);
  --glow: hsl(from var(--glow-color) h s l / 0.35);
  --glow-soft: hsl(from var(--glow-color) h s l / 0.14);

  --pass: #8fd9a8;
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--glow); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- typography ---------- */

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

.display {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.02em;
}

.h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.h3 { font-size: 1.25rem; }

.lead { color: var(--dim); font-size: 1.08rem; max-width: 620px; }

.glow-word {
  background: var(--ember);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 28px var(--glow);
}

.mono { font-family: var(--font-mono); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(21, 21, 22, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo img { height: 24px; }

.nav-links { display: flex; align-items: center; gap: 28px; }

.nav-links a {
  color: var(--dim);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* the .nav-links a rule outranks .btn-primary — restore dark text on the CTA */
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: var(--accent-ink); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 13px 26px;
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: 0;
}

.btn-primary {
  background: var(--ember-cta);
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: 0 0 26px var(--glow);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 40px var(--glow); }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover { border-color: var(--dim); }

.btn-sm { padding: 9px 18px; font-size: 0.8rem; }
.nav .btn-primary { box-shadow: 0 0 12px var(--glow-soft); }
.nav .btn-primary:hover { box-shadow: 0 0 20px var(--glow); }

/* ---------- panels & sections ---------- */

.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p { color: var(--dim); margin-top: 14px; }

/* ---------- hero ---------- */

.hero-panel {
  /* no box — the hero floats directly on the fluid background */
  background: transparent;
  border: 0;
  margin-top: 12px;
  padding: clamp(40px, 6vw, 88px) clamp(4px, 2vw, 24px);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* the static SVG art is replaced by the fixed hexagon explosion */
.hero-art { display: none; }

.hero-content { position: relative; z-index: 2; max-width: 560px; }

.hero-content .lead { margin: 22px 0 34px; }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.eval-strip {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--dim);
  position: relative;
}

.eval-strip { z-index: 2; }
.eval-strip .pass { color: var(--pass); }
.eval-strip .break { color: var(--accent); text-shadow: 0 0 12px var(--glow); }

/* ---------- loop ---------- */

.loop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.loop-step {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 28px 24px;
  position: relative;
}

.loop-step .num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
}

.loop-step h3 { margin: 12px 0 10px; font-size: 1.1rem; }
.loop-step p { color: var(--dim); font-size: 0.9rem; }

/* ---------- cards ---------- */

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 32px 28px;
  transition: border-color 0.25s, background 0.25s;
  position: relative;
  overflow: hidden;
}

.card:hover { border-color: hsl(from var(--glow-color) h s l / 0.4); }

.card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.card p { color: var(--dim); font-size: 0.92rem; }

.card .card-link {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
}

/* domain tiles */
.domain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.domain-tile {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 26px 24px;
  transition: border-color 0.25s;
}

.domain-tile:hover { border-color: hsl(from var(--glow-color) h s l / 0.4); }
.domain-tile h3 { font-size: 1rem; margin-bottom: 8px; }
.domain-tile p { color: var(--dim); font-size: 0.86rem; }

/* ---------- content pages ---------- */

.page-hero { padding: 88px 0 56px; }
.page-hero .lead { margin-top: 18px; }

.block { padding: 56px 0; border-top: 1px solid var(--line-soft); }
.block h2 { margin-bottom: 10px; }
.block > .container > p.intro { color: var(--dim); max-width: 640px; margin-bottom: 30px; }

.feature-list { list-style: none; display: grid; gap: 16px; max-width: 780px; }

.feature-list li {
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  color: var(--dim);
  font-size: 0.95rem;
}

.feature-list li strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 4px; font-family: var(--font-head); }

.note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--dim-2);
  margin-top: 22px;
}

.guarantee {
  margin-top: 34px;
  padding: 26px 30px;
  border-radius: 16px;
  border: 1px solid var(--glow);
  background: linear-gradient(135deg, hsl(from var(--glow-color) h s l / 0.08), hsl(from var(--accent-deep) h s l / 0.04));
  max-width: 780px;
}

.guarantee strong { color: var(--accent); font-family: var(--font-head); }
.guarantee p { color: var(--dim); font-size: 0.95rem; margin-top: 6px; }

/* ---------- research ---------- */

.pub {
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
  max-width: 820px;
}

.pub h3 { font-size: 1.08rem; }
.pub .authors { color: var(--dim); font-size: 0.88rem; margin-top: 6px; }
.pub .abstract { color: var(--dim); font-size: 0.92rem; margin-top: 10px; }

.venue {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--text);
  margin-top: 12px;
}

.venue.peer { border-color: hsl(from var(--pass) h s l / 0.5); color: var(--pass); }
.venue.preprint { border-color: var(--line); color: var(--dim); }

/* ---------- founders ---------- */

.founder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.founder {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 32px 28px;
}

.founder .role { font-family: var(--font-mono); font-size: 0.74rem; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; }
.founder h3 { margin: 10px 0 12px; font-size: 1.2rem; }
.founder p { color: var(--dim); font-size: 0.92rem; }

.belief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 900px; }

.belief h3 { font-size: 1.02rem; margin-bottom: 8px; }
.belief p { color: var(--dim); font-size: 0.92rem; }

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  padding: clamp(56px, 8vw, 96px) 32px;
}

.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: var(--dim); max-width: 520px; margin: 0 auto 32px; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line-soft);
  padding: 48px 0 40px;
  margin-top: 48px;
}

.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }

.footer-tag { color: var(--dim); font-size: 0.9rem; max-width: 300px; }
.footer-tag img { height: 20px; margin-bottom: 14px; }

.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-links div { display: flex; flex-direction: column; gap: 10px; }

.footer-links span { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--dim-2); margin-bottom: 4px; }
.footer-links a { color: var(--dim); font-size: 0.86rem; }
.footer-links a:hover { color: var(--text); }

.footer-legal { margin-top: 40px; color: var(--dim-2); font-size: 0.78rem; font-family: var(--font-mono); }

/* ---------- reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.38s ease, transform 0.38s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- home: fluid morphing background + parallax fracture field ---------- */

body.home { position: relative; overflow-x: hidden; }

/* fluid morphing glow layer — fixed so it drifts fluidly behind the whole page.
   z-index:-1 keeps it behind normal-flow content on every page automatically. */
.fluid-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.blob-wrap { position: absolute; will-change: transform; }

.blob {
  width: 100%;
  height: 100%;
  filter: blur(60px);
  opacity: 0.55;
  border-radius: 42% 58% 63% 37% / 45% 46% 54% 55%;
}

.blob.b-a { background: radial-gradient(circle at 42% 40%, hsl(from var(--glow-color) h s l / 0.55), hsl(from var(--accent-deep) h s l / 0.16) 55%, transparent 72%); }
.blob.b-b { background: radial-gradient(circle at 55% 50%, hsl(from var(--accent) h s l / 0.5), hsl(from var(--accent-deepest) h s l / 0.14) 55%, transparent 72%); }
.blob.b-c { background: radial-gradient(circle at 45% 55%, hsl(from var(--glow-hi-color) h s l / 0.42), hsl(from var(--accent-deep) h s l / 0.12) 55%, transparent 72%); }

.scroll-shards {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s linear;
}

/* lift real content above the drifting background */
.home > nav,
.home > header,
.home > section,
.home > footer { position: relative; z-index: 1; }

.scroll-shards .shard {
  position: absolute;
  display: block;
  will-change: transform;
}

.shard.tri  { clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }
.shard.quad { clip-path: polygon(22% 0%, 100% 20%, 82% 100%, 0% 78%); }
.shard.pent { clip-path: polygon(50% 0%, 96% 34%, 78% 100%, 18% 88%, 0% 28%); }
.shard.hex  { clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); }
.shard.slab { clip-path: polygon(18% 0%, 100% 9%, 90% 100%, 0% 86%); }
.shard.line { clip-path: polygon(0% 22%, 100% 0%, 100% 56%, 0% 100%); }

.shard.dark {
  background: linear-gradient(140deg, #2c2c30 0%, #17171a 100%);
  opacity: 0.5;
}

.shard.ember {
  background: var(--ember);
  opacity: 0.13;
  filter: blur(0.4px);
}

/* directional reveals used on the home page */
.home .card-grid .reveal { transform: translateY(22px) scale(0.94); }
.home .domain-grid .reveal { transform: translateY(22px); }
.home .domain-grid .reveal:nth-child(3n+1) { transform: translateX(-46px); }
.home .domain-grid .reveal:nth-child(3n)   { transform: translateX(46px); }

/* staggered entrances within each grid */
.home .loop-grid  .reveal:nth-child(2) { transition-delay: 0.04s; }
.home .loop-grid  .reveal:nth-child(3) { transition-delay: 0.08s; }
.home .loop-grid  .reveal:nth-child(4) { transition-delay: 0.12s; }
.home .card-grid  .reveal:nth-child(2) { transition-delay: 0.05s; }
.home .card-grid  .reveal:nth-child(3) { transition-delay: 0.10s; }
.home .domain-grid .reveal:nth-child(2) { transition-delay: 0.04s; }
.home .domain-grid .reveal:nth-child(3) { transition-delay: 0.08s; }
.home .domain-grid .reveal:nth-child(5) { transition-delay: 0.04s; }
.home .domain-grid .reveal:nth-child(6) { transition-delay: 0.08s; }

/* reset — must stay after the transform overrides above */
.home .card-grid .reveal.visible,
.home .domain-grid .reveal.visible { transform: none; }

/* gentle idle life (disabled when the user prefers reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .scroll-shards .shard { animation: shard-float 15s ease-in-out infinite; }
  .scroll-shards .shard.quad  { animation-duration: 19s; }
  .scroll-shards .shard.ember { animation-duration: 23s; }
  .hero-art { animation: hero-drift 16s ease-in-out infinite; }

  /* fluid blobs: travel across the viewport + morph + scale so they feel alive */
  .blob { animation: blob-move 20s ease-in-out infinite, blob-morph 14s ease-in-out infinite; }
  .blob.b-b { animation-duration: 26s, 18s; animation-direction: alternate, alternate; }
  .blob.b-c { animation-duration: 23s, 16s; animation-direction: reverse, alternate; }
}

@keyframes blob-move {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  20%  { transform: translate(22%, -26%) rotate(55deg) scale(1.2); }
  40%  { transform: translate(-24%, 14%) rotate(140deg) scale(0.82); }
  60%  { transform: translate(18%, 28%) rotate(215deg) scale(1.15); }
  80%  { transform: translate(-16%, -20%) rotate(300deg) scale(0.95); }
  100% { transform: translate(0, 0) rotate(360deg) scale(1); }
}

@keyframes blob-morph {
  0%, 100% { border-radius: 42% 58% 63% 37% / 45% 46% 54% 55%; }
  25%      { border-radius: 68% 32% 30% 70% / 65% 34% 66% 35%; }
  50%      { border-radius: 33% 67% 58% 42% / 42% 65% 35% 58%; }
  75%      { border-radius: 55% 45% 40% 60% / 58% 40% 60% 42%; }
}

@keyframes shard-float {
  0%, 100% { margin-top: 0; }
  50%      { margin-top: -16px; }
}

@keyframes hero-drift {
  0%, 100% { transform: translateY(-50%) rotate(0deg); }
  50%      { transform: translateY(-54%) rotate(1.4deg); }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .loop-grid { grid-template-columns: 1fr 1fr; }
  .card-grid, .domain-grid { grid-template-columns: 1fr 1fr; }
  .hero-art { opacity: 0.35; right: -80px; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--panel);
    padding: 24px;
    border-bottom: 1px solid var(--line);
    gap: 18px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .loop-grid, .card-grid, .domain-grid, .founder-grid, .belief-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero-panel { min-height: 0; }
  .hero-art { display: none; }
  .scroll-shards { display: none; }
  .blob { filter: blur(48px); }
}

/* ============================================================
   Evalium — Instrumented editorial layout
   Presentation-only redesign. Core background and text tokens above
   remain unchanged.
   ============================================================ */

:root {
  --radius-control: 8px;
  --radius-panel: 14px;
  --rail-size: 72px;
}

body.site-page { overflow-x: hidden; }

.site-page > nav {
  position: sticky;
  z-index: 50;
}

.site-page > header,
.site-page > section,
.site-page > footer {
  position: relative;
  z-index: 1;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

/* ---------- shared icon system ---------- */

.icon-frame,
.section-icon,
.page-glyph,
.instrument-mark,
.instrument-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex: 0 0 auto;
}

.icon-frame svg,
.section-icon svg,
.page-glyph svg,
.instrument-mark svg,
.instrument-node svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ---------- navigation & controls ---------- */

.nav {
  background: rgba(21, 21, 22, 0.9);
  border-bottom-color: var(--line);
}

.nav-inner { height: 72px; }
.nav-links { gap: 30px; }

.nav-links a:not(.btn) {
  position: relative;
  padding: 25px 0 23px;
}

.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 1px;
  background: var(--text);
  transition: right 0.24s ease;
}

.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn).active::after {
  right: 0;
}

.btn {
  border-radius: var(--radius-control);
  min-height: 44px;
  padding: 12px 20px;
  justify-content: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.btn-primary {
  color: var(--bg);
  background: var(--text);
  border: 1px solid var(--text);
  box-shadow: none;
}

.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
  color: var(--bg);
}

.nav .btn-primary,
.nav .btn-primary:hover {
  box-shadow: none;
}

.btn-sm {
  min-height: 36px;
  padding: 8px 15px;
}

.btn-primary:hover {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
  box-shadow: none;
  transform: translate3d(2px, -2px, 0);
  filter: brightness(1.08);
}

.btn-ghost:hover { transform: translateX(2px); }

.panel { border-radius: var(--radius-panel); }

/* ---------- home hero instrument ---------- */

.home header { overflow: hidden; }

.home .hero-panel {
  min-height: 640px;
  padding: clamp(64px, 8vw, 112px) clamp(4px, 2vw, 24px);
}

.home .hero-content {
  max-width: 620px;
  padding-right: 24px;
}

.home .hero-content .lead {
  max-width: 600px;
  margin: 24px 0 34px;
}

.hero-instrument {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(-92px, -4vw, -34px);
  width: min(46vw, 510px);
  aspect-ratio: 1 / 0.9;
  transform: translateY(-50%);
  pointer-events: none;
}

.instrument-portal {
  position: absolute;
  right: 13%;
  top: 8%;
  width: 44%;
  height: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 50% 50% 12px 12px / 32% 32% 12px 12px;
}

.instrument-mark {
  position: relative;
  width: 132px;
  height: 132px;
  perspective: 620px;
  transform-style: preserve-3d;
  isolation: isolate;
}

.instrument-mark::before {
  content: "";
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  filter: blur(18px);
  opacity: 0.3;
  transform: translateZ(-70px);
}

.instrument-mark-scene {
  position: absolute;
  inset: 0;
  transform: rotateX(4deg) rotateY(-9deg);
  transform-style: preserve-3d;
  will-change: transform;
}

.instrument-mark-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.28));
  opacity: 0.05;
}

.instrument-mark-layer:nth-child(1) { transform: translate3d(-5px, 4px, -48px); }
.instrument-mark-layer:nth-child(2) { transform: translate3d(-4px, 3px, -36px); opacity: 0.065; }
.instrument-mark-layer:nth-child(3) { transform: translate3d(-3px, 2px, -24px); opacity: 0.08; }
.instrument-mark-layer:nth-child(4) { transform: translate3d(-2px, 1.5px, -12px); opacity: 0.1; }
.instrument-mark-layer:nth-child(5) { transform: translate3d(-1px, 1px, 0); opacity: 0.13; }

.instrument-mark-layer.is-front {
  z-index: 2;
  opacity: 0.78;
  transform: translateZ(14px);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.34));
}

.instrument-rail {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 12%;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
}

.instrument-rail::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 2%;
  top: 50%;
  height: 1px;
  background: var(--line);
}

.instrument-node {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--dim);
}

.instrument-node.active {
  width: 72px;
  height: 112px;
  padding: 16px;
  border-radius: 38px 38px 12px 12px;
  color: var(--text);
  background: var(--surface);
  border-color: var(--dim-2);
}

.instrument-trace {
  position: absolute;
  left: 5%;
  top: 10%;
  width: 86px;
  display: grid;
  grid-template-columns: repeat(4, 4px);
  gap: 13px;
}

.instrument-trace i {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--dim);
  opacity: 0.65;
}

/* ---------- section rhythm ---------- */

.section { padding: 112px 0; }
.section-tight { padding: 80px 0; }

.section-head {
  max-width: 760px;
  margin-bottom: 58px;
}

.section-head .h2 { max-width: 680px; }
.section-head p { max-width: 720px; }

/* ---------- connected process rail ---------- */

.loop-grid {
  position: relative;
  gap: 0;
}

.loop-grid::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: calc(var(--rail-size) / 2);
  left: calc(var(--rail-size) / 2);
  right: calc(var(--rail-size) / 2);
  height: 1px;
  background: var(--line);
}

.loop-step {
  z-index: 1;
  min-width: 0;
  padding: 0 24px 24px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  transition:
    transform 0.25s ease,
    color 0.25s ease;
}

.loop-step:last-child { padding-right: 0; }

.process-icon-slot {
  display: block;
  position: relative;
  width: 78px;
  height: 96px;
  flex: 0 0 auto;
}

.process-icon {
  position: absolute;
  top: 0;
  left: 3px;
  width: var(--rail-size);
  height: var(--rail-size);
  padding: 17px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--dim);
  overflow: visible;
  transition:
    color 0.28s ease,
    transform 0.28s ease;
}

.process-icon::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  transition:
    inset 0.28s ease,
    border-radius 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease;
}

.process-icon svg {
  position: relative;
  z-index: 1;
}

.loop-step.is-active .process-icon,
.loop-step:hover .process-icon,
.loop-step:focus-visible .process-icon {
  color: var(--text);
  transform: translateY(-3px);
}

.loop-step.is-active .process-icon::before,
.loop-step:hover .process-icon::before,
.loop-step:focus-visible .process-icon::before {
  inset: -13px -3px;
  border-radius: 42px 42px 10px 10px;
  background: var(--surface);
  border-color: var(--dim-2);
}

.loop-step .num {
  display: block;
  color: var(--dim);
  transition: color 0.25s ease;
}

.loop-step.is-active .num,
.loop-step:hover .num { color: var(--accent); }

.loop-step h3 { margin-top: 13px; }

/* ---------- home capabilities: chapters, not cards ---------- */

.home .card-grid {
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.home .card-grid .card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) minmax(150px, 220px);
  grid-template-rows: auto auto;
  column-gap: 30px;
  align-items: center;
  padding: 44px 32px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  overflow: visible;
}

.home .card-grid .card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: var(--line);
  transition: background 0.25s ease, top 0.25s ease, bottom 0.25s ease;
}

.home .card-grid .card:hover {
  background: hsl(from var(--surface) h s l / 0.42);
}

.home .card-grid .card:hover::after {
  top: 0;
  bottom: 0;
  background: var(--accent);
}

.capability-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 88px;
  height: 96px;
  padding: 20px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 46px 46px 10px 10px;
  background: var(--panel);
}

.home .card-grid .card h3 {
  grid-column: 2;
  align-self: end;
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.home .card-grid .card p {
  grid-column: 2;
  align-self: start;
  max-width: 660px;
}

.home .card-grid .card .card-link {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

/* ---------- home domains: interactive open index ---------- */

.home .domain-grid {
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.home .domain-tile {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  column-gap: 18px;
  align-items: center;
  min-height: 142px;
  padding: 22px 24px 22px 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition:
    background 0.25s ease,
    padding-left 0.25s ease;
}

.home .domain-tile:nth-child(odd) { border-right: 1px solid var(--line); }

.domain-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 58px;
  height: 58px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--dim);
  transition:
    border-radius 0.25s ease,
    color 0.25s ease,
    background 0.25s ease;
}

.home .domain-tile h3 {
  grid-column: 2;
  align-self: end;
  margin: 0 0 7px;
  font-size: 1.05rem;
}

.home .domain-tile p {
  grid-column: 2;
  align-self: start;
}

.home .domain-tile.is-active,
.home .domain-tile:hover {
  padding-left: 22px;
  background: hsl(from var(--surface) h s l / 0.48);
}

.home .domain-tile.is-active .domain-icon,
.home .domain-tile:hover .domain-icon {
  border-radius: 30px 30px 8px 8px;
  background: var(--panel);
  color: var(--text);
}

/* ---------- closing CTA: open band ---------- */

.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 48px;
  align-items: end;
  text-align: left;
  padding: clamp(46px, 7vw, 76px) 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  overflow: visible;
}

.cta-band::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 110px;
  height: 3px;
  background: var(--accent);
}

.cta-band h2 { grid-column: 1; }

.cta-band > p,
.cta-band > .mono {
  grid-column: 1;
  max-width: 650px;
  margin: 12px 0 0;
}

.cta-band > .btn,
.cta-band > div:last-child {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
}

/* ---------- inner-page heroes ---------- */

.page-hero {
  min-height: 430px;
  padding: 112px 0 84px;
  overflow: hidden;
}

.page-hero .container {
  position: relative;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero .display {
  position: relative;
  z-index: 2;
  max-width: 840px;
}

.page-hero .lead {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.page-glyph {
  position: absolute;
  z-index: 0;
  right: -10px;
  top: 50%;
  width: 238px;
  height: 286px;
  padding: 58px;
  color: var(--dim-2);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 120px 120px 12px 12px;
  transform: translateY(-50%);
  opacity: 0.78;
}

.page-glyph::after {
  content: "";
  position: absolute;
  left: -90px;
  right: -120px;
  bottom: 38px;
  height: 1px;
  background: var(--line);
}

/* ---------- inner-page section composition ---------- */

.block {
  padding: 88px 0;
  border-top-color: var(--line);
}

.block > .container {
  position: relative;
}

.block h2,
.block > .container > p.intro {
  max-width: 760px;
}

.section-icon {
  position: absolute;
  top: -18px;
  right: 24px;
  width: 104px;
  height: 118px;
  padding: 24px;
  color: var(--dim-2);
  border: 1px solid var(--line);
  border-radius: 54px 54px 8px 8px;
}

.feature-list {
  max-width: 880px;
  gap: 0;
  border-top: 1px solid var(--line);
}

.feature-list li {
  position: relative;
  padding: 21px 20px 21px 54px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition:
    background 0.24s ease,
    padding-left 0.24s ease;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 28px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--dim-2);
  border-radius: 50%;
  background: var(--bg);
  transition:
    width 0.24s ease,
    border-radius 0.24s ease,
    background 0.24s ease;
}

.feature-list li:hover {
  padding-left: 62px;
  background: hsl(from var(--surface) h s l / 0.42);
}

.feature-list li:hover::before {
  width: 18px;
  border-radius: 2px;
  background: var(--accent);
}

.feature-list li strong {
  margin-bottom: 5px;
  font-size: 1rem;
}

.block .note {
  max-width: 880px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.guarantee {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  max-width: 880px;
  padding: 28px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.guarantee p { margin: 0; }

.page-capabilities .block:nth-of-type(even) .feature-list,
.page-capabilities .block:nth-of-type(even) .note,
.page-capabilities .block:nth-of-type(even) .guarantee,
.page-domains .block:nth-of-type(even) .feature-list,
.page-domains .block:nth-of-type(even) .note {
  margin-left: auto;
}

.page-capabilities .block:nth-of-type(even) h2,
.page-capabilities .block:nth-of-type(even) .intro,
.page-domains .block:nth-of-type(even) h2,
.page-domains .block:nth-of-type(even) .intro {
  margin-left: auto;
  margin-right: 120px;
}

.page-capabilities .block:nth-of-type(even) .section-icon,
.page-domains .block:nth-of-type(even) .section-icon {
  right: auto;
  left: 24px;
}

/* ---------- research: editorial index ---------- */

.page-research .pub {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  column-gap: 34px;
  max-width: 980px;
  padding: 30px 0;
  border-bottom-color: var(--line);
}

.page-research .pub h3,
.page-research .pub .authors,
.page-research .pub .abstract {
  grid-column: 2;
}

.page-research .pub h3 { font-size: 1.16rem; }

.page-research .pub .venue {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
  justify-self: start;
  margin: 2px 0 0;
  border-radius: 4px;
  text-align: center;
}

.page-research .pub:hover h3 { color: var(--accent); }

/* ---------- experts: three-stage rail ---------- */

.page-experts .loop-grid {
  margin-top: 34px;
}

.page-experts .loop-step {
  padding-right: 32px;
}

/* ---------- about: manifesto and portal profiles ---------- */

.belief-grid {
  max-width: 100%;
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  counter-reset: belief;
}

.belief {
  min-height: 220px;
  padding: 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  counter-increment: belief;
}

.belief::before {
  content: "0" counter(belief);
  display: block;
  margin-bottom: 38px;
  font-family: var(--font-mono);
  color: var(--dim-2);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.founder-grid {
  gap: 28px;
  margin-top: 34px;
}

.founder {
  position: relative;
  padding: 70px 34px 36px;
  background: transparent;
  border-color: var(--line);
  border-radius: 120px 120px 12px 12px;
  overflow: hidden;
}

.founder::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 50%;
  width: 48px;
  height: 1px;
  background: var(--accent);
  transform: translateX(-50%);
}

/* ---------- contact: two deliberate paths ---------- */

.page-contact .block .card-grid {
  gap: 0;
  max-width: 900px !important;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.page-contact .card-grid .card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  column-gap: 24px;
  padding: 42px 36px;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.page-contact .card-grid .card:first-child { border-right: 1px solid var(--line); }

.contact-icon {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 72px;
  height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 38px 38px 8px 8px;
  color: var(--dim);
}

.page-contact .card h3,
.page-contact .card p,
.page-contact .card .card-link {
  grid-column: 2;
}

.page-contact .card h3 { margin-top: 4px; }

/* ---------- partnerships: connected service row ---------- */

.page-partnerships .feature-list {
  position: relative;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 100%;
  border-top: 0;
}

.page-partnerships .feature-list::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 4px;
  height: 1px;
  background: var(--line);
}

.page-partnerships .feature-list li {
  padding: 38px 28px 28px 0;
  border-bottom: 1px solid var(--line);
}

.page-partnerships .feature-list li::before {
  left: 0;
  top: 0;
}

.page-partnerships .feature-list li:hover { padding-left: 12px; }

/* ---------- footer ---------- */

footer {
  margin-top: 80px;
  padding-top: 62px;
  border-top-color: var(--line);
}

.footer-inner {
  position: relative;
  padding-top: 16px;
}

.footer-inner::before {
  content: "";
  position: absolute;
  left: 24px;
  top: -63px;
  width: 86px;
  height: 3px;
  background: var(--accent);
}

/* ---------- motion: geometry responds, copy stays still ---------- */

@media (prefers-reduced-motion: no-preference) {
  .instrument-node.active {
    animation: instrument-node-pulse 4.8s ease-in-out infinite;
  }

  .instrument-mark-scene {
    animation: instrument-logo-float 8s cubic-bezier(0.45, 0, 0.2, 1) infinite;
  }

  .instrument-mark::before {
    animation: instrument-logo-aura 4.8s ease-in-out infinite;
  }
}

@keyframes instrument-node-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes instrument-logo-float {
  0%, 100% {
    transform: translate3d(0, 2px, 0) rotateX(-5deg) rotateY(-11deg);
  }
  50% {
    transform: translate3d(0, -7px, 0) rotateX(7deg) rotateY(12deg);
  }
}

@keyframes instrument-logo-aura {
  0%, 100% {
    opacity: 0.2;
    transform: translateZ(-70px) scale(0.88);
  }
  50% {
    opacity: 0.46;
    transform: translateZ(-70px) scale(1.12);
  }
}

/* ---------- responsive redesign ---------- */

@media (max-width: 960px) {
  .home .hero-panel { min-height: 600px; }
  .home .hero-content { max-width: 60%; }
  .hero-instrument { right: -150px; width: 520px; opacity: 0.58; }

  .home .card-grid .card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .home .card-grid .card .card-link {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
    margin-top: 18px;
  }

  .page-glyph {
    right: -74px;
    opacity: 0.5;
  }

  .section-icon {
    width: 86px;
    height: 98px;
    padding: 20px;
  }

  .page-capabilities .block:nth-of-type(even) h2,
  .page-capabilities .block:nth-of-type(even) .intro,
  .page-domains .block:nth-of-type(even) h2,
  .page-domains .block:nth-of-type(even) .intro {
    margin-right: 96px;
  }

  .cta-band {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .cta-band > .btn,
  .cta-band > div:last-child {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 30px;
  }
}

@media (max-width: 720px) {
  .nav-inner { height: 68px; }
  .nav-links { top: 68px; }
  .nav-links a:not(.btn) { padding: 4px 0; }
  .nav-links a:not(.btn)::after { bottom: -4px; }

  .section { padding: 78px 0; }
  .section-tight { padding: 62px 0; }

  .home .hero-panel {
    display: flex;
    min-height: 0;
    padding-top: 58px;
  }

  .home .hero-content {
    order: 1;
    max-width: 100%;
    padding-right: 0;
  }

  .hero-instrument {
    position: relative;
    order: 2;
    top: auto;
    right: auto;
    width: 100%;
    max-width: 500px;
    height: 330px;
    margin: 40px auto 0;
    transform: none;
    opacity: 0.9;
  }

  .loop-grid,
  .page-experts .loop-grid {
    grid-template-columns: 1fr !important;
    padding-left: 20px;
  }

  .loop-grid::before {
    top: 36px;
    bottom: 36px;
    left: 55px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .loop-step,
  .page-experts .loop-step {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 22px;
    padding: 0 0 36px;
  }

  .process-icon-slot {
    grid-column: 1;
    grid-row: 1 / span 3;
  }

  .loop-step.is-active .process-icon::before,
  .loop-step:hover .process-icon::before,
  .loop-step:focus-visible .process-icon::before {
    inset: -8px 0;
  }

  .loop-step .num,
  .loop-step h3,
  .loop-step p {
    grid-column: 2;
  }

  .loop-step h3 { margin-top: 8px; }

  .home .card-grid .card {
    grid-template-columns: 78px minmax(0, 1fr);
    column-gap: 20px;
    padding: 34px 18px;
  }

  .capability-icon {
    width: 70px;
    height: 78px;
    padding: 15px;
  }

  .home .domain-grid { grid-template-columns: 1fr; }
  .home .domain-tile:nth-child(odd) { border-right: 0; }

  .page-hero {
    min-height: 380px;
    padding: 86px 0 58px;
  }

  .page-glyph {
    right: -90px;
    width: 190px;
    height: 230px;
    padding: 46px;
    opacity: 0.32;
  }

  .block { padding: 68px 0; }
  .section-icon { display: none; }

  .page-capabilities .block:nth-of-type(even) h2,
  .page-capabilities .block:nth-of-type(even) .intro,
  .page-domains .block:nth-of-type(even) h2,
  .page-domains .block:nth-of-type(even) .intro {
    margin-left: 0;
    margin-right: 0;
  }

  .feature-list li {
    padding: 20px 8px 20px 42px;
  }

  .feature-list li::before { left: 12px; }
  .feature-list li:hover { padding-left: 48px; }

  .guarantee {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .page-research .pub {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .page-research .pub h3,
  .page-research .pub .authors,
  .page-research .pub .abstract,
  .page-research .pub .venue {
    grid-column: 1;
    grid-row: auto;
  }

  .page-research .pub .venue {
    margin-top: 14px;
  }

  .belief-grid { border-left: 0; }

  .belief {
    min-height: 0;
    padding: 28px 4px;
    border-right: 0;
  }

  .belief::before { margin-bottom: 22px; }

  .founder {
    padding: 62px 26px 30px;
    border-radius: 88px 88px 10px 10px;
  }

  .page-contact .block .card-grid {
    grid-template-columns: 1fr !important;
  }

  .page-contact .card-grid .card {
    padding: 32px 8px;
  }

  .page-contact .card-grid .card:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .page-partnerships .feature-list {
    grid-template-columns: 1fr;
  }

  .page-partnerships .feature-list::before {
    top: 20px;
    bottom: 20px;
    left: 4px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .page-partnerships .feature-list li {
    padding: 24px 8px 24px 34px;
  }

  .page-partnerships .feature-list li::before {
    left: 0;
    top: 30px;
  }
}

@media (max-width: 440px) {
  .container { padding-left: 18px; padding-right: 18px; }

  .hero-ctas {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-ctas .btn { width: 100%; }

  .hero-instrument {
    height: 275px;
    margin-top: 28px;
  }

  .instrument-node {
    width: 44px;
    height: 44px;
    padding: 9px;
  }

  .instrument-node.active {
    width: 56px;
    height: 88px;
    padding: 12px;
  }

  .home .card-grid .card {
    grid-template-columns: 1fr;
  }

  .capability-icon {
    grid-column: 1;
    grid-row: auto;
    margin-bottom: 20px;
  }

  .home .card-grid .card h3,
  .home .card-grid .card p,
  .home .card-grid .card .card-link {
    grid-column: 1;
  }

  .home .card-grid .card .card-link { grid-row: auto; }

  .home .domain-tile {
    grid-template-columns: 52px minmax(0, 1fr);
    column-gap: 14px;
    padding-right: 4px;
  }

  .domain-icon {
    width: 48px;
    height: 48px;
    padding: 10px;
  }

  .page-contact .card-grid .card {
    grid-template-columns: 60px minmax(0, 1fr);
    column-gap: 16px;
  }

  .contact-icon {
    width: 56px;
    height: 72px;
    padding: 12px;
  }
}
