/*
 * This file is part of the UX SDC Bundle
 *
 * (c) Jozef Môstka <https://github.com/tito10047/ux-sdc>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/* Styles for Hero component */


@layer components {
  .hero {
    position: relative;
    padding-block: var(--space-3xl);
    background: #0A0A0A;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;

    & .hero__grid-background {
      position: absolute;
      inset: 0;
      background-image:
        linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
      background-size: 50px 50px;
      mask-image: radial-gradient(circle at center, black, transparent 90%);
      pointer-events: none;
    }

    & .hero__content {
      position: relative;
      z-index: 1;
      --stack-space: var(--space-l);
    }

    & .hero__title {
      font-size: clamp(var(--size-step-3), 8vw, var(--size-step-6));
      max-width: 25ch;
      display: flex;
      flex-direction: column;
    }

    & .hero__title-row {
      display: block;
      opacity: 0;
      transform: translateY(30px);
      will-change: transform, opacity;
      animation: reveal-up 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    }

    & .hero__subtitle {
      font-size: var(--size-step-1);
      max-width: 50ch;
      line-height: 1.6;
    }

    & .hero__actions {
      display: flex;
      gap: var(--space-m);
      margin-top: var(--space-xl);
    }

    & .hero__reveal-item {
      opacity: 0;
      transform: translateY(30px);
      will-change: transform, opacity;
      animation: reveal-up 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    }

    & .hero__visual {
      position: relative;
      margin-top: var(--space-3xl);
      animation-duration: 1.2s; /* Heavier/slower reveal for the main visual */
      display: flex;
      justify-content: center;
      width: 100%;
      
      & > * {
        width: 100%;
        max-width: 1200px;
      }

      & .hero__glow {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 200%; /* Much larger glow */
        height: 150%;
        background: radial-gradient(circle, rgba(0, 112, 243, 0.3) 0%, transparent 75%);
        z-index: -1;
        opacity: 0;
        filter: blur(80px); /* Extra soft diffusion */
        pointer-events: none; /* Do not block clicks */
        animation: fade-in 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
        animation-delay: inherit; /* Sync with .hero__visual delay */
      }
    }

    & .btn {
      padding: var(--space-s) var(--space-l) !important;
      border-radius: var(--radius-s) !important;
      font-size: var(--size-step--1) !important;
      font-weight: 600 !important;
      text-transform: uppercase !important;
      letter-spacing: 0.05em !important;
      transition: var(--transition-fast) !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
    }

    & .btn--primary {
      background: var(--color-text-main) !important;
      color: var(--color-bg) !important;
      border: 1px solid var(--color-text-main) !important;
    }

    & .btn--primary:hover {
      background: transparent !important;
      color: var(--color-text-main) !important;
      box-shadow: 0 0 20px var(--color-glow) !important;
    }

    & .btn--outline {
      border: var(--border-thin) !important;
      color: var(--color-text-main) !important;
    }

    & .btn--outline:hover {
      background: rgba(255, 255, 255, 0.05) !important;
      border-color: rgba(255, 255, 255, 0.2) !important;
    }
  }

  @keyframes reveal-up {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fade-in {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}
