.demo-page {
  min-height: 100vh;
  overflow: hidden;
}

.demo-hero {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 148px 0 80px;
  text-align: center;
}

.demo-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 78px 6% auto;
  height: 520px;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.2), transparent 68%);
  filter: blur(20px);
  pointer-events: none;
}

.demo-glow {
  position: absolute;
  z-index: -1;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  pointer-events: none;
}

.demo-glow-left {
  top: 280px;
  left: -160px;
  background: #ec4899;
}

.demo-glow-right {
  top: 160px;
  right: -140px;
  background: #10b981;
}

.demo-hero .eyebrow,
.connected-workflow .eyebrow,
.demo-cta .eyebrow {
  margin-bottom: 18px;
}

.demo-hero h1 {
  max-width: 980px;
  margin: 0 auto;
  font-size: clamp(3.2rem, 7.4vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
  text-wrap: balance;
  background: linear-gradient(112deg, #ffffff 24%, #c4b5fd 62%, #f9a8d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.demo-lead {
  max-width: 720px;
  margin: 28px auto 0;
  color: #c1c8d5;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
  text-wrap: balance;
}

.tool-count-callout {
  width: fit-content;
  max-width: 100%;
  margin: 32px auto 0;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  border: 1px solid rgba(167, 139, 250, 0.4);
  border-radius: 16px;
  background:
    linear-gradient(120deg, rgba(99, 102, 241, 0.22), rgba(236, 72, 153, 0.15)),
    rgba(14, 15, 21, 0.92);
  box-shadow:
    0 12px 38px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(139, 92, 246, 0.14);
  color: #ffffff;
  line-height: 1;
}

.tool-count-number {
  font-family: Outfit, Inter, sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #c4b5fd, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tool-count-divider {
  color: #737d90;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tool-count-callout strong {
  margin-left: 3px;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tool-count-note {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  color: #9ca6b7;
  font-size: 0.76rem;
  font-weight: 600;
}

.workflow-path {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px auto 40px;
  padding: 0;
  list-style: none;
}

.workflow-path li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #d9deea;
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.workflow-path li span {
  color: #a78bfa;
  font-size: 0.7rem;
}

.video-showcase {
  margin-top: 2px;
}

.selected-video-heading {
  width: min(100%, 1020px);
  margin: 0 auto 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 44px;
  align-items: end;
  text-align: left;
}

.selected-video-kicker {
  margin-bottom: 8px;
  color: #c4b5fd;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selected-video-heading h2 {
  font-size: clamp(1.7rem, 3.1vw, 2.65rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.selected-video-heading > p {
  padding-bottom: 3px;
  color: #aab3c2;
  font-size: 0.92rem;
  line-height: 1.65;
}

.demo-video-frame {
  position: relative;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 25px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.025)),
    #0b0c11;
  box-shadow:
    0 38px 100px rgba(0, 0, 0, 0.65),
    0 0 70px rgba(99, 102, 241, 0.16);
}

.demo-window-bar {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px 15px 0 0;
  background: rgba(8, 9, 13, 0.88);
  pointer-events: none;
}

.demo-window-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ec4899;
}

.demo-window-bar span:nth-child(2) {
  background: #8b5cf6;
}

.demo-window-bar span:nth-child(3) {
  background: #10b981;
}

.demo-window-bar strong {
  margin-left: 5px;
  color: #8e98aa;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-video-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #020204;
  object-fit: contain;
}

.video-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(7, 8, 12, 0.78);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.video-arrow:hover,
.video-arrow:focus-visible {
  border-color: rgba(167, 139, 250, 0.72);
  background: rgba(78, 55, 135, 0.85);
  transform: translateY(-50%) scale(1.04);
}

.video-arrow span {
  margin-top: -5px;
  font-family: Outfit, Inter, sans-serif;
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1;
}

.video-arrow-prev {
  left: 24px;
}

.video-arrow-next {
  right: 24px;
}

.video-note {
  margin-top: 17px;
  color: #788396;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.video-note span:first-child {
  color: #a78bfa;
}

.video-selector {
  width: 100%;
  margin-top: 22px;
  padding: 2px 2px 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.6) transparent;
}

.video-selector-card {
  position: relative;
  min-width: 0;
  padding: 8px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  overflow: hidden;
  scroll-snap-align: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background: rgba(19, 21, 28, 0.8);
  color: #ffffff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.video-selector-card:hover {
  border-color: rgba(167, 139, 250, 0.42);
  background: rgba(29, 29, 42, 0.94);
  transform: translateY(-2px);
}

.video-selector-card.is-active {
  border-color: rgba(167, 139, 250, 0.76);
  background:
    linear-gradient(125deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.08)),
    rgba(24, 24, 35, 0.96);
  box-shadow: 0 10px 30px rgba(45, 32, 85, 0.32);
}

.video-selector-card img {
  width: 112px;
  height: 63px;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  object-fit: cover;
  background: #08090c;
}

.selector-card-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.selector-card-copy strong {
  overflow: hidden;
  font-size: 0.79rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selector-card-copy small {
  overflow: hidden;
  color: #8f99aa;
  font-size: 0.69rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selector-duration {
  position: absolute;
  top: 12px;
  left: 84px;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(4, 5, 8, 0.82);
  color: #e5e7eb;
  font-size: 0.61rem;
  font-weight: 700;
}

.connected-workflow {
  width: min(1080px, calc(100% - 48px));
  margin: 20px auto 0;
  padding: 90px 0 110px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: start;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.connected-workflow h2,
.demo-cta h2 {
  font-size: clamp(2.3rem, 4.8vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.workflow-copy {
  padding-top: 42px;
}

.workflow-copy > p {
  color: #abb4c3;
  font-size: 1.04rem;
  line-height: 1.7;
}

.workflow-copy ul {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.workflow-copy li {
  position: relative;
  padding-left: 27px;
  color: #e4e7ee;
  font-size: 0.94rem;
}

.workflow-copy li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #34d399;
  font-weight: 800;
}

.demo-cta {
  position: relative;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto 100px;
  padding: clamp(56px, 8vw, 88px) 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(236, 72, 153, 0.2), transparent 35%),
    radial-gradient(circle at 88% 100%, rgba(16, 185, 129, 0.14), transparent 38%),
    rgba(19, 21, 28, 0.84);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  text-align: center;
}

.demo-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.035), transparent 45%);
}

.demo-cta h2 {
  max-width: 760px;
  margin: 0 auto;
}

.demo-cta > p:not(.eyebrow) {
  max-width: 620px;
  margin: 20px auto 0;
  color: #aeb7c6;
  font-size: 1.03rem;
}

.demo-cta-actions {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.demo-cta-actions .btn-primary,
.demo-cta-actions .btn-secondary {
  min-width: 190px;
  justify-content: center;
}

.discord-button {
  gap: 9px;
}

.discord-button span {
  color: #a78bfa;
  font-size: 1.15rem;
}

@media (max-width: 760px) {
  .demo-hero {
    width: min(100% - 28px, 1180px);
    padding-top: 112px;
    padding-bottom: 56px;
  }

  .demo-hero h1 {
    max-width: none;
    font-size: clamp(2.8rem, 14vw, 4.2rem);
    line-height: 0.98;
  }

  .demo-lead {
    margin-top: 22px;
    font-size: 1rem;
  }

  .tool-count-callout {
    gap: 7px;
    margin-top: 26px;
    padding: 12px 14px;
  }

  .tool-count-callout strong {
    font-size: 0.78rem;
  }

  .tool-count-note {
    width: 100%;
    padding: 8px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
  }

  .workflow-path {
    gap: 7px;
    margin: 28px auto 30px;
  }

  .workflow-path li {
    min-height: 34px;
    padding: 0 11px;
    font-size: 0.73rem;
  }

  .demo-video-frame {
    padding: 5px;
    border-radius: 14px;
  }

  .demo-window-bar {
    display: none;
  }

  .demo-video-frame video {
    border-radius: 10px;
  }

  .selected-video-heading {
    margin-bottom: 18px;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .selected-video-heading h2 {
    font-size: clamp(1.55rem, 7.5vw, 2rem);
  }

  .selected-video-heading > p {
    font-size: 0.85rem;
  }

  .video-arrow {
    top: 47%;
    width: 34px;
    height: 46px;
    border-radius: 10px;
  }

  .video-arrow span {
    font-size: 2rem;
  }

  .video-arrow-prev {
    left: 10px;
  }

  .video-arrow-next {
    right: 10px;
  }

  .video-selector {
    margin-top: 17px;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(82vw, 300px);
    justify-content: start;
  }

  .video-selector-card {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .video-selector-card img {
    width: 94px;
    height: 53px;
  }

  .selector-duration {
    left: 69px;
  }

  .connected-workflow {
    width: min(100% - 32px, 1080px);
    padding: 64px 0 76px;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .connected-workflow h2,
  .demo-cta h2 {
    font-size: clamp(2.15rem, 10vw, 3.2rem);
  }

  .workflow-copy {
    padding-top: 0;
  }

  .demo-cta {
    width: min(100% - 28px, 1080px);
    margin-bottom: 64px;
    padding: 54px 20px;
    border-radius: 20px;
  }

  .demo-cta-actions {
    flex-direction: column;
  }

  .demo-cta-actions .btn-primary,
  .demo-cta-actions .btn-secondary {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-glow {
    display: none;
  }
}
