:root {
  --bg: #0a0a0a;
  --text: #e1e1e1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #030005;
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  overflow: hidden;
  height: 100vh;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Background Layers for Progressive Loading */
.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 1.2s ease-in-out;
}

.low-res {
  background-image: url('./dextop-low.jpg');
  filter: blur(30px); /* Heavy blur for the low-res placeholder */
  transform: scale(1.15);
  opacity: 1;
}

.high-res {
  opacity: 0;
  filter: blur(10px); /* 10% blur from previous step */
  transform: scale(1.08);
}

/* Hero Section */
.hero {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Static Title */
.static-title {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  text-align: center;
  animation: fade-up 1s ease-out forwards;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 2px 10px rgba(0, 0, 0, 0.6);
}

.subtext {
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  margin-bottom: 3rem;
  text-align: center;
  animation: fade-up 1s ease-out 0.2s forwards;
  opacity: 0;
}

.subtext a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  transition: opacity 0.3s ease;
}

.subtext a:hover {
  opacity: 0.8;
}

/* Morph Effect for Digits: Blur + Threshold */
.digit-morph-container {
  position: relative;
  filter: url(#threshold) drop-shadow(0 4px 15px rgba(0, 0, 0, 0.8)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
  height: 4.5rem;
  width: 6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.25rem;
}

.digit {
  position: absolute;
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.digit.visible {
  opacity: 1;
  filter: blur(0px);
  transform: scale(1);
}

.digit.hidden {
  opacity: 0;
  filter: blur(20px);
  transform: scale(1.2);
}

.digit.out {
  animation: blur-out 0.5s forwards;
}

.digit.in {
  animation: blur-in 0.5s forwards;
}

@keyframes blur-out {
  0% { opacity: 1; filter: blur(0px); transform: scale(1); }
  100% { opacity: 0; filter: blur(20px); transform: scale(1.2); }
}

@keyframes blur-in {
  0% { opacity: 0; filter: blur(20px); transform: scale(0.8); }
  100% { opacity: 1; filter: blur(0px); transform: scale(1); }
}

/* Logo */
.logo {
  position: absolute;
  top: 3rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 160px;
  width: 100%;
  z-index: 10;
  animation: fade-up-logo 1s ease-out forwards;
  filter: brightness(0) invert(1);
  pointer-events: none;
  -webkit-user-drag: none;
  user-drag: none;
}

@keyframes fade-up-logo {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Countdown Timer */
.countdown-container {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
  opacity: 0;
  animation: fade-up 1s ease-out 1s forwards;
  z-index: 10;
}

.countdown-item {
  background: transparent;
  border: none;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  box-shadow: none;
  transition: transform 0.4s ease;
}

.countdown-item:hover {
  transform: translateY(-2px);
}

.countdown-item .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
  .low-res {
    background-image: url('./mobile-low.jpg');
  }

  .countdown-container {
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    padding: 0 0.5rem;
  }
  
  .countdown-item {
    min-width: 0;
    padding: 0.5rem;
    flex: 1;
  }
  
  .countdown-item .label {
    font-size: 0.65rem;
  }
  
  .digit-morph-container {
    height: 3rem;
    width: 3.5rem;
  }

  .digit {
    font-size: 2rem;
  }
  
  .logo {
    max-width: 120px;
    top: 2rem;
  }
}