:root {
    /* Colors */
    --bg-color: #050507;
    --bg-secondary: #0a0a0f;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-primary: #6d28d9;
    /* Purple */
    --accent-secondary: #3b82f6;
    /* Blue */
    --accent-glow: #8b5cf6;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-main: 'Outfit', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* Custom cursor */
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: var(--bg-color);
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

body:hover .cursor-outline {
    opacity: 1;
}

/* Typography */
h1,
h2,
h3,
.logo {
    font-family: var(--font-display);
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Added shadow for legibility */
    letter-spacing: -0.02em;
    /* Tighter, more modern heading tracking */
}

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

ul {
    list-style: none;
}

/* --- UTILITIES --- */
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--accent-secondary) 50%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* Text shadow doesn't work well with transparent text fill, so we use drop-shadow filter */
    filter: drop-shadow(0 0 20px rgba(123, 31, 162, 0.3));
    /* Legibility fix */
}

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

.section-padding {
    padding: 12rem 0;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(5, 5, 7, 0.8);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: 1px;
}

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

.nav {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    padding-top: 4px;
    /* Visual correction */
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-smooth);
    position: relative;
}

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

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

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

/* Buttons */
.btn-primary,
.btn-glow {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: inline-block;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.btn-glow {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 0 20px rgba(109, 40, 217, 0.3);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(109, 40, 217, 0.6);
    transform: translateY(-2px) scale(1.02);
}

.btn-outline {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transition: var(--transition-smooth);
    margin-left: 1rem;
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--header-height);
}

/* Hero Overlay for Legibility */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(5, 5, 7, 0.6) 100%);
    z-index: -1;
    pointer-events: none;
}

.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: 10%;
    left: -50px;
    animation-delay: -5s;
}

@keyframes float {

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

    50% {
        transform: translate(30px, -30px);
    }
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--text-primary);
    border-radius: 50%;
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% {
        opacity: 1;
        top: 6px;
    }

    100% {
        opacity: 0;
        top: 20px;
    }
}

/* Services */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

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

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.placeholder-gradient-1 {
    background: linear-gradient(45deg, #2d1b4e, #4338ca);
}

.placeholder-gradient-2 {
    background: linear-gradient(45deg, #0f172a, #0e7490);
}

.placeholder-gradient-3 {
    background: linear-gradient(45deg, #022c22, #15803d);
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition-smooth);
}

.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
    opacity: 1;
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    padding: 4rem;
}

.contact-details {
    list-style: none;
    margin-top: 2rem;
    color: var(--text-secondary);
}

.contact-details li {
    margin-bottom: 1rem;
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    pointer-events: none;
}

.form-group input:focus~label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:focus~label,
.form-group textarea:not(:placeholder-shown)~label {
    top: -1.2rem;
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.full-width {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-secondary);
}

.footer-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

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

/* Text Scramble Styles */
.dud {
    color: var(--accent-secondary);
    opacity: 0.7;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

.loader-content {
    text-align: center;
    width: 300px;
}

.loader-text {
    font-family: var(--font-display);
    color: var(--accent-primary);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    font-size: 0.9rem;
    animation: blink 1s infinite;
}

.loader-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    transition: width 0.2s ease;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Glitch Effect Class */
.glitch-hover {
    position: relative;
    overflow: hidden;
}

.glitch-hover::before,
.glitch-hover::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    opacity: 0.8;
    display: none;
}

.glitch-hover:hover::before {
    display: block;
    animation: glitch-anim-1 0.4s infinite linear alternate-reverse;
    color: #0ff;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, 0);
}

.glitch-hover:hover::after {
    display: block;
    animation: glitch-anim-2 0.4s infinite linear alternate-reverse;
    color: #f0f;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    transform: translate(2px, 0);
}

@keyframes glitch-anim-1 {
    0% {
        clip-path: inset(20% 0 80% 0);
    }

    20% {
        clip-path: inset(60% 0 10% 0);
    }

    40% {
        clip-path: inset(40% 0 50% 0);
    }

    60% {
        clip-path: inset(80% 0 5% 0);
    }

    80% {
        clip-path: inset(10% 0 70% 0);
    }

    100% {
        clip-path: inset(30% 0 20% 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
    }

    20% {
        clip-path: inset(30% 0 20% 0);
    }

    40% {
        clip-path: inset(70% 0 10% 0);
    }

    60% {
        clip-path: inset(20% 0 50% 0);
    }

    80% {
        clip-path: inset(50% 0 30% 0);
    }

    100% {
        clip-path: inset(0% 0 80% 0);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-padding {
        padding: 6rem 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    .glass-card {
        padding: 1.5rem;
    }

    footer {
        padding-top: 4rem;
        padding-bottom: 2rem;
    }

    .footer-grid {
        margin-bottom: 3rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 101;
    }

    .mobile-menu-btn span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--text-primary);
        margin: 5px 0;
        transition: var(--transition-smooth);
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(2px, 2px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(5, 5, 7, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition-smooth);
        z-index: 100;
    }

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

/* --- NEW SECTIONS STYLES --- */

/* Infinite Marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    background: var(--bg-secondary);
    padding: 1.5rem 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: scrollMarquee 20s linear infinite;
}

.marquee-content span {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-right: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

@keyframes scrollMarquee {
    0% {
        transform: translateX(0);
    }

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

/* About & Stats */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.process-step {
    position: relative;
    padding: 3rem 2rem;
    overflow: hidden;
}

.step-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 0;
    right: 1rem;
    line-height: 1;
}

.process-step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-secondary);
}

/* Additional Orbs */
.orb-3 {
    width: 200px;
    height: 200px;
    background: var(--accent-glow);
    top: 150vh;
    left: 10%;
    animation-delay: -2s;
    position: absolute;
    /* Ensure it's positioned relative to a container if not fixed */
}

.orb-4 {
    width: 350px;
    height: 350px;
    background: var(--accent-primary);
    top: 250vh;
    right: 5%;
    animation-delay: -7s;
    position: absolute;
}

/* Ensure body/main handles overflow for absolute orbs if they are global */
main {
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

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

    #bg-canvas {
        opacity: 0.4;
    }
}

/* --- MONUMENTAL FOOTER --- */
footer {
    background: black;
    border-top: 1px solid var(--glass-border);
    padding-top: 8rem;
    padding-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

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

.footer-brand h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p {
    color: var(--text-secondary);
    max-width: 300px;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
}

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

.footer-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.social-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-3px);
}

.instagram-btn {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    color: white !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.3);
    border: none;
}

.instagram-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(220, 39, 67, 0.5);
    color: white !important;
}

.cta-button-footer {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent-primary);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button-footer:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(123, 31, 162, 0.3);
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(109, 40, 217, 0.5);
}

.lang-separator {
    color: var(--glass-border);
    font-size: 0.8rem;
}

/* Mobile adjustments for lang switch */
@media (max-width: 768px) {
    .lang-switch {
        margin-left: 0;
        margin-top: 1rem;
    }
}