/* ============================================================
   signal-engine — porcelain precision studio
   ============================================================ */

/* ---------- fonts (self-hosted, SIL OFL) ---------- */
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/geist-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/geist-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/geist-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/geist-sans-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/geist-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/geist-mono-latin-500-normal.woff2') format('woff2');
}

/* ---------- tokens ---------- */
:root {
  --page: #f7f6f4;
  --panel: #ffffff;
  --panel-soft: #fbfaf8;
  --ink: #171614;
  --ink-2: #55524c;
  --ink-3: #8a867e;
  --line: #e8e6e1;
  --line-strong: #d9d6cf;
  --ember: #e9704b;
  --ember-deep: #be4b2c;
  --ember-soft: rgba(233, 112, 75, 0.09);
  --green: #3d7a4e;
  --green-soft: rgba(61, 122, 78, 0.09);
  --gold: #a97e1f;
  --gold-soft: rgba(169, 126, 31, 0.10);
  --sans: 'Geist', -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
  --shadow-panel: 0 1px 2px rgba(23, 22, 20, 0.05), 0 16px 40px -20px rgba(23, 22, 20, 0.16);
  --shadow-card: 0 1px 2px rgba(23, 22, 20, 0.04), 0 10px 28px -16px rgba(23, 22, 20, 0.14);
  --r-panel: 14px;
  --r-card: 12px;
  --r-btn: 9px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--ember); color: #fff; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 40px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(247, 246, 244, 0.78);
  border-bottom: 1px solid rgba(23, 22, 20, 0.06);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 40px;
  height: 60px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand svg { display: block; }
.brand span {
  font-size: 15px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink);
}
.nav a.link {
  font-size: 13.5px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color 0.2s ease;
}
.nav a.link:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  border-radius: var(--r-btn); padding: 10px 18px;
  text-decoration: none; cursor: pointer; border: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn-ember {
  background: var(--ember-deep); color: #fff;
  box-shadow: 0 10px 22px -10px rgba(190, 75, 44, 0.6);
}
.btn-ember:hover { background: #a8401f; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink-3); }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--ember-deep);
  outline-offset: 2px;
  border-radius: 6px;
}
.nav .btn { padding: 8px 15px; font-size: 13.5px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: 60px;
  overflow: clip;
}
.hero::before {
  /* studio backdrop — a breath of light behind the engine */
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(46% 40% at 46% 66%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(30% 26% at 47% 68%, rgba(233, 112, 75, 0.05) 0%, rgba(233, 112, 75, 0) 70%);
}
#engine-canvas, #engine-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; z-index: 1;
}
#engine-canvas { opacity: 0; transition: opacity 0.9s ease; }
#engine-canvas.on { opacity: 1; }
#engine-poster { object-fit: cover; display: none; }
#engine-poster.show { display: block; }

.hero-head {
  position: relative; z-index: 3;
  text-align: center;
  padding: clamp(40px, 7vh, 78px) 24px 0;
  pointer-events: none;
}
.hero-head .kicker { margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 .dim { color: var(--ink-3); }
.hero-sub {
  margin: 20px auto 0;
  max-width: 560px;
  font-size: clamp(15.5px, 1.5vw, 17.5px);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: balance;
}
.hero-ctas {
  margin-top: 28px;
  display: flex; gap: 12px; justify-content: center;
  pointer-events: auto;
}

.hero-stage {
  position: relative; z-index: 2;
  flex: 1;
  min-height: 420px;
  display: grid;
  grid-template-columns: 220px 1fr minmax(330px, 380px);
  align-items: center;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 48px 64px;
  gap: 24px;
  pointer-events: none;
}
#engine-anchor { grid-column: 2; height: 1px; }

/* source labels */
.sources {
  grid-column: 1;
  display: flex; flex-direction: column; gap: 26px;
  pointer-events: auto;
}
.source {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.source i {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: #9a9da3;
  box-shadow: 0 0 0 3px rgba(154, 157, 163, 0.18);
}

/* the PR card — the product beside the 3D */
.pr-card {
  grid-column: 3;
  position: relative;
  pointer-events: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
#pr-anchor { position: absolute; left: 0; top: 52%; width: 1px; height: 1px; }
.pr-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}
.pr-head .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ember);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(233, 112, 75, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(233, 112, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(233, 112, 75, 0); }
}
.pr-body { padding: 16px; }
.pr-title { font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.pr-origin {
  margin-top: 10px;
  font-size: 12.5px; line-height: 1.5; color: var(--ink-2);
  padding: 9px 11px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.pr-origin b { color: var(--ink); font-weight: 600; }
.pr-checks {
  margin-top: 12px;
  display: flex; flex-direction: column; gap: 7px;
}
.check {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-2);
}
.check svg { flex: none; }
.pr-actions { display: flex; gap: 9px; margin-top: 16px; }
.pr-actions .btn { flex: 1; padding: 10px 8px; font-size: 13px; }
.demo-note {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: #b3afa7;
}
.pr-card .demo-note { display: block; padding: 0 16px 12px; text-align: right; }

.hero-scrollhint {
  position: absolute; z-index: 3; left: 50%; bottom: 18px;
  transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-3);
}

/* ---------- shared section rhythm ---------- */
.section { padding: clamp(90px, 12vh, 150px) 0; }
.section-head { max-width: 620px; margin: 0 auto 52px; text-align: center; padding: 0 24px; }
.section-head .kicker { margin-bottom: 16px; }
.section-head h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.08;
  text-wrap: balance;
}
.section-head p { margin-top: 14px; font-size: 16.5px; color: var(--ink-2); text-wrap: balance; }

/* ---------- signal inbox showcase ---------- */
.inbox {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-panel);
  max-width: 920px;
  margin: 0 auto;
  overflow: hidden;
}
.inbox-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.tab {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  color: var(--ink-3); background: transparent;
  border: 1px solid transparent; border-radius: 999px;
  padding: 6px 13px;
}
.tab.on { color: var(--ink); background: var(--page); border-color: var(--line-strong); }
.inbox-bar .demo-note { margin-left: auto; }
.sig-row {
  display: grid;
  grid-template-columns: 74px 118px 1fr auto;
  gap: 14px; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}
.sig-row:hover { background: var(--panel-soft); }
.sig-row:last-child { border-bottom: none; }
.sig-time { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.sig-src {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 3px 9px; text-align: center; white-space: nowrap;
  justify-self: start;
}
.sig-what { font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.45; }
.sig-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em;
  white-space: nowrap;
  border-radius: 999px; padding: 4px 11px;
}
.sig-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.st-you { color: var(--ember-deep); background: var(--ember-soft); }
.st-you i { animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.st-done { color: var(--green); background: var(--green-soft); }
.st-idea { color: var(--gold); background: var(--gold-soft); }
.st-learn { color: var(--ink-2); background: rgba(23, 22, 20, 0.05); }

/* ---------- pipeline ---------- */
.pipeline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  align-items: stretch;
  position: relative;
}
.pipe-step { position: relative; padding: 0 22px; }
.pipe-step + .pipe-step { border-left: 1px dashed var(--line-strong); }
.pipe-num {
  font-family: var(--mono); font-size: 11px; color: var(--ember-deep);
  letter-spacing: 0.16em; margin-bottom: 12px;
}
.pipe-step h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 6px; }
.pipe-step > p { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; min-height: 42px; }
.pipe-card {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 14px 15px;
  font-size: 12.5px;
}
.cluster-line {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-2);
  padding: 5px 0;
}
.cluster-line i { width: 6px; height: 6px; border-radius: 50%; flex: none; background: #9a9da3; }
.cluster-sum {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.cluster-sum span { display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: var(--ink-3); margin-top: 3px; }
.stages { display: flex; flex-direction: column; gap: 9px; }
.stage {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-2);
}
.stage .dot {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line-strong);
  font-size: 9px; color: #fff;
}
.stage.done .dot { background: var(--green); border-color: var(--green); }
.stage.live .dot { background: var(--ember); border-color: var(--ember); animation: pulse 1.8s ease-out infinite; }
.stage .lbl { flex: 1; }
.stage .ms { color: var(--ink-3); font-size: 10.5px; }
.approve-row { display: flex; align-items: center; gap: 10px; }
.approve-row .btn { flex: 1; font-size: 13px; padding: 10px 8px; }
.pipe-foot {
  margin-top: 10px; text-align: right;
}

/* ---------- mechanism strip ---------- */
.mech {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}
.mech-inner {
  max-width: var(--max); margin: 0 auto; padding: 34px 40px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
}
.mech-item { display: flex; gap: 12px; align-items: flex-start; }
.mech-item svg { flex: none; margin-top: 2px; }
.mech-item b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.mech-item span { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* ---------- pricing ---------- */
.plans {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  max-width: 920px; margin: 0 auto;
}
.plan {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-card);
  padding: 26px 24px;
  display: flex; flex-direction: column; gap: 4px;
}
.plan.hot { border-color: rgba(190, 75, 44, 0.35); box-shadow: 0 1px 2px rgba(23,22,20,.04), 0 18px 44px -20px rgba(190, 75, 44, 0.25); }
.plan h3 { font-size: 16px; font-weight: 600; }
.plan .price { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; margin-top: 8px; }
.plan .price small { font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.plan .meta { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.plan .desc { font-size: 13px; color: var(--ink-2); margin-top: 12px; line-height: 1.5; }
.plan .btn { margin-top: 18px; }
.plans-foot {
  text-align: center; margin-top: 20px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}

/* ---------- closing ---------- */
.close-sec { text-align: center; padding: clamp(100px, 14vh, 170px) 24px; }
.close-sec h2 {
  font-size: clamp(34px, 4.2vw, 56px); font-weight: 600;
  letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance;
}
.close-sec p { margin: 16px auto 0; max-width: 460px; font-size: 16.5px; color: var(--ink-2); }
.close-sec .btn { margin-top: 30px; padding: 13px 26px; font-size: 15px; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 26px 40px;
}
.foot-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.foot-inner .brand span { font-size: 13px; }
.foot-links { display: flex; gap: 22px; }
.foot-links a { font-size: 12.5px; color: var(--ink-3); text-decoration: none; }
.foot-links a:hover { color: var(--ink-2); }
.foot-tag { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pr-head .pulse, .st-you i, .stage.live .dot { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .hero-stage { grid-template-columns: 190px 1fr minmax(300px, 340px); padding: 12px 32px 52px; }
}
@media (max-width: 860px) {
  .wrap { padding: 0 22px; }
  .nav-inner { padding: 0 20px; gap: 16px; }
  .nav a.link { display: none; }
  .hero { min-height: auto; }
  .hero-stage {
    grid-template-columns: 1fr;
    padding: 0 22px 44px;
    gap: 0;
    min-height: auto;
  }
  .sources {
    flex-direction: row; flex-wrap: wrap; gap: 9px 16px;
    justify-content: center;
    order: 1;
    margin: 26px 0 8px;
  }
  .source { font-size: 9.5px; gap: 7px; }
  .source i { width: 5px; height: 5px; box-shadow: 0 0 0 2px rgba(154,157,163,.18); }
  #engine-anchor { order: 2; height: 330px; grid-column: 1; }
  .pr-card { order: 3; grid-column: 1; max-width: 420px; margin: 0 auto; width: 100%; }
  #pr-anchor { left: 50%; top: -8px; }
  .hero-scrollhint { display: none; }
  .pipeline { grid-template-columns: 1fr; gap: 30px; }
  .pipe-step + .pipe-step { border-left: none; border-top: 1px dashed var(--line-strong); padding-top: 28px; }
  .pipe-step > p { min-height: 0; }
  .mech-inner { grid-template-columns: 1fr; gap: 22px; padding: 30px 22px; }
  .plans { grid-template-columns: 1fr; max-width: 420px; }
  .sig-row { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 6px 12px; padding: 13px 16px; }
  .sig-time { display: none; }
  .sig-src { grid-row: 2; }
  .sig-what { grid-column: 1 / -1; }
  .sig-status { grid-row: 2; grid-column: 2; justify-self: end; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
}
