---
interface Props {
  title: string;
  description?: string;
  href: string;
  variant?: 'primary' | 'secondary';
}

const { title, description, href, variant = 'primary' } = Astro.props;
---

<div class="cta">
  <a href={href} class:list={['button', variant]}>{title}</a>
  {description && <p class="description">{description}</p>}
</div>

<style>
  .cta {
    text-align: center;
  }

  .button {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-family-inter);
    letter-spacing: 0.03em;
  }

  .button.primary {
    background: linear-gradient(135deg, #4F7CFF 0%, #7861FF 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 8px 24px rgba(21, 80, 211, 0.2);
  }

  .button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(79, 124, 255, 0.3);
    filter: brightness(1.1);
    text-decoration: none;
  }

  .button.secondary {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    color: #131b2c;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(18, 26, 43, 0.06);
  }

  .button.secondary:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(18, 26, 43, 0.08);
    text-decoration: none;
  }

  .description {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--color-on-surface-variant);
  }
</style>