/* ============================================
   HERO MAIN — Full-viewport hero with bg image,
   large headline, divider, description + CTAs,
   and product screenshot at bottom
   ============================================ */

.hero-main {
  position: relative;
  min-height: 200vh;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  padding: 0 var(--spacing-xl);
  padding-bottom: 0;
  padding-top: calc(var(--navbar-height) + var(--spacing-3xl));
  color: #FFFFFF;
  overflow: hidden;
}

/* --- Background image layer --- */
.hero-main__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #0F172A;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Subtle overlay for text readability */
.hero-main__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.3) 0%,
    rgba(15, 23, 42, 0.5) 60%,
    rgba(15, 23, 42, 0.8) 100%
  );
}

/* --- Pattern overlay: diagonal lines + noise grain --- */
.hero-main::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Diagonal lines */
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.06) 0px,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px,
      transparent 28px
    );
}

/* Noise grain via inline SVG filter on the bg */
.hero-main__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.18;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.8' numOctaves='4' type='fractalNoise' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* --- Content wrapper (above bg) --- */
.hero-main__inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--spacing-3xl);
}

/* --- Headline --- */
.hero-main__headline {
  font-family: var(--font-family-heading);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--spacing-xl);
  max-width: 900px;
  color: #FFFFFF;
}

/* --- Divider --- */
.hero-main__divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin-bottom: var(--spacing-xl);
}

/* --- Body: label left, description + CTAs right --- */
.hero-main__body {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--spacing-2xl);
  align-items: start;
  margin-bottom: var(--spacing-3xl);
}

.hero-main__label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  padding-top: 4px;
}

.hero-main__copy {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.hero-main__desc {
  font-size: 1.375rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
}

/* --- CTA buttons --- */
.hero-main__actions {
  display: flex;
  gap: var(--spacing-md);
}

.hero-main__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-family-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.hero-main__btn--primary {
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid #FFFFFF;
}

.hero-main__btn--primary:hover {
  background: rgba(255, 255, 255, 0.9);
}

.hero-main__btn--secondary {
  background: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.hero-main__btn--secondary:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
}

/* --- Product screenshot --- */
.hero-main__screenshot {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: -100px auto 0;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
  background: #F9FAFB;
}

.hero-main__screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Placeholder when no image is set */
.hero-main__screenshot--placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* --- Mobile (<=768px) --- */
@media (max-width: 768px) {
  .hero-main {
    padding: 0 var(--spacing-md);
    min-height: 100vh;
    padding-top: calc(56px + var(--spacing-2xl));
  }

  .hero-main__headline {
    font-size: clamp(2rem, 10vw, 3rem);
    margin-bottom: var(--spacing-lg);
  }

  .hero-main__body {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
  }

  .hero-main__label {
    font-size: 0.75rem;
  }

  .hero-main__desc {
    font-size: 1rem;
  }

  .hero-main__actions {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .hero-main__btn {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
  }

  .hero-main__screenshot {
    border-radius: 12px 12px 0 0;
    margin-left: 0;
    margin-right: 0;
  }

  .hero-main__divider {
    margin-bottom: var(--spacing-lg);
  }
}

/* --- Tablet (769px–1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-main__headline {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }

  .hero-main__body {
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-xl);
  }
}
