@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --f-red: hsl(356, 86%, 52%);
    --f-red-dark: hsl(356, 86%, 40%);
    --f-black: hsl(0, 0%, 4%);
    --f-dark-gray: hsl(0, 0%, 10%);
    --f-light-gray: hsl(0, 0%, 93%);
    --f-text-gray: hsl(0, 0%, 63%);
    --f-white: hsl(0, 0%, 100%);
    --f-glass: hsla(0, 0%, 100%, 0.05);
    --f-transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);

    /* Fluid Spacing & Sizes */
    --padding-section: clamp(80px, 12vw, 160px);
    --padding-container: clamp(20px, 5vw, 60px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor */
}

html {
    scroll-behavior: smooth;
    background: radial-gradient(circle at center,
            #300000 0%,
            /* 1. Deep Blood Red (Core) */
            #1a0000 5%,
            /* 2. Dark Maroon */
            #0d0202 12%,
            /* 3. Reddish-Black */
            #080303 25%,
            /* 4. Charcoal (Red hint fades) */
            #050505 45%,
            /* 5. Rich Obsidian */
            #030303 65%,
            /* 6. Onyx */
            #010101 85%,
            /* 7. Near Abyss */
            #000000 100%
            /* 8. Pure Black */
        );
}

body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at center,
            #300000 0%,
            /* 1. Deep Blood Red (Core) */
            #1a0000 5%,
            /* 2. Dark Maroon */
            #0d0202 12%,
            /* 3. Reddish-Black */
            #080303 25%,
            /* 4. Charcoal (Red hint fades) */
            #050505 45%,
            /* 5. Rich Obsidian */
            #030303 65%,
            /* 6. Onyx */
            #010101 85%,
            /* 7. Near Abyss */
            #000000 100%
            /* 8. Pure Black */
        );
    color: var(--f-white);
    line-height: 1.6;
    overflow-x: hidden;
    /* Removed opacity: 0 for direct visibility */
    opacity: 1;
}

body.menu-open {
    overflow: hidden;
}


/* Custom Cursor */
#cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--f-red);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
}

#cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--f-red);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s linear, width 0.3s, height 0.3s;
}

.hovering-link #cursor {
    width: 30px;
    height: 30px;
    background: hsla(356, 86%, 52%, 0.3);
}

.hovering-link #cursor-follower {
    width: 60px;
    height: 60px;
    border-color: var(--f-red);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--padding-container);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    /* transition: var(--f-transition); */
}

header.scrolled {
    background: hsla(0, 0%, 4%, 0.85);
    backdrop-filter: blur(15px);
    padding: 15px 0;
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
    letter-spacing: 4px;
    font-weight: 700;
}

.ferrari-text {
    font-size: clamp(18px, 4vw, 24px);
    color: var(--f-white);
    line-height: 1;
}

.dubai-text {
    font-size: clamp(8px, 1.5vw, 10px);
    color: var(--f-red);
    text-align: right;
    letter-spacing: 8px;
    margin-top: 5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: clamp(20px, 4vw, 40px);
}

#mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 14px;
    cursor: none;
    z-index: 1001;
}

#mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 1px;
    background: var(--f-white);
    transition: var(--f-transition);
}

#mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links a {
    text-decoration: none;
    color: var(--f-white);
    font-size: clamp(10px, 1.2vw, 12px);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 400;
    transition: var(--f-transition);
    opacity: 0.6;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--f-red);
}

/* Hero Section */
#hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* z-index: -1; */
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    /* Initial zoom for parallax */
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
            hsla(0, 0%, 4%, 0.4) 0%,
            hsla(0, 0%, 4%, 0.2) 50%,
            hsla(0, 0%, 4%, 1) 100%);
}

.hero-content {
    /* max-width: 400px; */
    padding-right: 30vw;
    z-index: 10;
    margin-top: 20px;
    width: 100%;
}

.hero-content h1 {
    font-family: 'Syne', serif;
    font-size: clamp(42px, 10vw, 96px);
    line-height: 1;
    margin-bottom: 20px;
    font-weight: 700;
    /* font-style: italic; */
    letter-spacing: -2px;
}

.hero-content p {
    font-size: clamp(14px, 2vw, 16px);
    margin-bottom: clamp(30px, 5vw, 50px);
    color: var(--f-light-gray);
    letter-spacing: 1px;
    font-weight: 300;
    max-width: 600px;
}

/* Section Header */
#models,
#contact,
#services {
    padding: var(--padding-container);
}

.section-header {
    margin-bottom: clamp(40px, 8vw, 80px);
}

.section-header h2 {
    font-family: 'Syne', serif;
    font-size: clamp(32px, 6vw, 56px);
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.divider {
    width: clamp(40px, 10vw, 80px);
    height: 2px;
    background: var(--f-red);
}

/* Models Grid */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(20px, 4vw, 40px);
}

.model-card {
    background: var(--f-dark-gray);
    position: relative;
    overflow: hidden;
    transition: var(--f-transition);
}

.model-image {
    height: clamp(300px, 40vw, 450px);
    overflow: hidden;
}

.model-image img {
    width: 100%;
    /* Extra width for parallax/zoom */
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.model-card:hover .model-image img {
    transform: scale(1.05) translate(-2%, 0);
}

.model-info {
    padding: clamp(10px, 4vw, 30px);
    background: linear-gradient(to bottom,
            #4a0404 0%,
            /* 1. Deep Wine */
            #320101 15%,
            /* 2. Blood Red */
            #250000 30%,
            /* 3. Oxblood */
            #1a0505 45%,
            /* 4. Very Dark Garnet */
            #120808 60%,
            /* 5. Rich Espresso/Black */
            /* #0d0d0d 75%,   6. Charcoal Black */
            #050505 85%,
            /* 7. Near Black */
            #0b0b0b 100%
            /* 8. Pure Black */
        );
    margin-top: -100px;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(245, 222, 179, 0.1);
}

.model-info h3 {
    font-size: clamp(24px, 4vw, 32px);
    margin-bottom: 15px;
    font-family: 'Syne', serif;
    /* font-style: italic; */
}

.specs {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid hsla(0, 0%, 100%, 0.1);
}

.spec span {
    font-size: clamp(10px, 1.2vw, 12px);
    text-transform: uppercase;
    color: var(--f-text-gray);
    letter-spacing: 2px;
}

.spec strong {
    font-size: clamp(14px, 1.8vw, 18px);
    display: block;
    margin-top: 5px;
}

/* Heritage Section */
#heritage {
    /* background: linear-gradient(90deg, var(--f-black) 0%, hsl(0, 0%, 6%) 100%); */
    background: radial-gradient(circle at center,
            #300000 0%,
            /* 1. Deep Blood Red (Core) */
            #1a0000 5%,
            /* 2. Dark Maroon */
            #0d0202 12%,
            /* 3. Reddish-Black */
            #080303 25%,
            /* 4. Charcoal (Red hint fades) */
            #050505 45%,
            /* 5. Rich Obsidian */
            #030303 65%,
            /* 6. Onyx */
            #010101 85%,
            /* 7. Near Abyss */
            #000000 100%
            /* 8. Pure Black */
        );
}

.heritage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: clamp(30px, 5vw, 60px);
}

.heritage-item {
    border-left: 1px solid hsla(0, 0%, 100%, 0.1);
    padding-left: 30px;
    transition: var(--f-transition);
}

.heritage-item:hover {
    border-color: var(--f-red);
}

#heritage {
    padding: 60px 0 90px 0;
}

.heritage-item .year {
    display: block;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: var(--f-red);
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
}

.heritage-item h4 {
    font-size: clamp(16px, 2vw, 20px);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1;
}

.heritage-item p {
    color: var(--f-text-gray);
    font-size: clamp(13px, 1.4vw, 15px);
}

/* Virtual Tour Section */
#virtual-tour {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1592198084033-aade902d1aae?auto=format&fit=crop&q=80&w=2070') center/cover fixed;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.virtual-content h2 {
    font-size: clamp(36px, 8vw, 72px);
    margin-bottom: 10px;
    font-family: 'Syne', serif;
    text-transform: uppercase;
    line-height: 1;
}

.virtual-content p {
    font-size: clamp(14px, 1.8vw, 18px);
    max-width: 700px;
    margin: 0 auto 50px;
}

/* Buttons */
.btn {
    padding: clamp(12px, 2vw, 15px) clamp(30px, 4vw, 40px);
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: clamp(10px, 1.2vw, 12px);
    font-weight: 600;
    transition: var(--f-transition);
    border: none;
    cursor: none;
    font-family: 'Outfit', serif;
    /* Inherit rounded cursor */
}

.btn-primary {
    background: var(--f-red);
    color: var(--f-white);
}

.btn-primary:hover {
    background: var(--f-white);
    color: var(--f-black);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--f-white);
    color: var(--f-white);
}

.btn-secondary:hover {
    background: var(--f-white);
    color: var(--f-black);
}

/* Contact Section */
.contact-wrapper {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 50%, rgba(255, 255, 255, 0) 100%);
    border: 1px solid hsla(0, 0%, 100%, 0.05);
    padding: clamp(30px, 8vw, 100px);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(280px, 100%, 300px), 1fr));
    gap: clamp(40px, 10vw, 120px);
}

.contact-info h2 {
    font-size: clamp(28px, 5vw, 48px);
    font-family: 'Syne', serif;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.contact-info p {
    margin-top: 20px;
    color: var(--f-text-gray);
    margin-bottom: 40px;
    font-size: clamp(14px, 1.6vw, 16px);
}

.info-item {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

.info-item strong {
    color: var(--f-red);
    text-transform: uppercase;
    font-size: clamp(9px, 1.1vw, 11px);
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.info-item span {
    font-size: clamp(14px, 1.5vw, 16px);
}

/* Form refinement */
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid hsla(0, 0%, 100%, 0.1);
    color: var(--f-white);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: var(--f-transition);
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--f-text-gray);
    pointer-events: none;
    transition: var(--f-transition);
    text-transform: uppercase;
    font-size: clamp(10px, 1.2vw, 12px);
    letter-spacing: 2px;
}

.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: -15px;
    font-size: 10px;
    color: var(--f-red);
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--f-red);
}

/* Footer */
footer {
    padding: 20px 0;
    border-top: 1px solid hsla(0, 0%, 100%, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    letter-spacing: 2px;
    font-weight: 700;
    font-size: clamp(20px, 4vw, 24px);
    color: var(--f-white);
}

.footer-content p {
    font-size: clamp(12px, 2vw, 14px);
    color: var(--f-text-gray);
}

.social-links {
    display: flex;
    gap: clamp(20px, 4vw, 40px);
}

.social-links a {
    color: var(--f-text-gray);
    text-decoration: none;
    font-size: clamp(10px, 1.1vw, 11px);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--f-transition);
}

.social-links a:hover {
    color: var(--f-white);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s, transform 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}

/* Media Queries for Specific Adjustments */
@media (max-width: 991px) {
    #mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .nav-wrapper.active .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        height: 100vh;
        background: hsla(0, 0%, 4%, 0.95);
        backdrop-filter: blur(20px);
        justify-content: center;
        align-items: center;
        z-index: 1000;
        gap: 10px;
    }

    .nav-wrapper.active .nav-links a {
        font-size: clamp(10px, 1.2vw, 12px);
        opacity: 0.8;
    }

    .contact-wrapper {
        padding: 40px 20px;
    }
}

@media (max-width: 768px) {
    * {
        cursor: auto !important;
    }

    .hero-content{
        padding-right: 0;
    }

    #cursor,
    #cursor-follower {
        display: none;
    }

    .nav-links {
        display: none;
        /* Add mobile menu trigger if needed */
    }

    .footer-content {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 30px;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 375px) {
    :root {
        --padding-container: 15px;
        --padding-section: 60px;
    }

    .hero-content h1 {
        font-size: clamp(36px, 12vw, 42px);
    }

    .section-header h2 {
        font-size: clamp(28px, 10vw, 32px);
    }

    .model-info {
        padding: 20px;
        margin-top: -60px;
    }

    .heritage-item {
        padding-left: 15px;
    }

    .heritage-item .year {
        font-size: 32px;
    }

    .virtual-content h2 {
        font-size: 36px;
    }

    .contact-wrapper {
        padding: 40px 15px;
    }

    #contact-form {
        gap: 20px;
        width: 80vw;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }
}