/* Background Hover CTA Component - EXACT implementation from background-hover-cta.md */

/* CSS Custom Properties for theming - EXACT from spec */
:root {
    --brand: 27 96% 61%;
    --brand-foreground: 31 97% 72%;
    --container-max-width: 80rem;
}

.dark {
    --brand: 31 97% 72%;
    --brand-foreground: 27 96% 61%;
}

/* Main CTA Section - EXACT structure from React component */
.cta-section {
    position: relative;
    overflow: hidden;
    padding: 6rem 0 8rem 0; /* py-24 sm:py-32 */
    background: #0f172a; /* Simple dark background to show glow effect */
}

@media (min-width: 640px) {
    .cta-section {
        padding: 8rem 0; /* sm:py-32 */
    }
}

/* Container for content - EXACT from React component */
.cta-container {
    position: relative;
    z-index: 10;
    margin: 0 auto;
    display: flex;
    max-width: var(--container-max-width); /* max-w-container */
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* gap-6 */
    text-align: center;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .cta-container {
        gap: 2rem; /* sm:gap-8 */
    }
}

/* CTA Title - EXACT from React component */
.cta-title {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 600; /* font-semibold */
    color: white;
    margin: 0;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .cta-title {
        font-size: 3rem; /* sm:text-5xl */
    }
}

/* CTA Button - EXACT shadcn button implementation */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: colors 0.2s;
    text-decoration: none;
    cursor: pointer;
    height: 2.75rem; /* size="lg" */
    padding: 0 2rem;
    background: hsl(var(--brand));
    color: white;
    border: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.cta-button:hover {
    background: hsl(var(--brand) / 0.9);
    color: white;
    text-decoration: none;
}

.cta-button:focus-visible {
    outline: 2px solid hsl(var(--brand));
    outline-offset: 2px;
}

.cta-button:disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Glow Background Container - EXACT from React component */
.glow-background {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    transform: translateY(1rem); /* translate-y-[1rem] */
    opacity: 0.8; /* opacity-80 */
    transition: all 0.5s ease-in-out; /* transition-all duration-500 ease-in-out */
}

/* Group hover effect - EXACT from React component */
.group:hover .glow-background {
    transform: translateY(-2rem); /* group-hover:translate-y-[-2rem] */
    opacity: 1; /* group-hover:opacity-100 */
}

/* Glow Effect Container - EXACT from React component */
.glow-effect {
    position: absolute;
    width: 100%;
    bottom: 0; /* variant="bottom" */
}

/* Glow Layers - EXACT from React Glow component */
.glow-outer {
    position: absolute;
    left: 50%;
    height: 16rem; /* h-[256px] */
    width: 60%; /* w-[60%] */
    transform: translateX(-50%) scale(2.5); /* -translate-x-1/2 scale-[2.5] */
    border-radius: 50%; /* rounded-[50%] */
    background: radial-gradient(ellipse at center,
        hsla(var(--brand-foreground) / 0.5) 10%,
        hsla(var(--brand-foreground) / 0) 60%);
}

.glow-inner {
    position: absolute;
    left: 50%;
    height: 8rem; /* h-[128px] */
    width: 40%; /* w-[40%] */
    transform: translateX(-50%) scale(2); /* -translate-x-1/2 scale-[2] */
    border-radius: 50%; /* rounded-[50%] */
    background: radial-gradient(ellipse at center,
        hsla(var(--brand) / 0.3) 10%,
        hsla(var(--brand-foreground) / 0) 60%);
}

@media (min-width: 640px) {
    .glow-outer {
        height: 32rem; /* sm:h-[512px] */
    }

    .glow-inner {
        height: 16rem; /* sm:h-[256px] */
    }
}

/* Animation Keyframes - EXACT from React component */
@keyframes appear {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes appear-zoom {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Classes - EXACT from React component */
.animate-appear {
    animation: appear 0.5s ease-out forwards;
}

.animate-appear-zoom {
    animation: appear-zoom 0.5s ease-out forwards;
}

/* Animation Delays - EXACT from React component */
.delay-100 {
    animation-delay: 100ms;
}

.delay-300 {
    animation-delay: 300ms;
}

/* Additional styles for demo variations */
.cta-section-purple {
    background: #581c87; /* Purple theme */
}

.cta-button-secondary {
    background: #6366f1;
}

.cta-button-secondary:hover {
    background: hsl(239 84% 67% / 0.9);
}

.cta-button-outline {
    background: transparent;
    border: 1px solid hsl(var(--brand));
    color: hsl(var(--brand));
}

.cta-button-outline:hover {
    background: hsl(var(--brand));
    color: white;
}
