/* ===== CSS Variables ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;
    --accent: #8b5cf6;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --dark-lighter: #334155;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --gradient-text: linear-gradient(135deg, #6366f1 0%, #0ea5e9 50%, #8b5cf6 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--dark);
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 60%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--light);
}

p {
    color: var(--gray);
}

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

ul {
    list-style: none;
}

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

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn i {
    font-size: 1.1rem;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--light);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-submit {
    width: 100%;
    justify-content: center;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: var(--shadow-md);
}

.header .container {
    padding: 1rem 20px;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.nav-menu a {
    color: var(--gray-light);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--light);
}

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--light);
    transition: var(--transition);
}

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

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 500px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.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.875rem;
    color: var(--gray);
}

.hero-visual {
    position: relative;
    height: 500px;
    animation: fadeInRight 1s ease 0.2s backwards;
}

.floating-card {
    position: absolute;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.floating-card span {
    color: var(--light);
    font-weight: 600;
}

.card-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 10%;
    animation-delay: 2s;
}

.card-3 {
    bottom: 15%;
    left: 5%;
    animation-delay: 4s;
}

/* ===== Services Section ===== */
.services {
    padding: 100px 0;
    background: var(--dark-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 1.5rem;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    margin-bottom: 1.5rem;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-light);
    font-size: 0.9rem;
}

.service-features li i {
    color: var(--secondary);
    font-size: 0.8rem;
}

/* ===== Portfolio Section ===== */
.portfolio {
    padding: 100px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--dark-light);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.portfolio-image {
    position: relative;
    height: 300px;
    background: var(--gradient-primary);
    overflow: hidden;
}

.portfolio-image:nth-child(2) {
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
}

.portfolio-image:nth-child(3) {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.portfolio-image:nth-child(4) {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    margin-bottom: 1.5rem;
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.portfolio-link i {
    font-size: 0.9rem;
}

.portfolio-tech {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-tech span {
    font-size: 0.75rem;
    color: var(--gray);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

/* ===== Process Section ===== */
.process {
    padding: 100px 0;
    background: var(--dark-light);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
}

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

.process-step:nth-child(2) {
    grid-column: 2;
}

.process-step:nth-child(5) {
    grid-column: 2;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    position: relative;
    z-index: 1;
}

.step-number::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: 0.3;
    z-index: -1;
}

.step-content h3 {
    margin-bottom: 0.75rem;
}

.step-content p {
    font-size: 0.95rem;
}

/* ===== Why Us Section ===== */
.why-us {
    padding: 100px 0;
}

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

.why-text {
    animation: fadeInLeft 1s ease;
}

.why-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.why-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.why-feature i {
    font-size: 1.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.why-feature h3 {
    margin-bottom: 0.5rem;
}

.why-feature p {
    font-size: 0.95rem;
}

.why-stats {
    animation: fadeInRight 1s ease 0.3s backwards;
}

.why-stat-item {
    text-align: center;
    margin-bottom: 2rem;
}

.stat-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    position: relative;
}

.stat-circle::before {
    content: '';
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    background: conic-gradient(
        transparent 0%,
        var(--primary) 20%,
        var(--primary) 25%,
        transparent 25%,
        transparent 30%,
        var(--primary) 30%,
        var(--primary) 35%,
        transparent 35%,
        transparent 40%,
        var(--primary) 40%,
        var(--primary) 45%,
        transparent 45%,
        transparent 50%,
        var(--primary) 50%,
        var(--primary) 55%,
        transparent 55%,
        transparent 60%,
        var(--primary) 60%,
        var(--primary) 65%,
        transparent 65%,
        transparent 70%,
        var(--primary) 70%,
        var(--primary) 75%,
        transparent 75%,
        transparent 80%,
        var(--primary) 80%,
        var(--primary) 85%,
        transparent 85%,
        transparent 90%,
        var(--primary) 90%,
        var(--primary) 95%,
        transparent 95%
    );
    animation: rotateCircle 3s linear infinite;
}

.stat-circle-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    z-index: 1;
}

@keyframes rotateCircle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.stat-label {
    font-size: 1rem;
    color: var(--gray);
}

/* ===== Testimonials Section ===== */
.testimonials {
    padding: 100px 0;
    background: var(--dark-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.testimonial-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonial-stars {
    color: #fbbf24;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--gray-light);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--light);
}

.author-company {
    font-size: 0.8rem;
    color: var(--gray);
}

/* ===== CTA Section ===== */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ===== Contact Section ===== */
.contact {
    padding: 100px 0;
    background: var(--dark-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    animation: fadeInLeft 1s ease;
}

.contact-details {
    margin: 2rem 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.25rem;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.75rem;
    border-radius: var(--radius-md);
}

.contact-item h4 {
    margin-bottom: 0.25rem;
}

.contact-item p {
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-light);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
}

.contact-form {
    animation: fadeInRight 1s ease;
}

#contactForm {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--light);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

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

/* ===== Footer ===== */
.footer {
    padding: 3rem 0 1.5rem;
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-brand p {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.footer-links h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-links a {
    display: block;
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

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

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

.footer-bottom p {
    font-size: 0.9rem;
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ===== 3D Background Canvas ===== */
#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

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

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

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

    .process-step:nth-child(2),
    .process-step:nth-child(5) {
        grid-column: 1;
    }

    .why-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .why-features {
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--dark);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

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

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

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .section-header p {
        margin-bottom: 2rem;
    }

    .why-stats {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .why-stat-item {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        margin-left: auto;
        margin-right: auto;
    }
}

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .portfolio-image {
        height: 250px;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
}