:root {
  --bg-0: #1b1410;
  --sun: #ffb35c;
  --brick: #c45c26;
  --brick-light: #e07a4a;
  --brick-dark: #8f3a18;
  --yellow: #f0c14b;
  --ink: #fff7ea;
  --muted: #e8d5c0;
  --card: rgba(27, 20, 16, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg-0);
  overflow: hidden;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 179, 92, 0.55), transparent 28%),
    radial-gradient(circle at 50% 100%, #5c2a18 0%, transparent 42%),
    linear-gradient(180deg, #241810 0%, #4a2618 38%, #8a4a28 72%, #c56a38 100%);
}

.sun {
  position: absolute;
  right: 11%;
  top: 8%;
  width: min(26vw, 200px);
  height: min(26vw, 200px);
  border-radius: 50%;
  background: radial-gradient(circle, #ffe7b0 0%, var(--sun) 42%, rgba(255, 140, 60, 0.15) 70%, transparent 72%);
  animation: glow 6s ease-in-out infinite;
}

.cloud {
  position: absolute;
  background: rgba(255, 232, 210, 0.16);
  border-radius: 40px;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud-a {
  width: 180px;
  height: 42px;
  top: 14%;
  left: -10%;
  animation: drift 42s linear infinite;
}

.cloud-a::before {
  width: 70px;
  height: 70px;
  top: -38px;
  left: 28px;
}

.cloud-a::after {
  width: 90px;
  height: 90px;
  top: -48px;
  left: 72px;
}

.cloud-b {
  width: 140px;
  height: 34px;
  top: 22%;
  left: 30%;
  animation: drift 54s linear infinite reverse;
}

.cloud-b::before {
  width: 54px;
  height: 54px;
  top: -28px;
  left: 18px;
}

.cloud-b::after {
  width: 72px;
  height: 72px;
  top: -40px;
  left: 58px;
}

.cloud-c {
  width: 220px;
  height: 48px;
  top: 7%;
  right: -20%;
  animation: drift 64s linear infinite;
}

.cloud-c::before {
  width: 80px;
  height: 80px;
  top: -42px;
  left: 40px;
}

.cloud-c::after {
  width: 100px;
  height: 100px;
  top: -52px;
  left: 90px;
}

.dust {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background-image:
    radial-gradient(circle, rgba(255, 220, 180, 0.35) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 180, 120, 0.25) 1px, transparent 1.8px);
  background-size: 52px 52px, 78px 78px;
  opacity: 0.35;
  animation: dust 12s linear infinite;
  pointer-events: none;
}

.tape {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  overflow: hidden;
  background: repeating-linear-gradient(-18deg, #111 0 16px, var(--yellow) 16px 32px);
  border-bottom: 3px solid #111;
}

.tape-track {
  display: flex;
  gap: 3rem;
  padding: 0.5rem 0;
  white-space: nowrap;
  width: max-content;
  animation: marquee 22s linear infinite;
}

.tape-track span {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  color: #1b1410;
  background: rgba(255, 247, 234, 0.92);
  padding: 0.15rem 0.7rem;
}

.content {
  position: relative;
  z-index: 4;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 0.4rem;
  text-align: center;
}

.badge {
  display: inline-block;
  align-self: center;
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(240, 193, 75, 0.55);
  border-radius: 999px;
  background: rgba(27, 20, 16, 0.4);
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.4rem, 7.2vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.lead {
  max-width: 38rem;
  margin: 0.85rem auto 1.5rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  line-height: 1.55;
}

.countdown {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.unit {
  min-width: 5.2rem;
  padding: 0.8rem 0.65rem 0.65rem;
  background: var(--card);
  border: 1px solid rgba(255, 247, 234, 0.12);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.unit span {
  display: block;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1.8rem, 4.6vw, 2.8rem);
  letter-spacing: 0.04em;
  line-height: 1;
}

.unit small {
  display: block;
  margin-top: 0.3rem;
  color: var(--yellow);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sep {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2rem;
  line-height: 3.8rem;
  color: var(--yellow);
}

.eta {
  margin-top: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.credit {
  margin-top: 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 247, 234, 0.72);
}

.credit strong {
  color: var(--yellow);
  font-weight: 700;
}

.scene {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  height: min(42vh, 380px);
  overflow: visible;
  pointer-events: none;
}

.crane {
  position: absolute;
  right: 0;
  bottom: 28px;
  height: min(48vh, 430px);
  width: auto;
  max-width: 54vw;
  overflow: visible;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.32));
}

.beacon {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 1.1s steps(2, end) infinite;
}

.trolley {
  animation: trolley 7.5s ease-in-out infinite;
}

.cable {
  transform-box: fill-box;
  transform-origin: top center;
  animation: cable 7.5s ease-in-out infinite;
}

.payload {
  animation: payload 7.5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 0;
}

.props {
  position: absolute;
  left: 2.2vw;
  bottom: 42px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.cone,
.cone::after {
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 42px solid #ef6c00;
  position: relative;
}

.cone::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 16px;
  width: 22px;
  height: 7px;
  background: #fff7ea;
}

.cone::after {
  content: "";
  position: absolute;
  left: -10px;
  top: 28px;
  border-left-width: 10px;
  border-right-width: 10px;
  border-bottom-width: 14px;
  border-bottom-color: #d84315;
}

.cone-b {
  transform: scale(0.82);
  opacity: 0.92;
}

.pile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-left: 8px;
}

.pile i {
  width: 42px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brick-light), var(--brick-dark));
}

.pile i:last-child {
  grid-column: 1 / 3;
  justify-self: center;
}

.wall {
  position: absolute;
  left: 10vw;
  bottom: 36px;
  z-index: 1;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 0;
  width: max-content;
  max-width: 64%;
}

.row {
  display: flex;
  gap: 3px;
  width: max-content;
  padding: 3px;
  background: #c9b496;
  box-shadow: 0 1px 0 #8d7a62;
}

.row:nth-child(even) {
  margin-left: 18px;
}

.row i {
  display: block;
  width: min(6.6vw, 60px);
  height: 22px;
  border-radius: 2px;
  background: linear-gradient(180deg, #f0a36a 0%, #c24b1d 55%, #7a2d12 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -3px 0 rgba(0, 0, 0, 0.25);
  animation: lay-brick 0.7s ease both;
}

.row i:nth-child(3n) {
  background: linear-gradient(180deg, #d9783a 0%, #b14d20 58%, #7a3014 100%);
}

.r1 i:nth-child(1) { animation-delay: 0.05s; }
.r1 i:nth-child(2) { animation-delay: 0.12s; }
.r1 i:nth-child(3) { animation-delay: 0.18s; }
.r1 i:nth-child(4) { animation-delay: 0.24s; }
.r1 i:nth-child(5) { animation-delay: 0.30s; }
.r1 i:nth-child(6) { animation-delay: 0.36s; }
.r1 i:nth-child(7) { animation-delay: 0.42s; }
.r1 i:nth-child(8) { animation-delay: 0.48s; }
.r1 i:nth-child(9) { animation-delay: 0.54s; }
.r1 i:nth-child(10) { animation-delay: 0.60s; }

.r2 i { animation-delay: 0.8s; }
.r3 i { animation-delay: 1.2s; }
.r4 i { animation-delay: 1.6s; }

.r4 i:nth-last-child(-n+3) {
  opacity: 0.35;
}

.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  background: linear-gradient(180deg, #5a3a28 0%, #2a1c16 100%);
  box-shadow: inset 0 8px 16px rgba(0, 0, 0, 0.28);
}

@keyframes glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.88; }
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(120vw); }
}

@keyframes dust {
  from { background-position: 0 0, 24px 18px; }
  to { background-position: 0 -80px, 24px -40px; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes blink {
  50% { opacity: 0.15; }
}

@keyframes trolley {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-110px); }
}

@keyframes cable {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.85); }
}

@keyframes payload {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(78px) rotate(6deg); }
}

@keyframes lay-brick {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .sep {
    display: none;
  }

  .unit {
    min-width: calc(50% - 1rem);
    flex: 1 1 40%;
  }

  .crane {
    right: -8%;
    bottom: 28px;
    max-width: 78vw;
    height: 260px;
  }

  .scene {
    height: 230px;
  }

  .wall {
    left: 3vw;
    max-width: 78%;
  }

  .props {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .tape-track {
    width: 100%;
    justify-content: center;
  }
}
