:root {
    --bg: #030303;
    --surface: #0a0a0a;
    --text: #ffffff;
    --text-muted: #a1a1aa;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.2);
    --border: rgba(255, 255, 255, 0.08);
    --radius-lg: 24px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

/* ════════════════════════════════════════════
   BACKGROUND EFFECTS
   ════════════════════════════════════════════ */

.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.gradient-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: -1;
    background:
        linear-gradient(to bottom, rgba(3, 3, 3, 0.7), rgba(3, 3, 3, 0.9)),
        url('assets/images/bg-cosmos.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(100px) brightness(0.4);
    animation: bg-animate 30s infinite alternate ease-in-out;
}

@keyframes bg-animate {
    from {
        transform: scale(1) rotate(0deg);
    }

    to {
        transform: scale(1.1) rotate(5deg);
    }
}

/* ════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════ */

.navbar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    padding: 32px 5%;
}

.navbar {
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 8px 12px 8px 24px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 40px;
    width: 70%;
    max-width: 1200px;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.logo i {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 32px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

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

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

.auth-ui {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.user-profile:hover .user-avatar {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 160px;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
}

.auth-dropdown.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ff4d4d;
}

.dropdown-item i {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s, background 0.2s;
}

.btn-primary:hover {
    background: #f4f4f5;
    transform: translateY(-1px);
}

.btn-primary i {
    width: 14px;
    height: 14px;
}

/* ════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════ */

.hero {
    padding-top: 180px;
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-content {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 72px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
}

.hero-content h1 span.italic {
    font-style: italic;
    font-weight: 400;
    color: #a1a1aa;
}

.hero-content p {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 48px auto;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-large {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.15);
}

.hero-mockup {
    margin-top: 80px;
    width: 90%;
    max-width: 1200px;
    padding: 20px;
}

.mockup-container {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mockup-container:hover {
    transform: perspective(1000px) rotateX(2deg) translateY(-10px);
}

.mockup-image {
    width: 100%;
    height: auto;
    display: block;
}

.mockup-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

/* ════════════════════════════════════════════
   FEATURES (STICKY SCROLL)
   ════════════════════════════════════════════ */

.features-sticky {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.features-container {
    display: flex;
    gap: 100px;
    position: relative;
}

.features-text-col {
    flex: 1;
    padding-bottom: 50vh;
    /* Extra room to scroll past last feature */
}

.feature-block {
    padding: 40vh 0;
    opacity: 0.3;
    transition: opacity 0.5s ease;
}

.feature-block.active {
    opacity: 1;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--accent);
}

.feature-block h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.feature-block p {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
}

.features-visual-col {
    flex: 1.2;
}

.sticky-visual-wrap {
    position: sticky;
    top: 20vh;
    aspect-ratio: 16/10;
    width: 100%;
}

.visual-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.visual-item.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.visual-inner {
    width: 100%;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.visual-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ════════════════════════════════════════════
   LAYOUTS SHOWCASE
   ════════════════════════════════════════════ */

.layout-showcase {
    padding: 100px 5%;
    text-align: center;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
}

.layout-showcase h2 {
    font-size: 32px;
    margin-bottom: 60px;
    letter-spacing: -0.02em;
}

.layouts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.layout-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.layout-preview {
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

.layout-preview::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.l-single::after {
    inset: 20px;
}

.l-horizontal::after {
    inset: 20px;
    width: 45px;
    box-shadow: 65px 0 0 rgba(255, 255, 255, 0.1);
}

.l-vertical::after {
    inset: 20px;
    height: 45px;
    box-shadow: 0 65px 0 rgba(255, 255, 255, 0.1);
}

.l-grid::after {
    inset: 20px;
    width: 45px;
    height: 45px;
    box-shadow: 65px 0 0 rgba(255, 255, 255, 0.1), 0 65px 0 rgba(255, 255, 255, 0.1), 65px 65px 0 rgba(255, 255, 255, 0.1);
}

.l-bento::after {
    inset: 20px;
    width: 60px;
    box-shadow: 80px 0 0 rgba(255, 255, 255, 0.1);
}

/* Simplified bento */
.l-mosaic::after {
    inset: 20px;
    height: 60px;
    box-shadow: 0 80px 0 rgba(255, 255, 255, 0.1);
}

.layout-card span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ════════════════════════════════════════════
   PRICING
   ════════════════════════════════════════════ */

.pricing {
    padding: 120px 5%;
    text-align: center;
}

.pricing-header h2 {
    font-size: 40px;
    margin-bottom: 12px;
}

.pricing-header p {
    color: var(--text-muted);
    margin-bottom: 60px;
}

.pricing-cards {
    display: flex;
    justify-content: center;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.price-card {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 48px;
    border-radius: 32px;
    text-align: left;
    display: flex;
    flex-direction: column;
    position: relative;
}

.price-card.pro {
    background: #ffffff;
    color: #000000;
    transform: scale(1.05);
    box-shadow: 0 30px 60px rgba(255, 255, 255, 0.1);
}

.badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 100px;
}

.price-card h3 {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

.price {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.one-time {
    font-size: 14px;
    color: #555;
    margin-bottom: 32px;
}

.price-card ul {
    list-style: none;
    margin-bottom: 40px;
}

.price-card li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 500;
}

.price-card i {
    color: var(--accent);
    width: 16px;
    height: 16px;
}

.pro i {
    color: #000;
}

.btn-secondary {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #fff;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.price-card.pro .btn-primary {
    margin-top: auto;
    background: #000;
    color: #fff;
    padding: 16px;
    font-size: 15px;
    justify-content: center;
}

/* ════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════ */

footer {
    padding: 80px 5%;
    border-top: 1px solid var(--border);
    margin-top: 100px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    color: var(--text-muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .navbar {
        min-width: auto;
        width: 100%;
    }

    .hero-content h1 {
        font-size: 48px;
    }

    .feature-item {
        flex-direction: column !important;
        gap: 40px;
    }

    .pricing-cards {
        flex-direction: column;
        align-items: center;
    }

    .price-card {
        width: 100%;
        max-width: 400px;
    }

    .price-card.pro {
        transform: none;
    }
}