/* ==========================================================================
   Lumenos Labs — design system
   Light moving through a system: warm lumen on cool ink.
   ========================================================================== */

:root {
  --bg: #0b0c0f;
  --bg-raise: #101218;
  --bg-panel: #0e1014;
  --line: rgba(235, 237, 242, 0.08);
  --line-strong: rgba(235, 237, 242, 0.14);
  --text: #edeff3;
  --muted: #9aa0ac;
  --dim: #5d636f;

  --lumen: #e4c57e;
  --estate: #de9e51;
  --pulse: #63c6ae;
  --flow: #8e96f0;

  --accent: var(--lumen);

  --font-display: "Schibsted Grotesk", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, monospace;

  --wrap: 1120px;
  --nav-h: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body[data-accent="estate"] { --accent: var(--estate); }
body[data-accent="pulse"]  { --accent: var(--pulse); }
body[data-accent="flow"]   { --accent: var(--flow); }

::selection { background: rgba(228, 197, 126, 0.25); color: var(--text); }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.nav.scrolled {
  background: rgba(11, 12, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.wordmark .mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lumen);
  box-shadow: 0 0 12px rgba(228, 197, 126, 0.7);
  flex: none;
}

.wordmark .labs { color: var(--dim); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

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

.nav-cta {
  font-size: 0.9rem;
  padding: 8px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  color: var(--text);
  transition: border-color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: rgba(228, 197, 126, 0.06);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  width: 40px;
  height: 36px;
  font-size: 1rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Typography & shared elements
   -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}

.title-xl { font-size: clamp(2.5rem, 6vw, 4.4rem); letter-spacing: -0.035em; }
.title-lg { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.title-md { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }

.lede {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 34em;
  margin-top: 22px;
}

.section {
  border-top: 1px solid var(--line);
  padding: 104px 0;
}

.section-head { max-width: 620px; margin-bottom: 60px; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 38px; }

.btn {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 99px;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
              border-color 0.2s ease, background-color 0.2s ease;
  display: inline-block;
}

.btn-solid {
  background: var(--accent);
  color: #14110a;
}

.btn-solid:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 28px rgba(228, 197, 126, 0.28);
}

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

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

.text-link {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.text-link::after { content: "→"; transition: transform 0.2s ease; }
.text-link:hover::after { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: calc(var(--nav-h) + 110px) 0 120px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 72% 30%, rgba(228, 197, 126, 0.07), transparent 70%);
}

body[data-accent="estate"] .hero-glow {
  background: radial-gradient(ellipse 60% 45% at 72% 30%, rgba(222, 158, 81, 0.08), transparent 70%);
}
body[data-accent="pulse"] .hero-glow {
  background: radial-gradient(ellipse 60% 45% at 72% 30%, rgba(99, 198, 174, 0.07), transparent 70%);
}
body[data-accent="flow"] .hero-glow {
  background: radial-gradient(ellipse 60% 45% at 72% 30%, rgba(142, 150, 240, 0.08), transparent 70%);
}

#lumen-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 62%);
}

.hero-inner { position: relative; max-width: 640px; }

.hero .lede { max-width: 30em; }

.hero-meta {
  margin-top: 64px;
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Principles (index)
   -------------------------------------------------------------------------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.principle {
  padding: 38px 34px;
  background: var(--bg-panel);
}

.principle + .principle { border-left: 1px solid var(--line); }

.principle .mono { color: var(--dim); display: block; margin-bottom: 18px; }

.principle h3 { font-size: 1.15rem; margin-bottom: 10px; }

.principle p { color: var(--muted); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Product panels (index)
   -------------------------------------------------------------------------- */

.product-panel {
  --p: var(--lumen);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  padding: 56px 0;
  border-top: 1px solid var(--line);
  position: relative;
}

.product-panel:last-of-type { border-bottom: 1px solid var(--line); }

.product-panel[data-p="estate"] { --p: var(--estate); }
.product-panel[data-p="pulse"]  { --p: var(--pulse); }
.product-panel[data-p="flow"]   { --p: var(--flow); }

.product-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--p);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.product-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--p);
  box-shadow: 0 0 10px var(--p);
}

.product-panel h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 14px; }

.product-panel .desc { color: var(--muted); max-width: 30em; margin-bottom: 26px; }

.cap-list { list-style: none; display: grid; gap: 12px; align-content: start; }

.cap-list li {
  color: var(--muted);
  font-size: 0.95rem;
  padding-left: 22px;
  position: relative;
}

.cap-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 1px;
  background: var(--p, var(--accent));
}

.cap-list li strong { color: var(--text); font-weight: 500; }

/* --------------------------------------------------------------------------
   Industries (index)
   -------------------------------------------------------------------------- */

.industries {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.industry {
  background: var(--bg-panel);
  padding: 34px;
}

.industry h3 { font-size: 1.05rem; margin-bottom: 8px; }
.industry p { color: var(--muted); font-size: 0.93rem; }

/* --------------------------------------------------------------------------
   Comparison (why AI-first)
   -------------------------------------------------------------------------- */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.compare-col { background: var(--bg-panel); padding: 40px 36px; }

.compare-col.built-in {
  background:
    linear-gradient(180deg, rgba(228, 197, 126, 0.05), transparent 60%),
    var(--bg-panel);
}

.compare-col .mono { display: block; margin-bottom: 26px; }
.compare-col.bolted .mono { color: var(--dim); }
.compare-col.built-in .mono { color: var(--lumen); }

.compare-col ul { list-style: none; display: grid; gap: 18px; }

.compare-col li {
  font-size: 0.97rem;
  color: var(--muted);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.compare-col li:last-child { border-bottom: none; padding-bottom: 0; }

.compare-col.built-in li { color: var(--text); }

/* --------------------------------------------------------------------------
   Engineering (index)
   -------------------------------------------------------------------------- */

.stack-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}

.stack-group h3 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 20px;
}

.stack-group ul { list-style: none; display: grid; gap: 10px; }

.stack-group li {
  color: var(--muted);
  font-size: 0.95rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Roadmap (index)
   -------------------------------------------------------------------------- */

.roadmap { list-style: none; border-top: 1px solid var(--line); }

.roadmap li {
  display: flex;
  align-items: baseline;
  gap: 28px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.roadmap .mono { color: var(--dim); flex: none; width: 42px; }

.roadmap .area { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; flex: none; width: 240px; }

.roadmap .note { color: var(--dim); font-size: 0.92rem; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 72px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 90% at 50% -20%, rgba(228, 197, 126, 0.08), transparent 70%),
    var(--bg-panel);
}

.contact-card .lede { margin: 18px auto 0; }

.contact-card .btn-row { justify-content: center; }

.contact-note {
  margin-top: 30px;
  color: var(--dim);
  font-size: 0.9rem;
}

.contact-note a { color: var(--muted); border-bottom: 1px solid var(--line-strong); }
.contact-note a:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer { border-top: 1px solid var(--line); padding: 64px 0 48px; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}

.footer-brand p {
  color: var(--dim);
  font-size: 0.92rem;
  max-width: 26em;
  margin-top: 16px;
}

.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 18px;
}

.footer ul { list-style: none; display: grid; gap: 10px; }

.footer ul a { color: var(--muted); font-size: 0.93rem; }
.footer ul a:hover { color: var(--text); }

.footer-base {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--dim);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Product pages — shared
   -------------------------------------------------------------------------- */

.p-hero { padding: calc(var(--nav-h) + 90px) 0 90px; }

.p-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
  position: relative;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.feature-cell { background: var(--bg-panel); padding: 30px 28px; }

.feature-cell h3 { font-size: 1rem; margin-bottom: 8px; }

.feature-cell p { color: var(--muted); font-size: 0.9rem; }

.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.split-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
}

.agent-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 42px 38px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, transparent), transparent 55%),
    var(--bg-panel);
}

.agent-card .mono { color: var(--accent); display: block; margin-bottom: 22px; }

.agent-card h3 { font-size: 1.35rem; margin-bottom: 12px; }

.agent-card > p { color: var(--muted); font-size: 0.97rem; margin-bottom: 22px; }

.agent-card ul { list-style: none; display: grid; gap: 10px; }

.agent-card ul li {
  color: var(--muted);
  font-size: 0.92rem;
  padding-left: 20px;
  position: relative;
}

.agent-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 9px;
  height: 1px;
  background: var(--accent);
}

.rules { list-style: none; border-top: 1px solid var(--line); counter-reset: rule; }

.rules li {
  counter-increment: rule;
  display: flex;
  gap: 30px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.02rem;
}

.rules li::before {
  content: counter(rule, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  flex: none;
}

.rules li span { color: var(--muted); }
.rules li strong { color: var(--text); font-weight: 500; }

.cta-band { text-align: center; }

.cta-band .lede { margin-inline: auto; }

/* --------------------------------------------------------------------------
   Estate — stage machine + module registry
   -------------------------------------------------------------------------- */

.stage-machine {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-panel);
  padding: 34px 30px;
}

.stage-machine .sm-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 26px;
}

.stages { list-style: none; display: grid; gap: 0; }

.stage {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  position: relative;
}

.stage .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--estate);
  flex: none;
  position: relative;
  z-index: 1;
  background: var(--bg-panel);
}

.stage.done .dot { background: var(--estate); box-shadow: 0 0 8px rgba(222, 158, 81, 0.6); }

.stage:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 3.5px;
  top: calc(50% + 8px);
  bottom: calc(-50% + 8px);
  width: 1px;
  background: var(--line-strong);
}

.stage .s-name { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text); }

.stage .s-note { font-size: 0.8rem; color: var(--dim); margin-left: auto; text-align: right; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.module {
  background: var(--bg-panel);
  padding: 26px 24px;
  transition: background-color 0.25s ease;
}

.module:hover { background: #12141a; }

.module h3 { font-size: 0.97rem; margin-bottom: 6px; }

.module p { color: var(--dim); font-size: 0.85rem; line-height: 1.5; }

/* --------------------------------------------------------------------------
   Pulse — conversation mock
   -------------------------------------------------------------------------- */

.chat {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-panel);
  padding: 28px;
  display: grid;
  gap: 14px;
  max-width: 460px;
  justify-self: end;
  width: 100%;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.chat-head .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pulse);
  box-shadow: 0 0 8px rgba(99, 198, 174, 0.7);
}

.bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.93rem;
  line-height: 1.5;
}

.bubble.in {
  background: #171a20;
  border: 1px solid var(--line);
  justify-self: start;
  border-bottom-left-radius: 4px;
}

.bubble.out {
  background: rgba(99, 198, 174, 0.1);
  border: 1px solid rgba(99, 198, 174, 0.22);
  justify-self: end;
  border-bottom-right-radius: 4px;
}

.chat-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--dim);
  justify-self: end;
}

.chat-meta.left { justify-self: start; }

.handoff {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px dashed rgba(99, 198, 174, 0.35);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--pulse);
}

.channel-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.channel {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 8px 18px;
}

/* --------------------------------------------------------------------------
   Flow — workflow graph
   -------------------------------------------------------------------------- */

.flowgraph { display: grid; justify-items: center; max-width: 560px; margin: 0 auto; }

.fg-node {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg-panel);
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  justify-content: center;
}

.fg-node .k {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.fg-node.ai {
  border-color: rgba(142, 150, 240, 0.45);
  background:
    linear-gradient(180deg, rgba(142, 150, 240, 0.08), transparent),
    var(--bg-panel);
  box-shadow: 0 0 24px rgba(142, 150, 240, 0.12);
}

.fg-node.ai .k { color: var(--flow); }

.fg-line { width: 1px; height: 26px; background: var(--line-strong); }

.fg-branch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  width: 100%;
  margin-top: 0;
}

.fg-col { display: grid; justify-items: center; align-content: start; }

.fg-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 0;
}

.fg-label.yes { color: var(--flow); border: 1px solid rgba(142, 150, 240, 0.4); }
.fg-label.no  { color: var(--dim); border: 1px solid var(--line-strong); }

.fg-col .fg-node { min-width: 0; width: 100%; }

.fg-fork {
  width: 50%;
  height: 22px;
  position: relative;
}

.fg-fork .bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-strong);
}

.fg-fork::before, .fg-fork::after {
  content: "";
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--line-strong);
}

.fg-fork::before { left: 0; }
.fg-fork::after { right: 0; }

.schema {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d0f13;
  padding: 22px 26px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--muted);
  overflow-x: auto;
}

.schema .key { color: var(--flow); }
.schema .str { color: var(--lumen); }
.schema .bool { color: var(--pulse); }

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

.int-chip {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-panel);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.int-chip:hover { border-color: rgba(142, 150, 240, 0.4); color: var(--text); }

/* --------------------------------------------------------------------------
   Immersion layer — ambient light, orchestrated motion, micro-interactions
   -------------------------------------------------------------------------- */

/* Film grain: a whisper of texture over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Cursor glow: accent light trailing the pointer (created by JS) */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--accent) 6%, transparent) 0%,
    transparent 65%);
}

/* Hero headline: words rise out of a blur (spans created by JS) */
.hero h1 .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  filter: blur(8px);
  transition: opacity 0.7s ease,
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              filter 0.7s ease;
}

.hero h1.words-in .w { opacity: 1; transform: none; filter: blur(0); }

/* Eyebrow rule draws in when its section reveals */
html.js .eyebrow::before {
  transition: width 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s;
}

html.js .reveal:not(.in) .eyebrow::before,
html.js .eyebrow.reveal:not(.in)::before { width: 0; }

/* The lumen mark breathes */
@keyframes lumen-breathe {
  0%, 100% { box-shadow: 0 0 12px rgba(228, 197, 126, 0.7); }
  50%      { box-shadow: 0 0 20px rgba(228, 197, 126, 1); }
}

.wordmark .mark { animation: lumen-breathe 4s ease-in-out infinite; }

/* Nav links: accent underline slides in */
.nav-links a:not(.nav-cta) { position: relative; }

.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }

/* Solid buttons: a sheen sweeps across on hover */
.btn-solid { position: relative; overflow: hidden; }

.btn-solid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  transform: translateX(-130%);
  transition: transform 0.6s ease;
}

.btn-solid:hover::after { transform: translateX(130%); }

/* Grid cells light up along their top edge on hover */
.module, .feature-cell, .industry, .principle {
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.module:hover, .feature-cell:hover, .industry:hover, .principle:hover {
  background: #12141a;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent) 40%, transparent);
}

/* Product panels: a wash of their own light on hover */
.product-panel { transition: background 0.35s ease; }

.product-panel:hover {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--p) 4%, transparent), transparent 65%);
}

/* Contact card: the glow above slowly breathes */
.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 90% at 50% -20%,
    color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
  opacity: 0;
  animation: card-breathe 7s ease-in-out infinite;
}

@keyframes card-breathe {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}

/* Pulse chat: sequenced playback + typing indicator (driven by JS) */
.chat.seq > *:not(.chat-head) {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.chat.seq > .show { opacity: 1; transform: none; }

.stage .dot {
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.bubble.typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 15px 16px;
  justify-self: end;
  background: rgba(99, 198, 174, 0.1);
  border: 1px solid rgba(99, 198, 174, 0.22);
  border-bottom-right-radius: 4px;
}

.bubble.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pulse);
  animation: typing-bounce 1s ease-in-out infinite;
}

.bubble.typing span:nth-child(2) { animation-delay: 0.15s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: none; opacity: 0.35; }
  30%           { transform: translateY(-4px); opacity: 0.9; }
}

/* Flow graph: light travels down the edges; the AI node breathes */
.fg-line { position: relative; }

.fg-line::after {
  content: "";
  position: absolute;
  left: -1.5px;
  top: -4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--flow);
  box-shadow: 0 0 8px var(--flow);
  opacity: 0;
  animation: fg-travel 3.2s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes fg-travel {
  0%   { top: -4px; opacity: 0; }
  10%  { opacity: 0.9; }
  38%  { top: calc(100% - 2px); opacity: 0.9; }
  48%  { top: calc(100% - 2px); opacity: 0; }
  100% { top: calc(100% - 2px); opacity: 0; }
}

@keyframes ai-breathe {
  0%, 100% { box-shadow: 0 0 24px rgba(142, 150, 240, 0.12); }
  50%      { box-shadow: 0 0 38px rgba(142, 150, 240, 0.24); }
}

.fg-node.ai { animation: ai-breathe 3.5s ease-in-out infinite; }

/* --------------------------------------------------------------------------
   Reveal animation
   -------------------------------------------------------------------------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

html.js .reveal.in { opacity: 1; transform: none; }

html.js .reveal-d1 { transition-delay: 0.08s; }
html.js .reveal-d2 { transition-delay: 0.16s; }
html.js .reveal-d3 { transition-delay: 0.24s; }

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 960px) {
  .principles { grid-template-columns: 1fr; }
  .principle + .principle { border-left: none; border-top: 1px solid var(--line); }
  .product-panel { grid-template-columns: 1fr; gap: 30px; }
  .stack-groups { grid-template-columns: 1fr; gap: 36px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .module-grid { grid-template-columns: 1fr 1fr; }
  .int-grid { grid-template-columns: 1fr 1fr; }
  .p-hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .chat { justify-self: start; }
  .split-2 { grid-template-columns: 1fr; }
  .split-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .roadmap .area { width: auto; min-width: 160px; }
}

@media (max-width: 700px) {
  .section { padding: 76px 0; }
  .hero { padding: calc(var(--nav-h) + 70px) 0 80px; }
  .compare { grid-template-columns: 1fr; }
  .industries { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .int-grid { grid-template-columns: 1fr 1fr; }
  .contact-card { padding: 52px 26px; }
  .roadmap li { flex-wrap: wrap; gap: 10px 24px; }
  .roadmap .note { width: 100%; padding-left: 66px; }
  .fg-branch { grid-template-columns: 1fr; gap: 22px; }
  .fg-fork { display: none; }

  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(11, 12, 15, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 10px 28px 22px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1rem; }
  .nav-links .nav-cta { border: none; padding: 12px 0; color: var(--accent); }
}
