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

:root {
    --color-bg: #0a0a0f;
    --color-bg-secondary: #12121a;
    --color-text: #ffffff;
    --color-text-muted: #8888a0;
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-accent: #f472b6;
    --color-border: rgba(255, 255, 255, 0.1);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-accent: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Animated Background ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--color-primary);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--color-accent);
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: #8b5cf6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

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

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-text);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 32px;
}

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

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

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--color-primary-light);
    margin-bottom: 32px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.gradient-text {
    display: block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    max-width: 600px;
    margin: 0 auto 40px;
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

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

.btn-arrow {
    transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

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

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

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
}

/* ===== Collection Section ===== */
.collection {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.template-card {
    background: var(--color-bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.template-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-glow);
}

.card-preview {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.preview-mockup {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mockup-header {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
}

.mockup-dots {
    display: flex;
    gap: 6px;
}

.mockup-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.mockup-dots span:first-child { background: #ff5f57; }
.mockup-dots span:nth-child(2) { background: #ffbd2e; }
.mockup-dots span:last-child { background: #28ca42; }

.mockup-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* SaaS Mockup */
.saas-mockup {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.saas-mockup .mockup-nav {
    height: 8px;
    width: 60%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.saas-mockup .mockup-hero {
    text-align: center;
    padding: 10px 0;
}

.saas-mockup .mockup-title {
    height: 16px;
    width: 70%;
    margin: 0 auto 8px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}

.saas-mockup .mockup-text {
    height: 8px;
    width: 50%;
    margin: 0 auto 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.saas-mockup .mockup-btn {
    height: 20px;
    width: 80px;
    margin: 0 auto;
    background: var(--gradient-primary);
    border-radius: 6px;
}

.saas-mockup .mockup-cards {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.saas-mockup .mockup-card {
    flex: 1;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Agency Mockup */
.agency-mockup {
    background: #0d0d0d;
}

.agency-mockup .mockup-content.dark {
    background: #0d0d0d;
}

.agency-mockup .mockup-nav {
    height: 8px;
    width: 40%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.agency-mockup .mockup-split {
    display: flex;
    gap: 20px;
    flex: 1;
    align-items: center;
}

.agency-mockup .mockup-left {
    flex: 1;
}

.agency-mockup .mockup-big-title {
    height: 24px;
    width: 90%;
    background: white;
    border-radius: 4px;
    margin-bottom: 12px;
}

.agency-mockup .mockup-left .mockup-text {
    height: 8px;
    width: 70%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.agency-mockup .mockup-right {
    flex: 1;
}

.agency-mockup .mockup-image {
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    border-radius: 8px;
}

/* App Mockup */
.app-mockup {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.app-mockup .mockup-content.gradient {
    justify-content: space-between;
    align-items: center;
}

.app-mockup .mockup-nav.light {
    height: 8px;
    width: 50%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    align-self: flex-start;
}

.app-mockup .mockup-center {
    display: flex;
    justify-content: center;
}

.app-mockup .mockup-phone {
    width: 60px;
    height: 100px;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.app-mockup .phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #2a2a3e 0%, #1a1a2e 100%);
    border-radius: 8px;
}

.app-mockup .mockup-cta {
    height: 20px;
    width: 100px;
    background: white;
    border-radius: 10px;
    align-self: center;
}

/* Card Overlay */
.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.template-card:hover .card-overlay {
    opacity: 1;
}

.preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transform: translateY(10px);
    transition: all var(--transition-normal);
}

.template-card:hover .preview-btn {
    transform: translateY(0);
}

.preview-btn:hover {
    box-shadow: var(--shadow-glow);
}

/* Card Info */
.card-info {
    padding: 24px;
}

.card-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary-light);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-description {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.meta-item svg {
    opacity: 0.7;
}

/* ===== About Section ===== */
.about {
    padding: 100px 0;
    background: var(--color-bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 20px;
}

.about-text {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.about-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-features li {
    display: flex;
    gap: 16px;
}

.feature-icon {
    width: 28px;
    height: 28px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--color-primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.about-features strong {
    display: block;
    margin-bottom: 4px;
}

.about-features p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Code Window */
.code-window {
    background: #1a1a24;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--color-border);
}

.code-dots {
    display: flex;
    gap: 8px;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dots span:first-child { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:last-child { background: #28ca42; }

.code-filename {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.code-content {
    padding: 24px;
    overflow-x: auto;
}

.code-content code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: #a5b4fc;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

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

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text);
}

.footer-links a {
    display: block;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 12px;
    transition: color var(--transition-fast);
}

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

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

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

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hero-stats {
        gap: 24px;
    }
    
    .stat-divider {
        display: none;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
