/* WebApp & SaaS Specific Styles */
:root {
    --saas-gradient-hero: radial-gradient(circle at top center, #1F2937, #0f1218);
    --saas-accent-blue: #2A8CA6;
    --saas-accent-teal: #4DB3D8;
}

.webapp-hero {
    position: relative;
    padding: 180px 0 100px;
    background: var(--saas-gradient-hero);
    color: white;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* Richer dark gradient background */
    background: radial-gradient(circle at 20% 50%, #1e293b 0%, #0f172a 100%);
}

.webapp-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(42, 140, 166, 0.07) 0%, transparent 50%);
    animation: rotateGlow 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}

.webapp-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    z-index: 0;
    opacity: 0.5;
}

.webapp-hero .container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* Text Content Animations */
.hero-text-content {
    /* Container itself doesn't hide, children do */
    position: relative;
    z-index: 2;
}

.hero-text-content>* {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-text-content .saas-badge {
    animation-delay: 0.1s;
}

.hero-text-content .hero-title-large {
    animation-delay: 0.2s;
}

.hero-text-content .hero-sub {
    animation-delay: 0.3s;
}

.hero-text-content .hero-btns {
    animation-delay: 0.4s;
}

.saas-badge {
    display: inline-block;
    background: rgba(42, 140, 166, 0.1);
    color: var(--saas-accent-teal);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 25px;
    border: 1px solid rgba(42, 140, 166, 0.3);
    letter-spacing: 1px;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(42, 140, 166, 0.1);
}

.hero-title-large {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: white;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.hero-sub {
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 35px;
    max-width: 550px;
}

/* Dashboard Mockup Visual - PREMIUM GLASS */
.saas-visual-side {
    position: relative;
    perspective: 1500px;
    transform-style: preserve-3d;
}

.dashboard-mockup {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow:
        0 20px 50px -10px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    transform: rotateY(-15deg) rotateX(10deg);
    animation: floatSaas 6s ease-in-out infinite;
    position: relative;
    opacity: 0;
    /* Reveal animation handled by keyframe in separate style or reusing fadeInUp with delay */
    animation: floatSaas 8s ease-in-out infinite, fadeInScale 1s ease-out forwards 0.3s;
}

/* Glow behind mockup */
.saas-visual-side::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(42, 140, 166, 0.3) 0%, transparent 70%);
    filter: blur(60px);
    z-index: -1;
    animation: pulseGlow 4s ease-in-out infinite;
}

.mockup-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mockup-dots {
    display: flex;
    gap: 8px;
}

.mockup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mockup-dot.active {
    background-color: #ff5f56;
    box-shadow: 0 0 10px rgba(255, 95, 86, 0.4);
}

.mockup-dot.yellow {
    background-color: #ffbd2e;
    box-shadow: 0 0 10px rgba(255, 189, 46, 0.4);
}

.mockup-dot.green {
    background-color: #27c93f;
    box-shadow: 0 0 10px rgba(39, 201, 63, 0.4);
}

.mockup-body {
    padding: 25px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 25px;
    height: 380px;
}

.mockup-sidebar {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.sidebar-line {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    width: 80%;
    transition: width 0.3s;
}

.sidebar-line:nth-child(2) {
    width: 60%;
}

.sidebar-line:nth-child(3) {
    width: 90%;
}

.sidebar-line.short {
    width: 40%;
}

.mockup-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mockup-chart-area {
    height: 140px;
    background: linear-gradient(180deg, rgba(42, 140, 166, 0.15) 0%, rgba(42, 140, 166, 0) 100%);
    border: 1px solid rgba(42, 140, 166, 0.2);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.mockup-grid-row {
    display: flex;
    gap: 15px;
}

.mockup-card {
    flex: 1;
    height: 90px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: transform 0.3s;
}

.mockup-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

@keyframes floatSaas {

    0%,
    100% {
        transform: rotateY(-15deg) rotateX(10deg) translateY(0);
    }

    50% {
        transform: rotateY(-15deg) rotateX(10deg) translateY(-25px);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: rotateY(-15deg) rotateX(10deg) scale(0.9) translateY(40px);
    }

    to {
        opacity: 1;
        transform: rotateY(-15deg) rotateX(10deg) scale(1) translateY(0);
    }
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Features Grid specifics if needed differing from website-design */
.saas-features {
    padding: 100px 0;
    background: #ffffff;
}

.saas-feature-card {
    position: relative;
    padding: 40px 30px;
    background: white;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    transition: all 0.3s ease;
    z-index: 1;
}

.saas-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.saas-feature-card .icon-wrap {
    width: 60px;
    height: 60px;
    background: rgba(42, 140, 166, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.saas-feature-card:hover .icon-wrap {
    background: var(--primary);
    color: white;
}

/* Ribbon reused but ensuring styles match */
.saas-cta-ribbon {
    background: var(--primary-dark);
    /* Maybe a darker specialized gradient */
    background: linear-gradient(135deg, #1A5C78 0%, #2A8CA6 100%);
    padding: 80px 0;
    text-align: center;
    color: white;
}

/* Media Queries */
@media (max-width: 900px) {
    .webapp-hero .container {
        grid-template-columns: 1fr;
    }

    .saas-visual-side {
        display: block;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        max-width: 400px;
        /* Constrain size */
        opacity: 0.25;
        /* Subtle background but visible */
        z-index: 0;
        pointer-events: none;
    }

    .hero-text-content {
        position: relative;
        z-index: 2;
    }
}