html,
body {
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at 12% 16%, rgba(83, 208, 255, 0.18), transparent 20%),
    radial-gradient(circle at 84% 18%, rgba(255, 157, 126, 0.12), transparent 16%),
    linear-gradient(180deg, #071019 0%, #09131d 56%, #071019 100%);
  background-image:
    linear-gradient(rgba(147, 196, 228, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 196, 228, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
}

main {
  position: relative;
}

.hero-section {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 62% 52% at 15% 42%, rgba(83, 208, 255, 0.16) 0%, transparent 60%),
    radial-gradient(ellipse 55% 65% at 84% 52%, rgba(46, 156, 255, 0.11) 0%, transparent 60%),
    radial-gradient(ellipse 80% 45% at 50% 85%, rgba(255, 157, 126, 0.08) 0%, transparent 60%),
    var(--color-bg-primary);
  animation: heroBgDrift 25s ease-in-out infinite alternate;
}

@keyframes heroBgDrift {
  0%   { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

.hero-noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  opacity: 0.4;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 80px;
  width: min(100%, var(--max-width));
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

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

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-screenshot-card img {
  width: 100%;
  aspect-ratio: 10 / 18;
  object-fit: contain;
  object-position: center top;
  padding-top: 18px;
}

#pain-points {
  background: var(--color-bg-secondary);
}

.pain-heading {
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  text-align: center;
}

.pain-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

#workflow {
  position: relative;
}

.workflow-heading,
.gallery-heading,
.features-heading,
.cta-heading {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.workflow-heading .section-title {
  background: linear-gradient(135deg, #f8fbff 0%, #8fddff 52%, #ffb39a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.workflow-heading .section-subtitle {
  background: linear-gradient(135deg, #f8fbff 0%, #8fddff 52%, #ffb39a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.workflow-heading .section-label {
  color: #8adfff;
}

#gallery {
  background: var(--color-bg-secondary);
}

.gallery-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
}

.gallery-media {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.video-frame {
  background: #081119;
  aspect-ratio: auto;
}

.video-frame video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.gallery-caption {
  color: var(--color-text-muted);
  font-size: var(--text-small);
  line-height: 1.8;
}

.gallery-story {
  display: grid;
  gap: var(--space-md);
}

.gallery-stage {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(143, 175, 202, 0.14);
  background: linear-gradient(180deg, rgba(16, 30, 44, 0.88), rgba(9, 18, 28, 0.96));
}

.gallery-stage-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 6px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--color-accent);
  background: rgba(83, 208, 255, 0.08);
  margin-bottom: var(--space-sm);
}

.gallery-stage-title {
  font-size: 1.05rem;
  margin-bottom: var(--space-xs);
}

.gallery-stage-body {
  color: #d3e1ee;
  font-size: var(--text-small);
  line-height: 1.8;
}

#features {
  background: var(--color-bg-primary);
}

#narrative {
  background: var(--color-bg-primary);
}

.narrative-shell {
  max-width: var(--content-width);
  margin: 0 auto;
  border-left: 2px solid var(--color-accent);
  padding-left: clamp(20px, 4vw, 40px);
}

.narrative-label {
  display: inline-block;
}

#cta {
  background: linear-gradient(135deg, var(--color-bg-secondary) 0%, #0D111C 100%);
}

.cta-cards {
  display: flex;
  justify-content: center;
}

.cta-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: 480px;
  width: 100%;
}

.cta-card-content {
  flex: 1;
}

.cta-card .btn-primary,
.cta-card .btn-outline {
  margin-top: auto;
  align-self: center;
}

.qr-image {
  width: 160px;
  height: 160px;
  margin: 0 auto var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  object-fit: cover;
  box-shadow: var(--shadow-card);
}

.qr-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: 0;
}

.qr-main {
  font-weight: 500;
  color: var(--color-text-primary);
}

.qr-price {
  color: var(--color-highlight);
  font-size: 1rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero-inner,
  .gallery-showcase {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-inner {
    display: flex;
    flex-direction: column;
  }

  .hero-screenshot-card {
    max-width: 100%;
    margin-top: var(--space-xl);
    transform: none;
    animation: none;
    opacity: 1;
  }

  .workflow-container {
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
  }

  .workflow-node {
    max-width: 280px;
  }

  .workflow-node::after {
    display: none;
  }

  .cta-cards {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-right {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .gallery-stage,
  .cta-card {
    padding: var(--space-lg);
  }

  .qr-image,
  .qr-placeholder {
    width: 144px;
    height: 144px;
  }
}
