/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
}

.site-header__wrap {
  padding: 1.25rem 1.25rem 0;
}

.site-header__bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  height: 4.5rem;
  padding-inline: 1.25rem;
  background-color: #fff;
  border-radius: 8px;
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled .site-header__bar {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo img {
  width: 6.25rem;
  height: 2.5rem;
  object-fit: contain;
}

.site-nav {
  display: none;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4.625rem;
}

.site-nav__list a {
  font-size: 1.125rem;
  font-weight: 500;
  color: #111;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.site-nav__list a:hover,
.site-nav__list a:focus-visible {
  color: #e83837;
}

.site-header__bar,
.site-header__actions {
  overflow: visible;
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

html[lang="en"] {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.lang-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: max-content;
  max-width: max-content;
  color: #111;
}

.lang-switch__toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem;
  color: inherit;
}

.lang-switch__icon {
  flex-shrink: 0;
}

.lang-switch__text {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
}

.lang-switch__chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.lang-switch__toggle[aria-expanded="true"] .lang-switch__chevron {
  transform: rotate(180deg);
}

.lang-switch__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  right: auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 96px;
  width: max-content;
  padding: 0.375rem 0;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.12);
  opacity: 0;
  transform: translateX(calc(-50% + 12px)) translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-switch__panel[hidden] {
  display: none !important;
}

.lang-switch__panel.is-open,
.lang-switch__panel:not([hidden]) {
  display: flex;
}

.lang-switch__toggle[aria-expanded="true"] + .lang-switch__panel {
  opacity: 1;
  transform: translateX(calc(-50% + 12px)) translateY(0);
  pointer-events: auto;
}

.lang-switch__option {
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: #111;
  white-space: nowrap;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a.lang-switch__option:hover,
a.lang-switch__option:focus-visible {
  background-color: rgba(232, 56, 55, 0.08);
  color: #e83837;
}

.lang-switch__option.is-disabled {
  color: #999;
  cursor: not-allowed;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #111;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  visibility: hidden;
  pointer-events: none;
}

.mobile-menu.is-open {
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu__backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu.is-open .mobile-menu__backdrop {
  opacity: 1;
}

.mobile-menu__panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100%, 22rem);
  height: 100%;
  padding: 0 2rem 2rem;
  background-color: #fff;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
}

.mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  height: 4.5rem;
  margin-bottom: 1rem;
}

.mobile-menu__logo {
  display: flex;
  align-items: center;
}

.mobile-menu__logo img {
  width: 6.25rem;
  height: 2.5rem;
  object-fit: contain;
}

.mobile-menu__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
}

.mobile-menu__nav {
  flex: 1;
  overflow-y: auto;
}

.mobile-menu.is-open .mobile-menu__panel {
  transform: translateX(0);
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-menu__list a {
  display: block;
  padding: 1rem 0;
  font-size: clamp(1.0625rem, 3vw, 1.25rem);
  font-weight: 500;
  line-height: 1.45;
  color: #111;
  border-bottom: 1px solid #f0f0f0;
  text-wrap: pretty;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-menu__list a:hover,
.mobile-menu__list a:focus-visible {
  color: #e83837;
  padding-left: 0.5rem;
}

body.is-menu-open {
  overflow: hidden;
}

/* Desktop nav — burger below 1289px */
@media (min-width: 1289px) {
  .site-header__bar {
    grid-template-columns: 11.625rem minmax(0, 1fr) 11.625rem;
  }

  .site-nav {
    display: block;
    justify-self: center;
    min-width: 0;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-menu {
    display: none;
  }
}

/* Reveal animation system */
.reveal {
  opacity: 0;
  transition:
    opacity 1.15s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up {
  transform: translateY(20px);
}

.reveal-fade {
  transform: none;
}

.reveal.is-visible {
  opacity: 1;
}

.reveal-up.is-visible {
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.12s;
}

.reveal-delay-2 {
  transition-delay: 0.24s;
}

.reveal-delay-3 {
  transition-delay: 0.36s;
}

.reveal-delay-4 {
  transition-delay: 0.48s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Global floating quick actions */
.quick-float {
  position: fixed;
  top: 58%;
  right: 0;
  z-index: 180;
  display: flex;
  flex-direction: column;
  gap: 0.9375rem;
  width: 11.375rem;
  transform: translate3d(100%, -50%, 0);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    transform 0.35s ease,
    opacity 0.25s ease,
    visibility 0.35s ease;
}

.quick-float.is-visible {
  transform: translate3d(0, -50%, 0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.quick-float__btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.4375rem 0.875rem 0.5rem;
  border: 0;
  font-family: inherit;
  font-size: 1.125rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.quick-float.is-visible .quick-float__btn:hover,
.quick-float.is-visible .quick-float__btn:focus-visible {
  filter: brightness(0.96);
}

.quick-float__btn:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.quick-float__btn--top {
  font-weight: 600;
  color: #000;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.quick-float__btn--top img {
  display: block;
  width: 0.5625rem;
  height: 0.3125rem;
  flex-shrink: 0;
}

.quick-float__btn--model {
  font-weight: 700;
  color: #fff;
  background-color: #e83837;
}

@media (max-width: 767px) {
  .site-header__wrap {
    padding: 0.75rem 1rem 0.375rem;
  }

  .site-header__bar {
    padding-inline: 1rem;
  }

  .quick-float {
    top: auto;
    bottom: 1.25rem;
    width: auto;
    max-width: calc(100vw - 1rem);
    transform: translate3d(100%, 0, 0);
  }

  .quick-float.is-visible {
    transform: translate3d(0, 0, 0);
  }

  .quick-float__btn {
    width: auto;
    min-height: 2.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-float {
    transition: none;
  }
}
