@use "../../../../styles/abstracts/variables" as *;

.hero {
  position: relative;

  /* ✅ Mobile-safe viewport */
  min-height: 80svh;
  width: 100%;

  overflow-x: clip;
  overflow-y: hidden;

  background:
    radial-gradient(circle at top right, rgba(247,147,26,0.1), transparent 45%),
    #0a0a0a;

  color: #fff;
  font-family: $font-onest, sans-serif;

  display: flex;
  align-items: center;
}

/* ===== BACKGROUND LINES ===== */
.bgLines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;

  span {
    position: absolute;
    width: 180%;
    height: 1px;
    background: rgba(255,255,255,0.035);
    left: -40%;
    transform: rotate(-14deg);
    animation: slide 18s linear infinite;

    &:nth-child(1) { top: 25%; }
    &:nth-child(2) { top: 50%; animation-delay: 6s; }
    &:nth-child(3) { top: 75%; animation-delay: 12s; }
  }
}

@keyframes slide {
  from { transform: translateX(-30%) rotate(-14deg); }
  to { transform: translateX(30%) rotate(-14deg); }
}

/* ===== LAYOUT ===== */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;

  padding-inline: 1.5rem;
  padding-block: clamp(4rem, 10vh, 7rem);

  display: grid;
  align-items: center;
  gap: 3rem;

  @media (min-width: 1024px) {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== LEFT ===== */
.left {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;

  h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;

    span {
      color: #fbbf24;
    }
  }

  p {
    max-width: 520px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #cbd5e1;
  }
}

/* ===== CTA ===== */
.ctas {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;

  button {
    width: fit-content;
    border: none;
    border-radius: 999px;
    padding: 0.9rem 1.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
  }
}

.primary {
  background: linear-gradient(135deg, #f7931a, #ffb703);
  color: #0a0a0a;

  &:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(255,183,3,0.35);
  }
}

.secondary {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fbbf24;
  backdrop-filter: blur(12px);

  &:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
  }
}

/* ===== RIGHT ===== */
.right {
  width: 100%;
  height: clamp(260px, 45vh, 520px);
  overflow: hidden;

  canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 22px;
    touch-action: none;
  }
}

/* ===== MOBILE FIXES ===== */
@media (max-width: 768px) {
  .hero {
    align-items: center;
    margin-top: 5rem;
    padding-top: 2rem;
  }

  .container {
    grid-template-columns: 1fr;
    text-align: center;
    padding-block: 5rem;
  }

  .left p {
    margin-inline: auto;
  }

  .ctas {
    flex-direction: column;

    button {
      width: 100%;
    }
  }

  .right {
    height: 22vh;
  }

  /* ✅ Reduce animation load */
  .bgLines span {
    animation-duration: 30s;
  }
}
