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

/* Background */
body {
  font-family: 'Nunito', sans-serif;
  background-color: #e1e1e1;
  color: #fff;
  height: 100vh;
  overflow: auto;
  position: relative;
}

main{
  padding-bottom:10rem;
}


/* Background container */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  background-color: #e1e1e1;
}

/* Gradient overlay (PC only) */
.background-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(
    to right,
    #e1e1e1 0%,
    #e1e1e1 10%,
    rgba(215, 215, 215, 0.12) 25%,
    rgba(215, 215, 215, 0.06) 40%,
    rgba(215, 215, 215, 0.02) 50%,
    rgba(215, 215, 215, 0.06) 60%,
    rgba(215, 215, 215, 0.12) 75%,
    #e1e1e1 90%,
    #e1e1e1 100%
  );
  pointer-events: none;
}

/* Background image */
.bg-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 2s ease;
  z-index: 0;
  background-color: #e1e1e1;
  filter: brightness(1.015);

    -webkit-mask-image: linear-gradient(
    to right,
    rgba(222, 222, 222, 0) 0%,
    black 30%,
    black 70%,
    rgba(222, 222, 222, 0) 100%
  );
  mask-image: linear-gradient(
    to right,
    rgba(222, 222, 222, 0) 0%,
    black 30%,
    black 70%,
    rgba(222, 222, 222, 0) 100%
  );


}

.bg-img.active {
  opacity: 1;
}

/* Content container */
.content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: left;
  z-index: 2;
  padding: 0 1rem;
  color:#333;

}

.about-content {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  padding: 0;
  text-align: left;
  color: #333;
}

@media (min-width: 768px) {
  h3.philosophy-title-ja {
    font-size: 2rem; 
    font-weight: 700;
    margin-bottom: 0.1rem;
  }
}


.term-explained {
  font-size: 0.95em;
  font-style: italic;
  color: #666;
  line-height: 1.5;
}




/* Section buttons */
.section-buttons {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.section-buttons button {
  width: 300px;
  height: 60px;
  display:flex;
  justify-content: center;
  align-items: center;
  padding:0;
  background: transparent;
  border: none;       
  cursor: pointer;
}

.section-buttons button img {
  width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.section-buttons button:hover {
  opacity: 0.7;
  transform: scale(1.03);
  transition: all 0.2s ease;
}


.img-button {
  border: none;
  background: none;
  padding: 0;
  width: 240px;
  height: 60px;  
  cursor: pointer;
}
.img-button img {
  width: 100%;
  height: auto;
  display: block;
}



/* Credit (footer) */
.credit {
  font-size: 0.7em;
  color: #333;
  text-align: center;
  padding: 1rem 0;
  position: static;
  bottom: 1rem;
  width: 100%;
}


.fade-in {
  opacity: 0;
  animation: fadeIn 1.2s ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}


.slide-up {
  transform: translateY(30px);
  opacity: 0;
  animation: slideUp 1.2s ease-out 0.3s forwards;
}

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

.component-title {
  white-space: nowrap;
}


/* ========== Smartphone styles ========== */
@media (max-width: 768px) {
  .bg-img {
    height: 100vh;
    width: auto;
    max-height: 100vh;
    object-fit: cover;
    transform: translate(-50%, -50%);
    -webkit-mask-image: none;
    mask-image: none;
  }


  .content {
  padding: 0 1rem;
  text-align: left;
  z-index: 2;
  color: #333;
}


  .section-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 24px; 
  }

    .section-buttons button {
    width: 80vw;
    height: 48px;
    font-size: 18px; 
  }

  .section-buttons button img {
    width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .background-gradient {
    display: none;
  }

  .social-icons {
    display: none;
  }

  .about-content {
    padding: 0 1rem;
    text-align: left;
  }

  .component-title {
    white-space: normal;
  }

}