/* =============================================
   FONTS — BMW Type Next (Latin)
   ============================================= */

@font-face {
  font-family: 'BMW Type Next';
  src: url('assets/fonts/bmwtypenextthin.otf') format('opentype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BMW Type Next';
  src: url('assets/fonts/bmwtypenextlight.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BMW Type Next';
  src: url('assets/fonts/bmwtypenextregular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BMW Type Next';
  src: url('assets/fonts/bmwtypenextbold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* =============================================
   FONTS — BMW Type Next Pro Hebrew
   Activated automatically for Hebrew characters
   ============================================= */

@font-face {
  font-family: 'BMW Type Next';
  src: url('assets/fonts/bmwtypenextprohebrewthin.otf') format('opentype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0590-U+05FF, U+FB1D-U+FB4E, U+20AA;
}

@font-face {
  font-family: 'BMW Type Next';
  src: url('assets/fonts/bmwtypenextprohebrewlight.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0590-U+05FF, U+FB1D-U+FB4E, U+20AA;
}

@font-face {
  font-family: 'BMW Type Next';
  src: url('assets/fonts/bmwtypenextprohebrewregular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0590-U+05FF, U+FB1D-U+FB4E, U+20AA;
}

@font-face {
  font-family: 'BMW Type Next';
  src: url('assets/fonts/bmwtypenextprohebrewmedium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0590-U+05FF, U+FB1D-U+FB4E, U+20AA;
}

@font-face {
  font-family: 'BMW Type Next';
  src: url('assets/fonts/bmwtypenextprohebrewbold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0590-U+05FF, U+FB1D-U+FB4E, U+20AA;
}

/* =============================================
   DESIGN TOKENS
   ============================================= */

:root {
  --color-blue: #1c69d4;
  --color-dark: #1a1a1a;
  --color-mid: #6f6f6f;
  --color-border: #d0d0d0;
  --color-white: #ffffff;

  --font-main: 'BMW Type Next', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --section-px: clamp(1rem, 5vw, 4rem);
  --section-py: clamp(2rem, 6vw, 5rem);
  --car-img-px: clamp(1rem, 6vw, 2.5rem);
}

/* =============================================
   RESET & BASE
   ============================================= */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: clamp(0.875rem, 2vw, 1rem);
  font-weight: 400;
  color: var(--color-dark);
  background-color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font-family: var(--font-main);
}

/* =============================================
   BREAKPOINT UTILITIES
   ============================================= */

.br-mob {
  display: block;
}

.br-desk {
  display: none;
}

@media (min-width: 768px) {
  .br-mob {
    display: none;
  }

  .br-desk {
    display: block;
  }
}

/* =============================================
   BUTTON
   ============================================= */

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-family: var(--font-main);
  font-size: clamp(1rem, 5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  line-height: 1;
  transition: background-color 0.2s ease;
}

.btn--primary {
  background-color: var(--color-blue);
  color: var(--color-white);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: #1558b0;
  outline: none;
}

/* =============================================
   HERO — base (mobile first)
   bg_mob.jpg: 650 × 906 px
   ============================================= */

.hero {
  width: 100%;
  aspect-ratio: 650 / 906;
  background-image: url('assets/images/bg_mob.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 2rem;
}

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  padding: clamp(0.875rem, 4vw, 1.5rem);
  gap: clamp(0.375rem, 1.5vw, 0.625rem);
}

.hero__logo {
  width: clamp(3rem, 11vw, 5rem);
  margin-bottom: 0.25rem;
}

.hero__h1 {
  font-size: clamp(2rem, 9.5vw, 4.25rem);
  font-weight: 400;
  color: white;
  line-height: 1.05;
  letter-spacing: -0.01em;
  direction: ltr;
  text-align: left;
}

.hero__era {
  font-size: clamp(0.8rem, 3.6vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  direction: ltr;
  text-align: left;
}

.hero__body {
  font-size: clamp(0.8rem, 3.5vw, 1.6rem);
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
}

/* ── Stats bar ── */
.hero__stats {
  display: flex;
  width: fit-content;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 0.5rem 2rem 0.5rem 2rem;
  margin-top: auto;
}

.hero__stat {
  text-align: center;
}

.hero__stat-val {
  display: block;
  font-weight: 300;
  color: white;
  line-height: 1.2;
  direction: rtl;
  unicode-bidi: plaintext;
}

.hero__stat-unit {
  display: block;
  font-size: clamp(0.8125rem, 3vw, 1.125rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.1em;
}

/* =============================================
   HERO — desktop
   bg_desk.jpg: 1920 × 990 px
   ============================================= */

@media (min-width: 768px) {
  .hero {
    aspect-ratio: 1920 / 704;
    background-image: url('assets/images/bg_desk.jpg');
    align-items: flex-start;
    padding-bottom: unset;
  }

  .hero__content {
    justify-content: center;
    padding: clamp(1.5rem, 3vw, 3rem);
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
  }

  .hero__logo {
    width: clamp(4rem, 6vw, 7rem);
    padding: 2rem 0 2rem 0;
    margin-bottom: 0;
  }

  .hero__h1 {
    font-size: clamp(1.75rem, 4vw, 5rem);
  }

  .hero__era {
    font-size: clamp(0.5rem, 1.5vw, 1.7rem);
  }

  .hero__he {
    font-size: clamp(0.6875rem, 1.2vw, 0.875rem);
  }

  .hero__body {
    font-size: clamp(0.7rem, 1.4vw, 1.7rem);
  }

  .hero__stats {
    margin-top: unset;
    gap: 3rem;
  }

  .hero__stat-val {
    font-size: clamp(1rem, 1.8vw, 2rem);
  }

  .hero__stat-unit {
    font-size: clamp(1rem, 1.8vw, 2rem);
  }
}

/* =============================================
   FORM SECTION
   ============================================= */

.form-section {
  padding: var(--section-py) clamp(2rem, 12vw, 10rem);
  background-color: var(--color-white);
  max-width: 75rem;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .form-section {
    padding: clamp(1.5rem, 3vw, 2.5rem) var(--section-px);
    max-width: 90rem;
  }
}

.form-section__title {
  font-size: clamp(1.125rem, 3vw, 1.875rem);
  font-weight: 400;
  color: var(--color-dark);
  line-height: 1.3;
  text-align: center;
  margin-bottom: clamp(1.25rem, 3vw, 2.25rem);
}

/* ── Form layout (mobile: stacked column) ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3vw, 1.75rem);
}

/* ── Inputs group ── */
.form-inputs {
  display: flex;
  flex-direction: column;
  gap: clamp(0.625rem, 2vw, 0.875rem);
}

.form-input {
  width: 100%;
  padding: 0.8125rem 1rem;
  font-family: var(--font-main);
  font-size: clamp(0.875rem, 2vw, 1rem);
  font-weight: 300;
  color: var(--color-dark);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease;
}

.form-input::placeholder {
  color: #aaa;
  text-align: right;
}

.form-input:focus {
  border-color: var(--color-dark);
}

.form-input.error {
  border-color: #c0392b;
  color: #c0392b;
}

.form-input.error::placeholder {
  color: #c0392b;
}

/* Select arrow */
.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 1rem center;
  padding-left: 2.25rem;
  color: #aaa;
}

.form-select:valid,
.form-select.has-value {
  color: var(--color-dark);
}

/* ── Side: disclaimer, checkbox, button ── */
.form-side {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2vw, 1rem);
}

.form-disclaimer {
  font-size: clamp(0.6875rem, 1.5vw, 0.8125rem);
  font-weight: 300;
  color: var(--color-mid);
  line-height: 1.5;
}

.form-disclaimer__link {
  color: var(--color-mid);
  text-decoration: underline;
}

.form-disclaimer__link:hover {
  color: var(--color-dark);
}

/* Checkbox row */
.form-checkbox {
  display: flex;
  flex-direction: row;
  gap: 0.625rem;
  align-items: flex-start;
  cursor: pointer;
}

.form-checkbox__input {
  flex-shrink: 0;
  width: 1.0625rem;
  height: 1.0625rem;
  margin-top: 0.15em;
  cursor: pointer;
  accent-color: var(--color-blue);
}

.form-checkbox__label {
  font-size: clamp(0.625rem, 1.5vw, 0.75rem);
  font-weight: 300;
  color: var(--color-mid);
  line-height: 1.55;
}

/* Submit button: full-width on mobile */
.form-submit {
  width: 100%;
  text-align: center;
}

/* ── Footer links ── */
.form-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  justify-content: space-between;
  margin-top: clamp(0.875rem, 2vw, 1.25rem);
}

@media (min-width: 768px) {
  .form-footer-links {
    justify-content: flex-start;
  }
}

.form-footer-links a {
  font-size: clamp(0.625rem, 1.5vw, 0.75rem);
  font-weight: 300;
  color: var(--color-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-footer-links a:hover {
  color: var(--color-blue);
}

/* ── Desktop form layout ── */
@media (min-width: 768px) {
  .form-section__title {
    text-align: unset;
  }

  .contact-form {
    /* RTL grid: inputs span 2/3, side takes 1/3 */
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: stretch;
  }

  /* Inputs: right 2/3, itself a 2-col grid */
  .form-inputs {
    grid-column: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(0.75rem, 2vw, 1rem);
  }

  /* Showroom select spans both columns */
  .form-inputs .form-select {
    grid-column: 1 / -1;
  }

  /* Side: left 1/3 */
  .form-side {
    grid-column: 2;
    justify-content: space-between;
    align-items: center;
  }

  .form-submit {
    width: 100%;
    text-align: center;
  }
}

/* =============================================
   CARS SECTION — shared
   ============================================= */

.cars-section {
  padding-block: var(--section-py);
  background-color: var(--color-white);
  /* No inline padding: full-bleed images need edge-to-edge */
}

/* ── Car card ── */
.car-card {
  display: flex;
  flex-direction: column;
}

.car-card__img-wrap {
  width: 100%;
}

.car-card__img {
  width: 100%;
  aspect-ratio: 746 / 373;
  object-fit: cover;
  display: block;
}

.car-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.375rem;
  padding-block-start: clamp(0.75rem, 2vw, 1rem);
  padding-inline: var(--section-px);
}

.car-card__title {
  font-size: clamp(0.6rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1;
}

.car-card__text {
  font-size: clamp(0.6rem, 4vw, 2rem);
  font-weight: 300;
  color: var(--color-dark);
  line-height: 1.1;
  unicode-bidi: plaintext;
}

/* =============================================
   CARS SECTION — mobile layout
   ============================================= */

.cars-mobile {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

/* Full-bleed: image reaches edge-to-edge */
.car-card--full .car-card__img-wrap {
  /* no padding */
}

/* Padded: image inset from both sides */
.car-card--padded .car-card__img-wrap {
  padding-inline: var(--car-img-px);
}

/* Mobile-only CTA */
.cars-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--section-px) 0;
  border-top: 1px solid var(--color-border);
}

.cars-cta__text {
  font-size: clamp(1rem, 5vw, 1.5rem);
  font-weight: 600;
  color: var(--color-dark);
  max-width: 30rem;
  line-height: 1.55;
}

/* Hide desktop swiper on mobile */
.swiper-outer {
  display: none;
}

/* =============================================
   CARS SECTION — desktop Swiper
   ============================================= */

@media (min-width: 768px) {
  .cars-mobile {
    display: none;
  }

  .cars-section {
    padding-block: clamp(1.5rem, 3vw, 2.5rem);
  }

  .swiper-outer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-inline: var(--section-px);
  }

  .cars-swiper {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  /* Remove body inline padding inside swiper — slides handle spacing */
  .swiper-slide .car-card__body {
    padding-inline: 0;
  }

  /* Desktop card typography — tighter than the mobile clamp */
  .swiper-slide .car-card__title {
    font-size: clamp(0.5rem, 1.3vw, 1.5rem);
  }

  .swiper-slide .car-card__text {
    font-size: clamp(0.5rem, 1.3vw, 1.5rem);
  }

  /* ── Nav buttons ── */
  .nav-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    color: var(--color-dark);
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
  }

  .nav-btn:hover,
  .nav-btn:focus-visible {
    color: var(--color-blue);
    outline: none;
  }

  /* Swiper disables buttons at boundaries */
  .nav-btn.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
  }
}