:root {
    --bg: #0a0a0a;
    --primary: #8B0000; /* Dark Red */
    --accent: #D4AF37;  /* Gold */
    --text: #ffffff;
    --text-muted: #888888;
    --card-bg: #151515;
    --font-main: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Custom cursor */
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
    background-image: 
        radial-gradient(at 0% 0%, rgba(139, 0, 0, 0.15) 0, transparent 50%), 
        radial-gradient(at 100% 100%, rgba(212, 175, 55, 0.08) 0, transparent 50%);
    background-attachment: fixed;
    animation: bgPulse 10s ease infinite alternate;
}

@keyframes bgPulse {
    0% { background-color: #0a0a0a; }
    100% { background-color: #0f0f0f; }
}

/* Noise Texture */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.05;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
}

/* Custom Cursor */
.cursor {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transition: transform 0.1s ease;
    will-change: transform;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease, width 0.3s, height 0.3s;
    will-change: transform;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.preloader-logo {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -2px;
    overflow: hidden;
}

.preloader-bar {
    width: 200px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    margin-top: 20px;
    position: relative;
}

.preloader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    mix-blend-mode: difference;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo svg {
    width: 35px;
    height: 35px;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover svg {
    transform: rotate(180deg) scale(1.1);
}

.logo-mark {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawLogo 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes drawLogo {
    to { stroke-dashoffset: 0; }
}

/* Magnetic Button Container */
.magnetic-wrap {
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent);
}

/* Sections */
section {
    padding: 100px 50px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Hero Section */
#hero {
    padding-top: 150px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, rgba(139, 0, 0, 0.1) 0%, transparent 70%);
}

.hero-content {
    max-width: 1000px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.9;
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: -3px;
}

.hero-title span {
    display: inline-block;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
    transform: translateY(30px);
    opacity: 0;
}

.hero-btns {
    display: flex;
    gap: 20px;
    transform: translateY(30px);
    opacity: 0;
}

.btn {
    padding: 18px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.4);
}

.btn-outline {
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* About Section */
#about {
    background: #0d0d0d;
}

.section-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 20px;
    display: block;
}

.about-text {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 3rem);
    line-height: 1.2;
    max-width: 900px;
}

.reveal-text span {
    display: inline-block;
    opacity: 0.2;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--card-bg);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.service-icon {
    margin-bottom: 30px;
    color: var(--accent);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

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

/* Process Section */
.process-container {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-top: 50px;
    position: relative;
}

.process-line {
    position: absolute;
    left: 20px;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(255,255,255,0.1);
    z-index: 0;
}

.process-progress {
    position: absolute;
    left: 20px;
    top: 0;
    width: 2px;
    height: 0%;
    background: var(--accent);
    z-index: 1;
}

.process-step {
    display: flex;
    gap: 50px;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--bg);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.process-step.active .step-number {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px var(--accent);
}

.step-content h4 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 10px;
}

.step-content p {
    color: var(--text-muted);
    max-width: 500px;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #1a1a1a;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.8s ease, filter 0.6s ease;
    filter: grayscale(100%);
    display: block;
    will-change: transform, filter, opacity;
    opacity: 0;
}

.portfolio-img.loaded {
    opacity: 1;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.portfolio-item.img-loaded .portfolio-overlay {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.portfolio-overlay h4 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 5px;
}

.portfolio-overlay span {
    color: var(--accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Clients Section */
.clients-carousel {
    overflow: hidden;
    padding: 50px 0;
    white-space: nowrap;
    position: relative;
}

.clients-track {
    display: inline-block;
    animation: scroll 30s linear infinite;
}

.client-logo {
    display: inline-block;
    margin: 0 50px;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255,255,255,0.2);
    transition: color 0.3s ease;
}

.client-logo:hover {
    color: var(--accent);
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* CTA Section */
#cta {
    text-align: center;
    background: var(--accent);
    color: var(--bg);
    min-height: 60vh;
}

#cta .hero-title {
    color: var(--bg);
    margin-bottom: 50px;
}

#cta .btn-primary {
    background: var(--bg);
    color: var(--accent);
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
}

.contact-info h2 {
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.contact-item a {
    font-size: 1.5rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent);
}

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

.form-group {
    position: relative;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 15px 0;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -10px;
    font-size: 0.7rem;
    color: var(--accent);
}

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

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.form-group input:focus ~ .form-line,
.form-group textarea:focus ~ .form-line {
    width: 100%;
}

.error-message {
    color: #ff4444;
    font-size: 0.75rem;
    margin-top: 5px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    position: absolute;
    bottom: -20px;
    left: 0;
    pointer-events: none;
}

.form-group.invalid .error-message {
    opacity: 1;
    transform: translateY(0);
}

.form-group.invalid .form-line {
    background: #ff4444;
    width: 100%;
}

.form-group.invalid input, .form-group.invalid textarea {
    border-bottom-color: #ff4444;
}

.form-group.invalid label {
    color: #ff4444 !important;
}

/* Footer */
footer {
    padding: 50px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Responsive */
@media (max-width: 1024px) {
    section { padding: 80px 30px; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .contact-container { grid-template-columns: 1fr; gap: 50px; }
    nav { padding: 20px 30px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 4rem; }
    .nav-links { display: none; }
    .contact-info h2 { font-size: 3rem; }
}

/* Mouse Follow Glow */
.glow {
    position: fixed;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.08) 0%, rgba(212, 175, 55, 0.02) 30%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    filter: blur(40px);
    will-change: transform;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--text);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--accent);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--accent);
}

/* Parallax Background Elements */
.parallax-bg {
    position: absolute;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
    font-family: var(--font-display);
    font-weight: 900;
    white-space: nowrap;
    text-transform: uppercase;
}

.hero-parallax-text {
    font-size: 20vw;
    top: 20%;
    left: -10%;
    color: var(--primary);
}

.about-parallax-text {
    font-size: 15vw;
    bottom: 10%;
    right: -5%;
    color: var(--accent);
}

.about-parallax-text-2 {
    font-size: 12vw;
    top: 10%;
    left: -2%;
    color: var(--primary);
}

/* Section Dividers */
.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.2;
    position: relative;
    overflow: hidden;
}

.divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--text), transparent);
    animation: dividerScan 4s linear infinite;
}

@keyframes dividerScan {
    to { left: 100%; }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10002;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 3rem;
    color: var(--text);
    cursor: pointer;
    z-index: 10003;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--accent);
}

.lightbox-content {
    max-width: 1200px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    width: 60%;
    height: 100%;
    max-height: 80vh;
    object-fit: cover;
    box-shadow: none;
    border: none;
    border-radius: 0;
}

.lightbox-info {
    width: 40%;
    padding: 60px;
    text-align: left;
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lightbox-info h3 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.lightbox-info p {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    margin-bottom: 40px;
    font-weight: 600;
}

@media (max-width: 992px) {
    .lightbox-content {
        flex-direction: column;
        max-height: 90vh;
        width: 95%;
    }
    .lightbox-content img {
        width: 100%;
        height: 40%;
        max-height: 40vh;
    }
    .lightbox-info {
        width: 100%;
        padding: 40px;
        text-align: center;
        align-items: center;
    }
    .lightbox-info h3 {
        font-size: 2rem;
    }
    .lightbox-info p {
        margin-bottom: 20px;
    }
}
