﻿:root {
  --bg-main: #05070b;
  --bg-panel: #0c1118;
  --bg-panel-soft: #121926;
  --surface: #1b2432;
  --text: #f5f7fa;
  --muted: #adb8c7;
  --line: #2b3545;
  --bmw-blue: #1c69d4;
  --bmw-silver: #c2cad4;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, #1a2637 0%, transparent 30%),
    radial-gradient(circle at 85% 15%, #162945 0%, transparent 25%),
    linear-gradient(180deg, #04060a 0%, #090d13 45%, #0d121b 100%);
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(28, 105, 212, 0.18), transparent 35%),
    radial-gradient(circle at 80% 15%, rgba(194, 202, 212, 0.12), transparent 30%),
    linear-gradient(180deg, #04060a 0%, #070b11 100%);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.loading-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-shell {
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.loading-ring {
  --progress: 0deg;
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(
      var(--bmw-blue) 0deg var(--progress),
      rgba(194, 202, 212, 0.18) var(--progress) 360deg
    );
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.loading-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: linear-gradient(180deg, #0d131d 0%, #0a1018 100%);
  border: 1px solid rgba(194, 202, 212, 0.28);
}

.loading-logo {
  width: 56px;
  height: 56px;
  z-index: 1;
}

.loading-text {
  color: #d9e1eb;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.loading-text span {
  color: #ffffff;
  font-family: "Oswald", sans-serif;
  font-size: 1.05rem;
  margin-right: 0.35rem;
}

.top-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid rgba(194, 202, 212, 0.18);
  background: linear-gradient(180deg, rgba(4, 6, 10, 0.92), rgba(4, 6, 10, 0.68));
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: "Oswald", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  transition: color 0.25s ease;
}

.menu a:hover {
  color: var(--text);
}

.bmw-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #11161f;
  background:
    conic-gradient(
      from 90deg,
      #fff 0 25%,
      var(--bmw-blue) 25% 50%,
      #fff 50% 75%,
      var(--bmw-blue) 75% 100%
    );
  box-shadow:
    inset 0 0 0 2px var(--bmw-silver),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  flex: 0 0 auto;
}

.bmw-logo.small {
  width: 22px;
  height: 22px;
}

.hero {
  position: relative;
  height: 410vh;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
}

#sequence-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  contain: strict;
}

.panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 7.5rem 1.2rem;
  border-top: 1px solid rgba(194, 202, 212, 0.15);
}

.panel-content {
  width: min(1100px, 96vw);
  background: linear-gradient(145deg, rgba(18, 25, 38, 0.88), rgba(10, 15, 23, 0.92));
  border: 1px solid rgba(194, 202, 212, 0.2);
  border-radius: 18px;
  padding: clamp(1.1rem, 2vw, 2rem);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

h2,
h3 {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.8rem, 4.2vw, 3.2rem);
}

h3 {
  font-size: clamp(1.25rem, 2.7vw, 1.7rem);
}

p {
  color: #d7dfea;
  line-height: 1.65;
}

.cards {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(23, 31, 45, 0.92), rgba(15, 21, 31, 0.95));
  padding: 1rem;
}

.card .bmw-logo {
  margin-bottom: 0.75rem;
}

.card h3 {
  margin-bottom: 0.4rem;
}

.stats {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(20, 28, 41, 0.7);
  padding: 1rem;
}

.value {
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  color: var(--bmw-silver);
  margin-bottom: 0.35rem;
}

.label {
  color: #c6d0df;
}

.panel-about {
  background: linear-gradient(180deg, rgba(5, 8, 12, 0.96), rgba(11, 16, 24, 0.9));
}

.panel-models {
  background: linear-gradient(180deg, rgba(9, 13, 20, 0.94), rgba(13, 19, 30, 0.92));
}

.panel-engineering {
  background: linear-gradient(180deg, rgba(8, 12, 19, 0.95), rgba(14, 20, 31, 0.9));
}

.panel-contact {
  background: linear-gradient(180deg, rgba(10, 15, 22, 0.96), rgba(7, 10, 15, 0.95));
}

.footer {
  border-top: 1px solid rgba(194, 202, 212, 0.2);
  padding: 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  color: #b9c5d6;
  background: #070b11;
}

@media (max-width: 900px) {
  .cards,
  .stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .top-bar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .menu {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero {
    height: 350vh;
  }
}
