:root {
    --primary: #FFD500;
    --primary-rgb: 255, 213, 0;
    --primary-dark: #ccaa00;
    --bg-dark: #070707;
    --bg-offset: #111111;
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent: #FFD500;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: clip;
    position: relative;
    cursor: none;
    /* Custom cursor used */
}

/* CINEMATIC GLOBAL BACKGROUND */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1541888946425-d81bb19480c5?q=80&w=2670&auto=format&fit=crop') center/cover no-repeat;
    filter: brightness(0.15) grayscale(0.5) blur(5px);
    z-index: -2;
    opacity: 0.6;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-dark) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Custom Selection */
::selection {
    background-color: var(--primary);
    color: var(--bg-dark);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.1;
    color: var(--accent);
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Custom Cursor */
.custom-cursor {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transition: transform 0.1s ease-out;
    box-shadow: 0 0 10px var(--primary);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(var(--primary-rgb), 0.5);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease-out;
}

/* UNIFIED MODERN HEADER SYSTEM */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.25);
    z-index: 99999;
}



/* PREMIUM PRELOADER */
#jm-preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}

body.loading {
    overflow: hidden;
}

#jm-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    font-size: 3rem;
    font-weight: 900;
    font-family: var(--font-heading);
    margin-bottom: 2rem;
    position: relative;
    animation: pulseLogo 2s infinite ease-in-out;
}

.loader-logo span {
    color: var(--primary);
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 213, 0, 0.1);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* INDUSTRIAL MODERNISM UTILITIES */
.glass-card {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 215, 0, 0.25);
}

.glass-panel {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.industrial-texture {
    background-image: radial-gradient(circle at 2px 2px, rgba(255, 215, 0, 0.08) 1px, transparent 0);
    background-size: 32px 32px;
}

@keyframes subtle-zoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.hero-zoom {
    animation: subtle-zoom 25s infinite alternate ease-in-out;
}

.text-stroke {
    -webkit-text-stroke: 1px #ffd700;
    color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #000000;
}
::-webkit-scrollbar-thumb {
    background: #ffd700;
}
::-webkit-scrollbar-thumb:hover {
    background: #e9c400;
}


.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}




/* 3D GALLERY & FILTERS */
.portfolio-grid {
    perspective: 2000px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 3rem;
    padding-top: 4rem;
}

.project-card-3d {
    position: relative;
    transform-style: preserve-3d;
    transition: var(--transition);
    cursor: pointer;
}

.project-card-3d .card-content {
    background: var(--bg-offset);
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.project-card-3d:hover .card-content {
    border-color: var(--primary);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.project-card-3d img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    transition: var(--transition);
}

.project-card-3d:hover img {
    transform: scale(1.1) translateZ(50px);
}

.project-info {
    padding: 2.5rem;
    transform: translateZ(30px);
}

.project-info span {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

/* FILTER BUTTONS */
.filter-container {
    display: flex;
    gap: 1.5rem;
    margin: 4rem 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.8rem 2.5rem;
    font-weight: 900;
    font-size: 0.65rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-dark);
}

/* MODAL SYSTEM (ULTRA PREMIUM) */
.jm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(30px);
    opacity: 0;
    transition: var(--transition);
}

.jm-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    background: #080808;
    border: 1px solid var(--border);
    padding: 5rem;
    position: relative;
    transform: translateY(100px) rotateX(10deg);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    overflow-y: auto;
}

.jm-modal.active .modal-content {
    transform: translateY(0) rotateX(0);
}

.modal-close {
    position: absolute;
    top: 3rem;
    right: 3rem;
    color: var(--primary);
    cursor: pointer;
    background: var(--glass);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.modal-gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.modal-gallery img:hover,
.modal-gallery img.active {
    border-color: var(--primary);
    transform: scale(1.05);
}

.modal-spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    margin-top: 2rem;
}

.modal-spec-item h4 {
    font-size: 0.7rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.modal-spec-item p {
    font-weight: 700;
}

.modal-brochure {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* SECTION DISTINCTION */
section {
    position: relative;
}

section:nth-child(even) {
    background: #080808;
}

.section-divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 151px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    transform: translateX(-50%);
    opacity: 0.5;
}

/* WHATSAPP FLOAT */
.whatsapp-float {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    background: #25d366;
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
}

/* STRATEGIC FORM */
.strategic-form input,
.strategic-form select,
.strategic-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    color: white;
    outline: none;
    font-size: 1rem;
    transition: var(--transition);
}

.strategic-form input:focus {
    border-color: var(--primary);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.btn-cta {
    padding: 0.8rem 2rem;
    background: var(--primary);
    color: var(--bg-dark);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 213, 0, 0.2);
}

/* Sections */
section {
    padding: 8rem 5%;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-label span {
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.section-label i {
    width: 40px;
    height: 1px;
    background: var(--primary);
}

.section-title {
    font-size: 3.5rem;
    max-width: 800px;
    margin-bottom: 3rem;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 5%;
    overflow: hidden;
    background: #000;
}

.hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slider .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.hero-content h1 {
    font-size: 6rem;
    line-height: 0.95;
    margin-bottom: 2rem;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 3rem;
    color: var(--text-main);
    border-left: 4px solid var(--primary);
    padding-left: 2rem;
}

/* Footer */
footer {
    background: #050505;
    padding: 6rem 5% 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    margin-bottom: 2rem;
    font-size: 0.8rem;
    color: var(--primary);
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 1rem;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}


/* --- GRID SYSTEM --- */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.grid-4-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .grid-4-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .grid-4-col,
    .grid-3-col,
    .grid-2-col {
        grid-template-columns: 1fr !important;
    }
}

/* --- THEME UTILITIES --- */

.section-light {
    background: #fdfdfd !important;
    color: #0a0a0a !important;
    position: relative;
    z-index: 1;
}

.section-light::before,
.section-light::after {
    display: none !important;
    /* Remove global dark background effects */
}

/* Typography for Light Sections */
.section-light h2,
.section-light h3,
.section-light h4 {
    color: #0a0a0a !important;
}

.section-light .section-title span,
.section-light h2 span {
    color: var(--primary) !important;
}

.section-light .section-label i {
    background: #0a0a0a !important;
}

.section-light .section-label span {
    color: #0a0a0a !important;
}

.section-light p,
.section-light .text-muted {
    color: #444 !important;
}

/* Specific component overrides for light mode */
.section-light .hover-lift:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.section-light select,
.section-light input,
.section-light textarea {
    color: #0a0a0a !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.section-light select option {
    background-color: #fdfdfd;
    color: #0a0a0a;
}

.section-light .progress-bar-bg {
    background: rgba(0, 0, 0, 0.05) !important;
}

.section-light .card-light {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.section-light .card-light h3,
.section-light .card-light h4 {
    color: #0a0a0a !important;
}

/* --- MOBILE NAVIGATION --- */

.mobile-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary);
    z-index: 1001;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 10000;
    padding: 3rem 2rem;
    transition: var(--transition);
    border-left: 1px solid rgba(255, 213, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.drawer-header .logo {
    font-size: 1.5rem;
    font-weight: 900;
}

.drawer-header .logo span {
    color: var(--primary);
}

.drawer-close {
    cursor: pointer;
    color: var(--primary);
}

.drawer-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.drawer-links a {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-main);
}

@media (max-width: 992px) {
    nav .nav-links {
        display: none !important;
    }

    .mobile-toggle {
        display: block !important;
    }
}