/* Motul Polska — home page */

/* —— Hero slider —— */

.hero {
  background: var(--black);
  min-height: 100svh;
  overflow: hidden;
  position: relative;
}

@media (min-width: 768px) {
  .hero {
    min-height: 900px;
  }
}

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

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

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

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  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 {
  pointer-events: none;
  visibility: visible;
  z-index: 2;
}

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

.hero-media {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.06);
  transition: transform 1.1s var(--ease);
  width: 100%;
}

.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 {
  bottom: 104px;
  left: max(var(--page-pad), calc(50% - var(--container) / 2));
  max-width: 720px;
  position: absolute;
  z-index: 3;
}

@media (min-width: 768px) {
  .hero-content {
    bottom: 120px;
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
  overflow: hidden;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

@media (min-width: 768px) {
  .hero-title,
  .hero h1 {
    font-size: 40px;
  }
}

@media (min-width: 1200px) {
  .hero-title,
  .hero h1 {
    font-size: 48px;
  }
}

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

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

.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 {
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  color: var(--white);
  cursor: pointer;
  display: grid;
  height: 42px;
  place-items: center;
  position: absolute;
  top: 50%;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
  translate: 0 -50%;
  width: 42px;
  z-index: 6;
}

@media (min-width: 768px) {
  .hero-arrow {
    height: 52px;
    width: 52px;
  }
}

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

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

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

.hero-arrow--prev {
  left: max(8px, calc(50% - var(--container) / 2));
}

.hero-arrow--next {
  right: max(8px, calc(50% - var(--container) / 2));
}

@media (min-width: 768px) {
  .hero-arrow--prev {
    left: max(var(--page-pad), calc(50% - var(--container) / 2));
  }

  .hero-arrow--next {
    right: max(var(--page-pad), calc(50% - var(--container) / 2));
  }
}

.hero-dots {
  align-items: center;
  bottom: 64px;
  display: flex;
  left: max(var(--page-pad), calc(50% - var(--container) / 2));
  position: absolute;
  z-index: 6;
  gap: 14px;
}

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

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

/* —— Quick links —— */
.quick-links {
  background: var(--ink);
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  justify-content: center;
  padding: 32px var(--page-pad);
}

@media (min-width: 768px) {
  .quick-links {
    grid-template-columns: repeat(2, 1fr);
    padding: 75px var(--page-pad);
  }
}

@media (min-width: 1200px) {
  .quick-links {
    gap: 24px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.quick-card {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  gap: 6px;
  isolation: isolate;
  justify-content: flex-end;
  min-height: 0;
  overflow: hidden;
  padding: 24px 20px 20px;
  position: relative;
  width: 100%;
}

@media (min-width: 768px) {
  .quick-card {
    padding: 40px 35px 32px;
  }
}

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

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

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

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

.quick-icon {
  left: 20px;
  position: absolute;
  top: 24px;
}

@media (min-width: 768px) {
  .quick-icon {
    left: 35px;
    top: 40px;
  }
}

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

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

.quick-sub {
  color: var(--surface);
  font-weight: 500;
  line-height: 1.25;
}

/* —— Split sections (2×2) —— */
.split {
  background: var(--ink);
  padding: 40px 0;
}

@media (min-width: 768px) {
  .split {
    padding: 70px 0;
  }
}

.split-inner {
  display: flex;
  flex-direction: column;
}

.split-row {
  align-items: stretch;
  display: grid;
  grid-template-columns: 1fr;
}

.split-row:nth-child(even) .split-media {
  order: 0;
}

@media (min-width: 768px) {
  .split-row {
    grid-template-columns: 1fr 1fr;
  }

  .split-row:nth-child(even) .split-media {
    order: 2;
  }
}

.split-media {
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .split-media {
    aspect-ratio: auto;
  }
}

.split-media img {
  aspect-ratio: 780 / 620;
  height: auto;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.split-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  line-height: 1.75;
  max-width: none;
  padding: 20px 0 32px;
}

@media (min-width: 768px) {
  .split-content {
    padding: 40px 32px;
  }

  .split-media {
    position: sticky;
    top: calc(var(--header-h, 72px) + 16px);
    align-self: start;
  }
}

@media (min-width: 1200px) {
  .split-content {
    padding: 48px 58px;
  }
}

.split-content h2 {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .split-content h2 {
    font-size: 40px;
    margin-bottom: 32px;
  }
}

@media (min-width: 1200px) {
  .split-content h2 {
    font-size: 48px;
  }
}

.split-content h3 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin: 28px 0 12px;
}

@media (min-width: 768px) {
  .split-content h3 {
    font-size: 24px;
    margin-top: 36px;
  }
}

.split-content p {
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1em;
}

.split-content p:last-of-type {
  margin-bottom: 0;
}

.split-list {
  color: rgba(255, 255, 255, 0.92);
  list-style: disc;
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.split-list--numbered {
  list-style: decimal;
}

.split-list li {
  margin-bottom: 0.55em;
  padding-left: 0.2em;
}

.split-list li:last-child {
  margin-bottom: 0;
}

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

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

.split-actions {
  margin-top: 40px;
}

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

@media (min-width: 768px) {
  .social {
    padding: 100px 0;
  }
}

.social h2 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.25;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .social h2 {
    font-size: 40px;
  }
}

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

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

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

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

.contact-cta h2 {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.5;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .contact-cta h2 {
    font-size: 40px;
  }
}

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

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

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

@media (min-width: 768px) {
  .news {
    padding: 100px 0;
  }
}

.news h2 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.25;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .news h2 {
    font-size: 40px;
    margin-bottom: 50px;
  }
}

.news-grid {
  display: grid;
  gap: 32px 36px;
  grid-template-columns: 1fr;
}

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

@media (min-width: 992px) {
  .news-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.news-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card-media {
  aspect-ratio: 3 / 2;
  background: #ddd;
  overflow: hidden;
}

.news-card-media--contain {
  background: #fff;
}

.news-card-media img {
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s var(--ease);
  width: 100%;
}

.news-card-media--contain img {
  object-fit: contain;
}

.news-card a:hover .news-card-media img {
  transform: scale(1.05);
}

.news-card h3 {
  color: var(--ink);
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.33;
  margin: 12px 0 8px;
  text-transform: none;
}

@media (min-width: 768px) {
  .news-card h3 {
    font-size: 24px;
    margin: 24px 0 12px;
  }
}

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

@media (min-width: 768px) {
  .news-more {
    font-size: 16px;
  }
}

@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;
  }
}
