/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f6f0; /* Light beige/off-white background */
    color: #000000;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Bar */
.navigation {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: center;
    padding: 20px 0;
    background-color: transparent;
}

.nav-logo {
    display: flex;
    align-items: center;
    justify-self: start;
}

.nav-logo-img {
    height: 60px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-self: end;
    padding-right: 0;
}

.nav-link {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #666666;
}

.nav-link.active {
    color: #b8a86b;
    font-weight: 600;
}

.nav-logo a {
    display: block;
    transition: transform 0.3s ease;
}

.nav-logo a:hover {
    transform: scale(1.1);
}

/* 3D Engine Showcase */
.engine-showcase {
    padding: 60px 0;
    text-align: center;
}

.engine-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.engine-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 40px;
}

.engine-viewer {
    width: 100%;
    height: 600px;
    border-radius: 0; /* square corners */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
    background-color: transparent;
}

.engine-description {
    font-size: 1rem;
    color: #666666;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* BMW Style Layout */
.bmw-layout {
    padding: 60px 0;
    min-height: 80vh;
}

.bmw-container {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(520px, 1fr);
    gap: 64px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    align-items: center;
    position: relative;
}

.bmw-container::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, rgba(0,0,0,0), #ddd, rgba(0,0,0,0));
    transform: translateX(-0.5px);
    pointer-events: none;
}

.text-content {
    padding-right: 20px;
    border-left: 6px solid #b8a86b;
    padding-left: 24px;
}

.content-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 400;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.content-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: #666666;
    font-weight: 300;
    margin-bottom: 30px;
}

.content-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #333333;
}

.content-text p {
    margin-bottom: 20px;
}

.content-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000000;
    margin: 25px 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.content-text ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 25px;
}

.content-text li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #444444;
}

.content-text li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #b8a86b;
    font-weight: bold;
}

.viewer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.engine-viewer-bmw {
    width: 100%;
    height: 500px;
    border-radius: 0; /* square corners */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 15px;
    background-color: transparent;
}

.viewer-description {
    font-size: 0.9rem;
    color: #666666;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
}

/* Responsive design for BMW layout */
@media (max-width: 1024px) {
    .bmw-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .bmw-container::before { display: none; }
    
    .text-content {
        padding-right: 0;
        order: 2;
    }
    
    .viewer-section {
        order: 1;
    }
    
    .engine-viewer-bmw {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .bmw-layout {
        padding: 40px 0;
    }
    
    .bmw-container {
        padding: 0 20px;
        gap: 30px;
    }
    
    .engine-viewer-bmw {
        height: 350px;
    }
    
    .content-text {
        text-align: left;
    }
}

/* Main Visual Section */
.main-visual {
    margin: 20px 0;
    position: relative;
}

/* Background Text */
.background-text {
    font-family: 'Anton', sans-serif;
    position: absolute;
    top: 0%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 400;
    color: transparent;
    -webkit-text-stroke: 1px #000000;
    text-stroke: 2px #000000;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 5;
    pointer-events: none;
    white-space: nowrap;
}

.car-panels {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    max-width: 900px;
    margin: 80px auto 0 auto;
    padding: 20px 20px;
    position: relative;
    z-index: 2;
}

/* Staggered animation for panels */
.panel:nth-child(1) {
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.panel:nth-child(2) {
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.panel:nth-child(3) {
    animation: slideInRight 0.8s ease-out 0.6s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

.panel {
    background-color: #b8a86b;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.panel:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    background-color: #c4b475;
}

.panel:hover::before {
    opacity: 1;
    transform: scale(1);
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    pointer-events: none;
}

.car-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background image approach for seamless split */
.car-bg-left,
.car-bg-center,
.car-bg-right {
    width: 100%;
    height: 100%;
    background-image: url('img/tollie.png');
    background-size: 300% auto;
    background-repeat: no-repeat;
    filter: contrast(1.1) brightness(1.0);
    transition: all 0.3s ease;
}

.panel:hover .car-bg-left,
.panel:hover .car-bg-center,
.panel:hover .car-bg-right {
    filter: contrast(1.3) brightness(1.1) saturate(1.2);
    transform: scale(1.05);
}

.car-bg-left {
    background-position: 0% center;
}

.car-bg-center {
    background-position: 50% center;
}

.car-bg-right {
    background-position: 100% center;
}


/* Panel-specific styling - rectangular colored backgrounds */
.panel-left {
    background-color: #b8a86b;
}

.panel-center {
    background-color: #b8a86b;
}

.panel-right {
    background-color: #b8a86b;
}


/* Facts Section */
.facts-section {
    padding: 40px 0;
    border-top: 1px solid #d4d4d4;
    border-bottom: 1px solid #d4d4d4;
    margin-top: clamp(120px, 18vh, 240px);
}

/* Quote Spotlight */
.quote-spotlight {
    margin: clamp(30px, 6vw, 60px) auto 0 auto;
}

.quote-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    text-align: center;
}

.quote-text {
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0.01em;
    font-size: clamp(1rem, 2.4vw, 1.25rem);
    line-height: 1.6;
    color: #333333;
}

.quote-author {
    margin-top: 6px;
    color: #666666;
    font-size: 0.95rem;
}

.facts-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.fact-line {
    margin: 10px 0;
}

.fact-text {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #000000;
}

/* Description Section */
.description-section {
    padding: 60px 0;
}

.description-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.description-text {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 300;
    line-height: 1.8;
    color: #333333;
    text-align: justify;
}

/* Heritage Section */
.heritage-section {
    padding: 60px 0 20px 0;
}

.heritage-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

.section-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.section-intro {
    color: #444444;
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: 26px;
}

.heritage-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 220px;
    gap: 16px;
    margin-bottom: 26px;
}

.heritage-card {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.heritage-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.12);
}

.heritage-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Video Card */
.video-card .media-wrap { position: relative; overflow: hidden; }
.heritage-video { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.05) contrast(1.05); }
.video-card:hover .heritage-video { filter: saturate(1.15) contrast(1.1); }
.video-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.75rem;
    padding: 6px 8px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

.heritage-caption { display: none; }

.heritage-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    row-gap: 10px;
    align-items: start;
}

/* Creative cards for copy blocks */
.heritage-col {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 24px;
    position: relative;
    border-radius: 0;
    display: block;
}

.heritage-col::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #b8a86b, #d3c790);
}

.heritage-col::after { content: none; }

.heritage-col:hover { transform: translateY(-2px); transition: transform 0.25s ease; }

.heritage-col .section-subtitle {
    margin: 2px 0 8px 0;
    padding-left: 0;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #e6e6e6;
    padding-bottom: 6px;
}

/* Right vertical aside */
.heritage-aside { position: sticky; top: 20px; align-self: start; }
.aside-card { background: #ffffff; border: 1px solid #e6e6e6; box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.aside-img { width: 100%; height: 680px; object-fit: cover; display: block; }
.aside-caption { text-align: center; color: #666666; padding: 10px 12px 12px 12px; font-size: 0.9rem; }

.section-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.heritage-list { list-style: none; margin: 10px 0 0 0; padding: 0; }
.heritage-list li { position: relative; padding-left: 18px; margin: 10px 0; color: #444444; }
.heritage-list li::before { content: "—"; position: absolute; left: 0; top: 0; color: #b8a86b; font-weight: 700; }

.heritage-paragraph { color: #333333; margin-top: 2px; }
/* Drop cap removed for cleaner editorial look */

/* Footer Section */
.footer {
    padding: 28px 0 18px 0;
    border-top: 1px solid #d4d4d4;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
}

.mazda-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-img {
    max-width: 60px;
    max-height: 60px;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo-img:hover {
    opacity: 1;
    transform: scale(1.1);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    gap: 18px;
    justify-content: flex-end;
}

.footer-link {
    color: #000000;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #666666;
}

.footer-note {
    color: #666666;
    font-size: 0.9rem;
}

.footer-bottom {
    margin-top: 8px;
    text-align: center;
}

.copyright {
    color: #9a9a9a;
    font-size: 0.8rem;
}

.footer-quote {
    margin: 10px auto 6px auto;
    max-width: 800px;
    color: #333333;
    font-style: italic;
    line-height: 1.6;
}

.footer-quote .quote-author {
    display: inline-block;
    margin-left: 6px;
    color: #666666;
    font-style: normal;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .navigation {
        padding: 15px 20px;
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .nav-logo {
        justify-self: center;
    }
    
    .nav-links {
        gap: 20px;
        flex-wrap: wrap;
        justify-self: center;
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
    
    .car-panels {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 20px 10px;
    }
    
    .panel {
        min-height: 300px;
        padding: 0;
    }
    
    /* Reset background positioning on mobile for better visibility */
    .car-bg-left,
    .car-bg-center,
    .car-bg-right {
        background-size: 100% auto;
        background-position: center center;
    }
    
    
    .facts-section {
        padding: 30px 0;
        margin-top: clamp(80px, 16vh, 180px);
    }
    
    .description-section {
        padding: 40px 0;
    }
    
    .description-text {
        text-align: left;
    }
    .heritage-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
    .heritage-img { height: 200px; }
    .heritage-video { height: 200px; }
    .heritage-columns { grid-template-columns: 1fr; }
    .heritage-container { grid-template-columns: 1fr; }
    .aside-img { height: 420px; }
    .footer-content { grid-template-columns: 1fr; }
    .footer-links { justify-content: center; }
}

/* Mosaic layout for large screens */
@media (min-width: 992px) {
    .heritage-card { height: 100%; }
    .win-card { grid-column: span 4; }
    .engine-card { grid-column: span 4; }
    .video-card { grid-column: span 8; grid-row: span 2; }
    .video-card .media-wrap, .video-card .heritage-video { height: 100%; }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 2.5rem;
    }
    
    .model-title {
        font-size: 2rem;
    }
    
    .fact-text {
        font-size: 0.9rem;
    }
    
    .description-text {
        font-size: 0.85rem;
    }
}

/* Animation and Effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header, .main-visual, .model-section, .facts-section, .description-section {
    animation: fadeInUp 0.8s ease-out;
}

.facts-section {
    animation-delay: 0.2s;
}

.description-section {
    animation-delay: 0.4s;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.car-bg-left:focus,
.car-bg-center:focus,
.car-bg-right:focus,
.logo-img:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}
