/* combined-home-about.css */
/* ========= GLOBAL RESET (kept from landing.css) ========= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Funnel Display", sans-serif;
  color: white;
  text-align: center;
}

/* Keep body styles in style.css so About gets its own background.
   DO NOT set/animate body background here. */

/* ========= HEADER / NAV (from landing.css) ========= */
header {
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 10px 0;
}

.logo-landing {
  width: 50%;
  animation: bounceIn 0.7s ease;
  z-index: 3;
  margin: 20px;
}

@keyframes bounceIn {
  0% {
    transform: translateY(-400%);
    opacity: 1;
  }
  60% {
    transform: translateY(10%);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
  }
}

/* ========= LANDING ONLY (scoped) ========= */

/* Wrap the entire landing (bg-imgs + subscribers + videos) */
.landing-section {
  position: relative;
  overflow: hidden;               /* no overflow outside the section */
  width: 100%;
  height: 100vh;
  padding: 30px 0 40px;
  isolation: isolate;
}

/* Animated space background is applied ONLY to this section */
.landing-section::before {
  content: "";
  position: absolute;
  inset: -15vh 0 -15vh 0;         /* overscan avoids seams on mobile */
  background: url("../img/background/space.png") no-repeat center bottom;
  background-size: cover;
  animation: spaceScroll 100s linear infinite alternate;
  z-index: -1;
  will-change: background-position;
  transform: translateZ(0);
}

@keyframes spaceScroll {
  0% { background-position: center bottom; }
  100% { background-position: center top; }
}

/* floating ghasts */
.bg-imgs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 80%;
  height: 100px;
  margin: 0 auto;
  padding: 0 20px;
  position: absolute;
  top: 10%;
  left: 0;
  right: 0;
  pointer-events: none;
}

.bg-img {
  width: 100px;
  height: auto;
  animation: bobbing 4s ease-in-out infinite;
}

.idle { width: 180px; }

@keyframes bobbing {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-20px); }
  100% { transform: translateY(0); }
}

/* subscriber goal */
.subscriber-goal-section {
  text-align: center;
  font-family: Arial, sans-serif;
  position: relative;
  width: 80%;
  margin: 0 auto;
  padding: 20px 0;
}

.sub-text-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  padding: 30px 0 10px 0;
}

.sub-text {
  background-color: transparent;
  padding: 0;
  margin: 0;
  width: 0%;
}
.sub-text-box h2 { margin: 0; }

.goal-bar-container {
  position: relative;
  width: 100%;
  background-color: #ffffff;
  border-radius: 25px;
  height: 45px;
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  height: 100%;
  width: 0%;
  background-color: #4caf50;
  border-radius: 25px;
  text-align: center;
  align-items: center;
  color: white;
  line-height: 30px;
  transition: width 3s ease-in-out;
}

.progress-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 20px;
  font-weight: bold;
  pointer-events: none;
  z-index: 2;
}

.goal-text {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #333;
  font-size: 20px;
  font-weight: bold;
  pointer-events: none;
}

#current-subs {
  display: flex;
  font-weight: bold;
  justify-content: center;
  overflow: hidden;
  gap: 3px;
}

.digit-container {
  display: inline-block;
  overflow: hidden;
  width: 20px;
  height: 28px;
  position: relative;
}

.digit-scroll {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  height: auto;
  animation: rollUp ease-in-out forwards;
}

@keyframes rollUp {
  0%   { transform: translateY(100%); opacity: 1; }
  100% { transform: translateY(0);   opacity: 1; }
}

.yt-button {
  display: flex;
  align-items: center;
  height: 40px;
  width: auto;
}

/* landing video grid */
.video-section { width: 100%; 
      background: transparent;
}
.video-grid {
  width: 80%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin: 0 auto;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: black;
  border-radius: 8px;
  overflow: hidden;
}

/* scope iframes to avoid clashing with About's iframe */
.video-section iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: transparent;
}

/* Loading Placeholder */
.loading-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

/* Hide the loading box once the iframe loads */
.video-wrapper iframe.loaded ~ .loading-box {
  opacity: 0;
}

/* ========= ABOUT ONLY (exact from about.css) ========= */

.about-container {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  margin: 0 auto;
}

.about-text {
  width: 50%;
  margin: 0 auto;
  display: block;
  padding: 0 10px;
}

.about-text p {
  width: 100%;
  text-align: justify;
}

.about-img {
  margin: 0 auto;
  height: 250px;
  pointer-events: none;
  padding: 0;
}

.achievements {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.ach-list,
.goals {
  margin: 10px auto;
  padding: 10px;
  border-radius: 8px;
}

.multiverse-content {
  display: flex;
  justify-content: space-evenly;
  width: 90%;
  margin: 0 auto;
}

.multiverse-text { width: 60%; }

.multiverse-text h2 { width: 90%; }

.multiverse-text p {
  margin: 0 auto;
  display: block;
  width: 90%;
  text-align: justify;
}

#latest-video {
    display: none;
}

.video-container { text-align: center; }

.video-container-info {
  display: block;
  margin: 0 auto;
}

.video-info p {
  margin: 0 auto;
  text-align: center;
}

#latest-video { text-align: center; }

.video-info {
  margin: 0 auto;
  width: 60%;
}

#video-title { margin-bottom: 10px; }

/* generic iframe (About section needs this),
   landing iframes were scoped above */
iframe {
  margin: 10px;
  width: 100%;
  max-width: 560px;
  height: 315px;
  border: none;
  border-radius: 8px;
  margin: 0 auto;
}

.content-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.content-box {
  display: block;
  position: relative;
  flex: 0 0 calc(33% - 15px);
}

.content-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  margin: 0 auto;
}

.content-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.content-box:hover .content-img img {
  transform: scale(1.05);
}

.content-img span {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 5px 10px;
  width: 100%;
  font-weight: bold;
  text-align: center;
  z-index: 2;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 768px) {
  /* increase overscan to prevent gaps while animating space bg */
  .landing-section::before { inset: -25vh 0 -25vh 0; }

  .bg-imgs { display: none; }

  .logo-landing {
    width: 90%;
    margin: 10px 0;
  }

  .subscriber-goal-section { width: 90%; }

#latest-videos {
    display: none;
}
#latest-video {
    display: block;
}

  .video-grid { grid-template-columns: 1fr; }
  .video-wrapper { height: auto; }

  /* About mobile (from about.css) */
  .about-container { width: 100%; }

  .about-text {
    padding-top: 20px;
    width: 90%;
  }

  .achievements {
    display: block;
    margin: 0 auto;
    text-align: center;
  }

  .ach-list, .goals { margin: 0 auto; }

  ul {
    list-style-position: inside;
    text-align: center;
    padding-left: 0;
    margin: 0 auto;
    display: inline-block;
  }

  li {
    list-style-position: inside;
    text-align: left;
    margin: 0 auto;
    display: inline-block;
  }

  .multiverse-content {
    display: block;
    margin: 0 auto;
  }

  .multiverse-text {
    width: 100%;
    margin: 0 auto;
  }

  .multiverse-content h2 { text-align: center; }

  .multiverse-text p { padding: 0; }

  .about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .content-container {
    display: block;
    margin: 0 auto;
  }

  .content-box {
    width: 100%;
    margin-bottom: 20px;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .landing-section::before { animation: none; }
  .bg-img { animation: none; }
  .progress-bar { transition: none; }
}
