:root {
  --bg: #05070d;
  --bg2: #0a0e1a;
  --panel: #0c1120;
  --panel2: #11182a;
  --line: #1c2438;
  --text: #eef2fa;
  --muted: #97a1b8;
  --dim: #5b6478;
  --teal: #43e5c4;
  --violet: #9d7bff;
  --pink: #ff7ac6;
  --gold: #ffb54d;
  --max: 880px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }

.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(5, 7, 13, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(28, 36, 56, 0.7);
}
.mark {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  font-size: 15px;
}
.mark .gem {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
  background: linear-gradient(135deg, var(--teal), var(--violet));
  transform: rotate(45deg);
}
.bar nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.6vw, 26px);
  font-size: 14px;
}
.bar nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.bar nav a:hover,
.bar nav a[aria-current="page"] { color: var(--text); }
.bar nav a[aria-current="page"] { position: relative; }
.bar nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 1px;
  background: linear-gradient(90deg, var(--teal), var(--violet));
}
.bar nav a.cta {
  color: #04121a;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), #6ee7f0);
}

section {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 110px clamp(20px, 5vw, 48px) 80px;
  position: relative;
}
section > * { max-width: var(--max); }
h1 {
  font-size: clamp(2.5rem, 7.5vw, 5rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.9rem, 5.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.grad {
  background: linear-gradient(100deg, var(--teal), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad2 {
  background: linear-gradient(100deg, var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gold { color: var(--gold); }
.micro {
  margin-top: 34px;
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  max-width: 620px;
  text-wrap: balance;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 26px;
}
.kicker {
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

[data-reveal] > *,
.hero-inner > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  transition-delay: calc(var(--d, 0) * 0.22s);
}
.in > *,
.in.hero-inner > * {
  opacity: 1;
  transform: none;
}

.hero { padding-top: 0; }
#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-inner { position: relative; z-index: 2; }
.hero .sub {
  margin-top: 22px;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  color: var(--muted);
  text-wrap: balance;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30svh;
  z-index: 1;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.cue::after {
  content: "";
  display: block;
  width: 1px;
  height: 34px;
  margin: 10px auto 0;
  background: linear-gradient(180deg, var(--teal), transparent);
  animation: drip 1.8s ease-in-out infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.copied .strike {
  font-size: clamp(1.3rem, 3.6vw, 2rem);
  font-weight: 600;
  color: var(--dim);
  margin: 6px 0;
}
.copied .strike s {
  text-decoration-color: rgba(255, 122, 198, 0.7);
  text-decoration-thickness: 2px;
}
.copied h2 { margin-top: 40px; }

.ghosts {
  margin-top: 48px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 760px);
}
.ghost,
.story-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 18px;
  background: linear-gradient(180deg, rgba(12, 17, 32, 0.9), rgba(12, 17, 32, 0.4));
  text-align: left;
}
.ghost b {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 650;
}
.ghost span {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.in .ghost { box-shadow: 0 0 40px rgba(157, 123, 255, 0.06); }
.ghost:nth-child(1) span { color: var(--teal); }
.ghost:nth-child(2) span { color: var(--violet); }
.ghost:nth-child(3) span { color: var(--pink); }
.ghost:nth-child(4) span { color: var(--gold); }

.mapviz {
  margin-top: 44px;
  width: min(100%, 660px);
}
.mapviz svg {
  width: 100%;
  height: auto;
  display: block;
}
.mapviz .edge {
  stroke: url(#eg);
  stroke-width: 1.6;
  fill: none;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
}
.in .mapviz .edge {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.4s ease calc(var(--d, 0) * 0.25s + 0.4s);
}
.mapviz .node {
  transform-origin: center;
  transform-box: fill-box;
  transform: scale(0);
}
.in .mapviz .node {
  transform: scale(1);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--d, 0) * 0.18s);
}
.mapviz text {
  font-family: inherit;
  font-size: 12.5px;
  fill: var(--muted);
}
.mapviz .hot text {
  fill: var(--text);
  font-weight: 600;
}

.board {
  margin-top: 46px;
  display: grid;
  gap: 14px;
  width: min(100%, 560px);
}
.card {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--panel);
}
.card.win {
  border-color: rgba(255, 181, 77, 0.55);
  box-shadow: 0 0 44px rgba(255, 181, 77, 0.08);
}
.card .badges {
  display: flex;
  gap: 5px;
  flex: none;
}
.card .badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 7px;
  border-radius: 6px;
  color: #04121a;
}
.b-hi { background: var(--teal); }
.b-md { background: #7d88a3; }
.b-au { background: var(--gold); }
.card .name {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
}
.card .tag {
  font-size: 11px;
  color: var(--dim);
  margin-top: 3px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.loopviz {
  margin-top: 44px;
  width: min(78vw, 340px);
}
.loopviz svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.loopviz .ring {
  fill: none;
  stroke: url(#lg);
  stroke-width: 2;
  stroke-dasharray: 40 14;
  stroke-linecap: round;
}
.in .loopviz .ring { animation: spin 14s linear infinite; }
@keyframes spin { to { stroke-dashoffset: -540; } }
.loopviz text {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  fill: var(--text);
}
.loopviz .stop {
  fill: var(--bg);
  stroke: var(--line);
}

.vault {
  margin-top: 46px;
  padding: 30px clamp(18px, 5vw, 44px);
  border: 1.5px dashed rgba(67, 229, 196, 0.5);
  border-radius: 20px;
  position: relative;
  width: min(100%, 520px);
}
.vault .label {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 12px;
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--teal);
  white-space: nowrap;
}
.vault svg {
  width: min(60vw, 260px);
  height: auto;
  display: block;
  margin: 0 auto;
}
.vault .edge2 {
  stroke: rgba(157, 123, 255, 0.65);
  stroke-width: 1.4;
}
.vault .dot { fill: var(--teal); }
.vault .dot.v { fill: var(--violet); }

/* Chapter pages */
.chapter-hero { min-height: 88svh; }
.chapter-hero .chapter-no {
  margin-bottom: 18px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.chapter-hero .sub {
  margin: 24px auto 0;
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  text-wrap: balance;
}
.chapter-hero::before {
  content: "";
  position: absolute;
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(67, 229, 196, 0.08), rgba(157, 123, 255, 0.035) 42%, transparent 70%);
  pointer-events: none;
}

.flow {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 980px);
}
.flow-step {
  position: relative;
  min-height: 190px;
  padding: 24px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  text-align: left;
}
.flow-step::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -17px;
  z-index: 2;
  color: var(--teal);
  font-size: 18px;
}
.flow-step:last-child::after { display: none; }
.flow-step .num {
  color: var(--dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.flow-step b {
  display: block;
  margin-top: 26px;
  font-size: 1.1rem;
}
.flow-step p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}
.flow-step:nth-child(1) .num { color: var(--teal); }
.flow-step:nth-child(2) .num { color: var(--violet); }
.flow-step:nth-child(3) .num { color: var(--pink); }
.flow-step:nth-child(4) .num { color: var(--gold); }

.source-grid,
.deployment-grid,
.case-grid {
  display: grid;
  gap: 16px;
  width: min(100%, 980px);
  margin-top: 46px;
}
.source-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.deployment-grid,
.case-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.source-card,
.deployment,
.case-card {
  min-width: 0;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel), rgba(12, 17, 32, 0.5));
  text-align: left;
}
.source-card .icon,
.deployment .icon,
.case-card .icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(67, 229, 196, 0.08);
  color: var(--teal);
  font-weight: 800;
}
.source-card h3,
.deployment h3,
.case-card h3 {
  margin-top: 22px;
  font-size: 1.1rem;
}
.source-card p,
.deployment p,
.case-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.gate {
  width: min(100%, 760px);
  margin-top: 48px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(157, 123, 255, 0.42);
  border-radius: 22px;
  background: radial-gradient(circle at 50% 0%, rgba(157, 123, 255, 0.12), transparent 60%), var(--panel);
}
.gate .proposal {
  display: inline-block;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.86rem;
}
.gate .arrow {
  display: block;
  margin: 16px auto;
  color: var(--violet);
}
.gate .decision {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 750;
}
.gate .decision span { color: var(--teal); }

.signal-list {
  display: grid;
  gap: 12px;
  width: min(100%, 720px);
  margin-top: 42px;
  text-align: left;
}
.signal {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.signal .check {
  color: var(--teal);
  font-weight: 900;
}
.signal small {
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.boundary {
  width: min(100%, 800px);
  margin-top: 48px;
  padding: clamp(28px, 6vw, 62px);
  border: 1.5px dashed rgba(67, 229, 196, 0.55);
  border-radius: 24px;
  position: relative;
}
.boundary::before {
  content: "your security boundary";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 14px;
  background: var(--bg);
  color: var(--teal);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}
.boundary-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3vw, 30px);
}
.boundary-node {
  display: grid;
  place-items: center;
  min-width: 105px;
  min-height: 80px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  font-size: 0.9rem;
  font-weight: 700;
}
.boundary-arrow { color: var(--violet); }
.outside {
  margin-top: 32px;
  color: var(--dim);
  font-size: 0.9rem;
}
.outside s { text-decoration-color: var(--pink); }

.deployment.featured {
  border-color: rgba(67, 229, 196, 0.48);
  box-shadow: 0 0 45px rgba(67, 229, 196, 0.07);
}
.deployment .tagline {
  display: inline-block;
  margin-top: 18px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.case-card {
  display: flex;
  flex-direction: column;
}
.case-card .industry {
  color: var(--dim);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.case-card .hidden {
  margin-top: 22px;
  min-height: 105px;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
}
.case-card .turn {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.case-card .turn b {
  display: block;
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contrast {
  width: min(100%, 780px);
  margin-top: 46px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.contrast-box {
  min-height: 180px;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  text-align: left;
}
.contrast-box.dimmed { opacity: 0.58; }
.contrast-box h3 { font-size: 1.15rem; }
.contrast-box p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.94rem;
}
.contrast .vs {
  color: var(--dim);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.chapter-next {
  min-height: 72svh;
  background: radial-gradient(circle at 50% 60%, rgba(157, 123, 255, 0.08), transparent 45%);
}
.next-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  color: var(--teal);
  font-weight: 750;
  text-decoration: none;
}
.next-link:hover { gap: 20px; }
.next-link { transition: gap 0.2s ease; }

.end { min-height: 88svh; }
.ctas {
  margin-top: 42px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-block;
  padding: 15px 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), #6ee7f0);
  color: #04121a;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 8px 40px rgba(67, 229, 196, 0.25);
}
.btn:hover { filter: brightness(1.08); }
.btn2 {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}
.btn2:hover {
  color: var(--text);
  border-color: var(--dim);
}

footer {
  padding: 34px 20px 44px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  border-top: 1px solid var(--line);
  background: var(--bg2);
}
footer a { color: var(--muted); }

@media (max-width: 760px) {
  .bar { align-items: center; }
  .mark { font-size: 0; }
  .mark .gem { width: 14px; height: 14px; }
  .bar nav { gap: 14px; font-size: 13px; }
  .bar nav .cta { display: none; }
  .flow,
  .source-grid,
  .deployment-grid,
  .case-grid { grid-template-columns: 1fr; }
  .flow-step { min-height: auto; }
  .flow-step::after {
    content: "↓";
    top: auto;
    bottom: -19px;
    right: 50%;
  }
  .contrast { grid-template-columns: 1fr; }
  .contrast .vs { margin: -7px 0; }
  .boundary-flow { flex-direction: column; }
  .boundary-arrow { transform: rotate(90deg); }
}

@media (max-width: 560px) {
  .ghosts { grid-template-columns: 1fr; }
  .signal { grid-template-columns: 22px 1fr; }
  .signal small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] > *,
  .hero-inner > *,
  .mapviz .edge,
  .mapviz .node {
    opacity: 1;
    transform: none;
    transition: none;
    stroke-dashoffset: 0;
  }
  .in .loopviz .ring,
  .cue::after { animation: none; }
}
