/* ==========================================================================
   トップページ
   ※ 元: Next.js の CSS Modules（SCSS）を素のCSSに変換
   ========================================================================== */

/* --------------------------------------------------------------------------
   .hero-section（元: src/components/home/HeroSection/HeroSection.module.scss）
   -------------------------------------------------------------------------- */

/* Mobile vw calculations based on 480px design width */
/* Formula: value / 480 * 100 = vw */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: var(--header-height);
  overflow-x: clip;
}

@media (max-width: 640px) {
  .hero-section {
    display: grid;
    padding-top: 15vw; /* ~72px on 480px */
  }
}

.hero-section__container {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--padding-x-desktop);
  min-height: calc(100vh - var(--header-height));
}

@media (max-width: 1024px) {
  .hero-section__container {
    padding: 0 var(--padding-x-tablet);
  }
}

@media (max-width: 768px) {
  .hero-section__container {
    padding: 0 var(--padding-x-mobile);
  }
}

@media (max-width: 640px) {
  .hero-section__container {
    padding: 0 4.79vw; /* 23px / 480px */
    min-height: auto;
    margin-bottom: 8vw;
  }
}

.hero-section__copy-area {
  position: relative;
  z-index: 2;
  padding-top: 80px;
}

@media (max-width: 768px) {
  .hero-section__copy-area {
    padding-top: 40px;
  }
}

@media (max-width: 640px) {
  .hero-section__copy-area {
    padding-top: 10.42vw; /* 50px / 480px */
  }
}

.hero-section__main-copy {
  font-family: var(--font-body);
  font-weight: var(--font-weight-light);
  font-size: var(--font-size-hero);
  line-height: var(--line-height-hero);
  color: var(--color-text-primary);
}

.hero-section__main-copy span {
  display: block;
}

@media (max-width: 1024px) {
  .hero-section__main-copy {
    font-size: 56px;
  }
}

@media (max-width: 768px) {
  .hero-section__main-copy {
    font-size: 40px;
  }
}

@media (max-width: 640px) {
  .hero-section__main-copy {
    font-size: 9.375vw; /* 45px / 480px */
    line-height: 1.4;
  }
}

.hero-section__sub-copy {
  margin-top: 24px;
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-subtitle);
  color: var(--color-text-primary);
}

@media (max-width: 768px) {
  .hero-section__sub-copy {
    font-size: 20px;
    margin-top: 16px;
  }
}

@media (max-width: 640px) {
  .hero-section__sub-copy {
    font-size: 3.75vw; /* 18px / 480px */
    line-height: 1.5;
    margin-top: 4.17vw; /* 20px / 480px */
  }
}

.hero-section__main-image-wrapper {
  position: absolute;
  top: 0;
  left: 50vw;
  width: 50vw;
  height: 700px;
  z-index: 1;
}

@media (max-width: 1024px) {
  .hero-section__main-image-wrapper {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .hero-section__main-image-wrapper {
    position: relative;
    left: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    margin-top: 40px;
    max-width: 500px;
    margin-left: auto;
  }
}

@media (max-width: 640px) {
  .hero-section__main-image-wrapper {
    position: relative;
    top: 0;
    left: 0;
    margin-top: 0;
    order: 1;
  }
}

.hero-section__main-image-mask {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-section__main-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: hero-section-video-fade-in 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-section__sub-image-wrapper {
  position: absolute;
  top: 500px;
  left: 0;
  width: 50vw;
  height: 700px;
  z-index: 0;
}

@media (max-width: 1024px) {
  .hero-section__sub-image-wrapper {
    height: 500px;
  }
}

@media (max-width: 768px) {
  .hero-section__sub-image-wrapper {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-section__sub-image-wrapper {
    position: relative;
    display: block;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    margin-top: 0;
    margin-left: 0;
    order: 2;
  }
}

.hero-section__sub-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: hero-section-video-fade-in 3s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

/* Video opacity fade-in */
@keyframes hero-section-video-fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* Mask fade-in: 上から下へ少し斜めにふわっと表示 */
/* グラデーション境界を広くぼかしてソフトなリビール */
@keyframes hero-section-mask-reveal {
  0% {
    mask-position: 0 0;
    -webkit-mask-position: 0 0;
    transform: scale(1.05);
  }

  100% {
    mask-position: 0 100%;
    -webkit-mask-position: 0 100%;
    transform: scale(1);
  }
}

@keyframes hero-section-mask-reveal-sub {
  0% {
    mask-position: 0 0;
    -webkit-mask-position: 0 0;
    transform: scale(1.05);
  }

  100% {
    mask-position: 0 100%;
    -webkit-mask-position: 0 100%;
    transform: scale(1);
  }
}

.hero-section__video-mask-sub,
.hero-section__video-mask {
  /* 少し斜め(190deg)、上→下方向にリビール + scale 1.05→1 */
  mask-image: linear-gradient(190deg, transparent calc(50% - 25px), white calc(50% + 25px));
  mask-size: 100% 230%;
  mask-position: 0 0;
  mask-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(190deg, transparent calc(50% - 25px), white calc(50% + 25px));
  -webkit-mask-size: 100% 230%;
  -webkit-mask-position: 0 0;
  -webkit-mask-repeat: no-repeat;
  transform: scale(1.05);
}

.hero-section__video-mask {
  animation: hero-section-mask-reveal 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-section__video-mask-sub {
  animation: hero-section-mask-reveal-sub 3s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

/* --------------------------------------------------------------------------
   .philosophy-section（元: src/components/home/PhilosophySection/PhilosophySection.module.scss）
   -------------------------------------------------------------------------- */

/* Mobile vw calculations based on 480px design width */
/* Formula: value / 480 * 100 = vw */
.philosophy-section {
  position: relative;
  padding: 200px 0 150px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .philosophy-section {
    padding: 100px 0 80px;
  }
}

@media (max-width: 640px) {
  .philosophy-section {
    padding: 8vw 0 76.67vw;
  }
}

.philosophy-section__container {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--padding-x-desktop);
}

@media (max-width: 1024px) {
  .philosophy-section__container {
    padding: 0 var(--padding-x-tablet);
  }
}

@media (max-width: 768px) {
  .philosophy-section__container {
    padding: 0 var(--padding-x-mobile);
  }
}

@media (max-width: 640px) {
  .philosophy-section__container {
    padding: 0 4.79vw; /* 23px / 480px */
  }
}

.philosophy-section__bg-text {
  position: absolute;
  left: 88px;
  bottom: -200px;
  font-family: var(--font-accent-en);
  font-size: 182px;
  color: var(--color-white);
  filter: blur(4.7px);
  line-height: 0.9;
  z-index: 0;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  z-index: 2;
}

.philosophy-section__bg-text span {
  display: block;
}

@media (max-width: 1024px) {
  .philosophy-section__bg-text {
    font-size: 120px;
    left: 40px;
    bottom: -100px;
  }
}

@media (max-width: 768px) {
  .philosophy-section__bg-text {
    font-size: 60px;
    left: 20px;
    bottom: -50px;
  }
}

@media (max-width: 640px) {
  .philosophy-section__bg-text {
    left: 3vw; /* centered */
    bottom: auto;
    top: 178vw;
    font-size: 12vw; /* 57px / 480px */
    filter: blur(1.5px);
    line-height: 1;
  }
}

.philosophy-section__bg-block {
  position: absolute;
  left: 11px;
  bottom: -200px;
  width: 1000px;
  height: 600px;
  background: var(--gradient-bg-main);
  z-index: 0;
}

@media (max-width: 1024px) {
  .philosophy-section__bg-block {
    width: 100%;
    left: 0;
    height: 400px;
  }
}

@media (max-width: 640px) {
  .philosophy-section__bg-block {
    left: 0;
    transform: none;
    bottom: auto;
    top: 146vw;
    width: 80%;
    height: 100vw;
  }
}

.philosophy-section__content {
  position: relative;
  top: -210px;
  z-index: 1;
  margin-left: auto;
  max-width: 600px;
  padding-left: 50px;
  z-index: 3;
}

@media (max-width: 768px) {
  .philosophy-section__content {
    max-width: 100%;
    margin-left: 0;
    top: 0;
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .philosophy-section__content {
    max-width: 100%;
    margin-left: 0;
    top: 0;
    padding-left: 0;
  }
}

.philosophy-section__heading {
  font-family: var(--font-body);
  font-weight: var(--font-weight-light);
  font-size: var(--font-size-section-md);
  line-height: var(--line-height-section);
  color: var(--color-text-primary);
  margin-bottom: 48px;
}

.philosophy-section__heading span {
  display: block;
}

@media (max-width: 768px) {
  .philosophy-section__heading {
    font-size: 36px;
    margin-bottom: 32px;
  }
}

@media (max-width: 640px) {
  .philosophy-section__heading {
    font-size: 8.33vw; /* 40px / 480px */
    line-height: 1.5;
    margin-bottom: 6.67vw; /* 32px / 480px */
  }
}

.philosophy-section__body {
  margin-bottom: 48px;
}

.philosophy-section__body p {
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-text-primary);
  margin-bottom: 24px;
}

.philosophy-section__body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .philosophy-section__body p {
    font-size: 16px;
  }

  .philosophy-section__body p br {
    display: none;
  }
}

@media (max-width: 640px) {
  .philosophy-section__body {
    margin-bottom: 10vw; /* 48px / 480px */
  }

  .philosophy-section__body p {
    font-size: 3.75vw; /* 18px / 480px */
    line-height: 1.9;
    margin-bottom: 5vw; /* 24px / 480px */
  }

  .philosophy-section__body p br {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   .modal-video（元: src/components/common/ModalVideo/ModalVideo.module.scss）
   -------------------------------------------------------------------------- */

.modal-video__thumbnail {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border: none;
  padding: 0;
  background: none;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.modal-video__thumbnail:hover {
  transform: scale(1.02);
}

.modal-video__thumbnail:hover .modal-video__play-button {
  transform: translate(-50%, -50%) scale(1.1);
}

.modal-video__thumbnail:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.modal-video__play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.modal-video__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-video__modal {
  position: relative;
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-video__close-button {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: opacity 0.2s ease;
  z-index: 10000;
  display: none;
}

.modal-video__close-button:hover {
  opacity: 0.7;
}

.modal-video__close-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.modal-video__video {
  width: 100%;
  max-height: 80vh;
  background: #000;
  border-radius: 4px;
}

.modal-video__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

.modal-video__youtube {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* --------------------------------------------------------------------------
   .full-width-video（元: src/components/home/FullWidthVideoSection/FullWidthVideoSection.module.scss）
   -------------------------------------------------------------------------- */

.full-width-video {
  --expand: 0;
  width: 100%;
}

.full-width-video__video-wrapper {
  width: 100%;
  height: 500px;
}

@media (max-width: 640px) {
  .full-width-video__video-wrapper {
    height: 60vw;
  }
}

.full-width-video__video-wrapper {
  /* clip-path をボタン(サムネイル)にのみ適用 */
  /* モーダル(position: fixed)がクリップされるのを防ぐ */
}

.full-width-video__video-wrapper button {
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: inset(0 calc(25% * (1 - var(--expand))) round calc(30px * (1 - var(--expand))));
}

.full-width-video__video-wrapper button img {
  object-fit: cover;
  transition: transform 0.3s ease;
}

.full-width-video__video-wrapper button:hover img {
  transform: scale(1.05);
}
