:root {
  --bg: #0b0d10;
  --surface: #0f1216;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-2: #06b6d4;
  --bmw-blue: #1d4ed8;
  --bmw-light: #60a5fa;
  --success: #22c55e;
  --danger: #ef4444;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(29,78,216,.15), transparent 60%),
              radial-gradient(800px 400px at 10% 10%, rgba(6,182,212,.08), transparent 60%),
              var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: linear-gradient(180deg, rgba(15,18,22,.9), rgba(15,18,22,.6), transparent);
  backdrop-filter: blur(8px);
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .5px; }
.brand-ring { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--bmw-blue); box-shadow: 0 0 20px rgba(29,78,216,.6), inset 0 0 10px rgba(29,78,216,.4); }
.nav nav { display: flex; align-items: center; gap: 16px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; opacity: .9; }
.nav a:hover { color: white; }
.btn { background: linear-gradient(90deg, var(--bmw-blue), var(--bmw-light)); color: #fff; border: 0; padding: 10px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; box-shadow: 0 8px 24px rgba(29,78,216,.35); }
.btn.ghost { background: transparent; border: 1px solid rgba(96,165,250,.35); color: var(--text); box-shadow: none; }
.btn:active { transform: translateY(1px); }

#loader { position: fixed; top: 76px; right: 16px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(15,18,22,.65); border: 1px solid rgba(255,255,255,.06); backdrop-filter: blur(8px); z-index: 50; pointer-events: none; }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--bmw-blue); border-radius: 50%; animation: spin 1s linear infinite; }
.loader-text { color: var(--muted); font-weight: 600; letter-spacing: .2px; font-size: 12px; }
.hidden { opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

.section { position: relative; padding: 96px 24px; }
.container { max-width: 1200px; margin: 0 auto; }

.hero { height: 100vh; padding: 0; position: relative; }
#webgl { display: none; }
#heroImage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: auto; height: 85%; object-fit: contain; filter: saturate(1.05) contrast(1.05) brightness(.95); }
@media (max-width: 640px) {
  #heroImage { height: 92%; }
}
.hero-overlay { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; background: linear-gradient(180deg, rgba(11,13,16,0) 0%, rgba(11,13,16,.6) 55%, rgba(11,13,16,.9) 100%); }
.hero h1 { font-size: clamp(42px, 7vw, 86px); margin: 0 0 8px; letter-spacing: -1px; line-height: .95; }
.m-badge { background: linear-gradient(90deg, #ef4444, #3b82f6, #22c55e); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 6px 30px rgba(59,130,246,.35); font-weight: 800; margin-right: 6px; }
.hero p { margin: 0 0 16px; color: var(--muted); font-weight: 600; }

.controls { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 12px; }
.control label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.color-row { display: flex; gap: 10px; }
.color-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: var(--c); cursor: pointer; box-shadow: 0 0 0 0 rgba(255,255,255,.25); transition: transform .2s ease, box-shadow .2s ease; }
.color-dot:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.45); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.features .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)); border: 1px solid rgba(255,255,255,.06); border-radius: 16px; padding: 24px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.feature h2 { margin-top: 0; }
.feature p { color: var(--muted); }

.specs { background: radial-gradient(600px 400px at 80% 20%, rgba(29,78,216,.2), transparent 60%), var(--surface); }
.specs h2 { margin-top: 0; }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.spec { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; }
.spec span { color: var(--muted); }

.gallery .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { aspect-ratio: 16/10; background: center/cover no-repeat var(--bg), var(--surface); border-radius: 16px; border: 1px solid rgba(255,255,255,.06); box-shadow: 0 10px 30px rgba(0,0,0,.35); background-image: var(--bg); }

.cta { text-align: center; background: linear-gradient(180deg, rgba(29,78,216,.12), rgba(6,182,212,.12)); }
.form { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.form input { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: var(--text); padding: 12px 14px; border-radius: 10px; width: min(260px, 90vw); }

.footer { padding: 24px; background: #0a0c0f; border-top: 1px solid rgba(255,255,255,.06); color: var(--muted); }
.footer .container { display: flex; align-items: center; justify-content: space-between; }

@media (max-width: 1024px) {
  .features .container { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .spec-grid { grid-template-columns: 1fr; }
  .gallery .grid { grid-template-columns: 1fr; }
}


