:root {
  --header-height: 64px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-height);
  padding: 0 clamp(20px, 3vw, 40px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(9, 9, 11, .86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  background: linear-gradient(90deg, #fff, #a78bfa);
  color: transparent;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
  background-clip: text;
  -webkit-background-clip: text;
}

.brand svg {
  flex: none;
  color: #8b5cf6;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, .4));
}

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

.access-link,
.header-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.access-link {
  padding: 8px 14px;
  color: #cbd5e1;
}

.access-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.header-buy {
  padding: 8px 18px;
  border: 1px solid rgba(167, 139, 250, .45);
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 8px 22px rgba(109, 40, 217, .25);
}

.header-buy:hover {
  border-color: rgba(255, 255, 255, .55);
  box-shadow: 0 10px 26px rgba(109, 40, 217, .42);
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: calc(100svh - var(--header-height));
  min-height: 720px;
  padding: 28px 20px 20px;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.hero-copy {
  flex: none;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  max-width: 840px;
  margin: 0 auto 14px;
  font-size: clamp(38px, 5.2vw, 64px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.055em;
}

.stationary-3d-text {
  display: inline-block;
  padding-bottom: 4px;
  text-shadow: 0 5px 15px rgba(167, 139, 250, .4);
}

.animated-3d-text-premium {
  display: inline-block;
  min-height: 1.12em;
  padding-bottom: 4px;
  perspective: 1000px;
  transform-style: preserve-3d;
  animation: hero-float 6s ease-in-out infinite alternate;
}

#heroAnimatedWord {
  display: inline-block;
  min-width: 3.8ch;
  transition: opacity .4s ease, transform .4s ease;
}

.gold-shimmer {
  background: linear-gradient(90deg, #f59e0b, #fde68a, #fbbf24, #fff7cc, #f59e0b);
  background-size: 240% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  animation: gold-shimmer 5s linear infinite;
}

.gradient-text {
  display: inline-block;
  background: linear-gradient(90deg, #a78bfa, #f472b6);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-sub {
  max-width: 760px;
  margin: 0 auto;
  color: #cbd5e1;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.6;
}

.proof-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  margin-top: 18px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.proof-badge-icon {
  display: inline-flex;
  color: #fbbf24;
}

.proof-badge-icon,
#badgeRotatorText {
  transition: opacity .25s ease, transform .25s ease;
}

.demo-heading {
  margin: 18px 0 2px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
}

.demo-carousel-wrapper {
  --demo-card-width: 142px;
  --demo-card-height: 252px;
  --demo-carousel-gap: 16px;
  --demo-carousel-pad: 14px;
  position: relative;
  width: min(760px, 100%);
  height: calc(var(--demo-card-height) + (var(--demo-carousel-pad) * 2));
  margin: 0 auto;
  overflow: hidden;
}

.demo-carousel-wrapper::before,
.demo-carousel-wrapper::after {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  width: 42px;
  content: '';
  pointer-events: none;
}

.demo-carousel-wrapper::before {
  left: 0;
  background: linear-gradient(90deg, #09090b, transparent);
}

.demo-carousel-wrapper::after {
  right: 0;
  background: linear-gradient(270deg, #09090b, transparent);
}

.demo-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  padding: var(--demo-carousel-pad) 2px;
  overflow-x: auto;
  overflow-y: clip;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  cursor: grab;
  contain: layout paint style;
  touch-action: pan-x pan-y;
}

.demo-carousel::-webkit-scrollbar {
  display: none;
}

.demo-carousel.is-dragging {
  cursor: grabbing;
}

.demo-carousel-virtual-spacer {
  display: block;
  height: 1px;
  pointer-events: none;
}

.demo-vid-card {
  position: absolute;
  top: var(--demo-carousel-pad);
  width: var(--demo-card-width);
  height: var(--demo-card-height);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: #000;
  color: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .35);
  cursor: pointer;
  contain: layout paint style;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), border-color .3s ease, box-shadow .3s ease, opacity .3s ease;
}

.demo-vid-card:hover {
  z-index: 2;
  border-color: rgba(139, 92, 246, .65);
  transform: translateY(-7px) scale(1.035);
  box-shadow: 0 20px 38px rgba(0, 0, 0, .5), 0 0 26px rgba(139, 92, 246, .28);
}

.demo-vid-card video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-play-btn-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.8);
  transition: opacity .25s ease, transform .25s ease;
  backdrop-filter: blur(6px);
}

.demo-vid-card:hover .demo-play-btn-overlay,
.demo-vid-card:focus-visible .demo-play-btn-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.demo-vid-label {
  position: absolute;
  inset: auto 0 0;
  padding: 26px 8px 9px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .84), transparent);
  color: rgba(255, 255, 255, .8);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.3;
  text-transform: uppercase;
  pointer-events: none;
}

.carousel-hint {
  margin: -4px auto 0;
  color: #94a3b8;
  font-size: 11px;
}

.hero-cta {
  position: relative;
  z-index: 10;
  display: flex;
  flex: none;
  justify-content: center;
  padding-top: 8px;
}

.hero-buy,
.demo-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid rgba(167, 139, 250, .55);
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(109, 40, 217, .3);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.hero-buy:hover,
.demo-action-btn:hover {
  border-color: rgba(255, 255, 255, .6);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(109, 40, 217, .46);
}

.dynamic-bg-container {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  background: #09090b;
  pointer-events: none;
}

.dynamic-bg-container::after {
  position: absolute;
  z-index: 8;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, transparent 0, rgba(9, 9, 11, .2) 45%, rgba(9, 9, 11, .72) 100%);
  content: '';
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .18;
  animation: ambient-drift 18s ease-in-out infinite alternate;
}

.bg-glow-1 {
  top: -25%;
  left: 18%;
  width: 58vw;
  height: 58vw;
  background: #7c3aed;
}

.bg-glow-2 {
  right: -12%;
  bottom: -28%;
  width: 48vw;
  height: 48vw;
  background: #db2777;
  animation-delay: -8s;
}

.space-starfield,
.bg-particles,
.bg-keywords,
.bg-floating-sites,
.bg-grid {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.space-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: star-twinkle var(--star-speed, 7s) ease-in-out infinite alternate;
}

.bg-keyword {
  position: absolute;
  padding: 5px 12px;
  border: 1px solid rgba(139, 92, 246, .16);
  border-radius: 999px;
  background: rgba(139, 92, 246, .08);
  color: rgba(248, 250, 252, .42);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: keyword-float var(--float-speed, 28s) ease-in-out infinite;
}

.bg-particle {
  position: absolute;
  top: -5%;
  border-radius: 50%;
  background: rgba(139, 92, 246, .45);
  animation: particle-fall var(--fall-speed, 22s) linear infinite;
}

.space-shooting-star {
  position: absolute;
  width: 72px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(-45deg, rgba(255, 255, 255, .75), transparent);
  opacity: 0;
  animation: shooting-star 18s ease-in-out infinite;
}

.s-star-1 { top: 15%; left: 72%; }
.s-star-2 { top: 38%; left: 88%; animation-delay: 7s; animation-duration: 25s; }

.bg-grid {
  opacity: .18;
  background-image: linear-gradient(rgba(139, 92, 246, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(139, 92, 246, .08) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at center, #000, transparent 74%);
}

.bg-site-card {
  position: absolute;
  width: var(--site-width);
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, .18);
  border-radius: 10px;
  background: rgba(15, 17, 23, .82);
  opacity: .5;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .4);
  transform: rotate(var(--site-rotation));
  animation: site-float var(--site-speed) ease-in-out infinite;
}

.bg-site-card video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.bg-site-card span {
  position: absolute;
  bottom: 6px;
  left: 50%;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(139, 92, 246, .35);
  color: rgba(255, 255, 255, .75);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.modal-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .78);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
  backdrop-filter: blur(12px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-box {
  position: relative;
  width: min(820px, 100%);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  background: #09090b;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .75);
  transform: translateY(18px) scale(.97);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}

.modal-overlay.active .modal-box {
  transform: none;
}

.modal-close-btn {
  position: absolute;
  z-index: 20;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  background: rgba(9, 9, 11, .72);
  color: #fff;
  cursor: pointer;
}

.demo-preview-content {
  display: grid;
  grid-template-columns: minmax(300px, 1.1fr) 1fr;
  min-height: 520px;
}

.demo-preview-video-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 680px;
  overflow: hidden;
  background: #000;
}

.demo-preview-video-container video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.demo-nav-btn {
  position: absolute;
  z-index: 10;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
}

.demo-nav-btn:hover {
  background: rgba(124, 58, 237, .9);
}

.demo-nav-btn.prev { left: 12px; }
.demo-nav-btn.next { right: 12px; }

.demo-preview-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 38px;
  background: linear-gradient(135deg, #09090b, #111115);
  color: #fff;
}

.demo-badge {
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 5px 10px;
  border: 1px solid rgba(139, 92, 246, .3);
  border-radius: 999px;
  background: rgba(139, 92, 246, .14);
  color: #c084fc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.demo-preview-details h2 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: -.02em;
}

.demo-description {
  margin: 0 0 22px;
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.6;
}

.demo-features {
  display: grid;
  gap: 11px;
  margin: 0 0 28px;
  padding: 0;
  color: #e4e4e7;
  font-size: 13px;
  list-style: none;
}

.demo-features li {
  position: relative;
  padding-left: 24px;
}

.demo-features li::before {
  position: absolute;
  left: 2px;
  color: #34d399;
  content: '✓';
  font-weight: 800;
}

.demo-action-btn {
  width: 100%;
}

body.modal-open {
  overflow: hidden;
}

@keyframes hero-float {
  0% { transform: perspective(1000px) rotateX(8deg) rotateY(-4deg) translateZ(8px); }
  50% { transform: perspective(1000px) rotateX(-4deg) rotateY(4deg) translateZ(20px); }
  100% { transform: perspective(1000px) rotateX(4deg) rotateY(8deg) translateZ(12px); }
}

@keyframes gold-shimmer {
  to { background-position: 240% center; }
}

@keyframes ambient-drift {
  to { transform: translate3d(7vw, 5vh, 0) scale(1.08); }
}

@keyframes star-twinkle {
  0%, 100% { opacity: .18; transform: scale(.85); }
  50% { opacity: .9; transform: scale(1.15); }
}

@keyframes keyword-float {
  0%, 100% { transform: rotate(var(--float-rotation)) translate3d(0, 0, 0); }
  50% { transform: rotate(calc(var(--float-rotation) + 2deg)) translate3d(12px, -22px, 0); }
}

@keyframes particle-fall {
  0% { opacity: 0; transform: translate3d(0, -10vh, 0); }
  10%, 90% { opacity: .45; }
  100% { opacity: 0; transform: translate3d(var(--particle-drift), 110vh, 0); }
}

@keyframes shooting-star {
  0%, 10%, 100% { opacity: 0; transform: translate3d(150px, -150px, 0) rotate(-45deg) scaleX(0); }
  3% { opacity: 1; transform: translate3d(40px, -40px, 0) rotate(-45deg) scaleX(1); }
  8% { opacity: 0; transform: translate3d(-200px, 200px, 0) rotate(-45deg) scaleX(0); }
}

@keyframes site-float {
  0%, 100% { transform: rotate(var(--site-rotation)) translate3d(0, 0, 0); }
  50% { transform: rotate(calc(var(--site-rotation) + 2deg)) translate3d(0, -18px, 0); }
}

@media (max-width: 767px) {
  :root { --header-height: 58px; }

  .site-header { gap: 8px; padding-inline: 14px; }
  .brand { gap: 0; }
  .brand span { display: none; }
  .header-actions { gap: 4px; }
  .access-link { padding-inline: 9px; }
  .header-buy { padding-inline: 12px; font-size: 12px; }

  .hero {
    min-height: 700px;
    padding: 16px 14px 12px;
  }

  .hero-title {
    margin-bottom: 10px;
    font-size: clamp(31px, 9.1vw, 42px);
    line-height: 1.08;
  }

  .hero-sub {
    max-width: 46ch;
    font-size: 14px;
    line-height: 1.5;
  }

  .proof-badge {
    min-height: 34px;
    margin-top: 12px;
    padding: 6px 12px;
    font-size: 11px;
  }

  .demo-heading { margin-top: 12px; font-size: 12px; }

  .demo-carousel-wrapper {
    --demo-card-width: clamp(120px, 34vw, 146px);
    --demo-card-height: clamp(213px, 60.44vw, 260px);
    --demo-carousel-gap: 10px;
    --demo-carousel-pad: 5px;
  }

  .carousel-hint { max-width: 52ch; padding-inline: 12px; line-height: 1.35; }
  .hero-cta { padding-top: 5px; }
  .hero-buy { min-height: 44px; padding: 9px 17px; font-size: 13px; }

  .space-starfield,
  .space-shooting-star,
  .bg-floating-sites {
    display: none;
  }

  .ambient-glow { filter: blur(65px); opacity: .1; animation: none; }
  .bg-keyword { padding: 4px 9px; font-size: 8px; }

  .modal-overlay {
    align-items: flex-start;
    padding: 12px;
    background: rgba(0, 0, 0, .9);
    backdrop-filter: none;
  }

  .modal-box { max-height: calc(100dvh - 24px); }
  .demo-preview-content { grid-template-columns: 1fr; min-height: 0; }
  .demo-preview-video-container { height: min(50dvh, 390px); }
  .demo-preview-details { padding: 22px 20px 24px; }
  .demo-description { margin-bottom: 16px; }
  .demo-features { margin-bottom: 20px; }
}

@media (max-height: 780px) and (min-width: 768px) {
  .hero { min-height: 650px; padding-top: 16px; }
  .hero-title { font-size: clamp(36px, 4.4vw, 52px); line-height: 1.05; }
  .hero-sub { font-size: 15px; }
  .proof-badge { margin-top: 10px; }
  .demo-heading { margin-top: 10px; }
  .demo-carousel-wrapper {
    --demo-card-width: 122px;
    --demo-card-height: 217px;
    --demo-carousel-pad: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animated-3d-text-premium,
  .gold-shimmer,
  .ambient-glow,
  .space-star,
  .bg-keyword,
  .bg-particle,
  .space-shooting-star,
  .bg-site-card {
    animation: none !important;
    transform: none;
  }

  #heroAnimatedWord,
  .proof-badge-icon,
  #badgeRotatorText,
  .demo-vid-card,
  .modal-box {
    transition: none;
  }
}
