/* Components Design System */

/* Preloader Cinematic */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1s var(--ease-premium), visibility 1s var(--ease-premium);
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    width: 200px;
    height: auto;
    margin-bottom: var(--space-32);
    opacity: 0;
    transform: scale(0.9);
    animation: preloaderLogoIntro 1.2s var(--ease-premium) forwards;
}

.preloader-bar-container {
    width: 150px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.preloader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
    animation: preloaderFill 2s var(--ease-premium) forwards;
}

@keyframes preloaderLogoIntro {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes preloaderFill {
    to {
        width: 100%;
    }
}

/* Premium Buttons */
.btn-group {
    display: flex;
    gap: var(--space-16);
    justify-content: center;
    margin-top: var(--space-32);
}

.btn-premium {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 12px 28px;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

/* Primary Button (Racing Red Accent) */
.btn-premium.btn-primary {
    background: var(--accent);
    color: var(--text-primary);
    border: 1px solid var(--accent);
    box-shadow: 0 4px 15px rgba(227, 27, 35, 0.25);
}

.btn-premium.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: none;
}

.btn-premium.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(227, 27, 35, 0.4);
}

.btn-premium.btn-primary:hover::before {
    left: 150%;
    transition: all 0.7s var(--ease-premium);
}

/* Outline Button (Metal Chrome Borda) */
.btn-premium.btn-outline {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    border: 1px solid var(--border-color-glow);
}

.btn-premium.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: none;
}

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

.btn-premium.btn-outline:hover::before {
    left: 150%;
    transition: all 0.7s var(--ease-premium);
}

/* Cinematic Title Reveal & Headers */
.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: 12px;
    opacity: 0;
    transform: translateY(30px);
    animation: cinematicReveal 1.2s 2.2s var(--ease-premium) forwards;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 750px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    animation: cinematicReveal 1.2s 2.5s var(--ease-premium) forwards;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-content .btn-group {
    opacity: 0;
    transform: translateY(15px);
    animation: cinematicReveal 1.2s 2.8s var(--ease-premium) forwards;
}

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

/* Technical blueprint decorations for Hero Content */
.hero-content {
    position: relative;
    padding: var(--space-64) var(--space-96);
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(5, 5, 5, 0.35);
    backdrop-filter: blur(10px);
    border-radius: 2px;
}

.hero-content::before,
.hero-content::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(255, 255, 255, 0.2);
    border-style: solid;
    pointer-events: none;
}

.hero-content::before {
    top: -1px;
    left: -1px;
    border-width: 1.5px 0 0 1.5px;
}

.hero-content::after {
    top: -1px;
    right: -1px;
    border-width: 1.5px 1.5px 0 0;
}

.hero-content-decor::before,
.hero-content-decor::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(255, 255, 255, 0.2);
    border-style: solid;
    pointer-events: none;
}

.hero-content-decor::before {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 1.5px 1.5px;
}

.hero-content-decor::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 1.5px 1.5px 0;
}

.hero-content-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: center;
    opacity: 0.85;
    z-index: -1;
}

.tech-spec-text {
    position: absolute;
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.tech-spec-left {
    top: var(--space-16);
    left: var(--space-24);
}

.tech-spec-right {
    bottom: var(--space-16);
    right: var(--space-24);
}

/* Tachometer Scroll Indicator */
.scroll-indicator-wrapper {
    position: absolute;
    bottom: var(--space-48);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-16);
    opacity: 0;
    animation: fadeIn 1s 3.2s var(--ease-premium) forwards;
}

.dial-indicator {
    width: 70px;
    height: 45px;
}

.dial-needle {
    transform-origin: 35px 40px;
    animation: dialIdle 3s infinite ease-in-out;
}

@keyframes dialIdle {
    0%, 100% {
        transform: rotate(-55deg);
    }
    50% {
        transform: rotate(-45deg);
    }
}

.scroll-text {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Smooth Metal Background Texture Transition Layer */
.scroll-metal-transition {
    position: relative;
    width: 100%;
    z-index: 1;
    /* Will sit over the fixed video and blend to dark metal texture */
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0) 0%, rgba(13, 13, 13, 0.8) 50%, var(--bg-secondary) 100%);
    box-shadow: 0 -20px 40px rgba(5, 5, 5, 0.8);
}

.metal-texture {
    /* Minimal noise SVG pattern embedded */
    background-image: radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 0),
                      radial-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 0);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
}

/* Mobile Menu Glassmorphic Tray */
@media (max-width: 992px) {
    .nav-menu.mobile-active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: rgba(13, 13, 13, 0.95);
        backdrop-filter: blur(25px);
        border-left: 1px solid var(--border-color);
        padding: var(--space-128) var(--space-48) var(--space-48) var(--space-48);
        z-index: 999;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        animation: slideInRight 0.5s var(--ease-premium) forwards;
    }
    
    @keyframes slideInRight {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }
}

/* Premium Card Component */
.card-premium {
    position: relative;
    height: 420px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: border-color 0.4s var(--ease-premium), transform 0.4s var(--ease-premium);
}

.card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-30deg);
    transition: none;
    z-index: 2;
    pointer-events: none;
}

.card-premium:hover {
    border-color: var(--border-color-glow);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-premium:hover::before {
    left: 160%;
    transition: all 1.1s var(--ease-premium);
}

.card-img-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%) brightness(85%);
    transition: transform 0.8s var(--ease-premium), filter 0.8s var(--ease-premium);
}

.card-premium:hover .card-img {
    transform: scale(1.06);
    filter: grayscale(0%) brightness(95%);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0.6) 45%, rgba(5, 5, 5, 0.15) 100%);
    z-index: 1;
}

.card-content {
    position: relative;
    z-index: 2;
    padding: var(--space-32);
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-8);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.card-premium:hover .card-content h3 {
    color: var(--accent);
}

.card-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Premium Form & Inputs Component */
.form-premium {
    width: 100%;
}

.form-group {
    position: relative;
    margin-bottom: var(--space-24);
}

.input-premium {
    width: 100%;
    background: rgba(22, 22, 22, 0.65);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: var(--space-16);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

.input-premium:focus {
    border-color: var(--accent);
    background: rgba(22, 22, 22, 0.9);
    box-shadow: 0 0 10px rgba(227, 27, 35, 0.15);
}

textarea.input-premium {
    resize: none;
    min-height: 120px;
}

.form-group label {
    position: absolute;
    left: var(--space-16);
    top: var(--space-16);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

.input-premium:focus ~ label,
.input-premium:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 10px;
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--bg-primary);
    padding: 0 var(--space-8);
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Gallery Component */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-16);
    margin-top: var(--space-48);
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%) brightness(80%);
    transition: transform 0.6s var(--ease-premium), filter 0.6s var(--ease-premium);
}

.gallery-item:hover img {
    transform: scale(1.06);
    filter: grayscale(0%) brightness(95%);
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Stats Section */
.stat-col-divider {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* Contact Form Panel */
.contact-form-panel {
    background: rgba(22, 22, 22, 0.3);
    border: 1px solid var(--border-color);
    padding: var(--space-48);
    border-radius: 4px;
    position: relative;
}

@media (max-width: 576px) {
    .contact-form-panel {
        padding: var(--space-24);
    }
}

/* Section Titles (h2) */
.section-title {
    font-size: 2.8rem;
    margin-top: var(--space-8);
    line-height: 1.1;
}

.section-title-handle {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2.1rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.7rem;
    }

    .section-title-handle {
        font-size: 1.4rem;
    }
}

/* Footer */
.footer-premium {
    background: #000;
    border-top: 1px solid var(--border-color);
    padding: var(--space-48) 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    position: relative;
    z-index: 10;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-24);
}

.footer-links {
    display: flex;
    gap: var(--space-24);
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand img {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: var(--space-16);
        white-space: normal;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    right: var(--space-24);
    bottom: var(--space-24);
    width: 58px;
    height: 58px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    z-index: 998;
    transition: var(--transition-fast);
    animation: whatsappPulse 2.5s infinite;
}

.whatsapp-float:hover {
    background: #1ebe57;
    transform: scale(1.08);
}

@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    50% {
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 0 10px rgba(37, 211, 102, 0);
    }
}

@media (max-width: 576px) {
    .whatsapp-float {
        right: var(--space-16);
        bottom: var(--space-16);
        width: 50px;
        height: 50px;
    }
}

/* Scroll Reveal classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-premium), transform 0.8s var(--ease-premium);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

@media (max-width: 576px) {
    .reveal {
        transform: translateY(12px);
    }
}

