:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --bg-dark: #020617;
    --bg-card: rgba(15, 23, 42, 0.6);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #10b981;
    --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-surface);
    pointer-events: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.95rem;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.desktop-only {
    display: inline-flex !important;
}

.mobile-only {
    display: none !important;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.6);
}

/* Hero Section */
.hero {
    padding: 12rem 0 8rem;
    text-align: center;
    position: relative;
}

.hero-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
    background: linear-gradient(to bottom, #fff 40%, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 3rem;
}

.quick-steps {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-badge {
    background: var(--primary);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
}

.hero-image-wrapper {
    margin-top: 5rem;
    perspective: 1000px;
    position: relative;
    display: flex;
    justify-content: center;
}

.demo-container {
    width: 100%;
    max-width: 900px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--glass-border);
    transform: rotateX(5deg);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.demo-container:hover {
    transform: rotateX(0deg);
}

.browser-header {
    background: #f1f5f9;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.browser-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.browser-content {
    padding: 60px 40px;
    text-align: left;
    color: #1e293b;
    position: relative;
    min-height: 400px;
    background: #fff;
    overflow: hidden;
}

.demo-product {
    max-width: 500px;
}

.demo-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f172a;
}

.demo-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: inline-block;
    position: relative;
}

.price-select {
    position: relative;
    z-index: 1;
}

.selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(37, 99, 235, 0.3);
    z-index: -1;
    animation: selectText 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-tooltip {
    position: absolute;
    top: -60px;
    left: 20px;
    background: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #2563eb;
    opacity: 0;
    transform: translateY(10px);
    animation: showTooltip 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    z-index: 10;
    max-width: 90vw;
    font-size: 0.85rem;
}

.demo-cursor {
    position: absolute;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 100;
    animation: moveCursor 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes selectText {

    0%,
    20% {
        width: 0;
    }

    40%,
    80% {
        width: 100%;
    }

    100% {
        width: 0;
    }
}

@keyframes showTooltip {

    0%,
    45% {
        opacity: 0;
        transform: translateY(10px);
    }

    50%,
    85% {
        opacity: 1;
        transform: translateY(0);
    }

    90%,
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

@keyframes moveCursor {
    0% {
        top: 80%;
        left: 80%;
    }

    30% {
        top: 30%;
        left: 10%;
    }

    40% {
        top: 30%;
        left: 30%;
    }

    80% {
        top: 30%;
        left: 30%;
    }

    100% {
        top: 80%;
        left: 80%;
    }
}

/* Features Section */
.features {
    padding: 8rem 0;
}

.section-tag {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.2em;
    display: block;
    text-align: center;
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 5rem;
    letter-spacing: -0.03em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2.5rem;
}

.feature-card {
    padding: 3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(15, 23, 42, 0.8);
}

.feature-icon {
    font-size: 2.8rem;
    margin-bottom: 2rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* How it works */
.how-it-works {
    padding: 8rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 4rem;
}

.step {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.step:nth-child(even) {
    direction: rtl;
}

.step:nth-child(even) .step-content {
    direction: ltr;
}

.step-image {
    width: 100%;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.step-number {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.step-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* CTA Section */
.cta {
    padding: 10rem 0;
    text-align: center;
}

.cta-box {
    padding: 6rem 3rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
}

.cta h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* Footer */
footer {
    padding: 5rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    margin-top: 1.5rem;
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links-col ul {
    list-style: none;
}

.footer-links-col li {
    margin-bottom: 0.8rem;
}

.footer-links-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 1rem;
    text-align: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.reveal {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsive */
@media (max-width: 992px) {
    .step {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .step:nth-child(even) {
        direction: ltr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 8rem 0 4rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .features {
        padding: 4rem 0;
    }

    .how-it-works {
        padding: 4rem 0;
    }

    .cta {
        padding: 5rem 0;
    }

    .cta-box {
        padding: 3rem 1.5rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(2, 6, 23, 0.95);
        backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        border-bottom: 1px solid var(--glass-border);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: inline-flex !important;
    }

    .cta-box {
        padding: 4rem 2rem;
    }

    .browser-content {
        padding: 40px 20px;
        min-height: 350px;
    }

    .demo-price {
        font-size: 1.8rem;
    }

    .demo-title {
        font-size: 1.2rem;
    }

    .demo-tooltip {
        top: -60px;
        left: 0;
        right: 0;
        margin: auto;
        width: max-content;
        font-size: 0.75rem;
        padding: 8px 12px;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .quick-steps {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .footer-bottom {
        justify-content: center;
    }
}

/* Legal Pages refinement */
.legal-page {
    background-attachment: fixed;
}

.legal-content {
    margin-top: 4rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}