/* 
 * JCTechDS Premium Design System
 * Theme: "Cyber-Luxe" - Dark, Glassmorphic, Neon Accents
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    /* -- Palette: Void & Neon -- */
    /* Backgrounds */
    --bg-deep: 240 10% 4%;
    /* #09090b - Almost black */
    --bg-surface: 240 10% 8%;
    /* #121216 - Slightly lighter */
    --bg-card: 240 10% 12%;
    /* #1c1c21 - Card bg */

    /* Primary Accents (Electric Violet -> Cyan gradient) */
    --primary-hue: 265;
    --primary: 265 89% 66%;
    /* #a855f7 */
    --accent-hue: 190;
    --accent: 190 90% 60%;
    /* #22d3ee */

    /* Text */
    --text-main: 0 0% 100%;
    --text-muted: 240 5% 65%;

    /* System */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Transitions */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* -- Reset & Base -- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: hsl(var(--bg-deep));
    color: hsl(var(--text-main));
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.1;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* -- Utilities -- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    color: white;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.6);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-padding {
    padding: 6rem 0;
}

/* -- Layout Components -- */

/* Headers */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    /* Improved Glass Effect */
    background: rgba(4, 4, 6, 0.7);
    /* Darker, more premium base */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(4, 4, 6, 0.9);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    /* Fixed height for consistency */
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: white;
    display: flex;
    /* Ensure logo text aligns properly if icons added later */
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    /* Helper: Fixes vertical alignment */
    gap: 3rem;
    /* More breathing room */
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: white;
}

/* Hover Underline Effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: hsl(var(--primary));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    padding: 0.5rem 0;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(18, 18, 22, 0.9);
    /* Darker backdrop */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding-left: 1.25rem;
    /* Slide effect */
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 5rem;
    overflow: hidden;
}

/* Background Glows */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, hsl(var(--primary) / 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite alternate;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, hsl(var(--accent) / 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 8s infinite alternate-reverse;
}

.hero-content {
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.875rem;
    color: hsl(var(--accent));
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    line-height: 1.05;
}

.hero-desc {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.stat-item h3 {
    font-size: 2rem;
    color: hsl(var(--accent));
}

.stat-item p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Services / Packages */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.package-card {
    padding: 2.5rem;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.package-card:hover {
    transform: translateY(-8px);
    border-color: hsl(var(--primary) / 0.5);
}

.package-card.highlight {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid hsl(var(--primary) / 0.3);
}

.package-card.highlight::before {
    content: 'Most Popular';
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 0.75rem;
    color: hsl(var(--accent));
    border: 1px solid hsl(var(--accent) / 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.features-list {
    margin: 2rem 0;
}

.features-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e4e4e7;
    font-size: 0.95rem;
}

.check-icon {
    color: hsl(var(--primary));
    flex-shrink: 0;
}

/* Animations */
/* Animations */
@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, 40px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Animation Classes */
.animate-hidden {
    opacity: 0;
}

.fade-in-up {
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

/* Stagger Delays */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

/* Grid Stagger Initial State */
.stagger-grid>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.stagger-grid.visible>* {
    opacity: 1;
    transform: translateY(0);
}

/* Child Staggering (CSS-only fallback or JS helper base) */
.stagger-grid.visible>*:nth-child(1) {
    transition-delay: 100ms;
}

.stagger-grid.visible>*:nth-child(2) {
    transition-delay: 200ms;
}

.stagger-grid.visible>*:nth-child(3) {
    transition-delay: 300ms;
}

.stagger-grid.visible>*:nth-child(4) {
    transition-delay: 400ms;
}

.stagger-grid.visible>*:nth-child(5) {
    transition-delay: 500ms;
}

.stagger-grid.visible>*:nth-child(6) {
    transition-delay: 600ms;
}

/* Enhanced Hover Effects */
/* .project-preview transition moved to .project-img */

/* Tech Stack Pulse */
@keyframes pulse-glow {

    0%,
    100% {
        text-shadow: 0 0 10px transparent;
        transform: scale(1);
    }

    50% {
        text-shadow: 0 0 20px hsl(var(--accent) / 0.5);
        transform: scale(1.1);
    }
}

.tech-stack i:hover {
    color: hsl(var(--accent));
    animation: pulse-glow 1.5s infinite;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: hsl(var(--bg-card));
        /* Fixed: Added hsl() wrapper */
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

/* -- New Sections -- */

/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    position: relative;
}

.process-step {
    text-align: center;
    position: relative;
    padding: 2rem;
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.01));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Space Grotesk', sans-serif;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 0;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-preview {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    /* Ensure image doesn't overflow */
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s var(--ease-out);
}

.project-card:hover .project-img {
    transform: scale(1.05);
    /* Apply zoom to the image itself */
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    color: white;
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Tech Stack */
.tech-stack {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    font-size: 2.5rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.tech-stack i {
    transition: color 0.3s ease, transform 0.3s ease;
}

.tech-stack i:hover {
    color: hsl(var(--accent));
    transform: scale(1.1);
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    padding: 2rem;
}

.stars {
    color: #ffd700;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-card p {
    font-size: 1rem;
    font-style: italic;
    color: #e4e4e7;
    margin-bottom: 1.5rem;
}

.client-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: hsl(var(--primary));
}

.process-step h3 {
    font-size: 1.5rem;
    color: hsl(var(--primary));
    margin-bottom: 1rem;
}

.process-step p {
    color: var(--text-muted);
}

/* FAQ Section */
.faq-grid {
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.faq-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: white;
}

.faq-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
}