/* ===================================
   CAFEDA.DEV - Premium Landing Page Styles
   =================================== */

/* CSS Custom Properties */
:root {
    /* Colors - Premium Dark Theme */
    --color-bg-primary: #0a0a0f;
    --color-bg-secondary: #12121a;
    --color-bg-tertiary: #1a1a25;
    --color-bg-card: rgba(26, 26, 37, 0.6);

    --color-text-primary: #ffffff;
    --color-text-secondary: #a0a0b0;
    --color-text-muted: #6b6b7b;

    /* Gradient Colors */
    --color-accent-1: #6366f1;
    --color-accent-2: #8b5cf6;
    --color-accent-3: #a855f7;
    --color-accent-4: #c084fc;

    /* Accent Gradient */
    --gradient-primary: linear-gradient(135deg, var(--color-accent-1) 0%, var(--color-accent-3) 100%);
    --gradient-text: linear-gradient(135deg, var(--color-accent-2) 0%, var(--color-accent-4) 100%);
    --gradient-glow: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 24px;
    --container-max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition-base);
    backdrop-filter: blur(0);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 0;
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
}

.logo-text {
    letter-spacing: -0.5px;
}

.logo-dot {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    position: relative;
    transition: var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

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

.nav-link.active::after,
.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    position: relative;
    transition: var(--transition-base);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-text-primary);
    transition: var(--transition-base);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 30% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 70% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    animation: fadeInUp 1s ease;
}

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

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-accent-4);
    margin-bottom: 24px;
    animation: pulse 3s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.2);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
}

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

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

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary .btn-arrow {
    width: 18px;
    height: 18px;
    transition: var(--transition-base);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

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

.stat {
    text-align: center;
}

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

.stat-number::after {
    content: '+';
    -webkit-text-fill-color: var(--color-accent-4);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--color-text-muted);
    border-bottom: 2px solid var(--color-text-muted);
    transform: rotate(45deg);
}

/* ===================================
   Apps Section
   =================================== */
.apps {
    padding: var(--section-padding);
    position: relative;
}

.apps::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent-4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

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

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

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

/* App Card */
.app-card {
    position: relative;
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition-base);
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition-base);
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: var(--shadow-glow);
}

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

.app-card-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-slow);
}

.app-card:hover .app-card-glow {
    opacity: 1;
}

.app-card.featured {
    border-color: rgba(139, 92, 246, 0.3);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, var(--color-bg-card) 50%);
}

.featured-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    background: var(--gradient-primary);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.app-content {
    position: relative;
    z-index: 1;
}

.app-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.app-description {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.app-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-accent-4);
}

.app-link svg {
    width: 16px;
    height: 16px;
    transition: var(--transition-base);
}

.app-link:hover svg {
    transform: translateX(4px);
}

/* ===================================
   About Section
   =================================== */
.about {
    padding: var(--section-padding);
    background: var(--color-bg-secondary);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
}

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

.about-content {
    max-width: 560px;
}

.about-text {
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
}

.feature {
    display: flex;
    gap: 16px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.feature-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-content p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* Code Visual */
.about-visual {
    display: flex;
    justify-content: center;
}

.visual-card {
    position: relative;
    perspective: 1000px;
}

.visual-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    filter: blur(40px);
    animation: glowPulse 4s ease infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.code-block {
    position: relative;
    background: var(--color-bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: var(--transition-base);
}

.code-block:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.code-dot.red {
    background: #ff5f56;
}

.code-dot.yellow {
    background: #ffbd2e;
}

.code-dot.green {
    background: #27ca40;
}

.code-title {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.code-content {
    padding: 24px;
    font-size: 0.9rem;
    line-height: 1.8;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    overflow-x: auto;
}

.code-content .keyword {
    color: #c084fc;
}

.code-content .property {
    color: #7dd3fc;
}

.code-content .string {
    color: #a5d6a7;
}

.code-content .function {
    color: #fbbf24;
}

.code-content .param {
    color: #fb923c;
}

.code-content .class {
    color: #38bdf8;
}

/* ===================================
   Footer
   =================================== */
.footer {
    padding: 60px 0 30px;
    background: var(--color-bg-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-tagline {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
    max-width: 280px;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

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

.footer-column a:hover {
    color: var(--color-accent-4);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

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

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-content {
        max-width: 100%;
    }

    .about-visual {
        order: -1;
    }

    .code-block {
        transform: none;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-bg-secondary);
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding: 40px;
        transition: var(--transition-base);
        border-left: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-toggle.active .hamburger {
        background: transparent;
    }

    .nav-toggle.active .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle.active .hamburger::after {
        bottom: 0;
        transform: rotate(-45deg);
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-title {
        letter-spacing: -1px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-divider {
        display: none;
    }

    .hero-stats {
        flex-direction: column;
    }

    .scroll-indicator {
        display: none;
    }

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

    .footer-links {
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .hero-subtitle {
        font-size: 1.1rem;
    }

    .app-card {
        padding: 24px;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
}

/* ===================================
   Animations
   =================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Particle styles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(139, 92, 246, 0.4);
    border-radius: 50%;
    pointer-events: none;
    animation: float 20s infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty));
        opacity: 0;
    }
}

/* Smooth scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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