/* Prevent horizontal layout shifts / jitter on trackpads */
html, body {
    overflow-x: clip;
}

/* Aurora Borealis Ambient Background Glow - Contained to viewport to prevent scroll jitter */
.aurora-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    contain: strict;
    opacity: 0.55;
    mix-blend-mode: screen;
}
.aurora-wave {
    position: absolute;
    width: 100%;
    height: 60%;
    left: 0;
    top: 0;
    border-radius: 50%;
    filter: blur(70px);
    background: radial-gradient(ellipse at 30% 40%, rgba(95, 204, 235, 0.18) 0%, rgba(38, 128, 180, 0.12) 40%, transparent 75%),
                radial-gradient(ellipse at 70% 60%, rgba(130, 240, 220, 0.14) 0%, rgba(32, 90, 140, 0.10) 45%, transparent 80%),
                radial-gradient(ellipse at 50% 50%, rgba(150, 180, 255, 0.14) 0%, transparent 70%);
    animation: auroraWave 20s ease-in-out infinite alternate;
    will-change: transform;
}
.aurora-wave-2 {
    top: 45%;
    height: 60%;
    filter: blur(85px);
    background: radial-gradient(ellipse at 60% 30%, rgba(70, 180, 220, 0.15) 0%, rgba(20, 60, 100, 0.08) 50%, transparent 75%),
                radial-gradient(ellipse at 25% 70%, rgba(100, 210, 240, 0.12) 0%, transparent 70%);
    animation: auroraWave2 25s ease-in-out infinite alternate-reverse;
    will-change: transform;
}

@keyframes auroraWave {
    0% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.05) translateY(2%); }
    100% { transform: scale(0.96) translateY(-2%); }
}
@keyframes auroraWave2 {
    0% { transform: scale(0.96) translateY(0); }
    50% { transform: scale(1.06) translateY(-2%); }
    100% { transform: scale(1) translateY(2%); }
}

/* Floating micro-animations */
.brand img {
    animation: logoFloat 4.5s ease-in-out infinite alternate;
}
@keyframes logoFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-3px); }
}

.extra-icon {
    animation: iconPulse 3.8s ease-in-out infinite alternate;
}
@keyframes iconPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(114, 196, 220, 0.1); }
    100% { transform: scale(1.04); box-shadow: 0 0 14px 2px rgba(114, 196, 220, 0.25); }
}

/* Shimmer Light Streak across Buttons & Popular Badge */
.hero-action-primary,
.popular,
.plan-button,
.auth-submit {
    position: relative;
    overflow: hidden;
}

.hero-action-primary::after,
.popular::after,
.auth-submit::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -80%;
    width: 60%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.18),
        rgba(180, 235, 255, 0.35),
        rgba(255, 255, 255, 0.18),
        transparent
    );
    transform: rotate(25deg);
    pointer-events: none;
    animation: btnShimmer 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.popular::after {
    animation-delay: 1.5s;
    animation-duration: 4s;
}

@keyframes btnShimmer {
    0%, 70% { left: -80%; opacity: 0; }
    71% { opacity: 1; }
    90%, 100% { left: 160%; opacity: 0; }
}

/* Text Shimmer Gradient on Hero Subtitle */
.hero-intro h1 span {
    background: linear-gradient(105deg, #b8dce7 0%, #ffffff 35%, #88d4ec 65%, #b8dce7 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 7s linear infinite;
}
@keyframes textShine {
    0% { background-position: 250% 0; }
    100% { background-position: -50% 0; }
}

/* 3D Interactive Card Tilt with Specular Ice Glare */
.plan,
.extra {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
    transition: transform 0.15s ease-out, border-color 0.2s, box-shadow 0.2s;
}

.card-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(180, 235, 255, 0.14) 0%,
        rgba(140, 215, 245, 0.04) 30%,
        transparent 65%
    );
    opacity: 0;
    transition: opacity 0.25s ease;
    mix-blend-mode: overlay;
    z-index: 10;
}
.plan:hover .card-glare,
.extra:hover .card-glare {
    opacity: 1;
}

.plan:hover {
    border-color: rgba(160, 225, 248, 0.32) !important;
    box-shadow: 0 14px 40px -6px rgba(0, 0, 0, 0.7), 0 0 20px 0 rgba(114, 196, 220, 0.14) !important;
}
.plan.best:hover {
    border-color: rgba(160, 225, 248, 0.45) !important;
    box-shadow: 0 16px 45px -5px rgba(0, 0, 0, 0.75), 0 0 26px 2px rgba(114, 196, 220, 0.20) !important;
}

/* Social link hover pop & glow */
.social-link {
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s !important;
}
.social-link:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 8px 24px -4px rgba(114, 196, 220, 0.25);
}

/* Scroll Reveal Animations - Smooth without layout shifts */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* Interactive Click Sparkle Canvas */
#clickSparkles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
}

/* Topbar stable transitions - NO transform transitions that cause vibration */
.topbar {
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}
.topbar.scrolled {
    background: rgba(6, 10, 13, 0.94) !important;
    border-color: rgba(160, 220, 240, 0.24) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 18px rgba(114, 196, 220, 0.12) !important;
}
