* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #080808;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}


/* =========================
   HEADER
========================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 6%;

    background: rgba(8, 8, 8, 0.88);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid #222;

    z-index: 1000;
}

.logo {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: 4px;
}

.header nav {
    display: flex;
    gap: 35px;
}

.header nav a {
    color: #aaa;
    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;

    transition: 0.3s;
}

.header nav a:hover {
    color: #ffffff;
}


/* =========================
   HERO
========================= */

.hero {
    min-height: 100vh;

    display: flex;
    align-items: center;

    padding: 120px 8% 80px;

    background:
        radial-gradient(
            circle at 75% 50%,
            #202020 0%,
            #101010 30%,
            #080808 65%
        );
}

.hero-content {
    max-width: 900px;
}

.small-title {
    color: #777;
    font-size: 12px;
    letter-spacing: 5px;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: clamp(55px, 9vw, 135px);
    line-height: 0.9;
    letter-spacing: -6px;
    font-weight: 900;
}

.hero h1 span {
    color: #777;
}

.hero-text {
    max-width: 560px;
    margin-top: 40px;

    color: #999;

    font-size: 17px;
    line-height: 1.7;
}

.hero-button {
    display: inline-block;

    margin-top: 35px;
    padding: 17px 28px;

    color: #ffffff;
    border: 1px solid #555;

    text-decoration: none;

    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;

    transition: 0.3s;
}

.hero-button:hover {
    background: #ffffff;
    color: #000000;
}


/* =========================
   SECTIONS
========================= */

.section {
    width: 100%;
    padding: 150px 8%;
}

.section-heading {
    margin-bottom: 80px;
}

.section-heading p {
    color: #666;

    font-size: 11px;
    letter-spacing: 4px;

    margin-bottom: 20px;
}

.section-heading h2 {
    font-size: clamp(45px, 7vw, 95px);
    line-height: 0.9;
    letter-spacing: -4px;
}

.section-heading h2 span {
    color: #555;
}


/* =========================
   TIMELINE
========================= */

.timeline {
    max-width: 1000px;
    border-left: 1px solid #333;
}

.timeline-item {
    display: grid;
    grid-template-columns: 150px 1fr;

    gap: 50px;

    padding: 35px 0 35px 40px;

    border-bottom: 1px solid #1e1e1e;

    transition: 0.3s;
}

.timeline-item:hover {
    background: #0d0d0d;
}

.timeline-year {
    color: #777;

    font-size: 22px;
    font-weight: bold;
}

.timeline-item h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.timeline-item p {
    color: #888;

    max-width: 650px;

    line-height: 1.7;
}


/* =========================
   CARS
========================= */

.cars-section {
    background: #0c0c0c;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 25px;
}


/* =========================
   CAR CARD
========================= */

.car-card {
    background: #111;

    border: 1px solid #222;

    overflow: hidden;

    transition:
        border-color 0.4s ease,
        transform 0.4s ease;
}

.car-card:hover {
    border-color: #444;
    transform: translateY(-5px);
}


/* прибираємо стандартний трикутник */

.car-card summary {
    list-style: none;
    cursor: pointer;
}

.car-card summary::-webkit-details-marker {
    display: none;
}


/* IMAGE */

.car-image {
    width: 100%;
    height: 390px;

    background: #090909;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.car-image img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    display: block;

    transition: transform 0.7s ease;
}

.car-card:hover .car-image img {
    transform: scale(1.04);
}


/* =========================
   CAR NAME
========================= */

.car-name {
    min-height: 120px;

    padding: 25px 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-top: 1px solid #222;
}

.car-number {
    display: block;

    color: #666;

    font-size: 10px;
    letter-spacing: 3px;

    margin-bottom: 8px;
}

.car-name h3 {
    font-size: 28px;
    letter-spacing: -1px;
}

.car-name p {
    color: #666;

    font-size: 10px;
    letter-spacing: 3px;

    margin-top: 5px;
}


/* =========================
   ARROW
========================= */

.open-card {
    width: 15px;
    height: 15px;

    border-right: 2px solid #777;
    border-bottom: 2px solid #777;

    transform: rotate(45deg);

    flex-shrink: 0;

    transition:
        transform 0.45s ease,
        border-color 0.3s ease;
}


/* коли картка відкрита */

.car-card[open] .open-card {
    transform: rotate(225deg);

    border-color: #ffffff;
}


/* =========================
   CAR INFO
========================= */

.car-info {
    padding: 45px 30px 50px;

    border-top: 1px solid #222;

    background: #0d0d0d;

    animation: carInfoIn 0.45s ease both;
}


/* анімація появи інформації */

@keyframes carInfoIn {

    from {
        opacity: 0;
        transform: translateY(-18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================
   INFO MAIN
========================= */

.info-main > span {
    color: #666;

    font-size: 10px;
    letter-spacing: 3px;
}

.info-main h4 {
    margin-top: 15px;

    font-size: 38px;
    line-height: 1;

    letter-spacing: -2px;
}

.info-main p {
    color: #888;

    max-width: 600px;

    line-height: 1.7;

    margin-top: 20px;
}


/* =========================
   SPECS
========================= */

.specs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    margin-top: 45px;

    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

.specs div {
    padding: 25px 15px;

    border-right: 1px solid #222;
}

.specs div:last-child {
    border-right: none;
}

.specs span {
    display: block;

    color: #555;

    font-size: 9px;
    letter-spacing: 2px;

    margin-bottom: 10px;
}

.specs strong {
    font-size: 14px;
}


/* =========================
   INFO TEXT
========================= */

.info-text {
    margin-top: 30px;
}

.info-text p {
    color: #777;

    line-height: 1.8;

    max-width: 750px;
}


/* =========================
   BMW WORLD
========================= */

.world-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 1px;

    background: #222;

    border: 1px solid #222;
}

.world-card {
    min-height: 280px;

    padding: 35px;

    background: #0b0b0b;

    transition: 0.4s;
}

.world-card:hover {
    background: #151515;
}

.world-card > span {
    color: #555;

    font-size: 11px;
    letter-spacing: 3px;
}

.world-card h3 {
    margin-top: 70px;

    font-size: 17px;
}

.world-card p {
    color: #777;

    margin-top: 15px;

    line-height: 1.7;

    font-size: 13px;
}


/* =========================
   FACTS
========================= */

.facts-section {
    background: #0c0c0c;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 1px;

    background: #222;

    border: 1px solid #222;
}

.fact {
    min-height: 210px;

    padding: 35px;

    background: #101010;
}

.fact strong {
    display: block;

    font-size: 48px;

    letter-spacing: -2px;
}

.fact p {
    color: #777;

    line-height: 1.6;

    margin-top: 20px;
}


/* =========================
   DEEP FACTS
========================= */

.deep-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 1px;

    background: #222;

    border: 1px solid #222;
}

.deep-facts article {
    min-height: 300px;

    padding: 35px;

    background: #0d0d0d;

    transition: 0.4s;
}

.deep-facts article:hover {
    background: #151515;
}

.deep-facts article > span {
    color: #555;

    font-size: 11px;
    letter-spacing: 3px;
}

.deep-facts h3 {
    margin-top: 70px;

    font-size: 18px;
    line-height: 1.2;
}

.deep-facts p {
    color: #777;

    margin-top: 18px;

    line-height: 1.7;

    font-size: 13px;
}


/* =========================
   IMAGE NOTE
========================= */

.image-note {
    padding: 50px 8%;

    background: #050505;

    border-top: 1px solid #181818;
    border-bottom: 1px solid #181818;
}

.image-note p {
    color: #555;

    font-size: 11px;
    letter-spacing: 1px;
}


/* =========================
   END SECTION
========================= */

.end-section {
    min-height: 80vh;

    padding: 150px 8%;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background:
        radial-gradient(
            circle at center,
            #191919 0%,
            #080808 60%
        );
}

.end-section > p {
    color: #666;

    letter-spacing: 5px;
    font-size: 12px;

    margin-bottom: 30px;
}

.end-section h2 {
    font-size: clamp(60px, 11vw, 170px);

    line-height: 0.8;

    letter-spacing: -7px;
}

.end-section h2 span {
    color: #555;
}


/* =========================
   FOOTER
========================= */

footer {
    min-height: 180px;

    padding: 50px 8%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-top: 1px solid #222;

    background: #050505;
}

.footer-logo {
    font-size: 28px;

    font-weight: 900;

    letter-spacing: 4px;
}

footer p {
    color: #555;

    font-size: 10px;
    letter-spacing: 3px;
}

footer span {
    color: #444;

    font-size: 9px;
    letter-spacing: 2px;
}


/* =========================
   TABLET
========================= */

@media (max-width: 1000px) {

    .world-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .facts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .deep-facts {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .header {
        height: 65px;

        padding: 0 20px;
    }

    .header nav {
        display: none;
    }

    .hero {
        padding: 120px 25px 70px;
    }

    .hero h1 {
        font-size: 55px;
        letter-spacing: -3px;
    }

    .hero-text {
        font-size: 14px;
    }

    .section {
        padding: 90px 20px;
    }

    .section-heading {
        margin-bottom: 50px;
    }

    .section-heading h2 {
        font-size: 50px;
        letter-spacing: -3px;
    }

    .timeline-item {
        grid-template-columns: 1fr;

        gap: 15px;

        padding-left: 25px;
    }

    .cars-grid {
        grid-template-columns: 1fr;
    }

    .car-image {
        height: 280px;
    }

    .car-name {
        padding: 20px;

        min-height: 100px;
    }

    .car-name h3 {
        font-size: 23px;
    }

    .car-info {
        padding: 35px 20px;
    }

    .info-main h4 {
        font-size: 30px;
    }

    .specs {
        grid-template-columns: repeat(2, 1fr);
    }

    .specs div:nth-child(2) {
        border-right: none;
    }

    .world-grid,
    .facts-grid,
    .deep-facts {
        grid-template-columns: 1fr;
    }

    .world-card,
    .deep-facts article {
        min-height: 240px;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;

        gap: 20px;
    }

    .end-section h2 {
        font-size: 65px;
        letter-spacing: -4px;
    }

}