/*
Theme Name: DreamBMW M Colors (Video Hero v2)
Description: DreamBMW M-Performance theme with BMW M color palette, video hero, and full dark/light mode
Author: Eduard Gabrielyan & Ace
Version: 1.3
*/

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

html, body {
    height: 100%;
}

body {
    font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f7fb;
    color: #050814;
    line-height: 1.4;
}

/* GLOBAL THEME TOGGLE */
body.dark-theme {
    background: #050814;
    color: #f5f7fb;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
    border-radius: 0 !important; /* NO ROUNDED CORNERS ANYWHERE */
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* UTILS */

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 96px 0;
}

/* HEADER */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(5, 8, 20, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body:not(.dark-theme) .site-header {
    background: rgba(245, 247, 251, 0.96);
    color: #050814;
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

.header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* TOGGLE – smaller, with sun/moon */

.theme-toggle {
    width: 34px;
    height: 16px;
    border: 1px solid currentColor;
    background: transparent;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 0;
}

.theme-toggle-track {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #81C4FF, #16588E, #E7222E);
    opacity: 0.4;
}

.theme-toggle-knob {
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    line-height: 1;
    transform: translateX(1px);
    transition: transform 0.18s ease-out, background 0.18s ease-out, color 0.18s ease-out;
}

.theme-toggle-icon-sun,
.theme-toggle-icon-moon {
    pointer-events: none;
}

.theme-toggle-icon-moon {
    display: none;
}

/* DARK STATE – knob to right, moon icon */
body.dark-theme .theme-toggle-knob {
    transform: translateX(19px);
    background: #050814;
    color: #f5f7fb;
}

body.dark-theme .theme-toggle-icon-sun {
    display: none;
}

body.dark-theme .theme-toggle-icon-moon {
    display: inline;
}

.theme-toggle-label {
    display: none;
}

.site-logo {
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* NAV */

.main-nav {
    flex: 1;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 32px;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.main-nav li a {
    opacity: 0.8;
}

.main-nav li a:hover {
    opacity: 1;
}

.nav-cta {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 10px 18px;
    border: 1px solid;
    background: #16588E; /* BMW M dark blue */
    color: #ffffff;
    border-radius: 0;
}

body.dark-theme .nav-cta {
    border-color: #81C4FF;
    background: linear-gradient(90deg, #81C4FF, #16588E, #E7222E);
}

body:not(.dark-theme) .nav-cta {
    border-color: #16588E;
    background: #ffffff;
    color: #16588E;
}

/* HERO */

.hero {
    position: relative;
    min-height: 520px;
    padding-top: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: #050814; /* fallback if video fails */
    color: #ffffff;
}

/* HERO VIDEO BACKGROUND */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: auto;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -2;
    opacity: 0.9;
}

/* Gradient overlay on top of video using M colors */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,8,20,0.2) 0%, rgba(5,8,20,0.7) 55%, rgba(5,8,20,0.95) 100%);
    z-index: -1;
}

.hero-swipe-top,
.hero-swipe-bottom {
    position: absolute;
    width: 50%;
    height: 4px;
    background: linear-gradient(90deg, #81C4FF, #16588E, #E7222E);
}

.hero-swipe-top {
    top: 112px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-swipe-bottom {
    bottom: 0;
    right: 0;
}

.hero-inner {
    max-width: 640px;
    margin: 0 auto;
}

.hero-kicker {
    height: 24px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title span {
    display: block;
}

.hero-title-main {
    font-size: 72px;
    background: linear-gradient(90deg, #81C4FF, #16588E, #E7222E);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-subtitle {
    margin-top: 16px;
    font-size: 13px;
    opacity: 0.95;
}

.hero-actions {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.btn-primary,
.btn-outline {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 13px 24px;
    border-radius: 0;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(90deg, #81C4FF, #16588E, #E7222E);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
    border-color: #ffffff;
}

/* ENGINEERED SECTION */

.section-engineered {
    background: #ffffff;
    display: flex;
    justify-content: center;
    padding: 112px 0;
    color: #050814;
}

body.dark-theme .section-engineered {
    background: #050814;
    color: #f5f7fb;
}

.engineered-grid {
    max-width: 1120px;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
    padding: 0 24px;
}

.engineered-image {
    border: 1px solid #dfe5f2;
    background: #f5f7fb;
    padding: 24px;
    position: relative;
}

body.dark-theme .engineered-image {
    border-color: #181b26;
    background: #070a15;
}

.engineered-image::after {
    content: "";
    position: absolute;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #81C4FF, #16588E, #E7222E);
    bottom: -36px;
    right: 36px;
}

.engineered-content h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.engineered-content h2 span {
    display: block;
}

.engineered-title-accent {
    background: linear-gradient(90deg, #81C4FF, #16588E, #E7222E);
    -webkit-background-clip: text;
    color: transparent;
}

body.dark-theme .engineered-title-accent {
    color: transparent;
}

.engineered-copy {
    margin-top: 16px;
    font-size: 13px;
    color: #4a5160;
}

body.dark-theme .engineered-copy {
    color: #c4cadf;
}

.engineered-metrics {
    display: flex;
    gap: 48px;
    margin-top: 32px;
}

.metric {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.16em;
}

/* SPEC ICONS */
.metric-icon {
    margin-bottom: 8px;
}

.metric-icon svg {
    display: block;
    width: 26px;
    height: 26px;
}

/* FINDER SECTION */

.section-finder {
    background: radial-gradient(circle at top left, #81C4FF 0%, #f5f7fb 40%, #ffffff 100%);
    padding: 112px 0;
    color: #050814;
}

body.dark-theme .section-finder {
    background: radial-gradient(circle at top left, #050814 0%, #050814 40%, #050814 100%);
    color: #f5f7fb;
}

.finder-header {
    text-align: center;
    margin-bottom: 40px;
}

.finder-kicker {
    height: 24px;
}

.finder-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.finder-title span {
    display: block;
}

.finder-title-accent {
    background: linear-gradient(90deg, #81C4FF, #16588E, #E7222E);
    -webkit-background-clip: text;
    color: transparent;
}

.finder-subtitle {
    margin-top: 12px;
    font-size: 13px;
    color: #4a5160;
}

body.dark-theme .finder-subtitle {
    color: #c4cadf;
}

.finder-card {
    max-width: 820px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #dfe5f2;
    padding: 32px 40px 36px;
    box-shadow: 0 12px 40px rgba(5, 8, 20, 0.08);
}

body.dark-theme .finder-card {
    background: #070a15;
    border-color: #181b26;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.finder-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.finder-field label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 6px;
    color: #7f8595;
}

body.dark-theme .finder-field label {
    color: #9aa1c2;
}

.finder-field select {
    width: 100%;
    border: 1px solid #dfe5f2;
    background: #f7f9ff;
    padding: 8px 10px;
    font-size: 12px;
}

body.dark-theme .finder-field select {
    border-color: #181b26;
    background: #050814;
    color: #f5f7fb;
}

.finder-submit {
    margin-top: 8px;
    width: 100%;
    text-align: center;
}

.finder-submit button {
    width: 100%;
}

.finder-featured {
    border-top: 1px solid #e3e7f2;
    margin-top: 24px;
    padding-top: 20px;
    display: flex;
    gap: 48px;
    font-size: 11px;
}

body.dark-theme .finder-featured {
    border-top-color: #181b26;
}

/* JOURNEY SECTION */

.section-journey {
    background: #ffffff;
    padding: 112px 0;
    color: #050814;
}

body.dark-theme .section-journey {
    background: #050814;
    color: #f5f7fb;
}

.journey-grid {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 72px;
    align-items: flex-start;
}

.journey-heading h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.journey-heading h2 span {
    display: block;
}

.journey-heading h2 span.engineered-title-accent {
    background: linear-gradient(90deg, #81C4FF, #16588E, #E7222E);
    -webkit-background-clip: text;
    color: transparent;
}

.journey-copy {
    margin-top: 16px;
    font-size: 13px;
    color: #4a5160;
}

body.dark-theme .journey-copy {
    color: #c4cadf;
}

.journey-list {
    margin-top: 24px;
    font-size: 12px;
}

.journey-list-item {
    margin-bottom: 14px;
}

.journey-list-label {
    font-weight: 700;
    font-size: 12px;
}

.journey-list-copy {
    font-size: 12px;
    color: #4a5160;
}

body.dark-theme .journey-list-copy {
    color: #c4cadf;
}

/* FORM CARD */

.journey-form-card {
    background: #ffffff;
    border: 1px solid #dfe5f2;
    box-shadow: 0 12px 40px rgba(5, 8, 20, 0.06);
    padding: 32px 32px 28px;
}

body.dark-theme .journey-form-card {
    background: #070a15;
    border-color: #181b26;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.form-field {
    margin-bottom: 14px;
}

.form-field label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 6px;
    color: #7f8595;
}

body.dark-theme .form-field label {
    color: #9aa1c2;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 1px solid #dfe5f2;
    padding: 9px 10px;
    font-size: 12px;
    background: #f7f9ff;
}

body.dark-theme .form-field input,
body.dark-theme .form-field textarea {
    border-color: #181b26;
    background: #050814;
    color: #f5f7fb;
}

.form-field textarea {
    height: 80px;
    resize: vertical;
}

.form-submit {
    margin-top: 10px;
}

.form-helper {
    margin-top: 8px;
    font-size: 10px;
    color: #7f8595;
}

body.dark-theme .form-helper {
    color: #9aa1c2;
}

/* FOOTER */

.site-footer {
    background: #050814;
    color: #ffffff;
    padding: 48px 0 28px;
    margin-top: 80px;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr repeat(3, minmax(0, 1fr));
    gap: 56px;
    font-size: 12px;
}

.footer-logo {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.footer-description {
    font-size: 11px;
    color: #a4a9bc;
    max-width: 260px;
}

.footer-column-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 10px;
}

.footer-menu {
    list-style: none;
    font-size: 11px;
    color: #d5d8e3;
}

.footer-menu li {
    margin-bottom: 6px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #181b26;
    margin-top: 32px;
    padding-top: 16px;
    font-size: 10px;
    color: #7f8595;
}

.footer-social {
    display: flex;
    gap: 16px;
}

/* RESPONSIVE */

@media (max-width: 960px) {
    .engineered-grid,
    .journey-grid,
    .footer-top {
        grid-template-columns: 1fr;
    }

    .engineered-image::after {
        display: none;
    }

    .finder-card {
        padding: 24px;
    }

    .header-inner {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 16px;
    }

    .main-nav ul {
        justify-content: flex-start;
        gap: 18px;
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 40px;
    }

    .hero-title-main {
        font-size: 52px;
    }

    .finder-filters {
        grid-template-columns: 1fr;
    }

    .journey-grid {
        gap: 40px;
    }
}
