/* Hero Section - Static (scroll animation commented out for now) */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    padding-top: 80px;
    box-sizing: border-box;
    /* Full hero gradient from top to bottom - no gap below header */
    background: linear-gradient(180deg,
        rgba(102, 126, 234, 0.06) 0%,
        rgba(118, 75, 162, 0.05) 25%,
        rgba(240, 147, 251, 0.06) 50%,
        rgba(102, 126, 234, 0.05) 75%,
        rgba(240, 147, 251, 0.04) 100%
    );
    overflow: visible;
    perspective: 2500px;
    perspective-origin: center center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Radial overlays so gradient appears across entire hero including top */
    background:
        radial-gradient(ellipse 120% 80% at 20% 20%, rgba(102, 126, 234, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 100% 70% at 80% 30%, rgba(240, 147, 251, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 80% 60% at 50% 60%, rgba(168, 85, 247, 0.08) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.hero-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    height: calc(100vh - 80px);
    margin: 0 auto;
    padding: 0 40px;
    /* Increased fluid padding */
    z-index: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -9px;
}

@media (min-width: 1601px) {
    .hero-wrapper {
        padding: 0 100px;
        /* Even more room on ultrawide */
    }
}

/* Initial Hero Title - At Top */
.hero-title-wrapper {
    position: absolute;
    top: 50%;
    /* Perfectly centered vertically */
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    /* Hardware accelerated centering */
    text-align: center;
    width: 100%;
    padding: 0 40px;
    z-index: 20;
    /* Keep above everything initially */
    will-change: transform, opacity;
}

.hero-title {
    font-size: clamp(48px, 7vw, 92px);
    font-weight: 800;
    line-height: 1.12;
    margin: 0;
    color: var(--text-color, #1a1a1a);
    letter-spacing: -0.04em;
    position: relative;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--text-light, #64748b);
    max-width: 520px;
    margin: 20px auto 0;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.hero-title .gradient-text {
    background: linear-gradient(90deg, #a855f7 0%, #f093fb 25%, #ff6b35 50%, #f5576c 75%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    display: inline-block;
    padding-bottom: 0.1em;
    margin-bottom: -0.1em;
    background-size: 200% 200%;
    /* animation commented out for now */
    /* animation: gradient-shift 3s ease infinite; */
}

/* @keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
} */

/* Hero CTA - visible on desktop and mobile */
.hero-cta {
    margin-top: 28px;
    text-align: center;
}

.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 1.0625rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.35);
}

/* Hero: image and left content hidden; title + CTA visible */
.hero-image-wrapper,
.hero-left-content {
    display: none !important;
}

/* Hero Image - Below Title (commented out when hero is text-only)
.hero-image-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0) scale(0.5) rotateX(15deg);
    width: 100%;
    max-width: 80vw;
    z-index: 99;
    will-change: transform, opacity, width, left;
    transform-style: preserve-3d;
    opacity: 0;
}

.hero-image-wrapper.zoomed {
    max-width: 1200px;
} */

/* Dashboard Frame Glow */
.dashboard-frame::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(240, 147, 251, 0.3), rgba(102, 126, 234, 0.3));
    filter: blur(40px);
    border-radius: 30px;
    z-index: -1;
    opacity: 0.8;
}

/* Removed .sticky class as we use dynamic calculations in JS now */

/* Dashboard Frame Styles */
.dashboard-frame {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.3s ease;
}

.dashboard-frame:hover {
    box-shadow: 0 32px 80px rgba(168, 85, 247, 0.2),
        0 0 0 1px rgba(168, 85, 247, 0.1),
        0 12px 32px rgba(0, 0, 0, 0.15);
}

.dashboard-frame-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.frame-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.frame-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.frame-dot-red {
    background: #ff5f57;
}

.frame-dot-yellow {
    background: #ffbd2e;
}

.frame-dot-green {
    background: #28ca42;
}

.frame-url {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 13px;
    color: var(--text-light, #666);
    max-width: 400px;
    margin: 0 auto;
}

.frame-url i {
    font-size: 11px;
    color: #10b981;
}

.frame-url span {
    font-weight: 500;
    letter-spacing: -0.01em;
}

.frame-menu {
    color: var(--text-light, #666);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.frame-menu:hover {
    background: var(--bg-subtle, #f3f4f6);
    color: var(--text-color, #1a1a1a);
}

.dashboard-frame-content {
    position: relative;
    background: #f8f9fa;
    overflow: hidden;
    display: block;
    width: 100%;
    line-height: 0;
}

.dashboard-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.1s ease-out;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Left Content Block - Appears When Image Locks on Right */
.hero-left-content {
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%) translateX(-60px);
    width: 42%;
    max-width: 35vw;
    /* Fluid relative width */
    opacity: 0;
    visibility: hidden;
    z-index: 10;
    will-change: transform, opacity;
    pointer-events: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-left-content.visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(calc(-50% + 40px)) translateX(0) !important;
    pointer-events: auto;
    display: block;
}

.hero-left-title {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 28px;
    margin-top: 0;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    text-align: left;
    display: block;
}

.hero-left-title .gradient-text {
    background: linear-gradient(90deg, #a855f7 0%, #f093fb 25%, #ff6b35 50%, #f5576c 75%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    display: inline-block;
}

.hero-left-description {
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.7;
    color: #555;
    margin-bottom: 40px;
    margin-top: 0;
    font-weight: 400;
    text-align: left;
    max-width: 100%;
    display: block;
}

.hero-left-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-start;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Responsive - Hero + next section visible on mobile; CTA shown */
@media (max-width: 1023px) {
    .hero {
        min-height: 0;
        height: auto;
        padding-top: 112px !important;
        padding-bottom: 48px !important;
        overflow: hidden;
        box-sizing: border-box;
    }

    .hero-wrapper {
        position: relative !important;
        top: 0 !important;
        min-height: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 0 24px;
        gap: 0;
        box-sizing: border-box;
    }

    .hero-title-wrapper {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin-bottom: 0;
    }

    .hero-title {
        font-size: clamp(36px, 6.5vw, 56px);
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.6;
        max-width: 100%;
        margin-top: 16px;
        padding: 0 8px;
    }

    .hero-cta {
        margin-top: 24px;
    }

    .hero-cta-btn {
        padding: 14px 28px;
        font-size: 1rem;
    }

    /* Image and left content stay hidden (text-only hero) */
    .hero-image-wrapper {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

    .hero-left-content {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        text-align: center;
        padding: 0;
    }

    .hero-left-title {
        font-size: clamp(28px, 4vw, 36px);
        margin-bottom: 16px;
    }

    .hero-left-description {
        font-size: clamp(16px, 2vw, 18px);
        margin-bottom: 32px;
        text-align: center;
    }

    .hero-left-cta {
        justify-content: center;
    }

    .hero-clouds,
    .hero-blobs {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 120px !important;
        padding-bottom: 40px !important;
    }

    .hero-wrapper {
        gap: 0;
        padding: 0 20px;
    }

    .hero-cta {
        margin-top: 20px;
    }

    .hero-cta-btn {
        padding: 12px 24px;
        font-size: 0.9375rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .hero-title {
        font-size: clamp(32px, 8vw, 44px);
    }

    .hero-subtitle {
        font-size: 0.9375rem;
        margin-top: 14px;
    }

    .hero-image-wrapper {
        max-width: 100%;
    }

    .hero-left-title {
        font-size: 26px;
        text-align: center;
    }

    .hero-left-description {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 115px !important;
        padding-bottom: 36px !important;
    }

    .hero-wrapper {
        padding: 0 16px;
        gap: 0;
    }

    .hero-cta {
        margin-top: 18px;
    }

    .hero-cta-btn {
        padding: 12px 20px;
        font-size: 0.9375rem;
        max-width: 100%;
    }

    .hero-title {
        font-size: 28px;
        letter-spacing: -0.02em;
        text-align: center;
    }

    .hero-subtitle {
        font-size: 0.875rem;
        margin-top: 12px;
        line-height: 1.55;
    }

    .hero-left-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-left-cta .btn {
        width: 100%;
    }
}

/* Atmospheric Clouds Section - High-End Aesthetic */
.hero-clouds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 8;
    /* Between Image (5) and Title (10) */
    overflow: hidden;
}

.hero-cloud {
    position: absolute;
    border-radius: 50%;
    opacity: 0.8;
    filter: blur(60px);
    will-change: transform, opacity;
    animation: drift-idle 20s ease-in-out infinite alternate;
}

@keyframes drift-idle {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(30px, 20px) scale(1.1);
    }
}

.cloud-1 {
    width: 800px;
    height: 500px;
    top: -10%;
    left: -15%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4), transparent);
    animation-delay: 0s;
}

.cloud-2 {
    width: 900px;
    height: 600px;
    bottom: -20%;
    right: -20%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4), rgba(240, 147, 251, 0.1), transparent);
    animation-delay: -5s;
}

.cloud-3 {
    width: 600px;
    height: 400px;
    top: 20%;
    right: -10%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.2), transparent);
    animation-delay: -10s;
}

.cloud-4 {
    width: 1000px;
    height: 600px;
    top: 40%;
    left: 10%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5), transparent);
    animation-delay: -15s;
}

/* Mesh Background Blobs */
.hero-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    /* Substantially reduced for a lighter feel */
    will-change: transform;
    animation: blob-float 30s ease-in-out infinite alternate;
}

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

    33% {
        transform: translate(10%, 15%) rotate(120deg) scale(1.2);
    }

    66% {
        transform: translate(-10%, 20%) rotate(240deg) scale(0.8);
    }

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

.blob-1 {
    width: 800px;
    height: 800px;
    top: -200px;
    left: -200px;
    background: radial-gradient(circle, #a855f7, transparent);
    animation-delay: 0s;
}

.blob-2 {
    width: 900px;
    height: 900px;
    bottom: -300px;
    right: -200px;
    background: radial-gradient(circle, #667eea, transparent);
    animation-delay: -5s;
}

.blob-3 {
    width: 700px;
    height: 700px;
    top: 20%;
    right: 15%;
    background: radial-gradient(circle, #f093fb, transparent);
    animation-delay: -10s;
}

/* Performance optimizations */
.hero-title-wrapper,
.hero-image-wrapper,
.hero-left-content,
.dashboard-image,
.hero-cloud,
.hero-blob {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}