/* BadiNext Premium Design System V4.8 — Ambient Motion & Glass Buttons */

:root {
    --brand-deep: #0B3B2E;
    --brand-emerald: #10B981;
    --hero-mint: #e6fffa;
    --hero-blue: #ebf8ff;
    --hero-warm: #fffaf0;

    /* Explicit Layer Stack */
    --zi-bg: 0;
    --zi-ill: 1;
    --zi-cards: 2;
    --zi-content: 3;
}

/* Animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float-hero {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-12px) rotate(2deg);
    }
}

@keyframes float-slow-rotate {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(20px, -20px) rotate(180deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Floating Decorative Assets */
.floating-asset {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    filter: blur(0.5px);
    opacity: 0.8;
}

.asset--sphere {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle at 30% 30%, #ec4899, #8b5cf6);
    border-radius: 50%;
    top: 15%;
    left: 5%;
    box-shadow: inset -10px -10px 30px rgba(0, 0, 0, 0.2), 0 20px 40px rgba(236, 72, 153, 0.3);
    animation: float-slow-rotate 25s infinite ease-in-out;
}

.asset--cube {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    border-radius: 12px;
    top: 65%;
    right: 8%;
    transform: rotate(15deg);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.3);
    animation: float-hero 8s infinite ease-in-out;
}

.asset--star {
    width: 60px;
    height: 60px;
    background: #f59e0b;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    top: 20%;
    right: 15%;
    animation: float-slow-rotate 20s infinite linear;
    opacity: 0.6;
}

.asset--ring {
    width: 140px;
    height: 140px;
    border: 30px solid rgba(139, 92, 246, 0.1);
    border-radius: 50%;
    bottom: 5%;
    left: 15%;
    animation: float-hero 12s infinite ease-in-out reverse;
}

/* 3-Layer Organic Drift Keyframes */
@keyframes driftA {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1.05);
    }

    50% {
        transform: translate(30px, -20px) rotate(1deg) scale(1.07);
    }
}

@keyframes driftB {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1.1);
    }

    50% {
        transform: translate(-40px, 15px) rotate(-1.5deg) scale(1.12);
    }
}

@keyframes driftC {

    0%,
    100% {
        transform: translate(0, 0) scale(1.02);
    }

    50% {
        transform: translate(15px, 25px) scale(1.04);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* Hero Wrapper */
.hero-v4 {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 88px;
    padding-bottom: 120px;
    /* Increased padding */
    overflow: hidden;
    background: #fff;
    z-index: 1;
}

/* Bottom Fade Transition Removed */

/* Layer 0: Background Gradients */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: var(--zi-bg);
    pointer-events: none;
}

.hero__bg-gradients {
    position: absolute;
    inset: 0;
    filter: blur(140px);
    opacity: 0.3;
}

.hero__bg-gradient-1 {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, var(--hero-mint) 0%, transparent 70%);
}

.hero__bg-gradient-2 {
    position: absolute;
    top: -5%;
    right: -5%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, var(--hero-blue) 0%, transparent 70%);
}

/* Layer 1: Network Illustration System */
.hero__illWrap {
    position: absolute;
    inset: 0;
    z-index: var(--zi-ill);
    pointer-events: none;
    overflow: hidden;
}

.hero__illLayer {
    position: absolute;
    inset: -10%;
    /* Bleed for motion */
    width: 120%;
    height: 120%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__illLayer--a {
    z-index: 1;
    animation: driftA 35s ease-in-out infinite;
    opacity: 0.12;
}

.hero__illLayer--b {
    z-index: 2;
    animation: driftB 45s ease-in-out infinite;
    opacity: 0.08;
    filter: blur(0.3px);
}

.hero__illLayer--c {
    z-index: 0;
    animation: driftC 55s linear infinite;
    opacity: 0.06;
}

.hero__ill-svg {
    width: 100%;
    height: 100%;
}

/* Layer 2: Floating Cards (Safe Zones) */
.hero__cards {
    position: absolute;
    inset: 0;
    z-index: var(--zi-cards);
    pointer-events: none;
}

.v-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: clamp(12px, 1.1vw, 18px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.05);
    width: clamp(220px, 22vw, 340px);
    animation: float-hero 6s ease-in-out infinite;
}

.v-card--event {
    right: clamp(24px, 4vw, 64px);
    top: 24%;
    animation-delay: 0s;
}

.v-card--opp {
    left: clamp(24px, 4vw, 64px);
    top: 52%;
    animation-delay: -2s;
}

.v-card--cert {
    right: clamp(24px, 4vw, 64px);
    bottom: 14%;
    width: clamp(180px, 18vw, 240px);
    animation-delay: -4s;
}

/* Layer 3: Main Content */
.hero__content {
    position: relative;
    z-index: var(--zi-content);
    text-align: center;
    max-width: 1200px;
    /* Ensure no opacity is inherited from parents */
    opacity: 1 !important;
}

.hero-v4 h1 {
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--brand-deep);
    margin-bottom: 2rem;
}

/* Buttons Fix */
.btn-primary-custom {
    background: linear-gradient(135deg, #EC4899 0%, #F59E0B 100%);
    /* Vibrant Pink-Orange Gradient */
    color: white !important;
    font-weight: 800;
    border-radius: 100px;
    padding: 1.25rem 3rem;
    box-shadow: 0 15px 35px -10px rgba(236, 72, 153, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.btn-primary-custom:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(236, 72, 153, 0.5);
    filter: brightness(1.1);
}

.btn-outline-custom {
    background: rgba(255, 255, 255, 0.78) !important;
    /* Glass Background */
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    backdrop-filter: blur(12px) saturate(180%);
    color: var(--brand-deep) !important;
    font-weight: 800;
    border-radius: 100px;
    padding: 1.25rem 3rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline-custom:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #EC4899 !important;
    /* Rose Pink Border on Hover */
    color: #EC4899 !important;
    box-shadow: 0 10px 30px -5px rgba(236, 72, 153, 0.2);
    transform: translateY(-3px);
}

/* Headline Underline Glow */
.headline-highlight-vibrant {
    position: relative;
    display: inline-block;
}

.headline-highlight-vibrant::after {
    content: "";
    position: absolute;
    bottom: 0.1em;
    left: -5%;
    width: 110%;
    height: 0.4em;
    background: linear-gradient(90deg, #EC4899 0%, #F59E0B 100%);
    opacity: 0.3;
    filter: blur(15px);
    z-index: -1;
    border-radius: 100px;
}

.headline-highlight {
    position: relative;
    display: inline-block;
}

.badge-glass {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(8px);
    padding: 10px 24px;
    border-radius: 100px;
    margin-bottom: 2.5rem;
    color: var(--brand-deep);
    font-weight: 900;
}

/* Trust Row (Standalone Section) */
.trust-row {
    padding-top: 2rem;
}

.trust-row p {
    color: #4b5563;
    font-weight: 700;
    opacity: 0.8;
}

.trust-logo {
    width: 100px;
    height: 32px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    .hero__illLayer,
    .v-card,
    .btn-primary-custom:hover,
    .btn-outline-custom:hover {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero__illLayer--b {
        display: none;
    }

    .hero-v4 h1 {
        font-size: clamp(3rem, 10vw, 8rem);
    }
}

@media (max-width: 768px) {

    .v-card,
    .hero__illLayer--c {
        display: none;
    }

    .hero__illLayer--a {
        opacity: 0.06;
        animation-duration: 60s;
    }

    .hero-v4 h1 {
        font-size: 3.5rem;
    }

    .btn-primary-custom,
    .btn-outline-custom {
        width: 100%;
        padding: 1.1rem;
    }
}

/* Feature Cards with Background Images */
.feature-card {
    position: relative;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    border-radius: 2.5rem;
    color: #fff;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    background: #000;
}

/* Color Themes for Feature Cards */
.feature-card--yellow {
    --feat-color: #FFB800;
}

.feature-card--pink {
    --feat-color: #E01E5A;
}

.feature-card--blue {
    --feat-color: #007AFF;
}

.feature-card--orange {
    --feat-color: #FF4D00;
}

.feature-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0.75;
    filter: saturate(1.1) brightness(0.9);
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.6s ease,
        filter 0.6s ease;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(15, 23, 42, 0) 0%,
            rgba(15, 23, 42, 0.3) 40%,
            rgba(15, 23, 42, 0.9) 100%);
    z-index: 1;
    transition: opacity 0.5s ease;
}

.feature-card__content {
    position: relative;
    z-index: 2;
    transform: translateY(15px);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.feature-card .icon-wrap {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Persistent Glow & Hover Effects */
.feature-card {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1), 0 0 15px -5px var(--feat-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.3), 0 0 35px -5px var(--feat-color);
}

.feature-card:hover .feature-card__bg {
    transform: scale(1.12);
    opacity: 0.85;
    filter: saturate(1.2) brightness(1);
}

.feature-card:hover .icon-wrap {
    background: var(--feat-color);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px -5px var(--feat-color);
    border-color: var(--feat-color);
}

.feature-card:hover .feature-card__content {
    transform: translateY(0);
}

.feature-card p {
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* Premium How It Works Section */
.how-works-v2 {
    position: relative;
    padding: 100px 0;
    /* Reduced padding for a more compact look */
    background: #020617;
    /* Deepest black/blue for colorful flares to pop */
    overflow: hidden;
}

.how-works-v2::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(16, 185, 129, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
}

.how-works-v2__title {
    background: linear-gradient(to bottom, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-card {
    position: relative;
    padding: 2.5rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 2;
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(16, 185, 129, 0.2);
    transform: translateY(-5px);
}

.step-card--orange {
    --step-color: #f59e0b;
}

.step-card--blue {
    --step-color: #3b82f6;
}

.step-card--pink {
    --step-color: #ec4899;
}

.step-number {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--step-color);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    margin-bottom: 2rem;
    transition: all 0.4s ease;
}

.step-card:hover .step-number {
    background: var(--step-color);
    color: #fff;
    box-shadow: 0 0 30px -5px var(--step-color);
    border-color: var(--step-color);
}

.step-connector {
    position: absolute;
    top: 4.25rem;
    left: calc(100% - 1rem);
    width: calc(100% - 4rem);
    height: 1px;
    background: linear-gradient(to right, rgba(16, 185, 129, 0.4), transparent);
    z-index: 1;
}

/* Premium Module Section */
#modules-overview {
    background: radial-gradient(circle at 50% 100%, #f1f5f9 0%, #f8fafc 100%);
    position: relative;
    padding: 120px 0;
}

/* ========================================
   MODULE CARDS
   ======================================== */
.module-card {
    position: relative;
    background: #ffffff;
    border-radius: 2rem;
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(15, 23, 42, 0.05);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    overflow: hidden;
}

/* Subtle background tint based on theme color */
.module-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--theme-color);
    opacity: 0.02;
    z-index: 0;
    transition: opacity 0.5s ease;
}

.module-card:hover::before {
    opacity: 0.05;
}

.module-card__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: repeating-linear-gradient(45deg,
            var(--theme-color),
            var(--theme-color) 1px,
            transparent 1px,
            transparent 15px);
    z-index: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.module-card:hover .module-card__pattern {
    opacity: 0.1;
}

.module-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -4px rgba(15, 23, 42, 0.08), 0 0 25px -5px var(--theme-color);
    border-color: var(--theme-color);
}

.module-card__status {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 20;
}

.status-badge {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
}

.status-badge--active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-badge--soon {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}

.module-card__icon {
    width: 3.5rem;
    height: 3.5rem;
    background: var(--theme-color);
    color: #ffffff;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 10;
    box-shadow: 0 8px 15px -4px var(--theme-color);
}

.module-card:hover .module-card__icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 25px -5px var(--theme-color);
}

.module-card__title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--theme-color);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
    position: relative;
    z-index: 10;
}

.module-card__tagline {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
}

.module-card__desc {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

/* Custom Scrollbar for Dropdowns */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* For Firefox */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 #f8fafc;
}


.module-card__body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.hover-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--theme-color);
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hover-link i {
    transition: transform 0.3s ease;
}

.module-card:hover .hover-link i {
    transform: translateX(4px);
}

/* Color Themes for Module Cards */
.module-card--pink {
    --theme-color: #E01E5A;
}

.module-card--orange {
    --theme-color: #FF4D00;
}

.module-card--blue {
    --theme-color: #007AFF;
}

.module-card--yellow {
    --theme-color: #FFB800;
}

.module-card__watermark {
    position: absolute;
    bottom: -1rem;
    left: -1rem;
    font-size: 7rem;
    color: var(--theme-color);
    opacity: 0.05;
    transform: rotate(-15deg);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
    z-index: 0;
}

.module-card:hover .module-card__watermark {
    opacity: 0.12;
    transform: rotate(-10deg) scale(1.2) translate(15px, -15px);
}

@media (max-width: 768px) {
    .how-works-v2 {
        padding: 60px 0;
    }

    .step-connector {
        display: none;
    }

    .step-card {
        padding: 2rem;
    }
}