/* 
  Lewis Hamilton Premium Landing Page CSS
  Theme: Dark, Racing-inspired, Premium, AMG Petronas accents
*/

:root {
    /* Color Palette */
    --bg-color: #050608;
    --surface-color: #14171E;
    --primary-color: #00D2BE;
    /* Petronas Teal */
    --primary-glow: rgba(0, 210, 190, 0.4);
    --secondary-color: #E60000;
    /* Subtle red accent, often on his helmet/gloves */
    --text-main: #FFFFFF;
    --text-muted: #A0AAB5;
    --border-color: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --container-max: 1200px;
    --section-pad: 100px 20px;

    /* Transitions */
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ================== GLOBAL STYLES ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo,
.stat-value {
    font-family: var(--font-heading);
    font-weight: 800;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-smooth);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

/* The Highlight class for gradient text */
.highlight {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary-color) 100%);
    background-clip: text;
    /* Standard property for compatibility */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* ================== NAVIGATION ================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: transparent;
    transition: background var(--transition-smooth), padding var(--transition-smooth);
}

.navbar.scrolled {
    background: rgba(5, 6, 8, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 40px;
}

.logo {
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: var(--transition-smooth);
}

/* ================== HERO SECTION ================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.bg-video {
    display: block;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
}

/* Fallback fallback gradient overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(5, 6, 8, 0.3) 0%,
            rgba(5, 6, 8, 0.7) 50%,
            rgba(5, 6, 8, 0.95) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    transform: translateY(20px);
    opacity: 0;
    animation: heroFadeIn 1s cubic-bezier(0.25, 0.8, 0.25, 1) forwards 0.5s;
}

.headline {
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 20px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.subheadline {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 50px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 210, 190, 0.3),
        0 0 40px rgba(0, 210, 190, 0.1);
    transition: transform 0.15s ease-out,
        box-shadow 0.15s ease-out,
        background 0.15s ease-out;
}

.btn-primary:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 210, 190, 0.6),
        0 0 60px rgba(0, 210, 190, 0.25),
        0 8px 25px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #00D2BE, #00F0D8);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 0 15px rgba(0, 210, 190, 0.4);
    transition: transform 0.05s ease-out;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.25s ease;
    z-index: -1;
}

.btn-primary:hover::after {
    left: 0;
}

.btn-primary .arrow {
    transition: transform 0.15s ease-out;
}

.btn-primary:hover .arrow {
    transform: translateY(4px);
    animation: arrowBounce 0.6s ease infinite;
}

@keyframes arrowBounce {

    0%,
    100% {
        transform: translateY(4px);
    }

    50% {
        transform: translateY(8px);
    }
}

/* ================== STATS SECTION ================== */
.stats-section {
    padding: var(--section-pad);
    background-color: var(--bg-color);
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

.stat-card {
    background: var(--surface-color);
    padding: 50px 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-10px) rotateX(2deg);
    box-shadow: 0 20px 40px var(--primary-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-value {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* ================== QUOTE SECTION ================== */
.quote-section {
    padding: 150px 20px;
    position: relative;
    text-align: center;
}

.quote-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(0, 210, 190, 0) 70%);
    z-index: -1;
    filter: blur(50px);
}

blockquote {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.3;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

blockquote::before,
blockquote::after {
    content: '"';
    color: var(--primary-color);
    opacity: 0.5;
}

cite {
    display: block;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 30px;
    color: var(--text-muted);
}

/* ================== GALLERY SECTION ================== */
.gallery-section {
    padding: var(--section-pad);
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 400px;
    gap: 20px;
    margin-top: 50px;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Removed .gallery-item.large as all items are now uniform */

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    filter: brightness(0.7);
}

.gallery-item .item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 50%);
    display: flex;
    align-items: flex-end;
    padding: 40px;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.gallery-item h3 {
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transform: translateY(20px);
    transition: transform var(--transition-smooth);
}

.gallery-item:hover {
    transform: translateY(-14px);
    box-shadow: 0 25px 50px rgba(0, 210, 190, 0.15),
        0 12px 25px rgba(0, 0, 0, 0.4);
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(1);
}

.gallery-item:hover .item-overlay {
    opacity: 1;
}

.gallery-item:hover h3 {
    transform: translateY(0);
}

/* ================== CTA SECTION ================== */
.cta-section {
    padding: 120px 20px;
    background: linear-gradient(135deg, rgba(26, 29, 36, 0) 0%, rgba(0, 210, 190, 0.05) 100%);
    text-align: center;
}

.cta-container {
    max-width: 700px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.cta-container p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 20px 0 40px;
}

.cta-form {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-form input {
    flex: 1;
    min-width: 250px;
    padding: 16px 24px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition-smooth);
}

.cta-form input:focus {
    border-color: var(--primary-color);
}

.btn-secondary {
    background: var(--text-main);
    color: var(--bg-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
}

/* ================== FOOTER ================== */
footer {
    padding: 40px 20px;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-logo span {
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.social-links a:hover {
    color: var(--primary-color);
}

.copyright {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

/* ================== ANIMATIONS ================== */

/* Image Sequence Animation */
@keyframes canvasFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

#hero-sequence {
    animation: canvasFadeIn 2s ease-in forwards;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animations */
[data-scroll] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: opacity, transform;
}

[data-scroll].scrolled {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger stat cards */
.stat-card:nth-child(1) {
    transition-delay: 0.1s;
}

.stat-card:nth-child(2) {
    transition-delay: 0.2s;
}

.stat-card:nth-child(3) {
    transition-delay: 0.3s;
}

.stat-card:nth-child(4) {
    transition-delay: 0.4s;
}

/* Stagger gallery items */
.gallery-item:nth-child(1) {
    transition-delay: 0.1s;
}

.gallery-item:nth-child(2) {
    transition-delay: 0.2s;
}

.gallery-item:nth-child(3) {
    transition-delay: 0.3s;
}

/* ================== MEDIA QUERIES ================== */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 300px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right var(--transition-smooth);
        z-index: -1;
    }

    .nav-links.active {
        right: 0;
    }

    .navbar.scrolled .nav-links {
        background: rgba(5, 6, 8, 0.95);
    }

    .cta-form {
        flex-direction: column;
    }

    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}