/* ============================================================
   t3 landing — sliced webp background + responsive shell
   Design canvas: 384 x 1280 (background split into 4 tiles)
   Mobile: full-bleed column · Desktop: centered column + red backdrop
   ============================================================ */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  /* deep-red backdrop fills the empty sides on wide screens,
       matching the artwork so the centered column looks intentional.
       On phones the column is full-bleed so a solid colour is enough
       (and avoids iOS `background-attachment: fixed` repaint jank). */
  min-height: 100vh;
  background: #160303;
}

@media only screen and (min-width: 768px) {
  body {
    background-image: radial-gradient(
      120% 60% at 50% 0%,
      #5a1010 0%,
      #2a0606 55%,
      #160303 100%
    );
    background-attachment: fixed;
  }
}

/* ---------- main container: centered, aspect-locked ---------- */
.container {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  /* keep the 384:1280 proportion without JS measuring */
  aspect-ratio: 384 / 1280;
  /* the big background is sliced into 4 small webp tiles and
       composited inside one box -> seamless, progressive loading */
  background-repeat: no-repeat;
  /* each tile is 1px taller than its 25% slot so neighbouring tiles
     overlap and cover the sub-pixel rounding gap (no 1px seam) */
  background-size: 100% calc(25% + 1px);
  background-image:
    url("img/bg_0.webp"), url("img/bg_1.webp"), url("img/bg_2.webp"),
    url("img/bg_3.webp");
  /* percentage positions are measured against (box - tile) so the
       four tiles land exactly at 0 / 25 / 50 / 75 % of the height */
  background-position:
    0 0,
    0 33.3333%,
    0 66.6667%,
    0 100%;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

/* graceful fallback if `aspect-ratio` is unsupported:
   padding-top 1280/384 = 333.33% keeps the same proportion */
@supports not (aspect-ratio: 1 / 1) {
  .container {
    height: 0;
    padding-bottom: 333.3333%;
  }
}

/* ---------- top sticky bonus bar ---------- */
.top-floating {
  /* fixed so it stays visible while the tall column scrolls,
       but constrained to the centered column width */
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  z-index: 99;
  text-align: center;
  background-image: url("img/top_header.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.top-floating img {
  float: right;
  margin: 1.5vh 1vh 1.5vh 0;
}

/* ---------- banner carousel ---------- */
.carousel {
  display: flex;
  overflow: hidden;
  position: absolute;
  left: 0;
  width: 100%;
  top: 66%;
}

.carousel img {
  width: 100%;
  height: auto;
  flex: 0 0 auto;
  z-index: 1;
  margin-left: 10px;
  animation: carousel 15s infinite;
}

/* ---------- carousel keyframes ---------- */
@media only screen and (max-width: 767px) {
  @keyframes carousel {
    0% {
      transform: translateX(0%);
      animation-timing-function: linear;
    }

    33% {
      transform: translateX(-100%);
      animation-timing-function: linear;
    }

    66% {
      transform: translateX(-200%);
      animation-timing-function: linear;
    }

    100% {
      transform: translateX(-280%);
      animation-timing-function: linear;
    }
  }
}

@media only screen and (min-width: 768px) {
  @keyframes carousel {
    0% {
      transform: translateX(0%);
      animation-timing-function: linear;
    }

    33% {
      transform: translateX(-90%);
      animation-timing-function: linear;
    }

    66% {
      transform: translateX(-190%);
      animation-timing-function: linear;
    }

    100% {
      transform: translateX(-280%);
      animation-timing-function: linear;
    }
  }
}

.feedback-btn {
  width: 20%;
  max-width: 200px;
  position: fixed;
  z-index: 99;
  bottom: 1px;
  right: 1px;
  display: none;
}
