@import "snippets/chroma.css";

.hero {
  display: flex;
  min-height: 100dvh;
  width: 100%;

  align-items: center;
  justify-content: space-between;

  flex-direction: column;

  padding: clamp(1rem, 2.5vw, 2rem) 1rem 0.75rem;
  background: #000;
  position: relative;
  overflow: hidden;

  &::before {
    content: "";
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.03) 0%, transparent 60%);
    pointer-events: none;
  }

  & .hero-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
  }

  & .title {
    font-size: clamp(3rem, 14vw, 10rem);
    letter-spacing: 0.05em;
    line-height: 0.9;
    text-align: center;
    text-wrap: balance;
  }

  & .hero-subtitle {
    font-size: clamp(1rem, 4.2vw, 1.75rem);
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.95rem;
  }

  & .hero-scroll {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding-bottom: 1rem;
    animation: scrollFloat 2.5s ease-in-out infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;

    &::after {
      content: "";
      width: 1px;
      height: 24px;
      background: linear-gradient(180deg, rgba(255,255,255,0.3), transparent);
      animation: scrollLine 2.5s ease-in-out infinite;
    }
  }
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scrollFloat {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@keyframes scrollLine {
  0%, 100% {
    opacity: 0.3;
    height: 20px;
  }
  50% {
    opacity: 0.8;
    height: 32px;
  }
}

.section {
  min-height: 55dvh;
  width: 100%;

  text-align: center;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: clamp(3rem, 8vw, 6rem) 1rem clamp(3rem, 8vw, 6rem);
  background: #000;
  position: relative;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, 600px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  }

  & .section-copy {
    width: min(100%, 72ch);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  & p {
    max-width: 72ch;
    font-size: clamp(1rem, 2.7vw, 1.2rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    text-wrap: pretty;
  }

  & .pitch {
    font-size: clamp(1.7rem, 4.5vw, 2.75rem);
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
  }

  & code {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.15em 0.45em;
    font-size: 0.9em;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.9);
  }

  & .features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1px;
    width: min(100%, 72ch);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-top: 0.5rem;
  }

  & .feature {
    background: #000;
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: left;
    transition: background var(--transition-smooth);

    &:hover {
      background: rgba(255, 255, 255, 0.02);
    }

    & .feature-tag {
      font-size: 0.65rem;
      text-transform: uppercase;
      letter-spacing: 0.16em;
      color: var(--green);
      opacity: 0.8;
    }

    & p {
      font-size: 0.9rem;
      color: rgba(255, 255, 255, 0.5);
      line-height: 1.45;
      max-width: none;
    }
  }

  & .cta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;

    & button {
      width: fit-content;
      padding: 0.85rem 2rem;
    }
  }

  & .author-note {
    width: min(100%, 44ch);
    margin-top: 2rem;
    padding: 1.5rem 1.75rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 var(--radius) var(--radius) 0;
    transition:
      border-color var(--transition-smooth),
      background var(--transition-smooth);

    &:hover {
      border-left-color: rgba(255, 255, 255, 0.25);
      background: rgba(255, 255, 255, 0.03);
    }
  }

  & .author-note-label {
    font-size: 0.65rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
  }

  & .author-note-copy {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.55);
  }
}

@media (max-width: 720px) {
  .hero {
    padding-inline: 0.75rem;

    &::before {
      display: none;
    }

    & .hero-content {
      gap: 0.5rem;
    }

    & .title {
      letter-spacing: 0.03em;
    }

    & .hero-scroll {
      font-size: 0.7rem;
    }
  }

  .section {
    gap: 1.25rem;
    padding-top: clamp(2rem, 6vw, 4rem);
    padding-bottom: clamp(2rem, 6vw, 4rem);

    & .section-copy {
      gap: 1rem;
    }

    & .pitch {
      & br {
        display: none;
      }
    }

    & .author-note {
      padding: 1rem 1.1rem;
      margin-top: 0.75rem;
    }
  }
}
