:root {
  --bg: #0a0a0b;
  --bg-soft: #111113;
  --ink: #f4f1ec;
  --ink-muted: #8a8680;
  --ink-dim: #4a4742;
  --line: rgba(244, 241, 236, 0.08);
  --accent: #d43728;
  --max: 1280px;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--bg);
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

canvas#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 2;
}

a {
  color: inherit;
  text-decoration: none;
}

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

/* ─── Navigation ─────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.5rem 2.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(10, 10, 11, 0.6) 0%, rgba(10, 10, 11, 0) 100%);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* Brand mark — geometric monogram: cream "S" in serif italic on an
   accent-red rounded square. Distinctive, typographic, premium —
   echoes the site's primary hero typography (Instrument Serif italic).
   No node-graph imagery, no n8n cues. */
.nav-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  background: var(--accent);
  color: var(--ink);
  border-radius: 6px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  padding-bottom: 2px;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.45s ease;
  box-shadow: 0 4px 14px -6px rgba(212, 55, 40, 0.55);
}

/* The accent dot — small cream circle in the bottom-right corner */
.nav-mark::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.75;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease;
}

.nav-logo:hover .nav-mark {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -6px rgba(212, 55, 40, 0.7);
}
.nav-logo:hover .nav-mark::after {
  transform: scale(1.4);
  opacity: 1;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  justify-self: center;
  font-weight: 400;
  color: var(--ink-muted);
}

.nav-links a {
  transition: color 0.24s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-locale {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 55, 40, 0.15);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── Hero — centered 3D stage with callouts ──────────── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 6rem 2.5rem 4rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 55% at 50% 55%,
    rgba(10, 10, 11, 0) 0%,
    rgba(10, 10, 11, 0.55) 55%,
    rgba(10, 10, 11, 0.92) 100%
  );
  pointer-events: none;
  z-index: -1;
}

/* ─── Hero starfield ─────────────────────────────────
   Quiet, ambient field of dim white dots — reads as deep
   space behind the title. Replaces the workflow centrepiece.
   The canvas fills the entire hero; the title sits above it. */

.hero-orb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  transform: none;
  aspect-ratio: auto;
}

.hero-orb__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 35%, rgba(60, 50, 80, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(20, 18, 28, 0.4) 0%, transparent 90%);
  pointer-events: none;
}

.hero-orb__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.hero-title em {
  color: var(--ink-muted);
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
}

/* ─── Telemetry corners ───────────────────────────────── */

.tele {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  z-index: 3;
}

.tele--tl { top: 6rem; left: 2.5rem; }
.tele--tr { top: 6rem; right: 2.5rem; }
.tele--bl { bottom: 2.5rem; left: 2.5rem; }
.tele--br { bottom: 2.5rem; right: 2.5rem; }

.tele-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 55, 40, 0.2);
  animation: pulse 2.4s ease-in-out infinite;
}

.tele-sep {
  color: var(--ink-dim);
}

.tele-arrow {
  display: inline-block;
  animation: scroll-arrow 2.2s ease-in-out infinite;
  color: var(--accent);
  font-size: 0.875rem;
}

@keyframes scroll-arrow {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* ─── Annotation callouts (Moffett-style) ─────────────── */

.anno {
  position: absolute;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 22rem;
  z-index: 3;
}

.anno--left {
  top: 34%;
  left: 2.5rem;
  flex-direction: row;
}

.anno--right {
  top: 46%;
  right: 2.5rem;
  flex-direction: row-reverse;
  text-align: right;
}

.anno-marker {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  margin-top: 0.4rem;
  position: relative;
}

.anno-marker::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.anno-line {
  flex-shrink: 0;
  width: 3rem;
  height: 1px;
  background: linear-gradient(to right, var(--accent), rgba(212, 55, 40, 0.1));
  /* marker = 10px tall, margin-top 0.4rem; line = 1px → centre at marker centre */
  margin-top: calc(0.4rem + 4.5px);
}

.anno--right .anno-line {
  background: linear-gradient(to left, var(--accent), rgba(212, 55, 40, 0.1));
}

.anno-body {
  flex: 1;
  min-width: 0;
}

.anno-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.anno-body p {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-muted);
  font-weight: 300;
  letter-spacing: 0.005em;
}

/* Entrance animation for annotations */
.anno {
  opacity: 0;
  animation: annoIn 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.anno--left { animation-delay: 0.5s; }
.anno--right { animation-delay: 0.9s; }

@keyframes annoIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Sections ───────────────────────────────────────── */

.section {
  position: relative;
  padding: 10rem 2.5rem;
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.section--dark {
  background: var(--bg-soft);
  max-width: 100%;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

.section--dark > .section-head,
.section--dark > .opp-list {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  margin-bottom: 6rem;
  max-width: 52rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-title em {
  color: var(--ink-muted);
}

.section-lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink-muted);
  margin-top: 2rem;
  max-width: 36rem;
  font-weight: 300;
}

/* ─── About ──────────────────────────────────────────── */

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 6rem;
  align-items: start;
}

.about-prose {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  font-weight: 300;
}

.about-prose p + p {
  margin-top: 1.5rem;
}

.about-prose .lead {
  font-size: 1.25rem;
  color: var(--ink);
  line-height: 1.55;
}

.about-prose .pull-quote {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.2;
  color: var(--ink);
  padding: 1.5rem 0 1.5rem 2rem;
  border-left: 2px solid var(--accent);
  margin: 2.5rem 0;
}

.about-prose .signature {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--ink-muted);
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.about-meta {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 0.5rem;
  position: sticky;
  top: 6rem;
}

.meta-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.meta-block:last-child {
  border-bottom: none;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}

.meta-value {
  font-size: 1.0625rem;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.4;
}

.meta-sub {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 300;
}

/* ─── Toast (after copy-to-clipboard) ──────────────────── */
.sf-toast {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translate(-50%, 14px);
  padding: 0.85rem 1.25rem;
  background: rgba(14, 14, 16, 0.96);
  border: 1px solid rgba(244, 241, 236, 0.12);
  border-left: 2px solid var(--accent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
}
.sf-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ─── Vertical picker (industry tabs) ──────────────────
   Lets the visitor swap the Opportunities copy between
   All / Treuhand / Bau / Anwalt / Klinik. CSS-driven via
   body[data-vertical] + per-element data-vert attrs. */

.vert-picker {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.75rem;
  padding: 0.4rem;
  border: 1px solid rgba(244, 241, 236, 0.10);
  background: rgba(20, 20, 24, 0.55);
  border-radius: 999px;
}

.vert-pick {
  padding: 0.55rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: none;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.vert-pick:hover { color: var(--ink); }

.vert-pick.is-active {
  color: var(--ink);
  background: linear-gradient(
    135deg,
    rgba(212, 55, 40, 0.28) 0%,
    rgba(212, 55, 40, 0.10) 100%
  );
  border-color: rgba(212, 55, 40, 0.45);
}

/* Default: show only the "all" variant; hide the rest */
.opp-body p[data-vert]:not([data-vert="all"]),
.opp-body ul.opp-bullets[data-vert]:not([data-vert="all"]) { display: none; }
.opp-body p[data-vert="all"] { display: block; }
.opp-body ul.opp-bullets[data-vert="all"] { display: flex; }

/* When body has a vertical chosen, hide the "all" copy and show the matching one */
body[data-vertical="treuhand"] .opp-body p[data-vert="all"],
body[data-vertical="treuhand"] .opp-body ul.opp-bullets[data-vert="all"]       { display: none; }
body[data-vertical="treuhand"] .opp-body p[data-vert="treuhand"]               { display: block; }
body[data-vertical="treuhand"] .opp-body ul.opp-bullets[data-vert="treuhand"]  { display: flex; }
body[data-vertical="bau"]      .opp-body p[data-vert="all"],
body[data-vertical="bau"]      .opp-body ul.opp-bullets[data-vert="all"]       { display: none; }
body[data-vertical="bau"]      .opp-body p[data-vert="bau"]                    { display: block; }
body[data-vertical="bau"]      .opp-body ul.opp-bullets[data-vert="bau"]       { display: flex; }
body[data-vertical="anwalt"]   .opp-body p[data-vert="all"],
body[data-vertical="anwalt"]   .opp-body ul.opp-bullets[data-vert="all"]       { display: none; }
body[data-vertical="anwalt"]   .opp-body p[data-vert="anwalt"]                 { display: block; }
body[data-vertical="anwalt"]   .opp-body ul.opp-bullets[data-vert="anwalt"]    { display: flex; }
body[data-vertical="klinik"]   .opp-body p[data-vert="all"],
body[data-vertical="klinik"]   .opp-body ul.opp-bullets[data-vert="all"]       { display: none; }
body[data-vertical="klinik"]   .opp-body p[data-vert="klinik"]                 { display: block; }
body[data-vertical="klinik"]   .opp-body ul.opp-bullets[data-vert="klinik"]    { display: flex; }

/* Subtle fade when copy swaps */
.opp-body p[data-vert],
.opp-body ul.opp-bullets[data-vert] {
  animation: vertFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes vertFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Opportunity bullets ───────────────────────────── */

.opp-body .opp-bullets {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 40rem;
}

.opp-body .opp-bullets li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-muted);
  font-weight: 300;
}

.opp-body .opp-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.5rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

/* "Other" tab — accent ghost variant */
.vert-pick--other {
  border-color: rgba(244, 241, 236, 0.18);
  color: var(--ink-muted);
}
.vert-pick--other.is-active {
  background: linear-gradient(
    135deg,
    rgba(244, 241, 236, 0.14) 0%,
    rgba(244, 241, 236, 0.04) 100%
  );
  border-color: rgba(244, 241, 236, 0.4);
  color: var(--ink);
}

/* Other-panel show/hide:
   - Default: panel hidden, opp-list visible
   - When data-vertical=other: hide opp-list, show panel */
.opp-other { display: none; }
body[data-vertical="other"] .opp-list { display: none; }
body[data-vertical="other"] .opp-other {
  display: block;
  animation: vertFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.opp-other__inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
  border: 1px solid rgba(244, 241, 236, 0.10);
  background: linear-gradient(
    180deg,
    rgba(20, 20, 24, 0.45) 0%,
    rgba(14, 14, 18, 0.45) 100%
  );
  border-left: 2px solid var(--accent);
}

.opp-other__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.opp-other__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.opp-other__title em {
  color: var(--ink-muted);
  font-style: italic;
}

.opp-other__lede {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-muted);
  font-weight: 300;
  margin: 0 auto 1.25rem;
  max-width: 36rem;
}

.opp-other__cta {
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
}

.opp-other__note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  margin-top: 0.5rem;
}

/* ─── Opportunities ──────────────────────────────────── */

.opp-list {
  list-style: none;
  counter-reset: none;
}

.opp {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 4rem;
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
  transition: background 0.4s ease;
}

.opp:last-child {
  border-bottom: 1px solid var(--line);
}

.opp:hover {
  background: rgba(244, 241, 236, 0.015);
}

.opp-num {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 6rem;
}

.opp-num .roman {
  font-family: var(--font-serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.opp-num .pct {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
}

.opp-body h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.opp-body p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-muted);
  font-weight: 300;
  max-width: 42rem;
}

/* ─── System (workflow) section ──────────────────────── */

.section--system {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 10rem;
  background: transparent;         /* let the 3D canvas render through */
  max-width: 100%;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

.section--system > .section-head,
.section--system > .system-legend,
.section--system > .system-stage {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.system-stage {
  /* Decorative spacer — the 3D workflow renders in the canvas behind this as
     an ambient backdrop. No longer the primary interaction surface. */
  height: 38vh;
  min-height: 18rem;
  max-height: 28rem;
  position: relative;
  margin: 2rem auto 6rem; /* extra bottom margin so sub-nodes don't overlap the legend */
  opacity: 0.55;
  pointer-events: none;
}

/* Legacy hint kept as no-op so scene.js runs cleanly even if toggled */
.system-hint { display: none; }
.system-stage.is-active .system-hint { display: none; }

.hint-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: hint-breathe 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(212, 55, 40, 0.6);
}

@keyframes hint-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 55, 40, 0.6); }
  50%      { box-shadow: 0 0 0 10px rgba(212, 55, 40, 0); }
}

/* Node panel — appears when a node is clicked */
.node-panel {
  position: fixed;
  top: 50%;
  right: 2.5rem;
  transform: translateY(-50%);
  width: 22rem;
  max-width: calc(100vw - 3rem);
  background: rgba(14, 14, 16, 0.94);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  padding: 2rem 2rem 2rem 2.25rem;
  z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transform: translate(20px, -50%);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.node-panel[hidden] {
  display: none;
}

.node-panel.is-open {
  opacity: 1;
  transform: translate(0, -50%);
}

.node-panel-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-family: var(--font-sans);
  transition: color 0.2s ease;
}

.node-panel-close:hover {
  color: var(--ink);
}

.node-panel-key {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.node-panel-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.node-panel-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-muted);
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.node-panel-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
}

.node-panel-meta dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  align-self: center;
}

.node-panel-meta dd {
  color: var(--ink);
  font-weight: 400;
  line-height: 1.4;
}

/* Hover tooltip — follows cursor, appears above canvas */
.node-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  width: 17rem;
  padding: 1rem 1.15rem 0.85rem;
  background: rgba(14, 14, 17, 0.96);
  border: 1px solid rgba(212, 55, 40, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: none;
  opacity: 0;
  transform: translate(0, 0);
  transition: opacity 0.18s ease;
  z-index: 15;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  font-family: var(--font-sans);
}

.node-tooltip.is-visible {
  opacity: 1;
}

.tt-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--accent);
}
.tt-corner--tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.tt-corner--tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.tt-corner--bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.tt-corner--br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.tt-key {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
}

.tt-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.tt-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-muted);
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tt-hint {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.system-legend {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  padding-top: 2.5rem;
  counter-reset: none;
  position: relative;
  z-index: 3; /* sit above the 3D backdrop so sub-nodes don't bleed through */
}

.system-legend li {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.35rem 1.25rem 1.1rem;
  border: 1px solid rgba(244, 241, 236, 0.08);
  background: linear-gradient(
    180deg,
    rgba(18, 18, 22, 0.96) 0%,
    rgba(12, 12, 15, 0.96) 100%
  );
  cursor: pointer;
  transition: border-color 0.24s ease, background 0.24s ease, transform 0.24s ease;
  position: relative;
}

.system-legend li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--node-color, var(--accent));
  opacity: 0.65;
  transition: opacity 0.24s ease;
}

.system-legend li[data-node="N1"] { --node-color: #ff8a3d; }  /* webhook — orange */
.system-legend li[data-node="N2"] { --node-color: #b48cff; }  /* ai — purple */
.system-legend li[data-node="N3"] { --node-color: #5ce48c; }  /* sheets — green */
.system-legend li[data-node="N4"] { --node-color: #ff6b5b; }  /* gmail — red */
.system-legend li[data-node="N5"] { --node-color: #5ce48c; }  /* drive — green */

.system-legend li:hover {
  border-color: rgba(244, 241, 236, 0.2);
  transform: translateY(-3px);
}
.system-legend li:hover::before { opacity: 1; }

.system-legend li.is-active {
  border-color: var(--node-color);
  background: linear-gradient(
    180deg,
    rgba(212, 55, 40, 0.08) 0%,
    rgba(14, 14, 18, 0.5) 100%
  );
}
.system-legend li.is-active::before { opacity: 1; height: 3px; }

/* Node icon — styled glyph that maps to n8n's node types */
.legend-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--node-color);
  background: color-mix(in srgb, var(--node-color) 12%, transparent);
  color: var(--node-color);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.legend-icon::before {
  font-family: var(--font-mono);
  font-size: 1rem;
}

.legend-icon[data-kind="webhook"]::before { content: "⚡"; }
.legend-icon[data-kind="ai"]::before      { content: "✦"; }
.legend-icon[data-kind="sheets"]::before  { content: "▤"; }
.legend-icon[data-kind="mail"]::before    { content: "✉"; }
.legend-icon[data-kind="drive"]::before   { content: "◆"; }

.legend-key {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legend-name {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.legend-desc {
  font-size: 0.825rem;
  line-height: 1.55;
  color: var(--ink-muted);
  font-weight: 300;
  flex: 1;
}

.legend-more {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 0.5rem;
  transition: color 0.24s ease;
}

.system-legend li:hover .legend-more {
  color: var(--node-color);
}

/* ─── Examples CTA section ───────────────────────────── */

.section--examples {
  padding-top: 9rem;
  padding-bottom: 9rem;
  position: relative;
}

.examples-inner {
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
}

.examples-inner .section-label {
  display: block;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
}

.examples-inner .section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.75rem;
}

.examples-inner .section-title em {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}

.examples-lede {
  max-width: 38rem;
  margin: 0 auto 3rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-muted);
  font-weight: 300;
}

.examples-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.75rem;
  border: 1px solid rgba(212, 55, 40, 0.55);
  background: linear-gradient(
    135deg,
    rgba(212, 55, 40, 0.10) 0%,
    rgba(212, 55, 40, 0.02) 100%
  );
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s ease,
              background 0.4s ease,
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease;
  pointer-events: auto;
}

.examples-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.examples-cta:hover {
  border-color: var(--accent);
  background: linear-gradient(
    135deg,
    rgba(212, 55, 40, 0.20) 0%,
    rgba(212, 55, 40, 0.06) 100%
  );
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -22px rgba(212, 55, 40, 0.6);
}

.examples-cta:hover::before {
  transform: translateX(100%);
}

.examples-cta__arrow {
  display: inline-block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--accent);
}

.examples-cta:hover .examples-cta__arrow {
  transform: translateX(6px);
}

.examples-tags {
  list-style: none;
  margin: 3rem auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  max-width: 50rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.examples-tags li {
  position: relative;
  padding-left: 0.9rem;
}

.examples-tags li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  background: var(--accent);
  opacity: 0.55;
}

/* ─── Stack & hosting transparency ─────────────────── */

.section--stack {
  padding-top: 8rem;
  padding-bottom: 8rem;
}

.stack-table {
  max-width: 64rem;
  margin: 3rem auto 2rem;
  border: 1px solid rgba(244, 241, 236, 0.10);
  background: rgba(20, 20, 24, 0.45);
}

.stack-row {
  display: grid;
  grid-template-columns: 1.1fr 1.5fr 1.5fr;
  border-bottom: 1px solid rgba(244, 241, 236, 0.06);
}
.stack-row:last-child { border-bottom: none; }

.stack-row--head {
  background: rgba(244, 241, 236, 0.025);
}
.stack-row--head .stack-cell {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  font-weight: 500;
}

.stack-row--highlight {
  background: linear-gradient(
    90deg,
    rgba(212, 55, 40, 0.04) 0%,
    rgba(212, 55, 40, 0.01) 100%
  );
}

.stack-cell {
  padding: 1.1rem 1.4rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink);
  border-right: 1px solid rgba(244, 241, 236, 0.05);
}
.stack-cell:last-child { border-right: none; }

.stack-cell--label {
  font-weight: 500;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.2);
}

.stack-cell--regulated {
  color: var(--ink);
}
.stack-cell--regulated strong {
  color: #5ce48c;
  font-weight: 500;
}

.stack-note {
  max-width: 56rem;
  margin: 2rem auto 0;
  padding: 1.5rem 1.75rem;
  border-left: 2px solid var(--accent);
  background: rgba(212, 55, 40, 0.03);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-muted);
}
.stack-note strong {
  color: var(--ink);
  font-weight: 500;
}

/* ─── Pilot programme + commitments ────────────────── */

.section--pilot {
  padding-top: 8rem;
  padding-bottom: 8rem;
  background: linear-gradient(
    180deg,
    rgba(20, 20, 24, 0.0) 0%,
    rgba(20, 20, 24, 0.35) 50%,
    rgba(20, 20, 24, 0.0) 100%
  );
}

.pilot-inner {
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
}

.pilot-inner .section-label {
  display: block;
  margin-bottom: 1.5rem;
}

.pilot-inner .section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}

.pilot-inner .section-title em {
  color: var(--ink-muted);
  font-style: italic;
}

.pilot-lede {
  max-width: 38rem;
  margin: 0 auto 3rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-muted);
  font-weight: 300;
}

.pilot-commits {
  list-style: none;
  margin: 0 auto 3rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 52rem;
  text-align: left;
}

.pilot-commits li {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid rgba(244, 241, 236, 0.10);
  background: linear-gradient(
    180deg,
    rgba(20, 20, 24, 0.6) 0%,
    rgba(14, 14, 18, 0.6) 100%
  );
  border-top: 2px solid var(--accent);
}

.pilot-commits__metric {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.85rem;
}

.pilot-commits li strong {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.pilot-commits li span:not(.pilot-commits__metric) {
  display: block;
  font-size: 0.825rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.pilot-cta { display: inline-flex; }

@media (max-width: 720px) {
  .pilot-commits { grid-template-columns: 1fr; }
}

/* ─── Proof of work ───────────────────────────────── */

.section--proof {
  padding-top: 8rem;
  padding-bottom: 8rem;
}

/* ─── Plain-language before / after card ──────────── */

.proof-compare {
  max-width: 62rem;
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.proof-compare__col {
  padding: 1.75rem 1.75rem 1.85rem;
  border: 1px solid rgba(244, 241, 236, 0.08);
  background: linear-gradient(
    180deg,
    rgba(20, 20, 24, 0.5) 0%,
    rgba(14, 14, 18, 0.5) 100%
  );
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.proof-compare__col--before {
  border-left: 2px solid rgba(244, 241, 236, 0.18);
}

.proof-compare__col--after {
  border-left: 2px solid var(--accent);
}

.proof-compare__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.proof-compare__col--after .proof-compare__label {
  color: var(--accent);
}

.proof-compare__line {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-muted);
  font-weight: 300;
  max-width: none;
}

.proof-compare__line strong {
  color: var(--ink);
  font-weight: 500;
}

.proof-compare__arrow {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--ink-dim);
  padding: 0 0.5rem;
}

@media (max-width: 760px) {
  .proof-compare {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }
  .proof-compare__arrow {
    padding: 0.25rem 0;
    transform: rotate(90deg);
    font-size: 1rem;
  }
}

/* ─── Collapsible engine diagram ──────────────────── */

.proof-details {
  max-width: 80rem;
  margin: 3.5rem auto 0;
}

.proof-details__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(244, 241, 236, 0.08);
  background: rgba(20, 20, 24, 0.45);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.proof-details__summary::-webkit-details-marker { display: none; }
.proof-details__summary::marker { content: ""; }

.proof-details__summary:hover {
  border-color: rgba(244, 241, 236, 0.18);
  background: rgba(20, 20, 24, 0.7);
}

.proof-details__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.proof-details__action {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.proof-details__close { display: none; }
.proof-details[open] .proof-details__open { display: none; }
.proof-details[open] .proof-details__close { display: inline; }

.proof-details__icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.proof-details[open] .proof-details__icon {
  transform: rotate(180deg);
}

.proof-details .proof-figure {
  margin-top: 1.5rem;
}

.proof-figure {
  max-width: 80rem;
  margin: 3rem auto 0;
  padding: 0;
}

.proof-zoom {
  display: block;
  position: relative;
  border: 1px solid rgba(244, 241, 236, 0.10);
  background: linear-gradient(
    180deg,
    rgba(20, 20, 24, 0.55) 0%,
    rgba(14, 14, 18, 0.55) 100%
  );
  overflow: hidden;
  transition: border-color 0.45s ease,
              box-shadow 0.45s ease,
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.proof-zoom:hover {
  border-color: rgba(212, 55, 40, 0.45);
  box-shadow: 0 30px 60px -30px rgba(212, 55, 40, 0.45),
              0 0 0 1px rgba(212, 55, 40, 0.12);
  transform: translateY(-3px);
}

.proof-img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.95;
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.proof-zoom:hover .proof-img {
  opacity: 1;
  transform: scale(1.01);
}

.proof-zoom__hint {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.45rem 0.75rem;
  background: rgba(14, 14, 16, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(244, 241, 236, 0.12);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.proof-zoom:hover .proof-zoom__hint { opacity: 1; }

.proof-caption {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1.25rem;
  padding: 0 0.5rem;
}

.proof-caption__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.proof-caption__text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-muted);
  font-weight: 300;
}

/* ─── Reading (blog index) ─────────────────────────── */

.section--reading {
  padding-top: 8rem;
  padding-bottom: 8rem;
}

.reading-list {
  list-style: none;
  margin: 3rem auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 72rem;
}

.reading-card {
  border: 1px solid rgba(244, 241, 236, 0.10);
  background: linear-gradient(
    180deg,
    rgba(20, 20, 24, 0.45) 0%,
    rgba(14, 14, 18, 0.45) 100%
  );
  transition: border-color 0.3s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.reading-card:hover {
  border-color: rgba(212, 55, 40, 0.4);
  transform: translateY(-4px);
}

.reading-card a {
  display: block;
  padding: 2rem 1.75rem;
  height: 100%;
  color: inherit;
}

.reading-card__tag {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  border: 1px solid rgba(212, 55, 40, 0.4);
  background: rgba(212, 55, 40, 0.06);
  margin-bottom: 1rem;
}

.reading-card__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
  color: var(--ink);
}

.reading-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

.reading-card__meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

@media (max-width: 900px) {
  .reading-list { grid-template-columns: 1fr; }
}

/* ─── Footer legal links ──────────────────────────── */

.footer-legal {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.footer-legal a {
  color: var(--ink-muted);
  transition: color 0.25s ease;
}
.footer-legal a:hover { color: var(--accent); }
.footer-sep { color: var(--ink-dim); }

/* ─── Manifesto ──────────────────────────────────────── */

.section--manifesto {
  padding-top: 10rem;
  padding-bottom: 12rem;
}

.manifesto {
  max-width: 52rem;
}

.manifesto .section-label {
  margin-bottom: 4rem;
}

.manifesto-line {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.75rem);
  line-height: 1.35;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.manifesto-line + .manifesto-line {
  margin-top: 0.75rem;
}

.manifesto-line em {
  color: var(--accent);
}

/* ─── Footer ─────────────────────────────────────────── */

.footer {
  position: relative;
  z-index: 2;
  background: var(--bg);
  padding: 6rem 2.5rem 3rem;
  border-top: 1px solid var(--line);
  max-width: var(--max);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  font-weight: 300;
}

.footer-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  margin-bottom: 0.5rem;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
}

/* ─── Responsive ─────────────────────────────────────── */

@media (max-width: 900px) {
  .nav {
    padding: 1rem 1.25rem;
    grid-template-columns: 1fr auto;
  }
  .nav-locale { display: none; }
  .nav-links { gap: 1.25rem; font-size: 0.75rem; }

  .hero { padding: 5rem 1.25rem 6rem; }
  .hero-inner { padding-bottom: 2rem; }
  .hero::before {
    background: radial-gradient(
      ellipse 80% 50% at 50% 55%,
      rgba(10, 10, 11, 0) 0%,
      rgba(10, 10, 11, 0.6) 50%,
      rgba(10, 10, 11, 0.95) 100%
    );
  }

  .tele--tl { top: 4.5rem; left: 1.25rem; font-size: 0.625rem; }
  .tele--tr { top: 4.5rem; right: 1.25rem; font-size: 0.625rem; }
  .tele--bl, .tele--br { display: none; }

  /* Annotations collapse into small inline pills on mobile */
  .anno {
    position: static;
    width: auto;
    max-width: 100%;
    flex-direction: row !important;
    text-align: left !important;
    margin: 0 auto 1.25rem;
    padding: 0 0.5rem;
  }
  .anno-line { display: none; }
  .anno-body p { font-size: 0.75rem; }

  .system-legend {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }
  .system-legend li { padding: 1.1rem 1rem; }
  .system-stage {
    display: none; /* hide decorative 3D stage on mobile — dead weight */
  }

  .section { padding: 6rem 1.5rem; }
  .section-head { margin-bottom: 4rem; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-meta {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
  }
  .meta-block { padding-bottom: 1rem; }

  .opp {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2.5rem 0;
  }
  .opp-num {
    position: static;
    flex-direction: row;
    align-items: baseline;
    gap: 1rem;
  }
  .opp-num .roman { font-size: 2.25rem; }

  .section--manifesto { padding: 6rem 1.5rem 7rem; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .about-meta { grid-template-columns: 1fr; }
}

/* ─── Reveal animations ──────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Selection ──────────────────────────────────────── */

::selection {
  background: var(--accent);
  color: var(--ink);
}

/* ─── Film grain overlay ─────────────────────────────────
   Procedural SVG noise — 3% opacity, soft-light blend.
   Adds tactile texture without obscuring content. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

/* ─── Custom cursor — desktop only ─────────────────────
   Tiny accent dot + larger ring that follow with lag,
   amplifying the perception of polish. */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--accent);
  border-radius: 50%;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.06s linear;
}

.cursor-ring {
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 1px solid rgba(244, 241, 236, 0.45);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease,
              width 0.25s ease, height 0.25s ease,
              margin 0.25s ease,
              border-color 0.25s ease,
              background 0.25s ease;
}

.cursor-dot.is-active,
.cursor-ring.is-active {
  opacity: 1;
}

/* When over interactive elements — ring expands and tints with accent */
.cursor-ring.is-hover {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-color: rgba(212, 55, 40, 0.7);
  background: rgba(212, 55, 40, 0.08);
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* Hide the system cursor on devices where the custom cursor renders.
   Touch / coarse pointers fall through to the platform cursor. */
@media (hover: hover) and (pointer: fine) {
  html, body { cursor: none; }
  a, button, [role="button"], input, textarea, select,
  label, .opp, .system-legend li, .anno-marker,
  .examples-cta, .wf-tab, .wf-node, .nav-back, .wf-cta__back {
    cursor: none;
  }
}

/* ─── Nav — condense on scroll ──────────────────────── */
.nav {
  transition: padding 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.35s ease;
}
.nav.is-scrolled {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 11, 0.92) 0%,
    rgba(10, 10, 11, 0.78) 100%
  );
  border-bottom: 1px solid rgba(244, 241, 236, 0.05);
}

/* Underline draw-in on nav links */
.nav-links a {
  position: relative;
  padding-bottom: 0.25rem;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform-origin: right center;
  transform: scaleX(0);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links a:hover::after {
  transform-origin: left center;
  transform: scaleX(1);
}

/* ─── Manifesto staggered reveal ───────────────────────
   Each line waits longer than the previous so the
   manifesto reads aloud in your head. */
.manifesto-line.reveal {
  transition-delay: calc(var(--line-i, 0) * 220ms);
  opacity: 0;
  transform: translateY(28px);
}
.manifesto-line.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Opportunity cards — magnetic lift ───────────────
   Subtle Y/X transform driven from JS via custom props,
   plus a quiet accent border on the active card. */
.opp {
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.45s ease,
              border-color 0.45s ease;
  --magX: 0px;
  --magY: 0px;
  transform: translate3d(var(--magX), var(--magY), 0);
  will-change: transform;
}
.opp:hover {
  background: linear-gradient(
    90deg,
    rgba(244, 241, 236, 0.025) 0%,
    rgba(244, 241, 236, 0) 70%
  );
  border-top-color: rgba(212, 55, 40, 0.4);
}
.opp:hover + .opp {
  border-top-color: rgba(212, 55, 40, 0.4);
}
.opp:hover .opp-num .roman {
  color: var(--ink);
  text-shadow: 0 0 24px rgba(212, 55, 40, 0.45);
  transition: color 0.35s ease, text-shadow 0.35s ease;
}
.opp .opp-num .roman {
  transition: color 0.35s ease, text-shadow 0.35s ease;
}
.opp:hover .opp-num .pct {
  color: var(--accent);
  transition: color 0.35s ease;
}

/* Reduced-motion: kill heavy decorations */
@media (prefers-reduced-motion: reduce) {
  .grain { display: none; }
  .cursor-dot, .cursor-ring { display: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE LAYER
   Breakpoints: ≤1280 small laptop, ≤1024 iPad landscape,
   ≤900 iPad portrait, ≤720 phablet, ≤520 mobile.
   Tightens layout, scales typography, stacks grids,
   prevents horizontal overflow at every step.
   ════════════════════════════════════════════════════════ */

@media (max-width: 1280px) {
  .nav { padding: 1.25rem 1.75rem; }
  .nav-links { gap: 1.75rem; }
  .section { padding: 6rem 2rem; }
  .section--system { padding-left: 1.75rem; padding-right: 1.75rem; }
  .stack-table { max-width: 56rem; }
}

/* iPad landscape — keep 2-col grids, tighten edges */
@media (max-width: 1024px) {
  .nav { padding: 1.1rem 1.5rem; font-size: 0.78rem; }
  .nav-links { gap: 1.5rem; }
  .nav-locale { display: none; }   /* hide "Zug, CH" pill on tablet */

  .hero-title { font-size: clamp(2rem, 6vw, 4.5rem); }
  .hero-orb { width: min(86vw, 900px); }

  .about-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .opp { grid-template-columns: 7rem 1fr; gap: 2.5rem; padding: 2.75rem 0; }

  .stack-row { grid-template-columns: 1fr 1.2fr 1.2fr; }
  .stack-cell { padding: 0.95rem 1.1rem; font-size: 0.825rem; }
}

/* iPad portrait — collapse 3-col grids to 1 col */
@media (max-width: 900px) {
  .nav { grid-template-columns: 1fr auto; padding: 0.95rem 1.25rem; }
  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    gap: 1.1rem;
    font-size: 0.7rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(244, 241, 236, 0.05);
    width: 100%;
  }
  .nav { display: flex; flex-wrap: wrap; }
  .nav-logo { flex: 1; }

  /* Stack table → vertical card layout (each row becomes a card) */
  .stack-row {
    grid-template-columns: 1fr;
    border-bottom: 1px solid rgba(244, 241, 236, 0.10);
  }
  .stack-row--head { display: none; }
  .stack-cell { border-right: none; padding: 0.85rem 1.2rem; }
  .stack-cell--label {
    background: rgba(244, 241, 236, 0.04);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    padding-top: 1.1rem;
  }
  .stack-cell:nth-child(2)::before {
    content: "Standard tier · ";
    color: var(--ink-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }
  .stack-cell:nth-child(3)::before {
    content: "Regulated tier · ";
    color: #5ce48c;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }

  /* Hero orb a touch smaller so it doesn't crowd title */
  .hero-orb { width: min(90vw, 720px); top: 12%; }
  .hero-title { font-size: clamp(2rem, 8vw, 3.5rem); }

  /* About grid stacks */
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Examples + reading already 1 col handled below */
  .examples-tags { font-size: 0.65rem; }

  /* Pilot commits 1 col handled at 720px */
}

/* Phablet — single-column everything */
@media (max-width: 720px) {
  .pilot-commits { grid-template-columns: 1fr; }
  .reading-list { grid-template-columns: 1fr; }
  .wf-meta { grid-template-columns: repeat(2, 1fr); }
  .wf-hero__pillars { grid-template-columns: 1fr; }

  .section { padding: 4.5rem 1.25rem; }
  .section--examples,
  .section--stack,
  .section--pilot,
  .section--reading,
  .section--manifesto { padding: 4.5rem 1.25rem; }
  .section--dark { padding-left: 1.25rem; padding-right: 1.25rem; }

  /* Hero workflow tiles can be tight — make sure title still fits */
  .hero-orb {
    width: min(94vw, 600px);
    top: 10%;
    aspect-ratio: 1.4 / 1;
  }
  .hero-title { font-size: clamp(1.85rem, 9vw, 3rem); }
  .hero-subtitle { font-size: 0.65rem; }

  /* Telemetry corners */
  .tele--tl, .tele--tr { font-size: 0.6rem; top: 4rem; }
  .tele--tl { left: 1.25rem; }
  .tele--tr { right: 1.25rem; }

  /* Vertical picker wraps cleanly */
  .vert-picker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 12px;
    padding: 0.35rem;
    width: 100%;
    max-width: 22rem;
  }
  .vert-pick { padding: 0.45rem 0.85rem; font-size: 0.65rem; letter-spacing: 0.1em; }

  /* Examples CTA */
  .examples-cta { padding: 0.95rem 1.25rem; font-size: 0.78rem; letter-spacing: 0.10em; }

  /* Pilot commits */
  .pilot-commits li { padding: 1.5rem 1.25rem 1.25rem; }
  .pilot-commits__metric { font-size: 2.1rem; }

  /* Stack note */
  .stack-note { margin-left: 0; margin-right: 0; padding: 1.25rem 1.4rem; font-size: 0.825rem; }

  /* Manifesto */
  .manifesto-line { font-size: clamp(1.25rem, 5vw, 1.85rem); }

  /* Footer */
  .footer { padding: 4rem 1.25rem 2rem; }
  .footer-meta { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .footer-legal { font-size: 0.65rem; flex-wrap: wrap; }

  /* Section labels — slightly smaller everywhere */
  .section-label { font-size: 0.7rem; }

  /* Workflows page hero */
  .wf-hero { padding: 6rem 1.25rem 3rem; }
  .wf-hero__title { font-size: clamp(2rem, 8vw, 3rem); }
  .wf-tabs { flex-wrap: wrap; padding: 0.4rem; }
  .wf-tab { padding: 0.45rem 0.85rem; font-size: 0.65rem; }

  /* Workflows page workflow sections */
  .wf { padding: 3rem 1.25rem; }
  .wf-title { font-size: clamp(1.5rem, 6vw, 2.25rem); }
  .wf-summary { font-size: 0.95rem; }
  .wf-disclaimer { font-size: 0.78rem; padding: 0.85rem 1rem; }
  .wf-canvas { height: 540px; }       /* slightly shorter on small screens */

  /* Custom cursor — already disabled on coarse pointers */
}

/* Mobile small */
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-meta { grid-template-columns: 1fr; }

  /* Tighten more padding */
  .section { padding: 3.5rem 1rem; }
  .section--examples, .section--stack, .section--pilot,
  .section--reading, .section--manifesto { padding: 3.5rem 1rem; }
  .section--dark { padding-left: 1rem; padding-right: 1rem; }

  .nav { padding: 0.75rem 1rem; }
  .nav-logo { font-size: 0.85rem; }
  .nav-links { gap: 0.85rem; font-size: 0.65rem; padding-top: 0.4rem; }

  .nav-mark {
    width: 1.4rem;
    height: 1.4rem;
    font-size: 1.1rem;
  }

  /* Hero — tighten harder */
  .hero-title { font-size: clamp(1.65rem, 10vw, 2.5rem); }
  .hero-orb {
    width: 96vw;
    top: 8%;
    aspect-ratio: 1.3 / 1;
  }

  /* Annotation pills (when collapsed via 1320 rule, here we hide them entirely) */
  .anno { display: none; }

  /* Workflow page tile labels can be tight */
  .wf-canvas { height: 480px; }

  /* Reading cards padding */
  .reading-card a { padding: 1.5rem 1.25rem; }

  /* Legal pages */
  .legal-main { padding: 6rem 1.25rem 3rem; }
  .legal-article h1 { font-size: clamp(1.85rem, 9vw, 3rem); }
  .legal-article h2 { font-size: 1.4rem; }
}

/* Hover-incapable / touch — make sure tap targets are big enough */
@media (hover: none), (pointer: coarse) {
  .vert-pick, .wf-tab { padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .examples-cta { padding-top: 1.05rem; padding-bottom: 1.05rem; }
  .nav-links a { padding: 0.4rem 0; }
  /* Re-enable system cursor on touch (custom cursor is already hidden) */
  html, body, a, button { cursor: auto; }
}
