/* ========================================
   BMW USA — CSS Reset & Base
   ======================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-primary);
  font-weight: 400;
  color: var(--bmw-dark-text);
  background: var(--bmw-white);
  line-height: 1.5;
  overflow-x: hidden;
  transition: opacity ease-in 0.2s;
}

body[unresolved] {
  opacity: 0;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

fieldset {
  border: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--bmw-blue);
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to main content */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bmw-white);
  color: var(--bmw-dark-text);
  padding: 12px 24px;
  z-index: 10000;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* Selection */
::selection {
  background: var(--bmw-blue);
  color: var(--bmw-white);
}
