.demo-body,
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

.demo-body {
  --demo-bg: #050b18;
  --demo-panel: rgba(15, 23, 42, 0.78);
  --demo-panel-strong: rgba(15, 23, 42, 0.94);
  --demo-line: rgba(148, 163, 184, 0.24);
  --demo-text: #f8fafc;
  --demo-muted: #a8b5cc;
  --demo-blue: #60a5fa;
  --demo-green: #34d399;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 4%, rgba(34, 197, 94, 0.18), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(37, 99, 235, 0.30), transparent 34%),
    linear-gradient(135deg, #071225 0%, #08111f 44%, #041512 100%);
  color: var(--demo-text);
}

.demo-body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  mask-image: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0.72), transparent);
}

.demo-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(3, 7, 18, 0.88);
  padding: 0 32px;
  backdrop-filter: blur(18px);
}

.demo-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--demo-text);
}

.demo-brand .logo-icon {
  background: transparent;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.28);
}

.demo-brand span:last-child {
  display: grid;
  gap: 2px;
}

.demo-brand strong {
  font-size: 20px;
  line-height: 1;
}

.demo-brand small {
  color: var(--demo-muted);
}

.demo-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-nav a {
  border: 1px solid transparent;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 13px;
  white-space: nowrap;
}

.demo-nav a:hover,
.demo-nav a.active {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(96, 165, 250, 0.12);
  color: #fff;
}

.demo-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-header-actions a {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  color: #dbeafe;
  font-size: 13px;
  font-weight: 900;
  padding: 9px 12px;
  white-space: nowrap;
}

.demo-header-actions a:hover,
.demo-header-actions .demo-header-cta {
  border-color: rgba(52, 211, 153, 0.42);
  background: rgba(34, 197, 94, 0.12);
  color: #fff;
}

.demo-main {
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 82px;
}

.demo-section-block {
  scroll-margin-top: 96px;
}

.demo-section-block + .demo-section-block {
  margin-top: 76px;
}

.demo-hero,
.demo-showcase {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--demo-line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58)),
    radial-gradient(circle at 100% 0%, rgba(96, 165, 250, 0.16), transparent 34%);
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.36);
}

.demo-hero {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(520px, 1.12fr);
  gap: 28px;
  align-items: center;
  padding: 34px;
}

.demo-hero-copy h1,
.demo-section-copy h2 {
  margin: 16px 0;
  color: #fff;
  letter-spacing: 0;
}

.demo-hero-copy h1 {
  max-width: 560px;
  font-size: clamp(42px, 5vw, 74px);
  line-height: 0.94;
}

.demo-hero-copy p,
.demo-section-copy p {
  color: var(--demo-muted);
  font-size: 17px;
  line-height: 1.65;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.demo-hero-preview,
.demo-screen {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.72);
  box-shadow: 0 24px 72px rgba(2, 6, 23, 0.34);
  contain: layout paint;
}

.demo-hero-preview {
  aspect-ratio: 16 / 10;
}

.demo-hero-preview img,
.demo-screen img {
  aspect-ratio: 16 / 10;
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: top left;
}

.demo-hero-preview img {
  height: 100%;
}

.demo-screen img {
  height: auto;
}

.demo-showcase {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(560px, 1.28fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
}

.demo-showcase.reverse {
  grid-template-columns: minmax(560px, 1.28fr) minmax(300px, 0.72fr);
}

.demo-showcase.reverse .demo-section-copy {
  order: 2;
}

.demo-showcase.reverse .demo-screen {
  order: 1;
}

.demo-section-copy h2 {
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1;
}

.demo-screen figcaption {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.56);
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 800;
  padding: 14px 16px;
}

@media (max-width: 1080px) {
  .demo-body,
  html {
    scroll-padding-top: 230px;
  }

  .demo-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 22px;
  }

  .demo-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .demo-header-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .demo-hero,
  .demo-showcase,
  .demo-showcase.reverse {
    grid-template-columns: 1fr;
  }

  .demo-section-block {
    scroll-margin-top: 230px;
  }

  .demo-showcase.reverse .demo-section-copy,
  .demo-showcase.reverse .demo-screen {
    order: initial;
  }
}

@media (max-width: 560px) {
  .demo-hero-copy h1 {
    font-size: 36px;
    line-height: 1.02;
  }
}

@media (max-width: 700px) {
  .demo-main {
    width: min(100% - 28px, 1220px);
    padding-top: 24px;
  }

  .demo-hero,
  .demo-showcase {
    border-radius: 20px;
    padding: 18px;
  }

  .demo-hero-copy h1 {
    font-size: 40px;
  }

  .demo-actions .button {
    width: 100%;
  }
}
