/* Motul Polska — home page */

/* —— Hero slider —— */
.hero {
  position: relative;
  min-height: 900px;
  overflow: hidden;
  background: var(--black);
}

.hero-viewport {
  position: absolute;
  inset: 0;
}

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.hero-slide.is-entering-from-right,
.hero-slide.is-entering-from-left,
.hero-slide.is-leaving-to-left,
.hero-slide.is-leaving-to-right {
  visibility: visible;
  pointer-events: none;
  z-index: 2;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background: var(--hero-image) center 30% / cover no-repeat;
  transform: scale(1.06);
  transition: transform 1.1s var(--ease);
}

.hero-slide.is-active .hero-media {
  transform: scale(1);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.18) 48%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 40%, rgba(0, 0, 0, 0.35) 100%);
}

.hero-content {
  position: absolute;
  left: var(--page-pad);
  right: var(--page-pad);
  bottom: 7.5rem;
  z-index: 3;
  max-width: 720px;
}

.hero-title {
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.hero-line {
  display: block;
  transform: translateX(40px);
  opacity: 0;
}

.hero-cta {
  transform: translateX(28px);
  opacity: 0;
}

.hero-slide.is-active .hero-line,
.hero-slide.is-active .hero-cta {
  animation: hero-text-in 0.7s var(--ease) forwards;
}

.hero-slide.is-active .hero-line:nth-child(1) { animation-delay: 0.12s; }
.hero-slide.is-active .hero-line:nth-child(2) { animation-delay: 0.24s; }
.hero-slide.is-active .hero-cta { animation-delay: 0.38s; }

.hero-slide.is-leaving-to-left .hero-line,
.hero-slide.is-leaving-to-left .hero-cta,
.hero-slide.is-leaving-to-right .hero-line,
.hero-slide.is-leaving-to-right .hero-cta {
  animation: hero-text-out 0.45s var(--ease) forwards;
}

.hero-slide.is-leaving-to-left .hero-line:nth-child(1),
.hero-slide.is-leaving-to-right .hero-line:nth-child(1) { animation-delay: 0s; }
.hero-slide.is-leaving-to-left .hero-line:nth-child(2),
.hero-slide.is-leaving-to-right .hero-line:nth-child(2) { animation-delay: 0.04s; }
.hero-slide.is-leaving-to-left .hero-cta,
.hero-slide.is-leaving-to-right .hero-cta { animation-delay: 0.08s; }

@keyframes hero-text-in {
  from { opacity: 0; transform: translateX(48px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes hero-text-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-36px); }
}

.hero[data-dir="prev"] .hero-slide.is-active .hero-line,
.hero[data-dir="prev"] .hero-slide.is-active .hero-cta {
  animation-name: hero-text-in-from-left;
}

.hero[data-dir="prev"] .hero-slide.is-leaving-to-right .hero-line,
.hero[data-dir="prev"] .hero-slide.is-leaving-to-right .hero-cta {
  animation-name: hero-text-out-to-right;
}

@keyframes hero-text-in-from-left {
  from { opacity: 0; transform: translateX(-48px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes hero-text-out-to-right {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(36px); }
}

.hero-slide.is-entering-from-right {
  animation: hero-slide-in-right 0.75s var(--ease) forwards;
}

.hero-slide.is-entering-from-left {
  animation: hero-slide-in-left 0.75s var(--ease) forwards;
}

.hero-slide.is-leaving-to-left {
  animation: hero-slide-out-left 0.75s var(--ease) forwards;
}

.hero-slide.is-leaving-to-right {
  animation: hero-slide-out-right 0.75s var(--ease) forwards;
}

@keyframes hero-slide-in-right {
  from { opacity: 0; clip-path: inset(0 0 0 100%); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

@keyframes hero-slide-in-left {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

@keyframes hero-slide-out-left {
  from { opacity: 1; clip-path: inset(0 0 0 0); }
  to { opacity: 0; clip-path: inset(0 100% 0 0); }
}

@keyframes hero-slide-out-right {
  from { opacity: 1; clip-path: inset(0 0 0 0); }
  to { opacity: 0; clip-path: inset(0 0 0 100%); }
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  translate: 0 -50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.hero-arrow:hover {
  background: var(--motul-red);
}

.hero-arrow:active {
  transform: scale(0.96);
}

.hero-arrow svg {
  width: 22px;
  height: 22px;
}

.hero-arrow--prev { left: 20px; }
.hero-arrow--next { right: 68px; }

.hero-dots {
  position: absolute;
  left: var(--page-pad);
  bottom: 4rem;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-dots button {
  height: 10px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  width: 31px;
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.hero-dots button.is-active {
  width: 61px;
  background: var(--motul-red);
}

.fb-float {
  position: absolute;
  right: 0;
  top: 45%;
  z-index: 7;
  width: 48px;
  height: 64px;
  display: grid;
  place-items: center;
  background: var(--blue);
  transition: filter 0.2s;
}

.fb-float:hover {
  filter: brightness(1.1);
}

.fb-float img {
  width: 28px;
  height: 28px;
}

/* —— Quick links —— */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 458px));
  justify-content: center;
  gap: 48px;
  padding: 76px var(--page-pad) 80px;
  background: #121012;
}

.quick-card {
  position: relative;
  width: 100%;
  aspect-ratio: 458 / 253;
  min-height: 0;
  padding: 2.5rem 2.15rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  overflow: hidden;
  isolation: isolate;
}

.quick-card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
  transition: transform 0.5s var(--ease);
}

.quick-card:nth-child(2) .quick-card-media {
  object-position: 50% 56%;
}

.quick-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.2) 20%, rgba(10, 10, 10, 0.78) 100%);
  z-index: -1;
  pointer-events: none;
}

.quick-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: var(--motul-red);
  z-index: 1;
}

.quick-card:hover .quick-card-media {
  transform: scale(1.05);
}

.quick-icon {
  margin-bottom: 0.85rem;
}

.quick-icon img {
  width: auto;
  height: 29px;
}

.quick-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.quick-sub {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: #f9f9f9;
}

/* —— Split sections —— */
.split {
  display: grid;
  grid-template-columns: 780px 1fr;
  gap: 0 58px;
  align-items: stretch;
  min-height: 720px;
  padding: 70px var(--page-pad);
  background: var(--charcoal);
}

.split-reverse {
  grid-template-columns: 1fr 780px;
}

.split-reverse .split-media {
  order: 2;
}

.split-media {
  min-height: 619px;
  background: var(--split-image) center / cover no-repeat;
}

.split-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 0;
  max-width: 680px;
}

.split-reverse .split-content {
  justify-self: start;
}

.split-content h2 {
  font-size: 52px;
  margin-bottom: 1.35rem;
}

.split-content p {
  color: rgba(255, 255, 255, 0.92);
  max-width: 42rem;
}

.split-emphasis {
  font-weight: 700;
  color: var(--white);
}

.split-content .btn {
  margin-top: 1.25rem;
  align-self: flex-start;
}

/* —— Social —— */
.social {
  background: var(--white);
  color: var(--ink);
  padding: 100px 0 90px;
}

.social h2 {
  font-size: 40px;
  margin-bottom: 2rem;
  color: var(--ink);
}

.social-strip {
  margin: 0;
}

.social-strip img {
  width: 100%;
  height: auto;
}

/* —— Contact CTA —— */
.contact-cta {
  position: relative;
  isolation: isolate;
  min-height: 502px;
  display: grid;
  place-items: center;
  padding: 5rem var(--page-pad);
  text-align: center;
  background: var(--black);
  overflow: hidden;
}

.contact-cta-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  z-index: -2;
}

.contact-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: -1;
  pointer-events: none;
}

.contact-cta-inner {
  position: relative;
  z-index: 1;
}

.contact-cta h2 {
  font-size: 40px;
  margin-bottom: 1.75rem;
}

.contact-cta h2 span {
  display: block;
}

.contact-cta .btn {
  min-width: 203px;
}

/* —— News —— */
.news {
  background: var(--surface);
  color: var(--ink);
  padding: 100px 0 90px;
}

.news h2 {
  font-size: 40px;
  margin-bottom: 2.5rem;
  color: var(--ink);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 37px;
}

.news-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s var(--ease);
}

.news-card a:hover {
  transform: translateY(-3px);
}

.news-card img {
  width: 100%;
  aspect-ratio: 363 / 244;
  object-fit: cover;
}

.news-card h3 {
  font-size: 24px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  padding: 1.15rem 0 0.5rem;
  margin: 0;
  flex: 1;
  line-height: 1.25;
}

.news-more {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--motul-red-hot);
}


/* —— Home responsive —— */
@media (max-width: 1200px) {
  .hero h1,
  .split-content h2 {
    font-size: clamp(2rem, 4vw, 3.25rem);
  }

  .hero-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
  }

  .split,
  .split-reverse {
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
  }

  .quick-links {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .hero {
    min-height: 100svh;
  }

  .hero-content {
    bottom: 6.5rem;
  }

  .hero-arrow--prev { left: 8px; }
  .hero-arrow--next { right: 8px; }

  .fb-float {
    top: auto;
    bottom: 8rem;
  }

  .quick-links {
    grid-template-columns: 1fr;
    padding-block: 2rem;
  }

  .quick-card {
    aspect-ratio: 16 / 9;
  }

  .split,
  .split-reverse {
    grid-template-columns: 1fr;
    padding-block: 0;
    gap: 0;
  }

  .split-reverse .split-media {
    order: 0;
  }

  .split-media {
    min-height: 320px;
  }

  .split-content {
    padding: 2.5rem 0 3rem;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-arrow {
    width: 42px;
    height: 42px;
  }

  .social,
  .news {
    padding: 3.5rem 0;
  }

  .social h2,
  .news h2,
  .contact-cta h2 {
    font-size: 1.75rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-card h3 {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-line,
  .hero-cta,
  .hero-media { animation: none !important; transition: none !important; }
  .hero-slide.is-active .hero-line,
  .hero-slide.is-active .hero-cta {
    opacity: 1;
    transform: none;
  }
}
