/* ========================================
   GLOBAL STYLES & RESET
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #081010;
    color: #f8f8f8;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: #4050f0;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #6070ff;
}

/* ========================================
   NAVIGATION HEADER
   ======================================== */

.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(8, 16, 16, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(240, 240, 240, 0.1);
}

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

.logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(240, 240, 240, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f8f8f8;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #4050f0;
    transition: width 0.3s ease;
}

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

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 60px;
    perspective: 1000px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(8, 16, 16, 0.7) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(64, 80, 240, 0.2) 100%);
    z-index: 1;
}

.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
}

.shape-1 {
    animation: float-shape-1 6s ease-in-out infinite;
    transform-origin: center;
}

.shape-2 {
    animation: float-shape-2 8s ease-in-out infinite;
    transform-origin: center;
}

.shape-3 {
    animation: float-shape-3 7s ease-in-out infinite;
    transform-origin: center;
}

.shape-4 {
    animation: float-shape-4 9s ease-in-out infinite;
    transform-origin: center;
}

@keyframes float-shape-1 {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    25% { transform: translateY(-30px) translateX(15px) rotate(90deg); }
    50% { transform: translateY(-60px) translateX(0) rotate(180deg); }
    75% { transform: translateY(-30px) translateX(-15px) rotate(270deg); }
}

@keyframes float-shape-2 {
    0%, 100% { transform: translateX(0) translateY(0) rotateY(0deg); }
    50% { transform: translateX(40px) translateY(-40px) rotateY(180deg); }
}

@keyframes float-shape-3 {
    0%, 100% { transform: rotateX(0deg) rotateZ(0deg); }
    50% { transform: rotateX(180deg) rotateZ(180deg); }
}

@keyframes float-shape-4 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-50px) scale(1.2); }
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.3s both;
    transform-style: preserve-3d;
}

.hero-text {
    perspective: 1000px;
}

.hero-title {
    font-size: clamp(3.5rem, 12vw, 7rem);
    font-weight: 900;
    color: #f8f8f8;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    animation: slideInTitle 0.8s ease-out;
    text-shadow: 0 10px 40px rgba(64, 80, 240, 0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: #d8d8e0;
    font-weight: 400;
    margin-bottom: 2rem;
    animation: slideInSubtitle 0.8s ease-out 0.2s both;
}

@keyframes slideInTitle {
    from {
        opacity: 0;
        transform: translateY(30px) scaleY(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

@keyframes slideInSubtitle {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
    z-index: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #4050f0 0%, #6070ff 100%);
    color: #f8f8f8;
    box-shadow: 0 8px 24px rgba(64, 80, 240, 0.3);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(64, 80, 240, 0.5);
}

.btn-secondary {
    background: transparent;
    color: #f8f8f8;
    border: 2px solid #4050f0;
}

.btn-secondary:hover {
    background: #4050f0;
    transform: translateY(-4px);
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.scroll-dot {
    width: 8px;
    height: 8px;
    background: #4050f0;
    border-radius: 50%;
    animation: bounce 2s infinite;
    box-shadow: 0 0 16px rgba(64, 80, 240, 0.6);
}

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

/* Mobile Hero */
@media (max-width: 768px) {
    .hero {
        height: 90vh;
        margin-top: 50px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .cta-buttons {
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   SECTION COMMON STYLES
   ======================================== */

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    color: #f8f8f8;
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: #d8d8e0;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about {
    background: linear-gradient(180deg, #081010 0%, #101010 100%);
    padding: 3rem 0;
    position: relative;
}

.about-card {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(240, 240, 240, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 240, 240, 0.1);
    border-radius: 12px;
    padding: 3rem;
    transform: perspective(1000px) rotateX(0deg);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.about-card:hover {
    transform: perspective(1000px) rotateX(5deg) translateY(-10px);
    background: rgba(240, 240, 240, 0.06);
    box-shadow: 0 16px 48px rgba(64, 80, 240, 0.2);
}

.about-content {
    animation: fadeInUp 0.8s ease-out;
}

.about-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #d8d8e0;
    margin-bottom: 2.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(64, 80, 240, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(64, 80, 240, 0.2);
    transition: all 0.3s ease;
}

.stat:hover {
    background: rgba(64, 80, 240, 0.2);
    transform: translateY(-4px);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #4050f0;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #d8d8e0;
}

/* ========================================
   GALLERY SECTION
   ======================================== */

.gallery {
    background: #081010;
    padding: 3rem 0;
    position: relative;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.6rem 1.5rem;
    background: rgba(240, 240, 240, 0.05);
    border: 1px solid rgba(240, 240, 240, 0.1);
    color: #f8f8f8;
    cursor: pointer;
    border-radius: 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-tab:hover,
.filter-tab.active {
    background: #4050f0;
    border-color: #4050f0;
    color: #f8f8f8;
    box-shadow: 0 4px 16px rgba(64, 80, 240, 0.4);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1;
    perspective: 1000px;
    cursor: pointer;
    opacity: 1;
    transform: scale(1);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.gallery-item.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.8);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(64, 80, 240, 0.6) 0%, rgba(0, 255, 255, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.gallery-category {
    color: #f8f8f8;
    font-weight: 600;
    font-size: 1.2rem;
}

.gallery-item:hover {
    transform: scale(1.05) rotateY(8deg);
    box-shadow: 0 16px 48px rgba(64, 80, 240, 0.3);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

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

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
}

/* ========================================
   FEATURED WORK SECTION
   ======================================== */

.featured {
    background: linear-gradient(180deg, #081010 0%, #101010 100%);
    padding: 3rem 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.featured-card {
    display: flex;
    flex-direction: column;
    background: rgba(240, 240, 240, 0.02);
    border: 1px solid rgba(240, 240, 240, 0.08);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.featured-card:hover {
    transform: translateY(-12px) perspective(1000px) rotateX(3deg);
    border-color: rgba(64, 80, 240, 0.3);
    box-shadow: 0 16px 48px rgba(64, 80, 240, 0.2);
}

.featured-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.featured-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

.featured-card:hover .featured-image::after {
    opacity: 0;
}

.featured-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #f8f8f8;
}

.featured-content p {
    color: #d8d8e0;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.view-link {
    color: #4050f0;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.view-link:hover {
    color: #6070ff;
    transform: translateX(4px);
}

/* ========================================
   SERVICES/CTA SECTION
   ======================================== */

.services {
    background: linear-gradient(135deg, #081010 0%, #0a1414 50%, #081010 100%);
    padding: 3rem 0;
}

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.service-item {
    background: rgba(64, 80, 240, 0.08);
    border: 1px solid rgba(64, 80, 240, 0.15);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s ease;
}

.service-item:hover {
    background: rgba(64, 80, 240, 0.12);
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(64, 80, 240, 0.15);
}

.service-item h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #f8f8f8;
}

.service-item p {
    color: #d8d8e0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.cta-section {
    text-align: center;
    margin-top: 3rem;
}

.cta-note {
    color: #d8d8e0;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: #000000;
    border-top: 1px solid rgba(240, 240, 240, 0.1);
    padding: 2rem 0;
    position: relative;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand h4 {
    font-size: 1.5rem;
    color: #f8f8f8;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: #d8d8e0;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #d8d8e0;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #4050f0;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(240, 240, 240, 0.1);
    color: #687078;
    font-size: 0.85rem;
}

/* ========================================
   ANIMATIONS & SCROLL EFFECTS
   ======================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for items */
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }

.featured-card:nth-child(1) { animation-delay: 0.1s; }
.featured-card:nth-child(2) { animation-delay: 0.2s; }
.featured-card:nth-child(3) { animation-delay: 0.3s; }

.service-item:nth-child(1) { animation-delay: 0.1s; }
.service-item:nth-child(2) { animation-delay: 0.2s; }
.service-item:nth-child(3) { animation-delay: 0.3s; }

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 640px) {
    .section-container {
        padding: 3rem 1rem;
    }

    .nav-menu {
        gap: 0.8rem;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .about-card {
        padding: 2rem 1.5rem;
    }

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

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

    .service-item {
        padding: 1.5rem;
    }

    .cta-buttons {
        gap: 0.8rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Smooth scrolling behavior */
* {
    scroll-behavior: smooth;
}

/* GPU acceleration for transforms */
.hero-shapes,
.gallery-item,
.featured-card,
.about-card {
    transform: translateZ(0);
    will-change: transform;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
