/* === MOTOZONE v4.0 - MASTERPIECE === */

:root {
    --obsidian: #050505;
    --matte-black: #0a0a0a;
    --crimson: #990000;
    /* Darker, more elegant red */
    --text-primary: #ededed;
    --text-muted: #666666;
    --font-heading: 'Outfit', sans-serif;
    --font-tech: 'Space Mono', monospace;
}

body,
html {
    margin: 0;
    padding: 0;
    background-color: var(--obsidian);
    color: var(--text-primary);
    font-family: var(--font-heading);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 200;
    /* Light weight for elegance */
    letter-spacing: -0.02em;
}

.font-tech {
    font-family: var(--font-tech);
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Navigation (Apple Style) --- */
.masterpiece-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    /* Logo left, others right/center */
    align-items: center;
    z-index: 1000;
    mix-blend-mode: difference;
    /* Ensures visibility on any background */
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
}

.nav-link-v4 {
    color: white !important;
    text-decoration: none;
    font-weight: 300;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s;
    letter-spacing: 0.5px;
}

.nav-link-v4:hover {
    opacity: 1;
    color: white !important;
}

.nav-link-v4:visited,
.nav-link-v4:active,
.nav-link-v4:focus {
    color: white !important;
}

/* --- Hero Video --- */
.hero-video-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    /* Slight dim for text readability */
}

.hero-overlay-v4 {
    position: absolute;
    bottom: 10%;
    left: 5%;
    z-index: 10;
}

.hero-title-master {
    font-size: 6rem;
    line-height: 1;
    margin-bottom: 20px;
    opacity: 0;
    /* Fade reveal */
    transform: translateY(30px);
}

/* --- The Lab (Tech Specs) --- */
.tech-lab-section {
    min-height: 100vh;
    background: var(--matte-black);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-top: 1px solid #1a1a1a;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 80%;
    border-top: 1px solid #333;
    border-left: 1px solid #333;
}

.tech-item {
    padding: 40px;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    transition: background 0.3s;
}

.tech-item:hover {
    background: #0f0f0f;
}

.tech-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 10px;
    color: white;
}

/* --- Gallery (Garage v4) --- */
.gallery-container {
    padding: 100px 5%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 40px;
}

.gallery-card {
    background: #0f0f0f;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Focus Mode: When one is hovered, others dim */
.gallery-container:hover .gallery-card {
    opacity: 0.3;
    filter: grayscale(100%);
}

.gallery-container .gallery-card:hover {
    opacity: 1;
    filter: grayscale(0%);
    z-index: 2;
}

.gallery-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.gallery-info {
    padding: 30px;
}

.offcanvas-v4 {
    background-color: var(--obsidian);
    border-left: 1px solid #333;
}

/* --- Utils --- */
.fade-up {
    animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}