/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #07060b;
    --bg-secondary: #0d0c14;
    --bg-card: rgba(18, 16, 30, 0.7);
    --bg-card-hover: rgba(26, 23, 45, 0.8);

    --text-primary: #f0eef6;
    --text-secondary: #9490a9;
    --text-muted: #5d5878;

    --accent-1: #8b5cf6;
    --accent-2: #6d28d9;
    --accent-3: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.25);

    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #f97316 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
    --gradient-card-border: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(236, 72, 153, 0.1) 50%, transparent 100%);

    --border-color: rgba(139, 92, 246, 0.12);
    --border-hover: rgba(139, 92, 246, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

/* ===== PARTICLES CANVAS ===== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

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

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

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(7, 6, 11, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    z-index: 1001;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: #fff;
}

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

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

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link--cta {
    background: var(--gradient-primary);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: var(--radius-xl);
    font-weight: 600;
}

.nav-link--cta::after {
    display: none;
}

.nav-link--cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-xl);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
}

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

.btn-ghost:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: var(--accent-1);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SECTION COMMON ===== */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-3);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 6px 16px;
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.section-desc {
    margin-top: 16px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent-3);
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 8px 20px;
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

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

/* ===== SERVICES ===== */
.services {
    position: relative;
    z-index: 1;
    padding: 120px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

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

.service-icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== PROCESS ===== */
.process {
    position: relative;
    z-index: 1;
    padding: 120px 0;
    background: var(--bg-secondary);
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 32px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent-1), #ec4899, #f97316);
    opacity: 0.3;
}

.process-step {
    text-align: center;
    position: relative;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-hover);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-3);
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.process-step:hover .step-number {
    border-color: var(--accent-1);
    box-shadow: 0 0 24px var(--accent-glow);
    background: rgba(139, 92, 246, 0.15);
}

.step-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== TECH STACK ===== */
.stack {
    position: relative;
    z-index: 1;
    padding: 120px 0;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stack-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
}

.stack-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.stack-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.stack-logo svg {
    width: 100%;
    height: 100%;
}

/* ===== CONTACT ===== */
.contact {
    position: relative;
    z-index: 1;
    padding: 120px 0;
    background: var(--bg-secondary);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-top: 16px;
    margin-bottom: 36px;
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.contact-method:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.method-icon {
    font-size: 1.4rem;
}

.method-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.method-value {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 2px;
}

/* ===== CONTACT FORM ===== */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    background: rgba(7, 6, 11, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    color: var(--text-muted);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235d5878' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-group select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    z-index: 1;
    padding: 48px 0 32px;
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
}

.footer-tagline {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 8px;
}

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

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

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

.footer-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-legal p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.footer-email a {
    font-size: 0.88rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-email a:hover {
    color: var(--accent-3);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SCROLL REVEAL ===== */
.service-card,
.process-step,
.stack-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.visible,
.process-step.visible,
.stack-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    .process-timeline::before {
        display: none;
    }
    .stack-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(7, 6, 11, 0.97);
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;
        padding: 80px 24px 40px;
        overflow-y: auto;
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }
    .nav-links.open {
        opacity: 1;
        pointer-events: all;
    }
    .nav-link {
        font-size: 1.3rem;
    }
    .nav-toggle {
        display: flex;
    }
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .process-timeline {
        grid-template-columns: 1fr;
    }
    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-stats {
        gap: 20px;
    }
    .stat-divider {
        display: none;
    }
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .stack-grid {
        grid-template-columns: 1fr;
    }
    .hero-actions .btn {
        width: 100%;
    }
}
