:root {
  --bg: #f4f9ff;
  --bg2: #e5f1ff;
  --panel: #ffffff;
  --text: #0d2235;
  --muted: #4d667d;
  --line: #bfd6ea;
  --accent: #0ea5e9;
  --accent2: #0ea980;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #d8ebff 0%, var(--bg) 45%, #f6fbff 100%);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.16) 0 2px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(16, 169, 128, 0.14) 0 2px, transparent 2px);
  background-size: 42px 42px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 6vw;
  backdrop-filter: blur(10px);
  background: rgba(246, 251, 255, 0.86);
  border-bottom: 1px solid rgba(173, 200, 224, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(132, 173, 203, 0.55);
  background: linear-gradient(160deg, rgba(235, 245, 255, 0.95), rgba(220, 237, 251, 0.95));
  box-shadow: 0 8px 18px rgba(51, 94, 129, 0.16);
}

.brand-mark img {
  width: 30px;
  height: 30px;
  display: block;
}

.brand-copy strong {
  display: block;
  font-size: 0.96rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.75rem;
}

.nav {
  display: flex;
  gap: 14px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav a:hover {
  color: #0b3f66;
}

main {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 26px 0 70px;
}

.hero {
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  align-items: center;
  padding: 30px 0 34px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent2);
}

h1 {
  margin: 0;
  line-height: 1.03;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
}

h1 span {
  color: var(--accent);
  display: block;
}

.lead {
  color: var(--muted);
  line-height: 1.6;
  margin: 20px 0;
  max-width: 62ch;
}

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

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: #ffffff;
}

.btn-ghost {
  border-color: var(--line);
  background: #f8fcff;
}

.hero-tags {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags li {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(125, 174, 210, 0.65);
  color: #1b4f76;
  font-size: 0.82rem;
}

.hero-panel {
  background: linear-gradient(160deg, #ffffff, #eff7ff);
  border: 1px solid rgba(159, 194, 222, 0.7);
  border-radius: 16px;
  padding: 20px;
}

.hero-panel h2 {
  margin: 0 0 10px;
}

.hero-panel ol {
  margin: 0;
  padding-left: 18px;
  color: #244763;
  line-height: 1.6;
}

.panel-note {
  margin-top: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: #4f6f8b;
}

.hero-demo {
  padding: 22px;
  min-height: 360px;
  --demo-cycle: 7.1s;
}

.hero-demo-head h2 {
  margin: 0;
}

.hero-demo-head p {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: #4d667d;
}

.demo-stage {
  margin-top: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.demo-party {
  width: 118px;
  display: grid;
  justify-items: center;
  gap: 7px;
}

.demo-party-icon {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background: #e9f3ff;
  border: 1px solid #c8deef;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.demo-party-icon img {
  width: 39px;
  height: 39px;
  object-fit: contain;
}

.demo-party-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #2b5473;
  text-align: center;
}

.demo-channel {
  position: relative;
  min-height: 164px;
}

.demo-connector {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 62px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #a9c7e1 0%, #8db7db 45%, #a9c7e1 100%);
}

.demo-message {
  position: absolute;
  width: 60px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.demo-message svg {
  width: 29px;
  height: 29px;
}

.demo-origin {
  position: absolute;
  left: 6%;
  width: 50px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.demo-origin-overt {
  top: 18px;
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fecaca;
  animation: demoOriginOvert var(--demo-cycle) ease-in-out infinite;
}

.demo-origin-covert {
  top: 102px;
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  animation: demoOriginCovert var(--demo-cycle) ease-in-out infinite;
}

.demo-merge {
  position: absolute;
  left: 20%;
  top: 57px;
  width: 56px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #224d71;
  background: #e8f3ff;
  border: 1px solid #b9d1ea;
  opacity: 0;
  animation: demoMerge var(--demo-cycle) ease-in-out infinite;
}

.demo-message-single {
  left: 24%;
  top: 46px;
  color: #224d71;
  background: #e8f3ff;
  border: 1px solid #b9d1ea;
  animation: demoSingleTravel var(--demo-cycle) ease-in-out infinite;
}

.demo-message-overt {
  left: 66%;
  top: 60px;
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fecaca;
  animation: demoOvertTravel var(--demo-cycle) ease-in-out infinite;
}

.demo-message-covert {
  left: 66%;
  top: 60px;
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  animation: demoCovertTravel var(--demo-cycle) ease-in-out infinite;
}

.demo-receive {
  position: absolute;
  left: calc(74% + 60px);
  top: 32px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #166534;
  background: #e8fbe7;
  border: 1px solid #b7efb4;
  opacity: 0;
  transform: scale(0.9);
  animation: demoReceive var(--demo-cycle) ease-in-out infinite;
}

.demo-receive svg {
  width: 22px;
  height: 22px;
}

.demo-adversary {
  position: absolute;
  left: 50%;
  top: 108px;
  transform: translateX(-50%) scale(0.9);
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  opacity: 0;
  animation: demoAdversary var(--demo-cycle) ease-in-out infinite;
}

.demo-adversary img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(127, 29, 29, 0.25));
}

.demo-origin svg {
  width: 24px;
  height: 24px;
}

.demo-merge svg {
  width: 24px;
  height: 24px;
}

.demo-legend {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.demo-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid #c8deef;
  background: #f2f8ff;
  color: #2d5877;
}

.demo-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.demo-dot-overt::before { background: #ef4444; }
.demo-dot-covert::before { background: #22c55e; }
.demo-dot-observer::before { background: #b45309; }

.message-model {
  padding-top: 20px;
}

.message-model-card {
  border: 1px solid #c8deef;
  background: linear-gradient(180deg, #ffffff 0%, #f3f9ff 100%);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(52, 96, 132, 0.08);
}

.message-model-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: stretch;
  gap: 16px;
}

.message-model-copy {
  min-width: 0;
}

.message-model-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2.3vw, 1.45rem);
  color: #173f5e;
}

.message-model-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.36rem;
}

.message-step {
  border: 1px solid #c8deef;
  border-radius: 10px;
  background: #f8fcff;
  padding: 5px 8px;
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 6px;
  color: #35556f;
  font-size: 0.87rem;
  font-weight: 500;
  line-height: 1.28;
  opacity: 0.84;
  transform: scale(1);
  transform-origin: left center;
  position: relative;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.message-step-index {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.67rem;
  font-weight: 700;
  color: #1f4d75;
  background: #e2eefb;
  border: 1px solid #b7d2ea;
}

.message-model-image-wrap {
  margin: 0;
  display: grid;
  place-items: center;
}

.message-model-image {
  width: 100%;
  max-width: 470px;
  height: auto;
  display: block;
  border-radius: 10px;
}

.message-model .panel-note {
  margin-top: 12px;
}

.message-model-steps:hover .message-step {
  opacity: 0.34;
  transform: scale(0.98);
}

.message-model-steps .message-step:hover,
.message-model-steps .message-step:focus-within {
  background: #fff3e7;
  border-color: #d97706;
  box-shadow: 0 10px 18px rgba(180, 83, 9, 0.22);
  opacity: 1;
  transform: scale(1.015);
  font-size: 0.94rem;
  font-weight: 700;
}

@media (hover: none) {
  .message-step {
    opacity: 1;
    transform: none;
  }

  .message-model-steps:hover .message-step {
    opacity: 1;
    transform: none;
  }
}

.section {
  padding: 56px 0 8px;
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
}

.section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 74ch;
}

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

.steps {
  display: grid;
  gap: 12px;
}

.steps article {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.steps h3,
.card h3 {
  margin: 0 0 6px;
  font-size: 1.03rem;
}

.steps p,
.card p {
  margin: 0;
  font-size: 0.95rem;
}

.cards h2 {
  margin-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.card {
  background: linear-gradient(175deg, #ffffff, #f2f8ff);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.scenarios .section-kicker {
  margin-bottom: 10px;
}

.scenario-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.scenario-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 14px 26px rgba(45, 92, 130, 0.12);
}

.scenario-mock {
  padding: 14px;
  background: linear-gradient(180deg, #f8fcff 0%, #f1f8ff 100%);
  border-bottom: 1px solid #d8e8f5;
}

.scenario-flow {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.scenario-role-node {
  width: 98px;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #2b5473;
}

.scenario-role-icon {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf4fe;
  border: 1px solid #c8deef;
}

.scenario-role-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.scenario-role-icon img {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
}

.scenario-role-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
}

.scenario-channel {
  position: relative;
  min-height: 96px;
}

.scenario-connector {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 36px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #a9c7e1 0%, #8db7db 45%, #a9c7e1 100%);
}

.scenario-single {
  position: absolute;
  top: 24px;
  left: 10%;
  width: 46px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #224d71;
  background: #e8f3ff;
  border: 1px solid #b9d1ea;
  animation: singleTravel 5.4s ease-in-out infinite;
}

.scenario-single svg {
  width: 23px;
  height: 23px;
  display: block;
}

.scenario-split-msg {
  position: absolute;
  opacity: 0;
  width: 42px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scenario-split-msg svg {
  width: 21px;
  height: 21px;
  display: block;
}

.scenario-split-msg-red {
  left: 66%;
  top: 34px;
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fecaca;
  animation: splitMsgRedTravel 5.4s ease-in-out infinite;
}

.scenario-split-msg-green {
  left: 66%;
  top: 34px;
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  animation: splitMsgGreenTravel 5.4s ease-in-out infinite;
}

.scenario-receiver {
  position: absolute;
  left: calc(72% + 46px);
  top: 10px;
  width: 33px;
  height: 33px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #166534;
  background: #e8fbe7;
  border: 1px solid #b7efb4;
  opacity: 0;
  transform: scale(0.9);
  animation: receiverRead 5.4s ease-in-out infinite;
}

.scenario-receiver svg {
  width: 20px;
  height: 20px;
}

.scenario-adversary {
  position: absolute;
  left: 45%;
  top: 62px;
  transform: translateX(-50%) scale(0.9);
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #7f1d1d;
  opacity: 0;
  animation: adversaryIntercept 5.4s ease-in-out infinite;
}

.scenario-adversary img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(127, 29, 29, 0.25));
}

@keyframes singleTravel {
  0% {
    left: 10%;
    opacity: 0;
  }
  12% {
    opacity: 0.9;
  }
  46% {
    left: 48%;
    opacity: 1;
  }
  54% {
    left: 56%;
    opacity: 0.38;
  }
  92% {
    left: 56%;
    opacity: 0.32;
  }
  100% {
    left: 56%;
    opacity: 0;
  }
}

@keyframes splitMsgRedTravel {
  0%, 54% {
    opacity: 0;
  }
  60% {
    opacity: 1;
    left: 66%;
    top: 34px;
  }
  84%, 92% {
    opacity: 1;
    left: 60%;
    top: 66px;
  }
  100% {
    opacity: 0;
    left: 60%;
    top: 66px;
  }
}

@keyframes splitMsgGreenTravel {
  0%, 54% {
    opacity: 0;
  }
  60% {
    opacity: 1;
    left: 66%;
    top: 34px;
  }
  84%, 92% {
    opacity: 1;
    left: 72%;
    top: 10px;
  }
  100% {
    opacity: 0;
    left: 72%;
    top: 10px;
  }
}

@keyframes receiverRead {
  0%, 78% {
    opacity: 0;
    transform: scale(0.9);
  }
  84%, 94% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(0.9);
  }
}

@keyframes adversaryIntercept {
  0%, 70% {
    opacity: 0;
    transform: translateX(-50%) scale(0.86);
  }
  78%, 95% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.86);
  }
}


.scenario-card figcaption {
  padding: 12px;
  display: grid;
  gap: 4px;
}

.scenario-card strong {
  font-size: 0.94rem;
  color: #153d5d;
}

.scenario-card span {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #4f667b;
}

.status {
  margin-top: 20px;
  padding-bottom: 20px;
}

.footer {
  border-top: 1px solid rgba(43, 72, 96, 0.7);
  margin-top: 24px;
  padding: 22px 6vw 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer a {
  color: #d8ecff;
  text-decoration: none;
}

@media (max-width: 980px) {
  .hero,
  .split,
  .card-grid,
  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 18px;
  }

  .demo-stage {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .demo-party {
    width: 100%;
    justify-items: start;
    grid-template-columns: 44px auto;
    grid-auto-flow: column;
    align-items: center;
  }

  .demo-channel {
    order: 3;
  }

  .message-model {
    padding-top: 14px;
  }

  .message-model-layout {
    grid-template-columns: 1fr;
  }

  .message-model-image {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    flex-wrap: wrap;
    row-gap: 6px;
  }
}

@keyframes demoOriginOvert {
  0%, 6% { opacity: 0; transform: translateX(0); }
  12%, 24% { opacity: 1; transform: translateX(12px); }
  32%, 100% { opacity: 0; transform: translateX(26px); }
}

@keyframes demoOriginCovert {
  0%, 8% { opacity: 0; transform: translateX(0); }
  14%, 26% { opacity: 1; transform: translateX(12px); }
  34%, 100% { opacity: 0; transform: translateX(26px); }
}

@keyframes demoMerge {
  0%, 20% { opacity: 0; transform: scale(0.92); }
  26%, 36% { opacity: 1; transform: scale(1); }
  44%, 100% { opacity: 0; transform: scale(1); }
}

@keyframes demoSingleTravel {
  0%, 38% { left: 24%; opacity: 0; }
  44% { opacity: 0.95; }
  62% { left: 48%; opacity: 1; }
  70% { left: 58%; opacity: 0.4; }
  94% { left: 58%; opacity: 0.32; }
  100% { left: 58%; opacity: 0; }
}

@keyframes demoOvertTravel {
  0%, 62% { opacity: 0; }
  68% { opacity: 1; left: 66%; top: 60px; }
  86%, 94% { opacity: 1; left: 62%; top: 120px; }
  100% { opacity: 0; left: 62%; top: 120px; }
}

@keyframes demoCovertTravel {
  0%, 62% { opacity: 0; }
  68% { opacity: 1; left: 66%; top: 60px; }
  86%, 94% { opacity: 1; left: 74%; top: 32px; }
  100% { opacity: 0; left: 74%; top: 32px; }
}

@keyframes demoReceive {
  0%, 80% { opacity: 0; transform: scale(0.9); }
  88%, 96% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(0.9); }
}

@keyframes demoAdversary {
  0%, 74% { opacity: 0; transform: translateX(-50%) scale(0.86); }
  82%, 96% { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.86); }
}
