/* ===== NEXT GEN COMPOSITES — GLOBAL STYLES ===== */
/* Dark carbon fiber industrial aesthetic */

:root {
    /* Core palette */
    --black: #0a0a0a;
    --carbon: #111111;
    --carbon-mid: #1a1a1a;
    --carbon-light: #222222;
    --carbon-lighter: #2a2a2a;
    --gunmetal: #333333;
    --steel: #555555;
    --silver: #888888;
    --light: #cccccc;
    --white: #f0f0f0;
    --pure-white: #ffffff;
    
    /* Accent — aggressive red-orange for carbon fiber racing vibe */
    --accent: #e63946;
    --accent-hover: #ff4d5a;
    --accent-dark: #b82e39;
    --accent-glow: rgba(230, 57, 70, 0.3);
    
    /* Secondary accent */
    --blue: #1d3557;
    --blue-light: #457b9d;
    
    /* Typography */
    --font-display: 'Rajdhani', sans-serif;
    --font-body: 'Barlow Condensed', sans-serif;
    --font-ui: 'Inter', sans-serif;
    
    /* Spacing */
    --section-pad: clamp(60px, 10vw, 120px);
    --container-max: 1280px;
    --gap: 24px;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--black);
    color: var(--light);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input, textarea { font-family: var(--font-ui); }

/* ===== PRELOADER ===== */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}
#preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-weave {
    width: 48px;
    height: 48px;
    position: relative;
}
.fiber-strand {
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    animation: weave-spin 1.2s var(--ease-in-out) infinite;
}
.fiber-strand.s1 { top: 8px; animation-delay: 0s; }
.fiber-strand.s2 { top: 18px; animation-delay: 0.15s; }
.fiber-strand.s3 { top: 28px; animation-delay: 0.3s; }
.fiber-strand.s4 { top: 38px; animation-delay: 0.45s; }

@keyframes weave-spin {
    0%, 100% { transform: scaleX(0.3); opacity: 0.4; }
    50% { transform: scaleX(1); opacity: 1; }
}

.loader-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 6px;
    color: var(--silver);
    text-transform: uppercase;
}

/* ===== CARBON FIBER BACKGROUND PATTERN ===== */
.carbon-bg {
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.02) 2px,
            rgba(255,255,255,0.02) 4px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.015) 2px,
            rgba(255,255,255,0.015) 4px
        );
}

/* ===== NAVIGATION ===== */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
#main-header.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}
.logo-text {
    display: flex;
    flex-direction: column;
}
.logo-main {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 3px;
    color: var(--pure-white);
    line-height: 1;
}
.logo-sub {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 5px;
    color: var(--accent);
    line-height: 1;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--silver);
    transition: color 0.25s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--pure-white);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}
.dropdown {
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 220px;
    background: rgba(17,17,17,0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s var(--ease-out);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown li a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--silver);
    transition: all 0.2s;
}
.dropdown li a:hover {
    color: var(--pure-white);
    background: rgba(230, 57, 70, 0.1);
    padding-left: 24px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav-cta {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--pure-white);
    background: var(--accent);
    padding: 10px 24px;
    border-radius: 4px;
    transition: all 0.3s var(--ease-out);
}
.nav-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 4px 0;
}
.mobile-toggle span {
    display: block;
    height: 2px;
    background: var(--pure-white);
    border-radius: 2px;
    transition: all 0.3s;
}
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10,10,10,0.98);
    backdrop-filter: blur(20px);
    padding: 40px 32px;
    z-index: 999;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 24px; }
.mobile-menu a {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 28px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--silver);
    transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--accent); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 14px 32px;
    border-radius: 4px;
    transition: all 0.3s var(--ease-out);
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--accent);
    color: var(--pure-white);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
}
.btn-ghost {
    background: transparent;
    color: var(--pure-white);
    border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(230,57,70,0.05);
}
.btn-sm {
    padding: 10px 20px;
    font-size: 12px;
}

/* ===== SECTION UTILITIES ===== */
.section-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--section-pad) 32px;
}
.section-header {
    margin-bottom: 56px;
}
.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    position: relative;
    padding-left: 32px;
}
.section-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 20px;
    height: 1px;
    background: var(--accent);
}
.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.1;
    color: var(--pure-white);
    letter-spacing: -0.5px;
}
.section-desc {
    font-size: 18px;
    color: var(--silver);
    max-width: 600px;
    margin-top: 16px;
    line-height: 1.6;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--carbon);
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 64px 32px 32px;
}
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand p {
    color: var(--silver);
    font-size: 15px;
    margin-top: 16px;
    max-width: 300px;
    line-height: 1.6;
}
.footer-social {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}
.footer-social a {
    color: var(--silver);
    transition: color 0.2s, transform 0.2s;
}
.footer-social a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}
.footer-links-group h4 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--pure-white);
    margin-bottom: 20px;
}
.footer-links-group li {
    margin-bottom: 10px;
}
.footer-links-group a {
    font-size: 14px;
    color: var(--silver);
    transition: color 0.2s, padding-left 0.2s;
}
.footer-links-group a:hover {
    color: var(--accent);
    padding-left: 4px;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    font-size: 13px;
    color: var(--steel);
}
.made-in-usa {
    font-weight: 500;
}

/* ===== PAGE HERO (for inner pages) ===== */
.page-hero {
    padding: 160px 32px 80px;
    background: var(--carbon);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px),
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(255,255,255,0.01) 2px, rgba(255,255,255,0.01) 4px);
    pointer-events: none;
}
.page-hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(36px, 6vw, 64px);
    color: var(--pure-white);
    letter-spacing: 2px;
    position: relative;
}
.page-hero p {
    font-size: 18px;
    color: var(--silver);
    margin-top: 12px;
    position: relative;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 64px 32px;
}
.content-section h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 28px;
    color: var(--pure-white);
    margin: 40px 0 16px;
}
.content-section h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    color: var(--white);
    margin: 32px 0 12px;
}
.content-section p {
    font-size: 16px;
    color: var(--silver);
    line-height: 1.8;
    margin-bottom: 16px;
}
.content-section ul, .content-section ol {
    margin-bottom: 16px;
    padding-left: 24px;
}
.content-section li {
    font-size: 16px;
    color: var(--silver);
    line-height: 1.8;
    margin-bottom: 8px;
    list-style: disc;
}
.content-section a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.content-section a:hover {
    color: var(--accent-hover);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .nav-links { display: none; }
    .mobile-toggle { display: flex; }
    .nav-cta { display: none; }
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}
@media (max-width: 640px) {
    .footer-top {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .section-container {
        padding-left: 20px;
        padding-right: 20px;
    }
}
