/* Home page. Sizes derived from the 2025 build at 1440x900 / 390x844 (ScreenUtil 1000 / 375 design widths). */

.footer {
  margin-top: 0;
}

/* ---- Welcome card ---- */
.welcome {
  display: flex;
  width: min(74vw, 1066px);
  height: 352px;
  margin: 28px auto 0;
  border-radius: 29px;
  background: #f5f5f5;
  box-shadow: 0 3px 7px 5px rgba(158, 158, 158, 0.1);
  overflow: hidden;
}

.welcome__img {
  flex: 2 1 0;
  min-width: 0;
  width: 66.6%;
  height: 100%;
  object-fit: cover;
}

.welcome__panel {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 43px;
  background: #fff;
  text-align: center;
}

.welcome__lead {
  margin: 0;
  color: rgba(0, 0, 0, 0.87);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
}

.welcome__lead span {
  display: block;
}

.welcome__days {
  margin: 14px 0 0;
  color: var(--brand);
  font-size: 20px;
  font-weight: 500;
}

.welcome__btn {
  display: inline-block;
  margin-top: 18px;
  padding: 7px 38px;
  border-radius: 10px;
  background: var(--brand);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}

.welcome__btn:hover {
  background: #1e88e5;
}

/* ---- Section headings ---- */
.home__section {
  margin-top: 56px;
}

.home__section--export {
  margin-top: 93px;
}

.home__title {
  margin: 0 0 28px;
  text-align: center;
  font-size: 23px;
  font-weight: 700;
}

main.home {
  padding-bottom: 121px;
}

/* ---- Carousels: plain scroll-snap row; JS (.carousel--enhanced) adds centring + autoplay ---- */
.carousel {
  padding: 0;
}

.carousel__track {
  container-type: inline-size;
  width: min(79.2vw, 1140px); /* three slots of 26.4vw (30% of the 88vw the 2025 carousel used) */
  margin: 0 auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__list {
  display: flex;
  min-width: 100%;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.carousel__slide {
  flex: 0 0 33.3333cqw;
  height: 325px;
  padding: 0 7px;
  scroll-snap-align: center;
}

.carousel--export .carousel__slide {
  height: 278px;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.carousel--enhanced .carousel__list {
  padding: 0 33.3333cqw;
}

.carousel--enhanced .carousel__slide img {
  transform: scale(0.87);
  transition: transform 0.6s ease;
}

.carousel--enhanced .carousel__slide.is-centre img {
  transform: none;
}

/* ---- Splash: drawn from html.splash (set by js/early.js before first paint) ---- */
html.splash::before {
  content: "SYDALEX";
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--brand);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  pointer-events: none;
  animation: splash-out 0.3s ease 1.7s forwards;
}

html.splash body::before,
html.splash body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 101;
  background: var(--brand);
  pointer-events: none;
  animation: 1.5s ease-in-out forwards;
}

html.splash body::before {
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  animation-name: tri-tr;
}

html.splash body::after {
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  animation-name: tri-bl;
}

@keyframes tri-tr {
  to { transform: translate(100%, -100%); visibility: hidden; }
}

@keyframes tri-bl {
  to { transform: translate(-100%, 100%); visibility: hidden; }
}

@keyframes splash-out {
  to { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html.splash::before,
  html.splash body::before,
  html.splash body::after { display: none; }
  .carousel--enhanced .carousel__slide img { transition: none; }
}

/* ---- Tablet: keep the welcome card from clipping ---- */
@media (min-width: 601px) and (max-width: 900px) {
  .welcome {
    width: 92vw;
  }

  .welcome__img {
    flex: 1 1 0;
    width: auto;
  }

  .welcome__panel {
    padding: 20px 16px;
  }

  .welcome__btn {
    white-space: nowrap;
  }
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
  .welcome {
    position: relative;
    display: block;
    width: 100%;
    height: 312px;
    margin-top: 21px;
    border-radius: 0;
    box-shadow: none;
  }

  .welcome__img {
    width: 100%;
    height: 100%;
  }

  .welcome__panel {
    position: absolute;
    right: 20px;
    bottom: 0;
    left: 20px;
    padding: 21px 16px 0;
    background: rgba(255, 255, 255, 0.54);
  }

  .welcome__lead {
    color: #000;
    font-size: 17px;
    font-weight: 400;
  }

  .welcome__lead span {
    display: inline;
  }

  .welcome__days {
    margin-top: 6px;
    color: #000;
    font-size: 19px;
    font-weight: 700;
  }

  .welcome__btn {
    margin: 31px 0 -1px;
    padding: 10px 21px;
    border-radius: 5px;
    background: #448aff;
    box-shadow: none;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.2;
  }

  .home__section {
    margin-top: 52px;
  }

  .home__section--export {
    margin-top: 31px;
  }

  .home__title {
    margin-bottom: 31px;
    font-size: 17px;
  }

  main.home {
    padding-bottom: 59px;
  }

  .carousel__track {
    width: 100%;
  }

  .carousel__slide,
  .carousel--export .carousel__slide {
    flex-basis: 50cqw;
    height: 260px;
    padding: 0 5px;
  }

  .carousel--enhanced .carousel__list {
    padding: 0 25cqw;
  }
}
