/* NEX.GO 360 — Redesign */
:root {
  --bg: oklch(0.13 0.015 255);
  --bg-1: oklch(0.17 0.02 255);
  --bg-2: oklch(0.21 0.025 255);
  --line: oklch(0.28 0.025 255);
  --line-soft: oklch(0.22 0.022 255);
  --fg: oklch(0.985 0.003 255);
  --fg-dim: oklch(0.74 0.012 255);
  --fg-mute: oklch(0.56 0.018 255);
  --accent: oklch(0.65 0.22 255);
  --accent-ink: oklch(0.99 0.005 255);
  --radius: 6px;
  --radius-lg: 12px;
  --maxw: 1320px;
  --pad: clamp(20px, 4vw, 48px);

  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0;
  font-feature-settings: "zero";
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

/* ─── Header ──────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: -0.01em;
  font-weight: 500;
}
.brand-mark {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--accent);
  position: relative;
  display: grid;
  place-items: center;
}
.brand-mark::after {
  content: "";
  width: 8px; height: 8px;
  border: 1.5px solid oklch(0.99 0.005 255);
  border-radius: 50%;
}
.brand strong { font-weight: 600; color: var(--fg); }
.brand .dot { color: var(--fg-mute); }

nav.primary {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 12px;
}
nav.primary a {
  font-size: 13.5px;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--fg-dim);
  transition: color .15s, background .15s;
}
nav.primary a:hover { color: var(--fg); background: var(--bg-1); }

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
}
.header-status .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 55%, transparent);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 55%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ─── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: transform .12s ease, background .15s, color .15s, border-color .15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover { background: oklch(0.7 0.22 255); }
.btn-primary .arrow { transition: transform .2s; }
.btn-primary:hover .arrow { transform: translateX(3px); }

.btn-ghost {
  color: var(--fg);
  border-color: var(--line);
  background: transparent;
}
.btn-ghost:hover { background: var(--bg-1); border-color: var(--fg-mute); }

.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ─── Hero ────────────────────────────────────────── */
.hero {
  position: relative;
  padding-top: 80px;
  padding-bottom: 120px;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}
.hero .wrap { position: relative; }

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  gap: 24px;
  flex-wrap: wrap;
}
.hero-meta > div { display: flex; gap: 10px; align-items: center; }

.hero h1 {
  font-size: clamp(56px, 11vw, 180px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  margin: 0;
  font-weight: 500;
  color: var(--fg);
}
.hero h1 .accent { color: var(--accent); }
.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg-mute);
}
.hero h1 .muted { color: var(--fg-mute); }
.hero h1 .slash { color: var(--fg-mute); }

.hero-variant { display: none; }
.hero-variant.active { display: block; }

.hero-lede {
  max-width: 560px;
  margin-top: 48px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-dim);
}
.hero-lede strong { color: var(--fg); font-weight: 500; }

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-tweak {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-tweak .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  border-radius: 999px;
  padding: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.hero-tweak button {
  width: 22px; height: 22px;
  border-radius: 50%;
  color: var(--fg-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hero-tweak button.on {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: end;
  margin-top: 80px;
}
@media (max-width: 900px) {
  .hero-bottom { grid-template-columns: 1fr; gap: 40px; }
}

.hero-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.hero-stack .cell {
  padding: 18px 16px;
  border-right: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-mute);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-stack .cell:last-child { border-right: 0; }
.hero-stack .cell b {
  color: var(--fg);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0;
}
@media (max-width: 700px) {
  .hero-stack { grid-template-columns: repeat(2, 1fr); }
  .hero-stack .cell:nth-child(2) { border-right: 0; }
  .hero-stack .cell:nth-child(1), .hero-stack .cell:nth-child(2) {
    border-bottom: 1px solid var(--line-soft);
  }
}

/* ─── Section scaffolding ────────────────────────── */
section { position: relative; }

.sec {
  padding-block: 120px;
  border-bottom: 1px solid var(--line-soft);
}
.sec-header {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  margin-bottom: 64px;
}
@media (max-width: 900px) {
  .sec-header { grid-template-columns: 1fr; gap: 24px; }
}
.sec-header h2 {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 12px 0 0;
  max-width: 10ch;
}
.sec-header .lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-dim);
  max-width: 58ch;
  align-self: end;
}
.sec-header .lede strong { color: var(--fg); font-weight: 500; }

.sec-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── Capabilities grid ──────────────────────────── */
.caps {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.cap {
  background: var(--bg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 340px;
  position: relative;
  transition: background .2s;
}
.cap:hover { background: var(--bg-1); }
.cap:hover .cap-arrow { color: var(--accent); transform: translate(4px, -4px); }
.cap.c-6 { grid-column: span 6; }
.cap.c-4 { grid-column: span 4; }
@media (max-width: 1000px) {
  .cap.c-6, .cap.c-4 { grid-column: span 12; }
}
.cap-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.cap-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.08em;
}
.cap-arrow {
  color: var(--fg-mute);
  transition: transform .2s, color .2s;
  flex-shrink: 0;
}
.cap h3 {
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0;
  line-height: 1.1;
}
.cap p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-dim);
  margin: 0;
}
.cap-foot {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  letter-spacing: 0;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 4px; height: 4px;
  background: var(--fg-mute);
  border-radius: 50%;
}
.chip.accent::before { background: var(--accent); }

/* visual slot inside cap */
.cap-visual {
  height: 120px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent 0 10px,
      var(--line-soft) 10px 11px
    );
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.cap-visual .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 4px;
}

/* ─── Results / KPIs ─────────────────────────────── */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
}
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: var(--bg);
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.kpi-val {
  font-size: clamp(48px, 6vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 500;
  color: var(--fg);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.kpi-val .unit {
  font-size: 24px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 400;
}
.kpi-label {
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.4;
  max-width: 22ch;
}
.kpi-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

/* ─── App showcase ───────────────────────────────── */
.app-show {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 1000px) { .app-show { grid-template-columns: 1fr; gap: 48px; } }

.phones {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 24px;
  perspective: 1200px;
}
.phone {
  width: 260px;
  aspect-ratio: 9/19.5;
  background: oklch(0.11 0.01 250);
  border-radius: 36px;
  padding: 10px;
  border: 1px solid var(--line);
  box-shadow:
    0 0 0 1px oklch(0.08 0.01 250),
    0 40px 80px -20px oklch(0.05 0.01 250 / 0.8);
  position: relative;
  flex-shrink: 0;
}
.phone::before {
  content: "";
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 22px;
  background: oklch(0.08 0.01 250);
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone.offset-1 { transform: translateY(28px) rotate(-3deg); }
.phone.offset-2 { transform: translateY(-20px) rotate(4deg); z-index: 2; }

.ps-status {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg);
}
.ps-title {
  padding: 20px 18px 12px;
  font-size: 20px;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.ps-sub {
  padding: 0 18px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-mute);
  letter-spacing: 0;
}
.ps-card {
  margin: 8px 14px;
  padding: 14px;
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.ps-card .l { display: flex; flex-direction: column; gap: 4px; }
.ps-card .t { color: var(--fg); font-weight: 500; }
.ps-card .s {
  color: var(--fg-mute);
  font-family: var(--font-mono);
  font-size: 10px;
}
.ps-card .b {
  padding: 5px 10px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}
.ps-card.muted .b {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  font-weight: 400;
}
.ps-row {
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  border-top: 1px solid var(--line-soft);
}
.ps-row .k { color: var(--fg-mute); font-family: var(--font-mono); font-size: 10px; }
.ps-row .v { color: var(--fg); }
.ps-action {
  margin: auto 14px 20px;
  padding: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* steps list for app showcase */
.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.step:first-child { border-top: 1px solid var(--line-soft); }
.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  padding-top: 3px;
}
.step h4 {
  font-size: 18px;
  margin: 0 0 4px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.step p {
  font-size: 14px;
  color: var(--fg-dim);
  margin: 0;
  line-height: 1.55;
}
.step-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  padding-top: 3px;
}

/* ─── Integrations ───────────────────────────────── */
.integ {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
@media (max-width: 700px) { .integ { grid-template-columns: repeat(2, 1fr); } }
.integ-cell {
  background: var(--bg);
  padding: 36px 28px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  cursor: default;
  transition: background .15s;
}
.integ-cell:hover { background: var(--bg-1); }
.integ-cell .name {
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--fg);
  font-weight: 500;
}
.integ-cell .cat {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.integ-cell .dot {
  position: absolute;
  top: 14px; right: 14px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.integ-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.integ-filter button {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-dim);
  transition: all .15s;
}
.integ-filter button:hover { color: var(--fg); border-color: var(--fg-mute); }
.integ-filter button.on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}

/* ─── Schnittstellen / middleware diagram ────────── */
.mw {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 32px;
  min-height: 480px;
}
@media (max-width: 1000px) { .mw { grid-template-columns: 1fr; gap: 16px; min-height: 0; } }
.mw-col {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.mw-col .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.mw-item {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  transition: border-color .25s, background .25s, transform .25s;
}
.mw-item.active {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--accent) 14%, var(--bg));
  transform: translateX(2px);
}
.mw-col-right .mw-item.active { transform: translateX(-2px); }
.mw-item .badge {
  font-size: 9px;
  padding: 2px 6px;
  background: color-mix(in oklch, var(--accent) 20%, transparent);
  color: var(--accent);
  border-radius: 3px;
  letter-spacing: 0.04em;
}

/* ─── Animated Middleware Core ───────────────────── */
.mw-center {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, color-mix(in oklch, var(--accent) 18%, transparent), transparent 70%),
    var(--bg-1);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.mw-center::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, transparent 40%, black 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, transparent 40%, black 80%);
  opacity: 0.35;
  pointer-events: none;
}

.mw-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.mw-flow .mw-line {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  opacity: 0.5;
}
.mw-flow .mw-line::after { content: ""; }

/* Animated data packets traveling each line */
.mw-flow .mw-line.in {
  stroke-dasharray: 4 280;
  stroke-dashoffset: 284;
  animation: flow-in 3.2s linear infinite;
}
.mw-flow .mw-line.out {
  stroke-dasharray: 4 280;
  stroke-dashoffset: 0;
  animation: flow-out 3.2s linear infinite;
}
.mw-flow .mw-line.in:nth-of-type(1) { animation-delay: 0.0s; stroke: var(--accent); }
.mw-flow .mw-line.in:nth-of-type(2) { animation-delay: 0.5s; }
.mw-flow .mw-line.in:nth-of-type(3) { animation-delay: 1.0s; stroke: var(--accent); }
.mw-flow .mw-line.in:nth-of-type(4) { animation-delay: 1.5s; }
.mw-flow .mw-line.in:nth-of-type(5) { animation-delay: 2.0s; stroke: var(--accent); }
.mw-flow .mw-line.in:nth-of-type(6) { animation-delay: 2.5s; }
.mw-flow .mw-line.out:nth-of-type(7) { animation-delay: 0.3s; stroke: var(--accent); }
.mw-flow .mw-line.out:nth-of-type(8) { animation-delay: 0.8s; }
.mw-flow .mw-line.out:nth-of-type(9) { animation-delay: 1.3s; stroke: var(--accent); }
.mw-flow .mw-line.out:nth-of-type(10) { animation-delay: 1.8s; }
.mw-flow .mw-line.out:nth-of-type(11) { animation-delay: 2.3s; stroke: var(--accent); }
.mw-flow .mw-line.out:nth-of-type(12) { animation-delay: 2.8s; }
@keyframes flow-in {
  0% { stroke-dashoffset: 284; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes flow-out {
  0% { stroke-dashoffset: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { stroke-dashoffset: -284; opacity: 0; }
}

.mw-core {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.mw-core-rings {
  position: absolute;
  inset: -40px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.mw-core-rings .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: ring-pulse 3s ease-out infinite;
}
.mw-core-rings .r1 { width: 180px; height: 180px; animation-delay: 0s; }
.mw-core-rings .r2 { width: 180px; height: 180px; animation-delay: 1s; }
.mw-core-rings .r3 { width: 180px; height: 180px; animation-delay: 2s; }
@keyframes ring-pulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.mw-core-box {
  position: relative;
  width: 220px;
  padding: 20px 18px 14px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 10px;
  box-shadow:
    0 0 0 4px color-mix(in oklch, var(--accent) 14%, transparent),
    0 20px 40px -10px color-mix(in oklch, var(--accent) 40%, transparent);
  overflow: hidden;
  text-align: center;
}
.mw-core-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.12em;
  line-height: 1.25;
  margin-bottom: 14px;
}
.mw-core-ops {
  position: relative;
  height: 22px;
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.mw-core-ops .op {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: op-cycle 4.5s ease-in-out infinite;
}
.mw-core-ops .op-1 { animation-delay: 0s; }
.mw-core-ops .op-2 { animation-delay: 1.5s; }
.mw-core-ops .op-3 { animation-delay: 3s; }
@keyframes op-cycle {
  0%, 33%, 100% { opacity: 0; transform: translateY(6px); }
  5%, 28% { opacity: 1; transform: translateY(0); }
}
.mw-core-scan {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  top: 0;
  opacity: 0.9;
  animation: scan 2.4s ease-in-out infinite;
}
@keyframes scan {
  0%, 100% { top: 0; opacity: 0; }
  50% { top: calc(100% - 2px); opacity: 0.9; }
}

.mw-core-meta {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.mw-core-meta .meta-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: var(--fg-dim);
}
.mw-core-meta .meta-row .v {
  color: var(--accent);
  font-size: 8px;
  animation: blip 1.6s ease-in-out infinite;
}
.mw-core-meta .meta-row:nth-child(1) .v { animation-delay: 0.0s; }
.mw-core-meta .meta-row:nth-child(2) .v { animation-delay: 0.3s; }
.mw-core-meta .meta-row:nth-child(3) .v { animation-delay: 0.6s; }
.mw-core-meta .meta-row:nth-child(4) .v { animation-delay: 0.9s; }
.mw-core-meta .meta-row:nth-child(5) .v { animation-delay: 1.2s; }
@keyframes blip {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; text-shadow: 0 0 8px var(--accent); }
}

@media (prefers-reduced-motion: reduce) {
  .mw-flow .mw-line, .ring, .mw-core-ops .op, .mw-core-scan, .meta-row .v {
    animation: none !important;
  }
  .mw-core-ops .op-1 { opacity: 1; }
}

/* ─── Reference / case ───────────────────────────── */
.case {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 900px) { .case { grid-template-columns: 1fr; } }
.case-quote {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0;
}
.case-quote::before { content: "\201E"; color: var(--accent); font-family: var(--font-mono); }
.case-quote::after { content: "\201C"; color: var(--accent); font-family: var(--font-mono); }
.case-attr {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-mute);
}
.case-attr .who { color: var(--fg); }
.case-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.case-numbers .n {
  background: var(--bg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.case-numbers .v {
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.03em;
}
.case-numbers .v .u { color: var(--accent); font-family: var(--font-mono); font-size: 16px; }
.case-numbers .l {
  font-size: 13px;
  color: var(--fg-dim);
}

/* ─── CTA ─────────────────────────────────────────── */
.cta {
  padding-block: 140px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 50% 60% at 50% 50%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 50% 60% at 50% 50%, black, transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}
.cta h2 {
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 500;
  margin: 0 auto 24px;
  max-width: 14ch;
  position: relative;
}
.cta h2 .accent { color: var(--accent); }
.cta p {
  font-size: 17px;
  color: var(--fg-dim);
  max-width: 50ch;
  margin: 0 auto 32px;
  line-height: 1.55;
  position: relative;
}
.cta .actions {
  display: inline-flex;
  gap: 12px;
  position: relative;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Footer ─────────────────────────────────────── */
footer.site-footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 64px 32px;
  background: var(--bg);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
  margin: 0 0 16px;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 14px; color: var(--fg-dim); transition: color .15s; }
.foot-col a:hover { color: var(--fg); }
.foot-brand p {
  color: var(--fg-dim);
  font-size: 14px;
  max-width: 36ch;
  margin: 16px 0 0;
  line-height: 1.5;
}
.foot-bot {
  border-top: 1px solid var(--line-soft);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  flex-wrap: wrap;
}
.foot-bot a { color: var(--fg-mute); }
.foot-bot a:hover { color: var(--fg); }

/* ─── Marquee ────────────────────────────────────── */
.marquee {
  border-block: 1px solid var(--line-soft);
  padding: 18px 0;
  overflow: hidden;
  background: var(--bg);
}
.marquee-track {
  display: flex;
  gap: 48px;
  animation: marquee 60s linear infinite;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-mute);
}
.marquee-track span { display: inline-flex; align-items: center; gap: 48px; }
.marquee-track span::after {
  content: "●";
  color: var(--accent);
  font-size: 8px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ─── Alternating section backgrounds ─────────── */
.sec-alt {
  background: oklch(0.22 0.13 255);
  position: relative;
}
.sec-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(oklch(0.35 0.12 255) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.35 0.12 255) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, black, transparent 80%);
  opacity: 0.4;
  pointer-events: none;
}
.sec-alt .wrap { position: relative; z-index: 1; }
.sec-alt .caps,
.sec-alt .kpis,
.sec-alt .integ,
.sec-alt .case-numbers {
  background: oklch(0.32 0.12 255);
  border-color: oklch(0.32 0.12 255);
}
.sec-alt .cap,
.sec-alt .kpi,
.sec-alt .integ-cell,
.sec-alt .case-numbers .n {
  background: oklch(0.22 0.13 255);
}
.sec-alt .mw-col {
  background: oklch(0.25 0.13 255);
  border-color: oklch(0.32 0.12 255);
}
.sec-alt .mw-item {
  background: oklch(0.22 0.13 255);
  border-color: oklch(0.32 0.12 255);
}
.sec-alt .cap:hover,
.sec-alt .integ-cell:hover { background: oklch(0.27 0.14 255); }
.sec-alt .chip {
  background: oklch(0.22 0.13 255);
  border-color: oklch(0.35 0.12 255);
}

#tweaks-panel {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 100;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  width: 260px;
  box-shadow: 0 20px 50px -20px oklch(0.05 0.01 250 / 0.9);
  font-family: var(--font-mono);
  display: none;
}
#tweaks-panel.open { display: block; }
#tweaks-panel h6 {
  font-size: 11px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  font-weight: 400;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#tweaks-panel .label {
  font-size: 11px;
  color: var(--fg-dim);
  margin-bottom: 6px;
}
#tweaks-panel .variants {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
#tweaks-panel .variants button {
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 10px;
  color: var(--fg-dim);
  background: var(--bg);
  text-align: center;
  transition: all .15s;
}
#tweaks-panel .variants button.on {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}
#tweaks-panel .variants button:hover:not(.on) {
  border-color: var(--fg-mute);
  color: var(--fg);
}


/* ─── Added: Subpage Support ─────────────── */
.cap.c-3 { grid-column: span 3; }
@media (max-width: 960px) {
  .cap.c-3 { grid-column: span 6; }
}
@media (max-width: 640px) {
  .cap.c-3 { grid-column: span 12; }
}

.cap.accent {
  background: oklch(0.22 0.15 255);
  border-color: var(--accent);
}
.cap.accent h3, .cap.accent p { color: var(--fg); }

.sub-hero {
  position: relative;
  padding: 120px 0 80px;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.sub-hero .hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}
.sub-hero .wrap { position: relative; }
.sub-hero .eyebrow {
  display: inline-flex;
  align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.sub-hero h1 {
  font-size: clamp(44px, 6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0 0 28px;
  max-width: 900px;
}
.sub-hero h1 .accent { color: var(--accent); }
.sub-hero .hero-lede {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-dim);
}
.sub-hero .hero-lede strong { color: var(--fg); font-weight: 500; }


/* ─── Datanorm Section ──────────────────────────── */
.dn {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 48px;
}
@media (max-width: 1000px) { .dn { grid-template-columns: 1fr; } }

.dn-col {
  background: var(--bg-1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.dn-col-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

/* Source files */
.dn-file {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  position: relative;
  animation: dn-file-pulse 4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes dn-file-pulse {
  0%, 100% { border-color: var(--line-soft); }
  15%, 35% { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 14px -2px color-mix(in oklch, var(--accent) 60%, transparent); }
}
.dn-file-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dn-file-icon {
  width: 14px; height: 16px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
  clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%);
}
.dn-file-name { color: var(--fg); flex: 1; }
.dn-file-size { color: var(--fg-mute); font-size: 10px; }
.dn-file-meta { color: var(--fg-mute); font-size: 10px; }
.dn-file-bar {
  height: 3px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
}
.dn-file-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  animation: dn-bar 4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes dn-bar {
  0% { width: 0; }
  15% { width: 0; }
  35% { width: 100%; }
  60% { width: 100%; }
  100% { width: 100%; opacity: 0.4; }
}

/* Terminal / processor */
.dn-terminal {
  background: oklch(0.1 0.01 255);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  flex: 1;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.dn-terminal-head {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  background: oklch(0.14 0.01 255);
}
.dn-terminal-head .dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.dn-terminal-head .r { background: oklch(0.6 0.15 25); }
.dn-terminal-head .y { background: oklch(0.75 0.15 85); }
.dn-terminal-head .g { background: oklch(0.7 0.18 145); }
.dn-terminal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  margin-left: 8px;
}
.dn-terminal-body {
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.dn-log-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  opacity: 0;
  animation: dn-log-in 6s ease-out infinite;
}
.dn-log-row .t { color: var(--fg-mute); }
.dn-log-row .m { color: var(--fg-dim); }
.dn-log-row .s.ok { color: var(--accent); }
.dn-log-row .s.pending { color: var(--fg-mute); animation: dn-pending 1s ease-in-out infinite; }
.dn-log-row:nth-child(1) { animation-delay: 0.0s; }
.dn-log-row:nth-child(2) { animation-delay: 0.4s; }
.dn-log-row:nth-child(3) { animation-delay: 0.8s; }
.dn-log-row:nth-child(4) { animation-delay: 1.2s; }
.dn-log-row:nth-child(5) { animation-delay: 1.6s; }
.dn-log-row:nth-child(6) { animation-delay: 2.0s; }
@keyframes dn-log-in {
  0% { opacity: 0; transform: translateX(-8px); }
  8% { opacity: 1; transform: translateX(0); }
  90% { opacity: 1; }
  100% { opacity: 0.15; }
}
@keyframes dn-pending {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.dn-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.dn-stat {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 12px 10px;
  text-align: center;
}
.dn-stat-val {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.dn-stat-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Catalog output */
.dn-catalog {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  overflow: hidden;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
}
.dn-catalog-head,
.dn-catalog-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 8px;
  padding: 9px 12px;
  align-items: center;
}
.dn-catalog-head {
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-soft);
  color: var(--fg-mute);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dn-catalog-row {
  border-bottom: 1px solid var(--line-soft);
  color: var(--fg-dim);
  position: relative;
  transition: background .3s;
}
.dn-catalog-row:last-child { border-bottom: 0; }
.dn-catalog-row .r { color: var(--fg); text-align: right; }
.dn-catalog-row.updated {
  animation: dn-row-flash 5s ease-out infinite;
  grid-template-columns: 44px 1fr auto auto;
}
.dn-catalog-row.updated:nth-of-type(3) { animation-delay: 0.5s; }
.dn-catalog-row.updated:nth-of-type(5) { animation-delay: 2s; }
.dn-catalog-row.updated:nth-of-type(7) { animation-delay: 3.5s; }
@keyframes dn-row-flash {
  0%, 5% { background: color-mix(in oklch, var(--accent) 22%, transparent); }
  20%, 100% { background: transparent; }
}
.badge-new {
  font-size: 8px;
  padding: 2px 5px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 3px;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.dn-sync {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  font-size: 12px;
  color: var(--fg-dim);
}
.dn-sync-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 color-mix(in oklch, var(--accent) 60%, transparent);
  animation: pulse 1.8s ease-out infinite;
}
.dn-sync-text .mono { color: var(--fg-mute); }

.dn-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
@media (max-width: 900px) { .dn-features { grid-template-columns: repeat(2, 1fr); } }
.dn-feat {
  background: var(--bg);
  padding: 24px;
}
.dn-feat p {
  margin: 0;
  font-size: 14px;
  color: var(--fg-dim);
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  .dn-file, .dn-file-bar span, .dn-log-row, .dn-catalog-row.updated {
    animation: none !important;
  }
  .dn-log-row { opacity: 1; }
  .dn-file-bar span { width: 100%; }
}

