@import url('../fonts/barlow/stylesheet.css');

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

body {
  background: #000;
  font-family: 'Barlow', Arial, sans-serif;
  overflow: hidden;
  color: #fff;
  font-size: 19px;
  line-height: 29px;
  font-weight: 300;
}

.lang-switcher {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-btn {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .25s ease;
}

.lang-btn:hover {
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.16);
}

.lang-btn.is-active {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.brands-intro {
  position: fixed;
  top: 25px;
  left: 50%;
  --intro-skew: -30deg;
  transform: translateX(-50%) skewX(var(--intro-skew));
  z-index: 30;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 50px 15px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  box-shadow: 0 0px 10px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.brands-intro > * {
  transform: skewX(calc(var(--intro-skew) * -1));
}

.brands-intro-logo {
  width: clamp(180px, 10vw, 250px);
  height: auto;
  display: block;
}

.brands-intro-text {
  font-size: 0.9rem;
  letter-spacing: .12em;
  color: #fff;
  white-space: nowrap;
}

.experience {
  display: flex;
  min-height: 100vh;
  gap: 10px;
}

.panel {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: white;
  padding: 46px 34px;
  flex: 1 1 0;
  min-width: 0;
  will-change: flex-grow, filter;
  transition:
    flex-grow .75s cubic-bezier(.19,1,.22,1),
    filter .45s ease;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.90), rgba(0,0,0,.70) 45%, rgba(0,0,0,.1)),
    var(--bg);
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 1.2s ease, filter .8s ease;
  z-index: -2;
  filter: brightness(.65);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.08), transparent 28%);
  opacity: 0;
  transition: opacity .6s ease;
  z-index: -1;
}

.experience.is-engaged:hover .panel {
  filter: grayscale(.2);
}

.experience.is-engaged:hover .panel:hover {
  flex-grow: 2.2;
}

.panel:hover {
  z-index: 2;
  filter: grayscale(0);
}

.panel:hover::before {
  transform: scale(1.08);
  filter: brightness(.82);
}

.panel:hover::after {
  opacity: 1;
}

.content {
  width: 100%;
  position: relative;
  top: 42%;
  z-index: 2;
  transform-origin: left bottom;
  transform: translateX(0);
  transition: transform .35s ease;
}

.experience.is-engaged .panel:hover .content {
  transform: translateX(16px);
}

.meta {
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
  opacity: .45;
  margin-bottom: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .55s cubic-bezier(.19,1,.22,1);
}

.meta-plus {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 6px;
  background: url("../images/icon-cross-white.svg") no-repeat center center;
  background-size: contain;
  font-size: 0;
  line-height: 0;
  vertical-align: middle;
  transform: translateY(-1px);
}

.logo {
  transition: transform .7s cubic-bezier(.19,1,.22,1), opacity .55s cubic-bezier(.19,1,.22,1);
  height: 35px;
  max-width: clamp(130px, 15vw, 260px);
  transform-origin: 0 50%;
}

.logo-img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.description {
  margin-top: 20px;
  width: 400px;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity .45s cubic-bezier(.19,1,.22,1),
    transform .45s cubic-bezier(.19,1,.22,1),
    visibility 0s linear .45s;
}

.cta {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  border: 1px solid #fff;
  color: #fff;
  padding: 5px 20px;
  border-radius: 10px;
  transform: translateY(8px);
  transition: all .35s ease;
}

.cta .circle {
  display: flex;
  align-items: center;
  justify-content: center;
  background:  url("../images/arrow_w.svg") no-repeat center center;
  width: 16px;
  height: 16px;
  transition: all .25s ease;
}

.cta:hover {
  background: #fff;
  color: #000;
}
.cta:hover .circle {
  background:  url("../images/arrow.svg") no-repeat center center;
  transform: translateX(3px);
}

.panel:hover .meta,
.panel:hover .description,
.panel:hover .cta {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition-delay: .22s;
}

.panel:hover .logo {
  transform: scale(1.25);
}

.wot {
  --bg:
    url('../images/wot01.jpg');
}

.apr {
  --bg:
  url('../images/Stoll-Web-res-28_1920x1920.jpg');
}

.dinan {
  --bg:
    url('../images/dinan_performance.jpg');
}

.stoll {
  --bg:
    url('../images/Stoll-Sport-Intake.jpg');
}

.akrapovic {
  --bg:
    url('../images/akrapovic.jpg');
}

.porsche {
  --bg:
    url('../images/soul-garage_3840x3840.jpeg');
}

@media (max-width: 1100px) {
  body {
    overflow-y: auto;
  }

  .lang-switcher {
    position: fixed;
    top: auto;
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    left: auto;
    z-index: 50;
    width: auto;
    justify-content: flex-end;
    padding: 0;
  }

  .brands-intro {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    margin: 0 auto;
    padding: 15px 30px;
    gap: 6px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border-radius: 0;
    width: 100%;
  }

  .brands-intro > * {
    transform: none;
  }

  .brands-intro-text {
    font-size: 0.9rem;
    letter-spacing: .12em;
  }

  .experience {
    flex-direction: column;
  }

  .experience.is-engaged:hover .panel {
    flex-grow: 1;
  }
  
  .experience.is-engaged:hover .panel:hover {
    flex-grow: 1;
  }

  .panel {
    min-height: 40vh;
    padding: 36px 24px;
    flex: 1;
  }

  .panel:hover .content {
    padding-left: 0;
    transform: translateX(0) !important;
  }

  .meta {
    opacity: 1;
    visibility: visible;
  }

  .description,
  .cta {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
      opacity .45s cubic-bezier(.19, 1, .22, 1),
      transform .45s cubic-bezier(.19, 1, .22, 1),
      visibility 0s linear .45s;
  }

  .panel:hover .description,
  .panel:hover .cta {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition-delay: 0s;
  }

  .panel.is-in-full-view .description,
  .panel.is-in-full-view .cta {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition:
      opacity .45s cubic-bezier(.19, 1, .22, 1),
      transform .45s cubic-bezier(.19, 1, .22, 1),
      visibility 0s;
  }

  .panel.is-in-full-view .description {
    transition-delay: 0.12s, 0.12s, 0s;
  }

  .panel.is-in-full-view .cta {
    transition-delay: 0.22s, 0.22s, 0s;
  }

  .cta .circle {
    transform: none !important;
  }
}

@media (max-width: 640px) {
  .brands-intro-text {
    font-size: 0.8rem;
  }

  .panel {
    min-height: 35vh;
    padding: 28px;
  }

  .logo {
    height: 34px;
    max-width: 180px;
  }

  .content {
    width: min(300px, 100%);
  }

  .description {
    width: min(280px, 100%);
    max-width: min(280px, 100%);
    font-size: 1rem;
    line-height: 1.6rem;
  }
}
