:root {
  --ink: #0d1b2a;
  --muted: #657386;
  --line: #e8edf3;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --green: #00c2a8;
  --blue: #2563eb;
  --cyan: #0ea5b7;
  --gold: #b7791f;
  --shadow: 0 24px 70px rgba(31, 45, 61, 0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #f8fafc;
  color: var(--ink);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body {
  overflow: hidden;
}

button,
textarea {
  font: inherit;
}

.demo-shell {
  position: relative;
  min-height: 100vh;
  padding: 28px clamp(18px, 4vw, 56px);
  background:
    radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.09), transparent 28%),
    radial-gradient(circle at 84% 30%, rgba(18, 166, 122, 0.1), transparent 30%),
    linear-gradient(145deg, #ffffff 0%, #f6f8fb 47%, #eef4f7 100%);
  isolation: isolate;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(16, 32, 51, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 51, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 86%);
}

.particle-field {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.particle-field span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.34);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.25);
  animation: drift 15s linear infinite;
}

.particle-field span:nth-child(1) {
  left: 12%;
  top: 23%;
}

.particle-field span:nth-child(2) {
  left: 24%;
  top: 72%;
  animation-delay: -5s;
  background: rgba(18, 166, 122, 0.34);
}

.particle-field span:nth-child(3) {
  left: 38%;
  top: 18%;
  animation-delay: -8s;
}

.particle-field span:nth-child(4) {
  left: 46%;
  top: 66%;
  animation-delay: -3s;
  background: rgba(14, 165, 183, 0.34);
}

.particle-field span:nth-child(5) {
  left: 61%;
  top: 25%;
  animation-delay: -10s;
}

.particle-field span:nth-child(6) {
  left: 68%;
  top: 78%;
  animation-delay: -1s;
  background: rgba(18, 166, 122, 0.34);
}

.particle-field span:nth-child(7) {
  left: 78%;
  top: 44%;
  animation-delay: -6s;
}

.particle-field span:nth-child(8) {
  left: 86%;
  top: 16%;
  animation-delay: -12s;
  background: rgba(14, 165, 183, 0.34);
}

.particle-field span:nth-child(9) {
  left: 8%;
  top: 52%;
  animation-delay: -4s;
  background: rgba(18, 166, 122, 0.34);
}

.particle-field span:nth-child(10) {
  left: 92%;
  top: 70%;
  animation-delay: -9s;
}

.topbar,
.control-strip {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-mark,
.ending-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-symbol {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: url("assets/neosmartflow-mark.svg") center / contain no-repeat;
  filter: drop-shadow(0 10px 18px rgba(37, 99, 235, 0.16));
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.topbar-actions a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.topbar-actions a:hover {
  color: var(--blue);
}

.demo-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(18, 166, 122, 0.12);
}

.stage {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  min-height: calc(100vh - 148px);
  gap: clamp(22px, 4vw, 64px);
}

.story-rail {
  display: grid;
  gap: 10px;
}

.story-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-left: 2px solid var(--line);
  color: #8a95a5;
  font-size: 13px;
  font-weight: 700;
  transition:
    color 320ms ease,
    border-color 320ms ease,
    transform 320ms ease;
}

.story-step span {
  color: #a3adbb;
  font-size: 11px;
}

.story-step.is-active {
  border-color: var(--blue);
  color: var(--ink);
  transform: translateX(6px);
}

.scene-panel {
  position: absolute;
  inset: 8% 0 8% 230px;
  display: grid;
  align-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 520ms ease,
    transform 520ms ease,
    visibility 520ms ease;
}

.scene-panel.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.opening-panel {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
  align-items: center;
  gap: clamp(26px, 5vw, 82px);
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 5.8vw, 76px);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  max-width: 900px;
  font-size: clamp(32px, 4vw, 60px);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(22px, 2vw, 30px);
}

.subtitle {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(19px, 2.05vw, 28px);
  line-height: 1.24;
  font-weight: 600;
}

.subtitle-secondary {
  margin-top: 18px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.command-card,
.workflow-board,
.receipt,
.asset-card,
.alert-card,
.metric-card,
.flow-card {
  border: 1px solid rgba(222, 228, 235, 0.9);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.command-card {
  display: grid;
  gap: 18px;
  justify-self: end;
  width: min(100%, 380px);
  padding: clamp(24px, 3vw, 34px);
  border-radius: 8px;
}

.monica-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: #102033;
  color: #fff;
  font-weight: 800;
}

.monica-profile strong {
  display: block;
  margin-bottom: 4px;
}

.monica-profile span,
.command-label,
.receipt span,
.metric-card span,
.asset-topline span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 154px;
  resize: none;
  padding: 18px;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  outline: none;
  background: #fbfdff;
  color: var(--ink);
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.35;
  font-weight: 650;
}

.primary-action,
.control-strip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.primary-action {
  min-height: 48px;
}

.primary-action:hover,
.control-strip button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(16, 32, 51, 0.18);
}

.play-icon {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #fff;
}

.panel-heading {
  margin-bottom: 26px;
}

.panel-heading p:not(.eyebrow) {
  max-width: 720px;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.5;
}

.centered {
  text-align: center;
}

.centered h2,
.centered p {
  margin-right: auto;
  margin-left: auto;
}

.workflow-board {
  display: grid;
  grid-template-columns: minmax(330px, 0.9fr) minmax(360px, 1fr);
  gap: 24px;
  padding: clamp(16px, 2.2vw, 28px);
  border-radius: 8px;
}

.operating-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(145px, 1fr));
  gap: 14px;
}

.flow-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 18px;
  border-radius: 8px;
  background: var(--panel-strong);
  overflow: hidden;
}

.flow-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -24px;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.flow-card.active {
  background: #102033;
  border-color: #102033;
}

.flow-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.flow-card.active span,
.flow-card.active strong {
  color: #fff;
}

.flow-card strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.15;
}

.flow-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.flow-card.active small {
  color: #b9c4d4;
}

.agent-lines {
  display: grid;
  gap: 8px;
  min-height: 280px;
}

.agent-line {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 88px;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px;
  border: 1px solid #e4eaf1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0;
  transform: translateY(10px);
  animation: riseIn 460ms ease forwards;
}

.agent-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eef5ff;
  color: var(--blue);
  font-weight: 800;
}

.agent-line strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.agent-line small {
  color: var(--muted);
  font-weight: 600;
}

.agent-progress {
  height: 7px;
  border-radius: 999px;
  background: #e8eef5;
  overflow: hidden;
}

.agent-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transform-origin: left;
  animation: fillBar 900ms ease forwards;
}

.route-map {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  align-items: center;
  min-height: 280px;
  padding: 22px;
  border: 1px solid #e5ebf2;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(16, 32, 51, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(16, 32, 51, 0.045) 1px, transparent 1px),
    rgba(250, 252, 255, 0.84);
  background-size: 34px 34px;
  overflow: hidden;
}

.city {
  position: relative;
  z-index: 2;
  padding: 15px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(16, 32, 51, 0.1);
}

.city strong,
.city span {
  display: block;
}

.city span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.route-line {
  position: relative;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.route-pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  border: 4px solid var(--green);
  transform: translateY(-50%);
  animation: routeMove 2.2s ease-in-out infinite;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
}

.metric-card {
  display: grid;
  gap: 10px;
  min-height: 184px;
  padding: clamp(18px, 2vw, 24px);
  border-radius: 8px;
  background: var(--panel-strong);
}

.metric-card strong {
  display: block;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1;
}

.metric-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.metric-card.pass strong,
.metric-card.low strong {
  color: var(--green);
}

.execution-panel {
  justify-items: center;
}

.success-orb {
  display: grid;
  place-items: center;
  width: 106px;
  height: 106px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: rgba(18, 166, 122, 0.12);
  box-shadow: 0 0 0 18px rgba(18, 166, 122, 0.08);
}

.success-orb span {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--green);
  position: relative;
}

.success-orb span::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 11px;
  width: 14px;
  height: 22px;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: rotate(42deg);
}

.receipt {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 1px;
  width: min(960px, 100%);
  overflow: hidden;
  border-radius: 8px;
  background: #e3eaf2;
}

.receipt div {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 18px;
  background: #fff;
}

.receipt strong {
  font-size: 16px;
}

.asset-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 20px;
}

.asset-card,
.alert-card {
  border-radius: 8px;
  background: var(--panel-strong);
  padding: clamp(22px, 3vw, 34px);
}

.asset-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.asset-topline strong {
  font-size: 28px;
}

.asset-visual {
  position: relative;
  height: 220px;
  margin-bottom: 20px;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), transparent 48%),
    linear-gradient(45deg, rgba(18, 166, 122, 0.14), transparent 55%),
    #f7fbff;
  overflow: hidden;
}

.asset-visual span {
  position: absolute;
  border: 1px solid rgba(16, 32, 51, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 36px rgba(16, 32, 51, 0.09);
}

.asset-visual span:nth-child(1) {
  left: 28px;
  top: 28px;
  width: 128px;
  height: 162px;
}

.asset-visual span:nth-child(2) {
  right: 32px;
  top: 46px;
  width: 156px;
  height: 42px;
}

.asset-visual span:nth-child(3) {
  right: 32px;
  top: 112px;
  width: 116px;
  height: 42px;
  background: rgba(18, 166, 122, 0.12);
}

.asset-card p,
.alert-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

.alert-label {
  display: inline-flex;
  margin-bottom: 28px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(183, 121, 31, 0.12);
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.ending-panel {
  justify-items: center;
  text-align: center;
}

.ending-panel p {
  max-width: 820px;
  color: var(--muted);
  font-size: clamp(24px, 3.4vw, 48px);
  line-height: 1.1;
  font-weight: 750;
}

.ending-panel h2 {
  margin-bottom: 44px;
  max-width: 980px;
}

.ending-brand {
  font-size: 22px;
}

.control-strip {
  gap: 16px;
}

.control-strip button {
  min-width: 84px;
  min-height: 40px;
}

.progress-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(16, 32, 51, 0.08);
  overflow: hidden;
}

.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.timer {
  min-width: 48px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0.3;
  }

  50% {
    transform: translate3d(28px, -42px, 0);
    opacity: 0.75;
  }

  100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.3;
  }
}

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fillBar {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes routeMove {
  0%,
  100% {
    left: 0;
  }

  50% {
    left: calc(100% - 16px);
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .demo-shell {
    min-height: 100svh;
  }

  .stage {
    display: block;
    min-height: 780px;
    padding-top: 40px;
  }

  .story-rail {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 24px;
  }

  .story-step {
    display: grid;
    align-content: center;
    min-height: 60px;
    border-left: 0;
    border-top: 2px solid var(--line);
    padding: 9px 6px;
    font-size: 11px;
  }

  .story-step.is-active {
    transform: translateY(-3px);
  }

  .scene-panel {
    inset: 130px 0 40px;
  }

  .opening-panel,
  .workflow-board,
  .asset-layout {
    grid-template-columns: 1fr;
  }

  .operating-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .receipt {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .demo-shell {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    gap: 14px;
  }

  .demo-status {
    display: none;
  }

  .stage {
    min-height: 1030px;
  }

  .story-rail {
    grid-template-columns: 1fr;
  }

  .story-step {
    min-height: 36px;
    display: flex;
  }

  .scene-panel {
    inset: 344px 0 54px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 34px;
  }

  .decision-grid,
  .receipt,
  .operating-flow {
    grid-template-columns: 1fr;
  }

  .flow-card {
    min-height: 112px;
  }

  .metric-card {
    min-height: 138px;
  }

  .route-map {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .route-line {
    height: 72px;
    width: 3px;
    margin: 0 auto;
  }

  .route-pulse {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-name: routeMoveVertical;
  }
}

@keyframes routeMoveVertical {
  0%,
  100% {
    top: 0;
  }

  50% {
    top: calc(100% - 16px);
  }
}
