/* ========================================
   Rivaly Landing Page Styles
   Modern SaaS design with gradients
   ======================================== */

/* CSS Variables */
:root {
    --color-primary: #6366f1;
    --color-primary-dark: #4f46e5;
    --color-primary-light: #818cf8;
    --color-secondary: #06b6d4;
    --color-accent: #8b5cf6;
    --color-bg: #0f172a;
    --color-bg-light: #1e293b;
    --color-bg-card: rgba(30, 41, 59, 0.8);
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-border: rgba(148, 163, 184, 0.2);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-card-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-center a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-center a:hover {
    color: var(--color-text);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-lk {
    color: var(--color-primary-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav-lk:hover {
    color: var(--color-text);
}

.btn-telegram {
    background: linear-gradient(135deg, #229ed9, #1a8bc7);
    color: white;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-small {
    padding: 6px 14px;
    font-size: 0.85rem;
}

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

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1.5px solid var(--color-border);
}

.btn-outline:hover {
    border-color: var(--color-primary-light);
    background: rgba(99, 102, 241, 0.1);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
    animation: gradientPulse 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gradientPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Animated background blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    top: -10%;
    left: -10%;
    animation: blobFloat 20s ease-in-out infinite;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    top: 40%;
    right: -5%;
    animation: blobFloat 25s ease-in-out infinite reverse;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--color-accent), #ec4899);
    bottom: -5%;
    left: 20%;
    animation: blobFloat 18s ease-in-out infinite 2s;
}

.blob-4 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    top: 20%;
    left: 60%;
    animation: blobFloat 22s ease-in-out infinite 4s;
}

@keyframes blobFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(20px, 10px) scale(1.05);
    }
}

/* Subtle grid overlay */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Section Titles
   ======================================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 64px;
    letter-spacing: -1px;
}

/* ========================================
   Features Section
   ======================================== */
.features {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    position: relative;
    z-index: 1;
}

.feature-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow:
        var(--shadow-card-hover),
        0 0 40px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
}

/* Floating dots on features background */
.features-dots {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.features-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.25);
    animation: featureDotFloat 20s ease-in-out infinite;
}

@keyframes featureDotFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.25;
    }
    50% {
        transform: translateY(-40px) scale(1.5);
        opacity: 0.5;
    }
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   How It Works Section
   ======================================== */
.how-it-works {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 50%, transparent 100%);
}

.how-it-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    max-width: 280px;
    padding: 32px 24px;
}

.step-number {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    transition: var(--transition);
}

.step:hover .step-number {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    transform: scale(1.1);
}

.step h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.step p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.step-arrow {
    font-size: 2rem;
    color: var(--color-primary-light);
    font-weight: 300;
    opacity: 0.6;
}

/* ========================================
   Pricing Section
   ======================================== */
.pricing {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.pricing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 320px));
    gap: 32px;
    justify-content: center;
}

.pricing-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: var(--transition);
    position: relative;
}

.pricing-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.pricing-popular {
    border-color: var(--color-primary);
    box-shadow:
        0 0 30px rgba(99, 102, 241, 0.15),
        0 0 80px rgba(99, 102, 241, 0.08),
        inset 0 0 60px rgba(99, 102, 241, 0.03);
    position: relative;
    overflow: hidden;
}

.pricing-popular::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-primary-light), var(--color-accent));
    border-radius: calc(var(--radius-lg) + 2px);
    z-index: -1;
    opacity: 0.15;
    filter: blur(8px);
    animation: popularGlow 3s ease-in-out infinite alternate;
}

@keyframes popularGlow {
    from {
        opacity: 0.1;
        filter: blur(8px);
    }
    to {
        opacity: 0.25;
        filter: blur(12px);
    }
}

.popular-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    padding: 6px 20px;
    border-radius: 0 0 var(--radius) var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 32px;
}

.pricing-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.pricing-period {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}

.pricing-features li {
    padding: 10px 0;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--color-border);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: "✓";
    color: var(--color-secondary);
    font-weight: 700;
    margin-right: 10px;
}

/* ========================================
   CTA Final Section
   ======================================== */
.cta-final {
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.05) 100%);
}

.cta-final::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.cta-final h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.cta-final p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    border-top: 1px solid var(--color-border);
    padding: 48px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
}

.footer-brand p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-sep {
    color: var(--color-border);
}

.footer-soon {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ========================================
   Legal Disclaimer
   ======================================== */

.legal-disclaimer {
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
    padding: 40px 0;
    margin-top: 20px;
}

.legal-disclaimer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.legal-disclaimer-content p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .nav-links {
        display: none;
    }

    .steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .section-title {
        font-size: 2rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
